WP_Customize_Header_Image_Control::prepare_control() WordPress Method

The WP_Customize_Header_Image_Control::prepare_control() method is used to prepare the header image control for display. This includes setting up the control's settings, such as the width and height of the image, and also retrieving the image from the WordPress media library.

WP_Customize_Header_Image_Control::prepare_control() #


Source

File: wp-includes/customize/class-wp-customize-header-image-control.php

	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();
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.