mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Code is Poetry.
WordPress' code just... wasn't. This is now dealt with. Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS. Fixes #41057. git-svn-id: https://develop.svn.wordpress.org/trunk@42343 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -256,13 +256,13 @@ final class WP_Comment {
|
||||
*/
|
||||
public function get_children( $args = array() ) {
|
||||
$defaults = array(
|
||||
'format' => 'tree',
|
||||
'status' => 'all',
|
||||
'format' => 'tree',
|
||||
'status' => 'all',
|
||||
'hierarchical' => 'threaded',
|
||||
'orderby' => '',
|
||||
'orderby' => '',
|
||||
);
|
||||
|
||||
$_args = wp_parse_args( $args, $defaults );
|
||||
$_args = wp_parse_args( $args, $defaults );
|
||||
$_args['parent'] = $this->comment_ID;
|
||||
|
||||
if ( is_null( $this->children ) ) {
|
||||
@@ -276,7 +276,7 @@ final class WP_Comment {
|
||||
if ( 'flat' === $_args['format'] ) {
|
||||
$children = array();
|
||||
foreach ( $this->children as $child ) {
|
||||
$child_args = $_args;
|
||||
$child_args = $_args;
|
||||
$child_args['format'] = 'flat';
|
||||
// get_children() resets this value automatically.
|
||||
unset( $child_args['parent'] );
|
||||
|
||||
Reference in New Issue
Block a user