wp/wp-admin/includes/nav-menu.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/nav-menu.php	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-admin/includes/nav-menu.php	Tue Sep 27 16:37:53 2022 +0200
@@ -262,22 +262,22 @@
  * Check whether to disable the Menu Locations meta box submit button and inputs.
  *
  * @since 3.6.0
- * @since 5.3.1 The `$echo` parameter was added.
+ * @since 5.3.1 The `$display` parameter was added.
  *
  * @global bool $one_theme_location_no_menus to determine if no menus exist
  *
  * @param int|string $nav_menu_selected_id ID, name, or slug of the currently selected menu.
- * @param bool       $echo                 Whether to echo or just return the string.
+ * @param bool       $display              Whether to display or just return the string.
  * @return string|false Disabled attribute if at least one menu exists, false if not.
  */
-function wp_nav_menu_disabled_check( $nav_menu_selected_id, $echo = true ) {
+function wp_nav_menu_disabled_check( $nav_menu_selected_id, $display = true ) {
 	global $one_theme_location_no_menus;
 
 	if ( $one_theme_location_no_menus ) {
 		return false;
 	}
 
-	return disabled( $nav_menu_selected_id, 0, $echo );
+	return disabled( $nav_menu_selected_id, 0, $display );
 }
 
 /**
@@ -325,7 +325,7 @@
  * @global int        $_nav_menu_placeholder
  * @global int|string $nav_menu_selected_id
  *
- * @param string $object Not used.
+ * @param string $data_object Not used.
  * @param array  $box {
  *     Post type menu item meta box arguments.
  *
@@ -335,7 +335,7 @@
  *     @type WP_Post_Type $args     Extra meta box arguments (the post type object for this meta box).
  * }
  */
-function wp_nav_menu_item_post_type_meta_box( $object, $box ) {
+function wp_nav_menu_item_post_type_meta_box( $data_object, $box ) {
 	global $_nav_menu_placeholder, $nav_menu_selected_id;
 
 	$post_type_name = $box['args']->name;
@@ -689,7 +689,7 @@
  *
  * @global int|string $nav_menu_selected_id
  *
- * @param string $object Not used.
+ * @param string $data_object Not used.
  * @param array  $box {
  *     Taxonomy menu item meta box arguments.
  *
@@ -699,7 +699,7 @@
  *     @type object   $args     Extra meta box arguments (the taxonomy object for this meta box).
  * }
  */
-function wp_nav_menu_item_taxonomy_meta_box( $object, $box ) {
+function wp_nav_menu_item_taxonomy_meta_box( $data_object, $box ) {
 	global $nav_menu_selected_id;
 
 	$taxonomy_name = $box['args']->name;
@@ -989,40 +989,40 @@
  *
  * @access private
  *
- * @param object $object The post type or taxonomy meta-object.
+ * @param object $data_object The post type or taxonomy meta-object.
  * @return object The post type or taxonomy object.
  */
-function _wp_nav_menu_meta_box_object( $object = null ) {
-	if ( isset( $object->name ) ) {
+function _wp_nav_menu_meta_box_object( $data_object = null ) {
+	if ( isset( $data_object->name ) ) {
 
-		if ( 'page' === $object->name ) {
-			$object->_default_query = array(
+		if ( 'page' === $data_object->name ) {
+			$data_object->_default_query = array(
 				'orderby'     => 'menu_order title',
 				'post_status' => 'publish',
 			);
 
 			// Posts should show only published items.
-		} elseif ( 'post' === $object->name ) {
-			$object->_default_query = array(
+		} elseif ( 'post' === $data_object->name ) {
+			$data_object->_default_query = array(
 				'post_status' => 'publish',
 			);
 
 			// Categories should be in reverse chronological order.
-		} elseif ( 'category' === $object->name ) {
-			$object->_default_query = array(
+		} elseif ( 'category' === $data_object->name ) {
+			$data_object->_default_query = array(
 				'orderby' => 'id',
 				'order'   => 'DESC',
 			);
 
 			// Custom post types should show only published items.
 		} else {
-			$object->_default_query = array(
+			$data_object->_default_query = array(
 				'post_status' => 'publish',
 			);
 		}
 	}
 
-	return $object;
+	return $data_object;
 }
 
 /**