mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Check the correct global in get_page and also ensure that the cap check for deleting pages copes for the default page we edit when adding new. Fixes #11203.
git-svn-id: https://develop.svn.wordpress.org/trunk@12332 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2279,8 +2279,8 @@ function get_all_page_ids() {
|
||||
*/
|
||||
function &get_page(&$page, $output = OBJECT, $filter = 'raw') {
|
||||
if ( empty($page) ) {
|
||||
if ( isset( $GLOBALS['page'] ) && isset( $GLOBALS['page']->ID ) ) {
|
||||
return get_post($GLOBALS['page'], $output, $filter);
|
||||
if ( isset( $GLOBALS['post'] ) && isset( $GLOBALS['post']->ID ) ) {
|
||||
return get_post($GLOBALS['post'], $output, $filter);
|
||||
} else {
|
||||
$page = null;
|
||||
return $page;
|
||||
|
||||
Reference in New Issue
Block a user