Check action type to avoid warnings. Props sirzooro. fixes #11203
git-svn-id: https://develop.svn.wordpress.org/trunk@12272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dff67e2fa2
commit
e7b40483e9
|
@ -184,7 +184,7 @@ if ( $can_publish ) : // Contributors don't get to choose the date of publish ?>
|
||||||
<?php do_action('post_submitbox_start'); ?>
|
<?php do_action('post_submitbox_start'); ?>
|
||||||
<div id="delete-action">
|
<div id="delete-action">
|
||||||
<?php
|
<?php
|
||||||
if ( current_user_can("delete_${post_type}", $post->ID) ) {
|
if ( ( 'edit' == $action ) && current_user_can("delete_${post_type}", $post->ID) ) {
|
||||||
if ( !EMPTY_TRASH_DAYS ) {
|
if ( !EMPTY_TRASH_DAYS ) {
|
||||||
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
|
$delete_url = wp_nonce_url( add_query_arg( array('action' => 'delete', 'post' => $post->ID) ), "delete-${post_type}_{$post->ID}" );
|
||||||
$delete_text = __('Delete Permanently');
|
$delete_text = __('Delete Permanently');
|
||||||
|
|
Loading…
Reference in New Issue