*/ require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' ); $admin_interface = new md_admin_interface(); //$admin_interface->menu_container_print(); $admin_interface->menu_container_print_custom(); // Load all the nav menu interface functions function do_accordion_sections_own( $screen, $context, $object ) { include('include/Popup_Add_Menu_Content.php' ); } /** * Displays a metabox for the custom links menu item. * * @since 3.0.0 * * @global int $_nav_menu_placeholder * @global int|string $nav_menu_selected_id */ function wp_nav_menu_item_link_meta_box_own_md() { global $_nav_menu_placeholder, $nav_menu_selected_id; $_nav_menu_placeholder = 0 > $_nav_menu_placeholder ? $_nav_menu_placeholder - 1 : -1; ?>

class="button-secondary submit-add-to-menu right" value="" name="add-custom-menu-item" id="submit-customlinkdiv" />

name; // Paginate browsing for large numbers of post objects. //post per page dynamic $post_per_page = get_option('amm_'.$post_type_name); if(empty($post_per_page)){ $post_per_page = get_option('amm_post_perpage_default'); } if(empty($post_per_page)){ $post_per_page = 50; } $per_page = (int)$post_per_page; $pagenum = isset( $_REQUEST[$post_type_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; $args = array( 'offset' => $offset, 'order' => 'ASC', 'orderby' => 'title', 'posts_per_page' => $per_page, 'post_type' => $post_type_name, 'suppress_filters' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' => false ); if ( isset( $post_type['args']->_default_query ) ) $args = array_merge($args, (array) $post_type['args']->_default_query ); // @todo transient caching of these results with proper invalidation on updating of a post of this type $get_posts = new WP_Query; $posts = $get_posts->query( $args ); if ( ! $get_posts->post_count ) { echo '

' . __( 'No items.' ) . '

'; return; } $get_posts_for_count = new WP_Query($args); $total_page_count = $get_posts_for_count->found_posts; $db_fields = false; if ( is_post_type_hierarchical( $post_type_name ) ) { $db_fields = array( 'parent' => 'post_parent', 'id' => 'ID' ); } //$walker = new Walker_Nav_Menu_Checklist( $db_fields ); $walker = new Walker_Nav_Menu_Checklist_md( $db_fields ); $current_tab = 'all'; if ( isset( $_REQUEST[$post_type_name . '-tab'] ) && in_array( $_REQUEST[$post_type_name . '-tab'], array('all', 'search') ) ) { $current_tab = $_REQUEST[$post_type_name . '-tab']; } $removed_args = array( 'action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce', ); ?>
Want to add a ? Buy the Pro Version to access all the features.


    Buy Pro Version


