Changeset 12597 for trunk/wp-admin/includes/meta-boxes.php
- Timestamp:
- 01/04/2010 04:58:43 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/meta-boxes.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r12584 r12597 14 14 15 15 $post_type = $post->post_type; 16 $can_publish = current_user_can("publish_${post_type}s"); 16 $post_type_object = get_post_type_object($post_type); 17 $type_cap = $post_type_object->capability_type; 18 $can_publish = current_user_can("publish_${type_cap}s"); 17 19 ?> 18 20 <div class="submitbox" id="submitpost"> … … 185 187 <div id="delete-action"> 186 188 <?php 187 if ( current_user_can( "delete_${ post_type}", $post->ID ) ) {189 if ( current_user_can( "delete_${type_cap}", $post->ID ) ) { 188 190 if ( !EMPTY_TRASH_DAYS ) { 189 191 $delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)