mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
More custom post type support. Props scribu. see #9674
git-svn-id: https://develop.svn.wordpress.org/trunk@12597 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -13,7 +13,9 @@ function post_submit_meta_box($post) {
|
||||
global $action;
|
||||
|
||||
$post_type = $post->post_type;
|
||||
$can_publish = current_user_can("publish_${post_type}s");
|
||||
$post_type_object = get_post_type_object($post_type);
|
||||
$type_cap = $post_type_object->capability_type;
|
||||
$can_publish = current_user_can("publish_${type_cap}s");
|
||||
?>
|
||||
<div class="submitbox" id="submitpost">
|
||||
|
||||
@@ -184,7 +186,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||
<?php do_action('post_submitbox_start'); ?>
|
||||
<div id="delete-action">
|
||||
<?php
|
||||
if ( current_user_can( "delete_${post_type}", $post->ID ) ) {
|
||||
if ( current_user_can( "delete_${type_cap}", $post->ID ) ) {
|
||||
if ( !EMPTY_TRASH_DAYS ) {
|
||||
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
|
||||
$delete_text = __('Delete Permanently');
|
||||
|
||||
Reference in New Issue
Block a user