Make WordPress Core


Ignore:
Timestamp:
08/24/2015 09:18:20 PM (9 years ago)
Author:
wonderboymusic
Message:

With a few modifications in wp-admin/menu.php, we can eliminate the extra logic for Post and Page menu registration. Instead, they can just declare menu_position on post type registration.

Props scribu, wonderboymusic.
Fixes #16865.

File:
1 edited

Legend:

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

    r33666 r33723  
    2727        'capability_type' => 'post',
    2828        'map_meta_cap' => true,
     29        'menu_position' => 5,
    2930        'hierarchical' => false,
    3031        'rewrite' => false,
     
    4445        'capability_type' => 'page',
    4546        'map_meta_cap' => true,
     47        'menu_position' => 20,
    4648        'hierarchical' => true,
    4749        'rewrite' => false,
Note: See TracChangeset for help on using the changeset viewer.