bootstrap(); } /** * Register menus (all under Settings). * * @since 5.1.0 * @return void */ public function register_menus() { add_submenu_page( 'options-general.php', __( 'Copy to Clipboard', 'ctc' ), __( 'Copy to Clipboard', 'ctc' ), 'manage_options', 'ctc', [ $this, 'render_dashboard' ] ); add_submenu_page( 'options-general.php', __( 'Global Injector', 'ctc' ), '↳ ' . __( 'Global Injector', 'ctc' ), 'manage_options', 'ctc-rules', [ $this, 'render_rules_list' ] ); add_submenu_page( 'options-general.php', __( 'Add New Rule', 'ctc' ), '↳ ' . __( 'Add new', 'ctc' ), 'manage_options', 'ctc-global-injector', [ Global_Injector::get(), 'render' ] ); /* add_submenu_page( 'options-general.php', __( 'Copy to Clipboard Settings', 'ctc' ), '↳ ' . __( 'Settings', 'ctc' ), 'manage_options', 'ctc-settings', [ $this, 'render_settings_placeholder' ] ); */ /* add_submenu_page( 'options-general.php', __( 'Help & Docs', 'ctc' ), '↳ ' . __( 'Help & Docs', 'ctc' ), 'manage_options', 'ctc-help', [ $this, 'render_help_placeholder' ] ); */ } /** * Render dashboard (React app mounts here). * * @since 5.1.0 * @return void */ public function render_dashboard() { ?>
bootstrap(); ?>