Make WordPress Core


Ignore:
Timestamp:
10/20/2015 06:22:41 PM (11 years ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/getPostClass.php

    r35242 r35299  
    121121                $found = get_post_class( '', $this->post_id );
    122122
    123                 // The 'site_icon' option check adds a query during unit tests. See {@see WP_Site_Icon::get_post_metadata()}.
    124                 $expected_num_queries = $num_queries + 1;
    125 
    126                 $this->assertSame( $expected_num_queries, $wpdb->num_queries );
     123                $this->assertSame( $num_queries, $wpdb->num_queries );
    127124        }
    128125}
Note: See TracChangeset for help on using the changeset viewer.