- Timestamp:
- 10/08/2020 09:13:57 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-setting.php
r47557 r49108 142 142 } 143 143 144 $this->term_id = intval( $matches['id'] );144 $this->term_id = (int) $matches['id']; 145 145 146 146 parent::__construct( $manager, $id, $args ); … … 434 434 $value['name'] = trim( esc_html( $value['name'] ) ); // This sanitization code is used in wp-admin/nav-menus.php. 435 435 $value['description'] = sanitize_text_field( $value['description'] ); 436 $value['parent'] = max( 0, intval( $value['parent'] ));436 $value['parent'] = max( 0, (int) $value['parent'] ); 437 437 $value['auto_add'] = ! empty( $value['auto_add'] ); 438 438 … … 557 557 558 558 $post_value = $setting->post_value( null ); 559 if ( ! is_null( $post_value ) && intval( $post_value )=== $this->previous_term_id ) {559 if ( ! is_null( $post_value ) && (int) $post_value === $this->previous_term_id ) { 560 560 $this->manager->set_post_value( $setting->id, $this->term_id ); 561 561 $setting->save(); … … 571 571 572 572 $widget_instance = $nav_menu_widget_setting->post_value(); // Note that this calls WP_Customize_Widgets::sanitize_widget_instance(). 573 if ( empty( $widget_instance['nav_menu'] ) || intval( $widget_instance['nav_menu'] )!== $this->previous_term_id ) {573 if ( empty( $widget_instance['nav_menu'] ) || (int) $widget_instance['nav_menu'] !== $this->previous_term_id ) { 574 574 continue; 575 575 }
Note: See TracChangeset
for help on using the changeset viewer.