render_screen_options example


    public function render_screen_options() {
        // Adds the screen options.         require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
        add_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' );

        // Display screen options.         $screen = WP_Screen::get( 'nav-menus.php' );
        $screen->render_screen_options( array( 'wrap' => false ) );
    }

    /** * Returns the advanced options for the nav menus page. * * Link title attribute added as it's a relatively advanced concept for new users. * * @since 4.3.0 * @deprecated 4.5.0 Deprecated in favor of wp_nav_menu_manage_columns(). */
    public function wp_nav_menu_manage_columns() {
        
if ( $this->get_option( 'layout_columns' ) ) {
            $this->columns = (int) get_user_option( "screen_layout_$this->id" );

            if ( ! $this->columns && $this->get_option( 'layout_columns', 'default' ) ) {
                $this->columns = $this->get_option( 'layout_columns', 'default' );
            }
        }
        $GLOBALS['screen_layout_columns'] = $this->columns; // Set the global for back-compat.
        // Add screen options.         if ( $this->show_screen_options() ) {
            $this->render_screen_options();
        }
        ?> </div> <?php         if ( ! $this->get_help_tabs() && ! $this->show_screen_options() ) {
            return;
        }
        ?> <div id="screen-meta-links"> <?php if ( $this->show_screen_options() ) : ?> <div id="screen-options-link-wrap" class="hide-if-no-js screen-meta-toggle"> <button type="button" id="show-settings-link" class="button show-settings" aria-controls="screen-options-wrap" aria-expanded="false">
Home | Imprint | This part of the site doesn't use cookies.