mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Customizer: Improve performance checking for published pages.
Improve the performance of `WP_Customize_Manager::has_published_pages()` by limiting the database query to a single published page, down from querying all published pages. Props nagpai, dlh, tyxla. Fixes #55425. Built from https://develop.svn.wordpress.org/trunk@53057 git-svn-id: http://core.svn.wordpress.org/trunk@52646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ddb40d7a0
commit
881e4f054b
@ -5750,7 +5750,7 @@ final class WP_Customize_Manager {
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0 !== count( get_pages() );
|
||||
return 0 !== count( get_pages( array( 'number' => 1 ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-53056';
|
||||
$wp_version = '6.0-alpha-53057';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user