summaryrefslogtreecommitdiffstats
path: root/wp-includes/class-wp-walker.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/class-wp-walker.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.tar.xz
wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/class-wp-walker.php')
-rw-r--r--wp-includes/class-wp-walker.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php
index e44907e..ff5eac2 100644
--- a/wp-includes/class-wp-walker.php
+++ b/wp-includes/class-wp-walker.php
@@ -147,7 +147,7 @@ class Walker {
$this->start_el( $output, $element, $depth, ...array_values( $args ) );
// Descend only when the depth is right and there are children for this element.
- if ( ( 0 == $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) {
+ if ( ( 0 === $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) {
foreach ( $children_elements[ $id ] as $child ) {
@@ -199,7 +199,7 @@ class Walker {
$parent_field = $this->db_fields['parent'];
// Flat display.
- if ( -1 == $max_depth ) {
+ if ( -1 === $max_depth ) {
$empty_array = array();
foreach ( $elements as $e ) {
$this->display_element( $e, $empty_array, 1, 0, $args, $output );
@@ -235,7 +235,7 @@ class Walker {
$top_level_elements = array();
$children_elements = array();
foreach ( $elements as $e ) {
- if ( $root->$parent_field == $e->$parent_field ) {
+ if ( $root->$parent_field === $e->$parent_field ) {
$top_level_elements[] = $e;
} else {
$children_elements[ $e->$parent_field ][] = $e;
@@ -251,7 +251,7 @@ class Walker {
* If we are displaying all levels, and remaining children_elements is not empty,
* then we got orphans, which should be displayed regardless.
*/
- if ( ( 0 == $max_depth ) && count( $children_elements ) > 0 ) {
+ if ( ( 0 === $max_depth ) && count( $children_elements ) > 0 ) {
$empty_array = array();
foreach ( $children_elements as $orphans ) {
foreach ( $orphans as $op ) {
@@ -294,14 +294,14 @@ class Walker {
$parent_field = $this->db_fields['parent'];
$count = -1;
- if ( -1 == $max_depth ) {
+ if ( -1 === $max_depth ) {
$total_top = count( $elements );
}
if ( $page_num < 1 || $per_page < 0 ) {
// No paging.
$paging = false;
$start = 0;
- if ( -1 == $max_depth ) {
+ if ( -1 === $max_depth ) {
$end = $total_top;
}
$this->max_pages = 1;
@@ -309,13 +309,13 @@ class Walker {
$paging = true;
$start = ( (int) $page_num - 1 ) * (int) $per_page;
$end = $start + $per_page;
- if ( -1 == $max_depth ) {
+ if ( -1 === $max_depth ) {
$this->max_pages = (int) ceil( $total_top / $per_page );
}
}
// Flat display.
- if ( -1 == $max_depth ) {
+ if ( -1 === $max_depth ) {
if ( ! empty( $args[0]['reverse_top_level'] ) ) {
$elements = array_reverse( $elements );
$oldstart = $start;