$post_type_setting ) { $post_types[ $post_type_name ]['show_ui'] = true; $post_types[ $post_type_name ]['delete_with_user'] = true; } return $post_types; } public static function mywp_taxonomy_types( $taxonomy_types ) { foreach( $taxonomy_types as $taxonomy_name => $taxonomy_setting ) { $taxonomy_types[ $taxonomy_name ]['show_ui'] = true; } return $taxonomy_types; } public static function mywp_debug_renders( $debug_renders ) { $debug_renders['shortcode'] = array( 'debug_type' => 'mywp', 'title' => __( 'My WP Shortcode' , 'mywp' ), ); $debug_renders['post_type'] = array( 'debug_type' => 'mywp', 'title' => __( 'My WP Post_Type' , 'mywp' ), ); $debug_renders['taxonomy'] = array( 'debug_type' => 'mywp', 'title' => __( 'My WP Taxonomy' , 'mywp' ), ); $debug_renders['current_setting'] = array( 'debug_type' => 'mywp', 'title' => __( 'Current Setting' , 'mywp' ), ); $debug_renders['settings'] = array( 'debug_type' => 'mywp', 'title' => __( 'Settings' , 'mywp' ), ); $debug_renders['controller'] = array( 'debug_type' => 'mywp', 'title' => __( 'Controller' , 'mywp' ), ); $debug_renders['thirdparty'] = array( 'debug_type' => 'dev', 'title' => __( 'Thirdparty' , 'mywp' ), ); return $debug_renders; } public static function mywp_debug_render_shortcode() { echo ''; } public static function mywp_debug_render_post_type() { echo ''; } public static function mywp_debug_render_taxonomy() { echo ''; } public static function mywp_debug_render_controller() { echo ''; } public static function mywp_debug_render_current_setting() { $current_setting_menu = MywpSettingMenu::get_current_menu(); if( ! empty( $current_setting_menu ) ) { printf( '

Current Setting Menu =

' , print_r( $current_setting_menu , true ) ); } $current_setting_screen = MywpSettingScreen::get_current_screen(); if( ! empty( $current_setting_screen ) ) { printf( '

Current Setting Screen =

' , print_r( $current_setting_screen , true ) ); } $current_setting_post_type = MywpSettingPostType::get_current_post_type(); if( ! empty( $current_setting_post_type ) ) { printf( '

Current Setting Post Type =

' , print_r( $current_setting_post_type , true ) ); } $current_setting_taxonomy = MywpSettingTaxonomy::get_current_taxonomy(); if( ! empty( $current_setting_taxonomy ) ) { printf( '

Current Setting Taxonomy =

' , print_r( $current_setting_taxonomy , true ) ); } if( ! empty( MywpSettingMenu::get_current_menu_id() ) ) { $current_setting_screens = MywpSettingScreen::get_setting_screens_by_menu_id( MywpSettingMenu::get_current_menu_id() ); if( ! empty( $current_setting_screens ) ) { printf( '

Current Setting Screens =

' , print_r( $current_setting_screens , true ) ); } } } public static function mywp_debug_render_settings() { $setting_menus = MywpSettingMenu::get_setting_menus(); echo 'Setting Menus'; if( ! empty( $setting_menus ) ) { printf( '' , print_r( $setting_menus , true ) ); } $menu_hook_names = MywpSettingMenu::get_menu_hook_names(); echo 'Menu Hook Names'; if( ! empty( $menu_hook_names ) ) { printf( '' , print_r( $menu_hook_names , true ) ); } $setting_screens = MywpSettingScreen::get_setting_screens(); echo 'Setting Screens'; if( ! empty( $setting_screens ) ) { printf( '' , print_r( $setting_screens , true ) ); } $setting_post_types = MywpSettingPostType::get_setting_post_types(); echo 'Setting Post Types'; if( ! empty( $setting_post_types ) ) { printf( '' , print_r( $setting_post_types , true ) ); } $setting_taxonomies = MywpSettingTaxonomy::get_setting_taxonomies(); echo 'Setting Taxonomies'; if( ! empty( $setting_taxonomies ) ) { printf( '' , print_r( $setting_taxonomies , true ) ); } } public static function mywp_debug_render_thirdparty() { $thirdparties = MywpThirdparty::get_plugins(); if( ! empty( $thirdparties ) ) { echo ''; foreach( $thirdparties as $plugin_base_name => $plugin ) { $plugin_data = MywpThirdparty::get_plugin_data_by_name( $plugin['plugin_name'] ); echo ''; if( $plugin['activate'] ) { printf( '' , $plugin_data['Name'] , $plugin_data['Version'] ); } else { printf( '' , $plugin['plugin_name'] ); } echo ''; echo ''; } echo '
%s (%s)%s'; if( $plugin['activate'] ) { printf( '%s' , __( 'Activated' , 'mywp' ) ); } else { _e( 'Not Activated' , 'mywp' ); } echo '
'; printf( __( 'plugin base name: %s' , 'mywp' ) . '
' , $plugin['plugin_base_name'] ); echo '
'; } } public static function mywp_request_admin() { if( ! MywpDeveloper::is_debug() ) { return false; } add_filter( 'current_edit_per_page' , array( __CLASS__ , 'current_edit_per_page' ) ); add_filter( 'mywp_setting_admin_sidebar_print_item_header_pre_add_title' , array( __CLASS__ , 'mywp_setting_admin_sidebar_print_item_header_pre_add_title' ) , 10 , 2 ); add_filter( 'mywp_setting_admin_toolbar_print_item_header_pre_add_title' , array( __CLASS__ , 'mywp_setting_admin_toolbar_print_item_header_pre_add_title' ) , 10 , 2 ); } public static function mywp_request_frontend() { if( ! MywpDeveloper::is_debug() ) { return false; } } public static function mywp_ajax() { if( ! MywpDeveloper::is_debug() ) { return false; } add_filter( 'mywp_setting_admin_sidebar_print_item_header_pre_add_title' , array( __CLASS__ , 'mywp_setting_admin_sidebar_print_item_header_pre_add_title' ) , 10 , 2 ); add_filter( 'mywp_setting_admin_toolbar_print_item_header_pre_add_title' , array( __CLASS__ , 'mywp_setting_admin_toolbar_print_item_header_pre_add_title' ) , 10 , 2 ); } public static function current_edit_per_page( $per_page ) { $per_page = 200; return $per_page; } public static function mywp_setting_admin_sidebar_print_item_header_pre_add_title( $pre_add_title , $item ) { $pre_add_title .= sprintf( '[%d]' , $item->ID ); return $pre_add_title; } public static function mywp_setting_admin_toolbar_print_item_header_pre_add_title( $pre_add_title , $item ) { $pre_add_title .= sprintf( '[%d]' , $item->ID ); return $pre_add_title; } } MywpControllerModuleDebugGeneral::init(); endif;