wp/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
   651 	 *
   651 	 *
   652 	 * Note that parent::sanitize() erroneously does wp_unslash() on $value, but
   652 	 * Note that parent::sanitize() erroneously does wp_unslash() on $value, but
   653 	 * we remove that in this override.
   653 	 * we remove that in this override.
   654 	 *
   654 	 *
   655 	 * @since 4.3.0
   655 	 * @since 4.3.0
   656 	 *
   656 	 * @since 5.9.0 Renamed `$menu_item_value` to `$value` for PHP 8 named parameter support.
   657 	 * @param array $menu_item_value The value to sanitize.
   657 	 *
       
   658 	 * @param array $value The menu item value to sanitize.
   658 	 * @return array|false|null|WP_Error Null or WP_Error if an input isn't valid. False if it is marked for deletion.
   659 	 * @return array|false|null|WP_Error Null or WP_Error if an input isn't valid. False if it is marked for deletion.
   659 	 *                                   Otherwise the sanitized value.
   660 	 *                                   Otherwise the sanitized value.
   660 	 */
   661 	 */
   661 	public function sanitize( $menu_item_value ) {
   662 	public function sanitize( $value ) {
       
   663 		// Restores the more descriptive, specific name for use within this method.
       
   664 		$menu_item_value = $value;
       
   665 
   662 		// Menu is marked for deletion.
   666 		// Menu is marked for deletion.
   663 		if ( false === $menu_item_value ) {
   667 		if ( false === $menu_item_value ) {
   664 			return $menu_item_value;
   668 			return $menu_item_value;
   665 		}
   669 		}
   666 
   670