-
Notifications
You must be signed in to change notification settings - Fork 0
/
menus-for-block-theme.php
45 lines (38 loc) · 1.24 KB
/
menus-for-block-theme.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
36
37
38
39
40
41
42
43
44
45
<?php
/*
Plugin Name: Menus for Block Theme
Plugin URI: https://la-webeuse.com/menus-for-block-theme/
Description: Enable shortcuts to manage block-based themes: re-enable classic menus and customizer tabs, add shortcuts to reusable blocks, templates, template parts and menu list. Disable file editor for plugins and themes.
Version: 1.0.0
Text Domain: menus-for-block-theme
Domain Path: /languages/
Author: La Webeuse
Author URI: https://la-webeuse.com/
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
// Load plugin text domain
load_plugin_textdomain(
'menus-for-block-theme',
false,
basename( dirname( __FILE__ ) ) . '/languages'
);
// Load require PHP files
require_once plugin_dir_path( __FILE__ ) . 'includes/admin.php';
require_once plugin_dir_path( __FILE__ ) . 'includes/main.php';
/**
* Add all necessary actions and filters of the plugin
*
* @return void
*/
function mfbt_start() {
add_action( 'admin_menu', 'mfbt_create_menu' );
add_action( 'admin_init', 'mfbt_register_settings' );
add_action( 'init', 'mfbt_main' );
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), 'mfbt_settings_link' );
}
mfbt_start();