wordpress update 6.6.2
This commit is contained in:
@@ -135,6 +135,9 @@ class Walker {
|
||||
return;
|
||||
}
|
||||
|
||||
$max_depth = (int) $max_depth;
|
||||
$depth = (int) $depth;
|
||||
|
||||
$id_field = $this->db_fields['id'];
|
||||
$id = $element->$id_field;
|
||||
|
||||
@@ -191,6 +194,8 @@ class Walker {
|
||||
public function walk( $elements, $max_depth, ...$args ) {
|
||||
$output = '';
|
||||
|
||||
$max_depth = (int) $max_depth;
|
||||
|
||||
// Invalid parameter or nothing to walk.
|
||||
if ( $max_depth < -1 || empty( $elements ) ) {
|
||||
return $output;
|
||||
@@ -285,12 +290,14 @@ class Walker {
|
||||
* @return string XHTML of the specified page of elements.
|
||||
*/
|
||||
public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$args ) {
|
||||
if ( empty( $elements ) || $max_depth < -1 ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$output = '';
|
||||
|
||||
$max_depth = (int) $max_depth;
|
||||
|
||||
if ( empty( $elements ) || $max_depth < -1 ) {
|
||||
return $output;
|
||||
}
|
||||
|
||||
$parent_field = $this->db_fields['parent'];
|
||||
|
||||
$count = -1;
|
||||
|
||||
Reference in New Issue
Block a user