Changeset 12783
- Timestamp:
- 01/21/2010 06:53:33 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-header.php
r12728 r12783 41 41 <?php 42 42 43 if ( in_array( $pagenow, array('post.php', 'post-new.php' , 'page.php') ) ) {43 if ( in_array( $pagenow, array('post.php', 'post-new.php') ) ) { 44 44 add_action( 'admin_print_footer_scripts', 'wp_tiny_mce', 25 ); 45 45 wp_enqueue_script('quicktags'); -
trunk/wp-admin/edit.php
r12728 r12783 66 66 $doaction = ($_GET['action'] != -1) ? $_GET['action'] : $_GET['action2']; 67 67 } else { 68 wp_redirect( admin_url( 'edit.php') );68 wp_redirect( admin_url("edit.php?post_type=$post_type") ); 69 69 } 70 70 … … 128 128 129 129 if ( isset($_GET['action']) ) 130 $sendback = remove_query_arg( array('action', 'action2', 'cat', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view' , 'post_type'), $sendback );130 $sendback = remove_query_arg( array('action', 'action2', 'cat', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); 131 131 132 132 wp_redirect($sendback); … … 199 199 printf( _n( 'Item moved to the trash.', '%s items moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) ); 200 200 $ids = isset($_GET['ids']) ? $_GET['ids'] : 0; 201 echo ' <a href="' . esc_url( wp_nonce_url( "edit.php? doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';201 echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />'; 202 202 unset($_GET['trashed']); 203 203 } -
trunk/wp-admin/includes/dashboard.php
r12765 r12783 253 253 $text = _n( 'Page', 'Pages', $num_pages->publish ); 254 254 if ( current_user_can( 'edit_pages' ) ) { 255 $num = "<a href='edit -pages.php'>$num</a>";256 $text = "<a href='edit -pages.php'>$text</a>";255 $num = "<a href='edit.php?post_type=page'>$num</a>"; 256 $text = "<a href='edit.php?post_type=page'>$text</a>"; 257 257 } 258 258 echo '<td class="first b b_pages">' . $num . '</td>'; -
trunk/wp-admin/includes/template.php
r12781 r12783 1606 1606 $hidden = get_hidden_columns( $current_screen ); 1607 1607 $title = _draft_or_post_title(); 1608 $post_type = $page->post_type; 1608 1609 ?> 1609 1610 <tr id="page-<?php echo $id; ?>" class="<?php echo $rowclass; ?> iedit"> … … 1670 1671 if ( current_user_can('delete_page', $page->ID) ) { 1671 1672 if ( $post->post_status == 'trash' ) 1672 $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("p age.php?action=untrash&post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>";1673 $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&action=untrash&post=$page->ID", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>"; 1673 1674 elseif ( EMPTY_TRASH_DAYS ) 1674 1675 $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>"; 1675 1676 if ( $post->post_status == 'trash' || !EMPTY_TRASH_DAYS ) 1676 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("p age.php?action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";1677 $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("post.php?post_type=$post_type&action=delete&post=$page->ID", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>"; 1677 1678 } 1678 1679 if ( in_array($post->post_status, array('pending', 'draft')) ) { -
trunk/wp-includes/link-template.php
r12733 r12783 738 738 $action = 'action=trash&'; 739 739 740 switch ( $post->post_type ) : 741 case 'page' : 742 if ( !current_user_can( 'delete_page', $post->ID ) ) 743 return; 744 $file = 'page'; 745 $var = 'post'; 746 break; 747 case 'attachment' : 748 if ( !current_user_can( 'delete_post', $post->ID ) ) 749 return; 750 $file = 'media'; 751 $var = 'attachment_id'; 752 break; 753 case 'revision' : 754 if ( !current_user_can( 'delete_post', $post->ID ) ) 755 return; 756 $file = 'revision'; 757 $var = 'revision'; 758 $action = ''; 759 break; 760 default : 761 if ( !current_user_can( 'edit_post', $post->ID ) ) 762 return apply_filters( 'get_delete_post_link', '', $post->ID, $context ); 763 $file = 'post'; 764 $var = 'post'; 765 break; 766 endswitch; 767 768 return apply_filters( 'get_delete_post_link', wp_nonce_url( admin_url("$file.php?{$action}$var=$post->ID"), "trash-{$file}_" . $post->ID ), $context ); 740 if ( 'display' == $context ) 741 $action = '&action=trash'; 742 else 743 $action = '&action=trash'; 744 745 $post_type_object = get_post_type_object( $post->post_type ); 746 if ( !$post_type_object ) 747 return; 748 749 if ( !current_user_can( $post_type_object->delete_cap, $post->ID ) ) 750 return; 751 752 return apply_filters( 'get_delete_post_link', wp_nonce_url( admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID) ), "trash-{$post->post_type}_" . $post->ID), $post->ID, $context ); 769 753 } 770 754 -
trunk/wp-includes/post.php
r12768 r12783 721 721 $args->edit_cap = ''; 722 722 $args->read_cap = ''; 723 $args->delete_cap = ''; 723 724 } else { 724 725 $args->edit_cap = 'edit_' . $args->capability_type; 725 726 $args->read_cap = 'read_' . $args->capability_type; 727 $args->delete_cap = 'delete_' . $args->capability_type; 726 728 } 727 729
Note: See TracChangeset
for help on using the changeset viewer.