plugin_screen_hook_suffix = add_options_page( __( 'Admin Quick Panel', 'admin-quick-panel' ), __( 'Admin Quick Panel', 'admin-quick-panel' ), 'manage_options', 'admin-quick-panel', array( $this, 'display_plugin_admin_page' ) ); /* $this->plugin_screen_hook_suffix = add_menu_page( __('Featured Admin Panel', 'aqpanel-featured-posts'), __('Featured Admin Panel', 'admin-quick-panel'), 'manage_options', 'aqpanel-featured-posts', array($this, 'display_plugin_admin_page') ); */ } /** * Render the settings page for this plugin. */ public function display_plugin_admin_page() { // Check that the user is allowed to update options if ( !current_user_can( 'manage_options' ) ) { wp_die( 'You do not have sufficient permissions to access this page.' ); } ?>

Want more features?

Learn More ' ; } /** * Add empty array if doesn't exist. */ public function aqpanel_featured_posts_plugin_options_validate( $input ) { if ( !isset( $input['aqpanel_posttypes'] ) ) { $input['aqpanel_posttypes'] = array(); } if ( !isset( $input['aqpanel_additional'] ) ) { $input['aqpanel_additional'] = array(); } return $input; } /** * Options description. */ public function aqpanel_featured_posts_plugin_section_text_callback( $description ) { echo "Choose the types of posts that can be attached to the side panel." ; } /** * Post Types. */ public function aqpanel_additional_callback() { global $aqpanel_options ; ?>

true, '_builtin' => false, ); $post_types_custom = get_post_types( $args, 'objects' ); if ( !empty($post_types_custom) ) { foreach ( $post_types_custom as $key => $ptype ) { $name = $ptype->labels->{'name'}; ?>

'Orders', ); if ( !empty($post_types_extra) && class_exists( 'woocommerce' ) ) { foreach ( $post_types_extra as $key => $ptype ) { ?>