-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock-finder.php
33 lines (27 loc) · 1006 Bytes
/
block-finder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Plugin Name: Block Finder
* Description: This plugin provides a dashboard to search for specific blocks
* Requires at least: 6.3
* Requires PHP: 7.0
* Version: 1.0.5
* Author: Troy Chaplin
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: block-finder
*
* @package block-finder
*/
// Exit if accessed directly
if (! defined('ABSPATH')) exit;
// Define plugin version
define('BLOCK_FINDER_VERSION', '1.0.5');
// Setup autoloading
require_once __DIR__ . '/vendor/autoload.php';
// Include dependencies
use BlockFinder\Functions;
// Enqueue block editor assets
$loadAssets = new Functions(__FILE__, BLOCK_FINDER_VERSION);
add_action('admin_enqueue_scripts', [$loadAssets, 'tc_block_finder_admin_assets']);
add_action('wp_dashboard_setup', [$loadAssets, 'tc_block_finder_dashboard']);
add_action('wp_ajax_find_blocks', [$loadAssets, 'tc_block_finder_query']);