Add AYS popup when deleting media, fixes #11673
git-svn-id: http://svn.automattic.com/wordpress/trunk@12591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d375ef7d54
commit
8368df8c17
|
@ -96,8 +96,10 @@ foreach ($posts_columns as $column_name => $column_display_name ) {
|
|||
$actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
|
||||
elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
|
||||
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
|
||||
if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH )
|
||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
if ( $is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) {
|
||||
$delete_ays = (!$is_trash && !MEDIA_TRASH) ? " onclick='return showNotice.warn();'" : '';
|
||||
$actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
}
|
||||
if ( !$is_trash )
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
|
|
|
@ -392,10 +392,12 @@ foreach ($arc_result as $arc_row) {
|
|||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '">' . __('Edit') . '</a>';
|
||||
if ( current_user_can('delete_post', $post->ID) )
|
||||
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH )
|
||||
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
|
||||
$actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
|
||||
else
|
||||
$actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
} else {
|
||||
$delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
|
||||
$actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url("post.php?action=delete&post=$post->ID", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
|
||||
}
|
||||
$actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View “%s”'), $title)) . '" rel="permalink">' . __('View') . '</a>';
|
||||
if ( current_user_can('edit_post', $post->ID) )
|
||||
$actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;" class="hide-if-no-js">'.__('Attach').'</a>';
|
||||
|
|
Loading…
Reference in New Issue