return false;
} $undefined =
new stdClass();
$is_placeholder =
( $this->term_id < 0
);
$is_dirty =
( $undefined !==
$this->
post_value( $undefined ) );
if ( !
$is_placeholder && !
$is_dirty ) { return false;
} $this->is_previewed = true;
$this->_original_value =
$this->
value();
$this->_previewed_blog_id =
get_current_blog_id();
add_filter( 'wp_get_nav_menus', array
( $this, 'filter_wp_get_nav_menus'
), 10, 2
);
add_filter( 'wp_get_nav_menu_object', array
( $this, 'filter_wp_get_nav_menu_object'
), 10, 2
);
add_filter( 'default_option_nav_menu_options', array
( $this, 'filter_nav_menu_options'
) );
add_filter( 'option_nav_menu_options', array
( $this, 'filter_nav_menu_options'
) );
return true;
} /**
* Filters the wp_get_nav_menus() result to ensure the inserted menu object is included, and the deleted one is removed.
*
* @since 4.3.0
*
* @see wp_get_nav_menus()
*
* @param WP_Term[] $menus An array of menu objects.
* @param array $args An array of arguments used to retrieve menu objects.
* @return WP_Term[] Array of menu objects.
*/