PluginProbe
Button Block – Stylish buttons that get more clicks / 1.2.5
Button Block – Stylish buttons that get more clicks v1.2.5
1.2.6 1.2.5 trunk 1.0.0 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.0.9 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.1.9 1.2.0 1.2.1 All 28 releases
button-block / includes / admin / SubMenu.php

SubMenu.php in Button Block – Stylish buttons that get more clicks 1.2.5, at includes/admin/SubMenu.php

39 lines 799 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace BTNB\Admin;
3
4 if ( !defined( 'ABSPATH' ) ) { exit; }
5
6 /**
7 * SubMenu class
8 * Adds a fallback submenu under Tools when the CPT admin menu is hidden.
9 *
10 * @package BTN\Admin
11 */
12 class SubMenu {
13 /**
14 * Constructor.
15 * Registers the admin_menu hook.
16 */
17 public function __construct() {
18 add_action( 'admin_menu', [ $this, 'adminMenu' ] );
19 }
20
21 /**
22 * Adds the 'Button Block' submenu under Tools when the CPT menu is hidden.
23 *
24 * @return void
25 */
26 function adminMenu(){
27 if( 'true' === get_option( 'button_block_option', '' ) ){
28 add_submenu_page(
29 'tools.php',
30 __('Button Block - bPlugins', 'button-block'),
31 __('Button Block', 'button-block'),
32 'manage_options',
33 'button-block',
34 [ \BTNBPlugin::class, 'renderDashboard' ]
35 );
36 }
37 }
38 }
39 new SubMenu();