setup_hooks(); } /** * To setup action/filter. * * @version 4.0.0 * * @return void */ protected function setup_hooks() { add_action( 'admin_head', array( $this, 'render_menu_editor_page' ) ); } /** * Function to load the menu editor page when click on particular menu * customize option from menu list. * * @version 4.0.0 * * @return void */ public function render_menu_editor_page() { $editor = filter_input( INPUT_GET, 'editor', FILTER_SANITIZE_URL ); if ( ! empty( $editor ) && 'rmp_menu' === get_post_type() && current_user_can( 'administrator' ) ) { set_current_screen(); include RMP_PLUGIN_PATH_V4 . '/templates/rmp-editor.php'; exit; } } /** * Add hooter section in editor. * * @version 4.0.0 * * @param HTML. */ public function header_section( $menu_name ) { ?>