PluginProbe
Icon Separator / 1.2.2
Icon Separator v1.2.2
trunk 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5
icon-separator / icon-separator.php

icon-separator.php in Icon Separator 1.2.2, at icon-separator.php

38 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Icon Separator
4 * Description: A simple horizontal separator with icon.
5 * Requires at least: 6.3
6 * Requires PHP: 7.0
7 * Version: 1.2.2
8 * Author: Phi Phan
9 * Author URI: https://boldblocks.net
10 *
11 * @package IconSeparator
12 * @copyright Copyright(c) 2022, Phi Phan
13 */
14
15 namespace IconSeparator;
16
17 // Exit if accessed directly.
18 defined( 'ABSPATH' ) || exit;
19
20 // Define constants.
21 define( 'ICON_SEPARATOR_ROOT', __FILE__ );
22 define( 'ICON_SEPARATOR_PATH', trailingslashit( plugin_dir_path( ICON_SEPARATOR_ROOT ) ) );
23
24 /**
25 * Registers the block using the metadata loaded from the `block.json` file.
26 * Behind the scenes, it registers also all assets so they can be enqueued
27 * through the block editor in the corresponding context.
28 *
29 * @see https://developer.wordpress.org/reference/functions/register_block_type/
30 */
31 function icon_separator_block_init() {
32 register_block_type( __DIR__ . '/build' );
33 }
34 add_action( 'init', __NAMESPACE__ . '\\icon_separator_block_init' );
35
36 // Load icons library.
37 require_once __DIR__ . '/includes/icon-library.php';
38