Ticket #11203: 11203.diff
| File 11203.diff, 1.3 KB (added by westi, 3 years ago) |
|---|
-
wp-includes/capabilities.php
818 818 $page_author_data = get_userdata( $page->post_author ); 819 819 //echo "current user id : $user_id, page author id: " . $page_author_data->ID . "<br />"; 820 820 // If the user is the author... 821 822 if ('' != $page->post_author) { 823 $page_author_data = get_userdata( $page->post_author ); 824 } else { 825 //No author set yet so default to current user for cap checks 826 $page_author_data = $author_data; 827 } 828 821 829 if ( $user_id == $page_author_data->ID ) { 822 830 // If the page is published... 823 831 if ( $page->post_status == 'publish' ) { -
wp-includes/post.php
2281 2281 if ( empty($page) ) { 2282 2282 if ( isset( $GLOBALS['page'] ) && isset( $GLOBALS['page']->ID ) ) { 2283 2283 return get_post($GLOBALS['page'], $output, $filter); 2284 } else if ( isset( $GLOBALS['post'] ) && isset( $GLOBALS['post']->ID ) ) { 2285 return get_post($GLOBALS['post'], $output, $filter); 2284 2286 } else { 2285 2287 $page = null; 2286 2288 return $page; 2287 2289 } 2288 2290 } 2289 2290 2291 $the_page = get_post($page, $output, $filter); 2291 2292 return $the_page; 2292 2293 }
