Changeset 21504
- Timestamp:
- 08/14/2012 06:39:15 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-classic.dev.css
r21461 r21504 517 517 518 518 .submitbox .submitdelete:hover, 519 #media-items a.delete:hover { 519 #media-items a.delete:hover, 520 #media-items a.delete-permanently:hover { 520 521 color: #fff; 521 522 background-color: #f00; … … 608 609 #media-upload a.del-link, 609 610 #media-items a.delete, 611 #media-items a.delete-permanently, 610 612 .plugins a.delete, 611 613 .ui-tabs-nav a { -
trunk/wp-admin/css/colors-fresh.dev.css
r21461 r21504 508 508 509 509 .submitbox .submitdelete:hover, 510 #media-items a.delete:hover { 510 #media-items a.delete:hover, 511 #media-items a.delete-permanently:hover { 511 512 color: #fff; 512 513 background-color: #f00; … … 599 600 #media-upload a.del-link, 600 601 #media-items a.delete, 602 #media-items a.delete-permanently, 601 603 .plugins a.delete, 602 604 .ui-tabs-nav a { -
trunk/wp-admin/edit-form-advanced.php
r21311 r21504 84 84 85 85 $form_action = 'editpost'; 86 $nonce_action = 'update- ' . $post_type . '_' . $post_ID;86 $nonce_action = 'update-post_' . $post_ID; 87 87 $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr($post_ID) . "' />"; 88 88 -
trunk/wp-admin/includes/ajax-actions.php
r21413 r21504 1728 1728 $post_type = $_POST['post_type']; 1729 1729 1730 check_ajax_referer('update- ' . $post_type . '_' . $post_id, '_wpnonce');1730 check_ajax_referer('update-post_' . $post_id, '_wpnonce'); 1731 1731 1732 1732 $post_id = edit_post(); … … 1770 1770 wp_die( 0 ); 1771 1771 1772 check_ajax_referer( 'update- ' . $post->post_type . '_' . $post_id );1772 check_ajax_referer( 'update-post_' . $post_id ); 1773 1773 1774 1774 if ( ! current_user_can( 'edit_post', $post_id ) ) -
trunk/wp-admin/includes/class-wp-media-list-table.php
r21323 r21504 361 361 if ( current_user_can( 'delete_post', $post->ID ) ) 362 362 if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) { 363 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash- attachment_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>";363 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; 364 364 } else { 365 365 $delete_ays = !MEDIA_TRASH ? " onclick='return showNotice.warn();'" : ''; 366 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url( "post.php?action=delete&post=$post->ID", 'delete- attachment_' . $post->ID ) . "'>" . __( 'Delete Permanently' ) . "</a>";366 $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>"; 367 367 } 368 368 $actions['view'] = '<a href="' . get_permalink( $post->ID ) . '" title="' . esc_attr( sprintf( __( 'View “%s”' ), $att_title ) ) . '" rel="permalink">' . __( 'View' ) . '</a>'; … … 375 375 if ( current_user_can( 'delete_post', $post->ID ) ) { 376 376 if ( $this->is_trash ) 377 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash- attachment_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>";377 $actions['untrash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=untrash&post=$post->ID", 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; 378 378 elseif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) 379 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash- attachment_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>";379 $actions['trash'] = "<a class='submitdelete' href='" . wp_nonce_url( "post.php?action=trash&post=$post->ID", 'trash-post_' . $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; 380 380 if ( $this->is_trash || !EMPTY_TRASH_DAYS || !MEDIA_TRASH ) { 381 381 $delete_ays = ( !$this->is_trash && !MEDIA_TRASH ) ? " onclick='return showNotice.warn();'" : ''; 382 $actions['delete'] = "<a class='submitdelete'$delete_ays href='" . wp_nonce_url( "post.php?action=delete&post=$post->ID", 'delete- attachment_' . $post->ID ) . "'>" . __( 'Delete Permanently' ) . "</a>";382 $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>"; 383 383 } 384 384 } -
trunk/wp-admin/includes/class-wp-posts-list-table.php
r21323 r21504 546 546 if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) { 547 547 if ( 'trash' == $post->post_status ) 548 $actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash- ' . $post->post_type . '_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>";548 $actions['untrash'] = "<a title='" . esc_attr( __( 'Restore this item from the Trash' ) ) . "' href='" . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . "'>" . __( 'Restore' ) . "</a>"; 549 549 elseif ( EMPTY_TRASH_DAYS ) 550 550 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr( __( 'Move this item to the Trash' ) ) . "' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Trash' ) . "</a>"; -
trunk/wp-admin/includes/media.php
r21353 r21504 1157 1157 if ( $delete && current_user_can( 'delete_post', $attachment_id ) ) { 1158 1158 if ( !EMPTY_TRASH_DAYS ) { 1159 $delete = "<a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete- attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Delete Permanently' ) . '</a>';1159 $delete = "<a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete-permanently'>" . __( 'Delete Permanently' ) . '</a>'; 1160 1160 } elseif ( !MEDIA_TRASH ) { 1161 1161 $delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a> 1162 1162 <div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'><p>" . sprintf( __( 'You are about to delete <strong>%s</strong>.' ), $filename ) . "</p> 1163 <a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete- attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>1163 <a href='" . wp_nonce_url( "post.php?action=delete&post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a> 1164 1164 <a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . "</a> 1165 1165 </div>"; 1166 1166 } else { 1167 $delete = "<a href='" . wp_nonce_url( "post.php?action=trash&post=$attachment_id", 'trash- attachment_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a>1168 <a href='" . wp_nonce_url( "post.php?action=untrash&post=$attachment_id", 'untrash- attachment_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>";1167 $delete = "<a href='" . wp_nonce_url( "post.php?action=trash&post=$attachment_id", 'trash-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a> 1168 <a href='" . wp_nonce_url( "post.php?action=untrash&post=$attachment_id", 'untrash-post_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>"; 1169 1169 } 1170 1170 } else { -
trunk/wp-admin/post.php
r20623 r21504 178 178 179 179 case 'editattachment': 180 check_admin_referer('update- attachment_' . $post_id);180 check_admin_referer('update-post_' . $post_id); 181 181 182 182 // Don't let these be changed … … 191 191 192 192 case 'editpost': 193 check_admin_referer('update- ' . $post_type . '_' . $post_id);193 check_admin_referer('update-post_' . $post_id); 194 194 195 195 $post_id = edit_post(); … … 201 201 202 202 case 'trash': 203 check_admin_referer('trash- ' . $post_type . '_' . $post_id);203 check_admin_referer('trash-post_' . $post_id); 204 204 205 205 $post = & get_post($post_id); … … 216 216 217 217 case 'untrash': 218 check_admin_referer('untrash- ' . $post_type . '_' . $post_id);218 check_admin_referer('untrash-post_' . $post_id); 219 219 220 220 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) … … 229 229 230 230 case 'delete': 231 check_admin_referer('delete- ' . $post_type . '_' . $post_id);231 check_admin_referer('delete-post_' . $post_id); 232 232 233 233 if ( !current_user_can($post_type_object->cap->delete_post, $post_id) ) -
trunk/wp-includes/link-template.php
r21414 r21504 972 972 $delete_link = add_query_arg( 'action', $action, admin_url( sprintf( $post_type_object->_edit_link, $post->ID ) ) ); 973 973 974 return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action- {$post->post_type}_{$post->ID}" ), $post->ID, $force_delete );974 return apply_filters( 'get_delete_post_link', wp_nonce_url( $delete_link, "$action-post_{$post->ID}" ), $post->ID, $force_delete ); 975 975 } 976 976
Note: See TracChangeset
for help on using the changeset viewer.