get_panel example

'menuNameLabel'          => __( 'Menu Name' ),
                'newMenuNameDescription' => __( 'If your theme has multiple menus, giving them clear names will help you manage them.' ),
                'itemAdded'              => __( 'Menu item added' ),
                'itemDeleted'            => __( 'Menu item deleted' ),
                'menuAdded'              => __( 'Menu created' ),
                'menuDeleted'            => __( 'Menu deleted' ),
                'movedUp'                => __( 'Menu item moved up' ),
                'movedDown'              => __( 'Menu item moved down' ),
                'movedLeft'              => __( 'Menu item moved out of submenu' ),
                'movedRight'             => __( 'Menu item is now a sub-item' ),
                /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */
                'customizingMenus'       => sprintf( __( 'Customizing ▸ %s' )esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ),
                /* translators: %s: Title of an invalid menu item. */
                'invalidTitleTpl'        => __( '%s (Invalid)' ),
                /* translators: %s: Title of a menu item in draft status. */
                'pendingTitleTpl'        => __( '%s (Pending)' ),
                /* translators: %d: Number of menu items found. */
                'itemsFound'             => __( 'Number of items found: %d' ),
                /* translators: %d: Number of additional menu items found. */
                'itemsFoundMore'         => __( 'Additional items found: %d' ),
                'itemsLoadingMore'       => __( 'Loading more results... please wait.' ),
                'reorderModeOn'          => __( 'Reorder mode enabled' ),
                'reorderModeOff'         => __( 'Reorder mode closed' ),
                
<?php                         /* translators: Hidden accessibility text. */
                        _e( 'Back' );
                        ?> </span> </button> <h3> <span class="customize-action"> <?php                         /* translators: &#9656; is the unicode right-pointing triangle. %s: Section title in the Customizer. */
                        printf( __( 'Customizing &#9656; %s' )esc_html( $this->manager->get_panel( 'widgets' )->title ) );
                    ?> </span> <?php _e( 'Add a Widget' ); ?> </h3> </div> <div id="available-widgets-filter"> <label class="screen-reader-text" for="widgets-search"> <?php                     /* translators: Hidden accessibility text. */
                    _e( 'Search Widgets' );
                    ?>

    public function json() {
        $array                   = wp_array_slice_assoc( (array) $this, array( 'id', 'description', 'priority', 'panel', 'type', 'description_hidden' ) );
        $array['title']          = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) );
        $array['content']        = $this->get_content();
        $array['active']         = $this->active();
        $array['instanceNumber'] = $this->instance_number;

        if ( $this->panel ) {
            /* translators: &#9656; is the unicode right-pointing triangle. %s: Section title in the Customizer. */
            $array['customizeAction'] = sprintf( __( 'Customizing &#9656; %s' )esc_html( $this->manager->get_panel( $this->panel )->title ) );
        } else {
            $array['customizeAction'] = __( 'Customizing' );
        }

        return $array;
    }

    /** * Checks required user capabilities and whether the theme has the * feature support required by the section. * * @since 3.4.0 * * @return bool False if theme doesn't support the section or user doesn't have the capability. */
Home | Imprint | This part of the site doesn't use cookies.