"/>Hide existing menu items label)) $newpage_lable = 'Add New '.$post_type['args']->label; } ?>
front_or_home = true; array_unshift( $posts, $front_page_obj ); } else{ $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1; /*array_unshift( $posts, (object) array( 'front_or_home' => true, 'ID' => 0, 'object_id' => $_nav_menu_placeholder, 'post_content' => '', 'post_excerpt' => '', 'post_parent' => '', 'post_title' => _x('Home', 'nav menu home label'), 'post_type' => 'nav_menu_item', 'type' => 'custom', 'url' => home_url('/'), ) );*/ } } $post_type = get_post_type_object( $post_type_name ); $archive_link = get_post_type_archive_link( $post_type_name ); if ( $post_type->has_archive ) { $_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1; array_unshift( $posts, (object) array( 'ID' => 0, 'object_id' => $_nav_menu_placeholder, 'object' => $post_type_name, 'post_content' => '', 'post_excerpt' => '', 'post_title' => $post_type->labels->archives, 'post_type' => 'nav_menu_item', 'type' => 'post_type_archive', 'url' => get_post_type_archive_link( $post_type_name ), ) ); } /** * Filter the posts displayed in the 'View All' tab of the current * post type's menu items meta box. * * The dynamic portion of the hook name, `$post_type_name`, refers * to the slug of the current post type. * * @since 3.2.0 * * @see WP_Query::query() * * @param array $posts The posts for the current post type. * @param array $args An array of WP_Query arguments. * @param object $post_type The current post type object for this menu item meta box. */ $posts = apply_filters( "nav_menu_items_{$post_type_name}", $posts, $args, $post_type ); $checkbox_items = walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $posts), 0, (object) $args ); if ( 'all' == $current_tab && ! empty( $_REQUEST['selectall'] ) ) { $checkbox_items = preg_replace('/(type=(.)checkbox(\2))/', '$1 checked=$2checked$2', $checkbox_items); } $filter_author = array(); $filter_template = array(); $filter_publish_date = array(); $filter_cate = array(); $template_name_array = array(); $templates_all = get_page_templates(); foreach ( $templates_all as $template_name => $template_filename ) { $template_name_array[$template_filename] = $template_filename; // $template_name_array[$template_name] =$template_filename; } foreach ($posts as $post_data){ if(isset($post_data->post_author)) $filter_author[]= $post_data->post_author; if('page' == $post_data->post_type){ $tamplate_name = get_post_meta( $post_data->ID,'_wp_page_template',true); $template_name_key = array_search($tamplate_name, $template_name_array); if (!empty($template_name_key)) $tamplate_name = $template_name_key; if(!empty($tamplate_name)){ $filter_template[] = $tamplate_name; }else{ $filter_template[] ='default'; } }else{ $category_detail = get_the_category($post_data->ID); if(!empty($category_detail) && count($category_detail) > 0) { $cate_array= array(); foreach($category_detail as $cd){ $filter_cate[] = $cd->cat_name; } } } //$filter_publish_date[]= get_the_date('', $post_data->ID); } if(count($filter_author) > 1 ) $filter_author = array_unique($filter_author); if(count($filter_template) > 1 ) $filter_template = array_unique($filter_template); if(count($filter_cate) > 1 ) $filter_cate = array_unique($filter_cate); $post_data_calss=''; if ( 'page' != $post_type_name ) { $post_data_calss = 'post-data-show'; } ?>

class="button-secondary submit-add-to-menu right" value="" name="add-post-type-menu-item" id="" />

0) { ?>

name; // Paginate browsing for large numbers of objects. $post_per_page = get_option('amm_'.$taxonomy_name); if(empty($post_per_page)){ $post_per_page = get_option('amm_post_perpage_default'); } if(empty($post_per_page)){ $post_per_page = 50; } $per_page = (int) $post_per_page; $pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; $args = array( 'child_of' => 0, 'exclude' => '', 'hide_empty' => false, 'hierarchical' => 1, 'include' => '', 'number' => $per_page, 'offset' => $offset, 'order' => 'ASC', 'orderby' => 'name', 'pad_counts' => false, ); $terms = get_terms( $taxonomy_name, $args ); if ( ! $terms || is_wp_error($terms) ) { echo '

' . __( 'No items.' ) . '

'; return; } $num_pages = ceil( wp_count_terms( $taxonomy_name , array_merge( $args, array('number' => '', 'offset' => '') ) ) / $per_page ); $total_page_count= wp_count_terms( $taxonomy_name , array_merge( $args, array('number' => '', 'offset' => '') ) ); $post_type_name = $taxonomy_name; $db_fields = false; if ( is_taxonomy_hierarchical( $taxonomy_name ) ) { $db_fields = array( 'parent' => 'parent', 'id' => 'term_id' ); } $walker = new Walker_Nav_Menu_Checklist_md( $db_fields ); $removed_args = array( 'action', 'customlink-tab', 'edit-menu-item', 'menu-item', 'page-tab', '_wpnonce', ); ?>

class="button-secondary submit-add-to-menu right" value="" name="add-taxonomy-menu-item" id="" />

0) { ?>