Changeset 12927 for trunk/wp-admin/edit-form-advanced.php
- Timestamp:
- 02/02/2010 05:37:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-form-advanced.php
r12887 r12927 86 86 87 87 $post_type_object = get_post_type_object($post_type); 88 $post_type_cap = $post_type_object->capability_type;89 88 90 89 // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). … … 129 128 add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', $post_type, 'normal', 'core'); 130 129 131 if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_posts') ) )130 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) 132 131 add_meta_box('slugdiv', __('Slug'), 'post_slug_meta_box', $post_type, 'normal', 'core'); 133 132 … … 193 192 <?php 194 193 $sample_permalink_html = get_sample_permalink_html($post->ID); 195 if ( !( 'pending' == $post->post_status && !current_user_can( 'publish_' . $post_type_cap . 's') ) ) { ?>194 if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->publish_cap ) ) ) { ?> 196 195 <div id="edit-slug-box"> 197 196 <?php
Note: See TracChangeset
for help on using the changeset viewer.