get_menu_auto_add example


    protected function get_term( $id ) {
        $term = parent::get_term( $id );

        if ( is_wp_error( $term ) ) {
            return $term;
        }

        $nav_term           = wp_get_nav_menu_object( $term );
        $nav_term->auto_add = $this->get_menu_auto_add( $nav_term->term_id );

        return $nav_term;
    }

    /** * Checks whether the current user has read permission for the endpoint. * * This allows for any user that can `edit_theme_options` or edit any REST API available post type. * * @since 5.9.0 * * @param WP_REST_Request $request Full details about the request. * @return bool|WP_Error Whether the current user has permission. */
Home | Imprint | This part of the site doesn't use cookies.