$84 GRAYBYTE WORDPRESS FILE MANAGER $81

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/test1.proid.vn/wp-includes/customize/

HOME
Current File : /home/bqrcodec/test1.proid.vn/wp-includes/customize//class-wp-customize-header-image-control.php
<?php
/**
 * Customize API: WP_Customize_Header_Image_Control class
 *
 * @package WordPress
 * @subpackage Customize
 * @since 4.4.0
 */

/**
 * Customize Header Image Control class.
 *
 * @since 3.4.0
 *
 * @see WP_Customize_Image_Control
 */
class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control {

	/**
	 * Customize control type.
	 *
	 * @since 4.2.0
	 * @var string
	 */
	public $type = 'header';

	/**
	 * Uploaded header images.
	 *
	 * @since 3.9.0
	 * @var string
	 */
	public $uploaded_headers;

	/**
	 * Default header images.
	 *
	 * @since 3.9.0
	 * @var string
	 */
	public $default_headers;

	/**
	 * Constructor.
	 *
	 * @since 3.4.0
	 *
	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.
	 */
	public function __construct( $manager ) {
		parent::__construct(
			$manager,
			'header_image',
			array(
				'label'    => __( 'Header Image' ),
				'settings' => array(
					'default' => 'header_image',
					'data'    => 'header_image_data',
				),
				'section'  => 'header_image',
				'removed'  => 'remove-header',
				'get_url'  => 'get_header_image',
			)
		);
	}

	/**
	 */
	public function enqueue() {
		wp_enqueue_media();
		wp_enqueue_script( 'customize-views' );

		$this->prepare_control();

		wp_localize_script(
			'customize-views',
			'_wpCustomizeHeader',
			array(
				'data'     => array(
					'width'         => absint( get_theme_support( 'custom-header', 'width' ) ),
					'height'        => absint( get_theme_support( 'custom-header', 'height' ) ),
					'flex-width'    => absint( get_theme_support( 'custom-header', 'flex-width' ) ),
					'flex-height'   => absint( get_theme_support( 'custom-header', 'flex-height' ) ),
					'currentImgSrc' => $this->get_current_image_src(),
				),
				'nonces'   => array(
					'add'    => wp_create_nonce( 'header-add' ),
					'remove' => wp_create_nonce( 'header-remove' ),
				),
				'uploads'  => $this->uploaded_headers,
				'defaults' => $this->default_headers,
			)
		);

		parent::enqueue();
	}

	/**
	 * @global Custom_Image_Header $custom_image_header
	 */
	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 _e( 'Randomize uploaded headers' ); ?>
				<# } else if ( data.type === 'default' ) { #>
					<?php _e( 'Randomize suggested headers' ); ?>
				<# } #>
			</button>

			<# } else { #>

			<button type="button" class="choice thumbnail"
				data-customize-image-value="{{data.header.url}}"
				data-customize-header-image-data="{{JSON.stringify(data.header)}}">
				<span class="screen-reader-text">
					<?php
					/* translators: Hidden accessibility text. */
					_e( 'Set image' );
					?>
				</span>
				<img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" />
			</button>

			<# if ( data.type === 'uploaded' ) { #>
				<button type="button" class="dashicons dashicons-no close">
					<span class="screen-reader-text">
						<?php
						/* translators: Hidden accessibility text. */
						_e( 'Remove image' );
						?>
					</span>
				</button>
			<# } #>

			<# } #>
		</script>

		<script type="text/template" id="tmpl-header-current">
			<# if (data.choice) { #>
				<# if (data.random) { #>

			<div class="placeholder">
				<span class="dashicons dashicons-randomize dice"></span>
				<# if ( data.type === 'uploaded' ) { #>
					<?php _e( 'Randomizing uploaded headers' ); ?>
				<# } else if ( data.type === 'default' ) { #>
					<?php _e( 'Randomizing suggested headers' ); ?>
				<# } #>
			</div>

				<# } else { #>

			<img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" />

