PluginProbe
Bookmark Card / 2.1.1
Bookmark Card v2.1.1
trunk 1.0.0 2.0.0 2.1.0 2.1.1 2.2.0 2.2.1 2.3.0
bookmark-card / bookmark-card.php

bookmark-card.php in Bookmark Card 2.1.1, at bookmark-card.php

38 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Bookmark Card
4 * Plugin URI: https://github.com/Mamaduka/bookmark-card
5 * Description: Turn any URL into a beautiful preview card.
6 * Version: 2.1.1
7 * Requires at least: 5.8
8 * Requires PHP: 5.6
9 * Author: George Mamadashvili
10 * Author URI: https://mamaduka.com/
11 * License: GPL-2.0-or-later
12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
13 *
14 * @package Mamaduka\BookmarkCard
15 */
16
17 namespace Mamaduka\BookmarkCard;
18
19 // Used for campatibility with WP 5.8.
20 if ( ! class_exists( 'WP_REST_URL_Details_Controller' ) ) {
21 require_once __DIR__ . '/compat/class-wp-rest-url-details-controller.php';
22
23 add_action( 'rest_api_init', function() {
24 $url_details_controller = new \WP_REST_URL_Details_Controller();
25 $url_details_controller->register_routes();
26 } );
27 }
28
29 /**
30 * Registers the block and required assets.
31 *
32 * @return void
33 */
34 function register_block() {
35 register_block_type( __DIR__ );
36 }
37 add_action( 'init', __NAMESPACE__ . '\\register_block' );
38