filter_nav_menu_options_value example


    public function filter_nav_menu_options( $nav_menu_options ) {
        if ( get_current_blog_id() !== $this->_previewed_blog_id ) {
            return $nav_menu_options;
        }

        $menu             = $this->value();
        $nav_menu_options = $this->filter_nav_menu_options_value(
            $nav_menu_options,
            $this->term_id,
            false === $menu ? false : $menu['auto_add']
        );

        return $nav_menu_options;
    }

    /** * Sanitize an input. * * Note that parent::sanitize() erroneously does wp_unslash() on $value, but * we remove that in this override. * * @since 4.3.0 * * @param array $value The menu value to sanitize. * @return array|false|null Null if an input isn't valid. False if it is marked for deletion. * Otherwise the sanitized value. */
Home | Imprint | This part of the site doesn't use cookies.