				<# } #>
			<# } #>
		</script>
		<?php
	}

	/**
	 * @return string|void
	 */
	public function get_current_image_src() {
		$src = $this->value();
		if ( isset( $this->get_url ) ) {
			$src = call_user_func( $this->get_url, $src );
			return $src;
		}
	}

	/**
	 */
	public function render_content() {
		$visibility = $this->get_current_image_src() ? '' : ' style="display:none" ';
		$width      = absint( get_theme_support( 'custom-header', 'width' ) );
		$height     = absint( get_theme_support( 'custom-header', 'height' ) );
		?>
		<div class="customize-control-content">
			<?php
			if ( current_theme_supports( 'custom-header', 'video' ) ) {
				echo '<span class="customize-control-title">' . $this->label . '</span>';
			}
			?>
			<div class="customize-control-notifications-container"></div>
			<p class="customizer-section-intro customize-control-description">
				<?php
				if ( current_theme_supports( 'custom-header', 'video' ) ) {
					_e( 'Click &#8220;Add Image&#8221; to upload an image file from your computer. Your theme works best with an image that matches the size of your video &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' );
				} elseif ( $width && $height ) {
					printf(
						/* translators: %s: Header size in pixels. */
						__( 'Click &#8220;Add Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header size of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
						sprintf( '<strong>%s &times; %s</strong>', $width, $height )
					);
				} elseif ( $width ) {
					printf(
						/* translators: %s: Header width in pixels. */
						__( 'Click &#8220;Add Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header width of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
						sprintf( '<strong>%s</strong>', $width )
					);
				} else {
					printf(
						/* translators: %s: Header height in pixels. */
						__( 'Click &#8220;Add Image&#8221; to upload an image file from your computer. Your theme works best with an image with a header height of %s pixels &#8212; you&#8217;ll be able to crop your image once you upload it for a perfect fit.' ),
						sprintf( '<strong>%s</strong>', $height )
					);
				}
				?>
			</p>
			<div class="current">
				<label for="header_image-button">
					<span class="customize-control-title">
						<?php _e( 'Current header' ); ?>
					</span>
				</label>
				<div class="container">
				</div>
			</div>
			<div class="actions">
				<?php if ( current_user_can( 'upload_files' ) ) : ?>
				<button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
				<button type="button" class="button new <?php echo ! $this->get_current_image_src() ? '' : 'customize-header-image-not-selected'; ?>" id="header_image-button" aria-label="<?php esc_attr_e( 'Add Header Image' ); ?>"><?php _e( 'Add Image' ); ?></button>
				<?php endif; ?>
			</div>
			<div class="choices">
				<span class="customize-control-title header-previously-uploaded">
					<?php _ex( 'Previously uploaded', 'custom headers' ); ?>
				</span>
				<div class="uploaded">
					<div class="list">
					</div>
				</div>
				<span class="customize-control-title header-default">
					<?php _ex( 'Suggested', 'custom headers' ); ?>
				</span>
				<div class="default">
					<div class="list">
					</div>
				</div>
			</div>
		</div>
		<?php
	}
}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
18 Mar 2026 5.12 PM
bqrcodec / bqrcodec
0755
class-wp-customize-background-image-control.php
1.254 KB
18 May 2022 3.24 PM
bqrcodec / bqrcodec
0644
class-wp-customize-background-image-setting.php
0.624 KB
18 May 2022 3.24 PM
bqrcodec / bqrcodec
0644
class-wp-customize-background-position-control.php
2.961 KB
7 Feb 2023 5.10 PM
bqrcodec / bqrcodec
0644
class-wp-customize-code-editor-control.php
2.263 KB
16 Jun 2020 9.07 PM
bqrcodec / bqrcodec
0644
class-wp-customize-color-control.php
3.134 KB
16 Jul 2025 10.52 PM
bqrcodec / bqrcodec
0644
class-wp-customize-cropped-image-control.php
1.425 KB
8 Sep 2023 9.32 AM
bqrcodec / bqrcodec
0644
class-wp-customize-custom-css-setting.php
5.16 KB
2 May 2025 2.19 PM
bqrcodec / bqrcodec
0644
class-wp-customize-date-time-control.php
9.225 KB
5 Mar 2025 11.27 PM
bqrcodec / bqrcodec
0644
class-wp-customize-filter-setting.php
0.574 KB
27 Jul 2017 12.41 AM
bqrcodec / bqrcodec
0644
class-wp-customize-header-image-control.php
7.841 KB
18 Aug 2025 8.27 PM
bqrcodec / bqrcodec
0644
class-wp-customize-header-image-setting.php
1.74 KB
10 Jul 2023 11.00 PM
bqrcodec / bqrcodec
0644
class-wp-customize-image-control.php
1.183 KB
22 Nov 2020 3.53 PM
bqrcodec / bqrcodec
0644
class-wp-customize-media-control.php
9.185 KB
18 Aug 2025 8.27 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-auto-add-control.php
1.096 KB
5 Oct 2017 2.22 AM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-control.php
2.078 KB
7 Feb 2023 5.10 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-item-control.php
7.966 KB
3 Jun 2024 8.35 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-item-setting.php
27.216 KB
30 Sep 2025 4.28 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-location-control.php
2.245 KB
28 Jan 2024 7.50 AM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-locations-control.php
2.751 KB
23 Feb 2023 11.06 AM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-name-control.php
1.104 KB
5 Oct 2017 2.22 AM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-section.php
0.699 KB
8 Oct 2020 9.15 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menu-setting.php
18.492 KB
18 Jan 2022 8.29 PM
bqrcodec / bqrcodec
0644
class-wp-customize-nav-menus-panel.php
3.231 KB
7 Feb 2023 5.10 PM
bqrcodec / bqrcodec
0644
class-wp-customize-new-menu-control.php
1.67 KB
26 Feb 2020 1.30 PM
bqrcodec / bqrcodec
0644
class-wp-customize-new-menu-section.php
1.653 KB
26 Feb 2020 3.33 PM
bqrcodec / bqrcodec
0644
class-wp-customize-partial.php
10.32 KB
12 Sep 2022 3.47 PM
bqrcodec / bqrcodec
0644
class-wp-customize-selective-refresh.php
13.519 KB
7 Oct 2025 1.24 AM
bqrcodec / bqrcodec
0644
class-wp-customize-sidebar-section.php
1.034 KB
30 Nov 2017 11.11 PM
bqrcodec / bqrcodec
0644
class-wp-customize-site-icon-control.php
5.042 KB
18 Aug 2025 8.27 PM
bqrcodec / bqrcodec
0644
class-wp-customize-theme-control.php
11.61 KB
14 Sep 2023 1.25 AM
bqrcodec / bqrcodec
0644
class-wp-customize-themes-panel.php
3.306 KB
13 Oct 2024 7.09 PM
bqrcodec / bqrcodec
0644
class-wp-customize-themes-section.php
6.792 KB
18 Mar 2025 1.15 PM
bqrcodec / bqrcodec
0644
class-wp-customize-upload-control.php
1.169 KB
22 Nov 2020 3.51 PM
bqrcodec / bqrcodec
0644
class-wp-sidebar-block-editor-control.php
0.67 KB
25 May 2021 8.52 AM
bqrcodec / bqrcodec
0644
class-wp-widget-area-customize-control.php
1.679 KB
7 Feb 2023 5.10 PM
bqrcodec / bqrcodec
0644
class-wp-widget-form-customize-control.php
2.584 KB
13 Apr 2019 4.46 AM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF