mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Comments: in WP_Comment_Query::fill_descendants()
, compute count()
in the first for
expression so that it does not run on each iteration.
Props vishalkakadiya, deremohan. Fixes #37416. Built from https://develop.svn.wordpress.org/trunk@38297 git-svn-id: http://core.svn.wordpress.org/trunk@38238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b8bfcb0d64
commit
f02f4ac762
@ -1012,7 +1012,7 @@ class WP_Comment_Query {
|
||||
|
||||
// Prime comment caches for non-top-level comments.
|
||||
$descendant_ids = array();
|
||||
for ( $i = 1; $i < count( $levels ); $i++ ) {
|
||||
for ( $i = 1, $c = count( $levels ); $i <= $c; $i++ ) {
|
||||
$descendant_ids = array_merge( $descendant_ids, $levels[ $i ] );
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38296';
|
||||
$wp_version = '4.7-alpha-38297';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user