-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdlx-set-top-6.php
35 lines (30 loc) · 1011 Bytes
/
dlx-set-top-6.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
34
35
<?php
/**
* Plugin Name: DLX Set Top 6
* Plugin URI: https://github.com/DLXPlugins/dlx-set-top-6
* Description: Set the top 6 items when you insert a block using the block editor.
* Version: 1.0.0
* Requires at least: 5.9
* Requires PHP: 7.2
* Author: DLX Plugins
* Author URI: https://dlxplugins.com
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: dlx-set-top-6
* Domain Path: /languages
*
* @package DLXTop6
*/
namespace DLXPlugins\DLXTop6;
add_action( 'enqueue_block_assets', __NAMESPACE__ . '\enqueue_block_editor_assets' );
function enqueue_block_editor_assets() {
// Load index asset file.
$asset_file = include plugin_dir_path( __FILE__ ) . 'build/index.asset.php';
wp_enqueue_script(
'dlx-set-top-6',
plugins_url( 'build/index.js', __FILE__ ),
array( 'wp-data', 'wp-blocks', 'wp-editor', 'wp-plugins' ),
$asset_file['version'],
true
);
}