Changeset 11878 for trunk/wp-includes/capabilities.php
- Timestamp:
- 08/25/2009 10:05:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/capabilities.php
r11873 r11878 777 777 $caps[] = 'delete_published_posts'; 778 778 } elseif ( 'trash' == $post->post_status ) { 779 $trash_meta = get_option('wp_trash_meta'); 780 if (is_array($trash_meta) && isset($trash_meta['posts'][$post->ID]['status']) && $trash_meta['posts'][$post->ID]['status'] == 'publish') 779 if ('publish' == get_post_meta($post->ID, '_wp_trash_meta_status', true) ) 781 780 $caps[] = 'delete_published_posts'; 782 781 } else { … … 806 805 $caps[] = 'delete_published_pages'; 807 806 } elseif ( 'trash' == $page->post_status ) { 808 $trash_meta = get_option('wp_trash_meta'); 809 if (is_array($trash_meta) && isset($trash_meta['posts'][$page->ID]['status']) && $trash_meta['posts'][$page->ID]['status'] == 'publish') 807 if ('publish' == get_post_meta($page->ID, '_wp_trash_meta_status', true) ) 810 808 $caps[] = 'delete_published_pages'; 811 809 } else { … … 841 839 $caps[] = 'edit_published_posts'; 842 840 } elseif ( 'trash' == $post->post_status ) { 843 $trash_meta = get_option('wp_trash_meta'); 844 if ( is_array($trash_meta) && isset($trash_meta['posts'][$post->ID]['status']) && $trash_meta['posts'][$post->ID]['status'] == 'publish' ) 841 if ('publish' == get_post_meta($post->ID, '_wp_trash_meta_status', true) ) 845 842 $caps[] = 'edit_published_posts'; 846 843 } else { … … 870 867 $caps[] = 'edit_published_pages'; 871 868 } elseif ( 'trash' == $page->post_status ) { 872 $trash_meta = get_option('wp_trash_meta'); 873 if ( is_array($trash_meta) && isset($trash_meta['posts'][$page->ID]['status']) && $trash_meta['posts'][$page->ID]['status'] == 'publish' ) 869 if ('publish' == get_post_meta($page->ID, '_wp_trash_meta_status', true) ) 874 870 $caps[] = 'edit_published_pages'; 875 871 } else {
Note: See TracChangeset
for help on using the changeset viewer.