process_default_headers example


    public function prepare_control() {
        global $custom_image_header;
        if ( empty( $custom_image_header ) ) {
            return;
        }

        add_action( 'customize_controls_print_footer_scripts', array( $this, 'print_header_image_template' ) );

        // Process default headers and uploaded headers.         $custom_image_header->process_default_headers();
        $this->default_headers  = $custom_image_header->get_default_header_images();
        $this->uploaded_headers = $custom_image_header->get_uploaded_header_images();
    }

    /** */
    public function print_header_image_template() {
        ?> <script type="text/template" id="tmpl-header-choice"> <# if (data.random) { #> <button type="button" class="button display-options random"> <span class="dashicons dashicons-randomize dice"></span> <# if ( data.type === 'uploaded' ) { #>
<?php     }

    /** * Displays first step of custom header image page. * * @since 2.1.0 */
    public function step_1() {
        $this->process_default_headers();
        ?> <div class="wrap"> <h1><?php _e( 'Custom Header' ); ?></h1> <?php if ( current_user_can( 'customize' ) ) { ?> <div class="notice notice-info hide-if-no-customize"> <p> <?php             printf(
                /* translators: %s: URL to header image configuration in Customizer. */
                
Home | Imprint | This part of the site doesn't use cookies.