WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2015 05:45:11 PM (5 years ago)
Author:
wonderboymusic
Message:

Nav Menus: show custom post type Archive item at the top of the View All tab for the post type on the legacy Nav Menu screen.

Props aaroncampbell, DrewAPicture, seanchayes, hlashbrooke, paulwilde, ericlewis, raulillana
See #16075.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-functions.php

    r35377 r35382  
    13241324 *                       ones the default is 'Parent Page:'.
    13251325 * - all_items - String for the submenu. Default is All Posts/All Pages.
     1326 * - archives - String for use with archives in nav menus. Default is Post Archives/Page Archives.
    13261327 * - insert_into_item - String for the media frame button. Default is Insert into post/Insert into page.
    13271328 * - uploaded_to_this_item - String for the media frame filter. Default is Uploaded to this post/Uploaded to this page.
     
    13631364        'parent_item_colon' => array( null, __('Parent Page:') ),
    13641365        'all_items' => array( __( 'All Posts' ), __( 'All Pages' ) ),
     1366        'archives' => array( __( 'Post Archives' ), __( 'Page Archives' ) ),
    13651367        'insert_into_item' => array( __( 'Insert into post' ), __( 'Insert into page' ) ),
    13661368        'uploaded_to_this_item' => array( __( 'Uploaded to this post' ), __( 'Uploaded to this page' ) ),
     
    14281430    if ( !isset( $object->labels['all_items'] ) && isset( $object->labels['menu_name'] ) )
    14291431        $object->labels['all_items'] = $object->labels['menu_name'];
     1432
     1433    if ( !isset( $object->labels['archives'] ) && isset( $object->labels['all_items'] ) ) {
     1434        $object->labels['archives'] = $object->labels['all_items'];
     1435    }
    14301436
    14311437    $defaults = array();
Note: See TracChangeset for help on using the changeset viewer.