mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Site Icon: Get site icon ID only when needed.
Cuts down on unnecessary queries, especially in environments that rely on post meta a lot. Reverts [32997]. Props ap.koponen, swissspidy. Fixes #34368. git-svn-id: https://develop.svn.wordpress.org/trunk@35299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -120,9 +120,6 @@ class Tests_Post_GetPostClass extends WP_UnitTestCase {
|
||||
|
||||
$found = get_post_class( '', $this->post_id );
|
||||
|
||||
// The 'site_icon' option check adds a query during unit tests. See {@see WP_Site_Icon::get_post_metadata()}.
|
||||
$expected_num_queries = $num_queries + 1;
|
||||
|
||||
$this->assertSame( $expected_num_queries, $wpdb->num_queries );
|
||||
$this->assertSame( $num_queries, $wpdb->num_queries );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user