PHP 8.0.30
Preview: class-wp-customize-header-image-setting.php Size: 1.79 KB
/home/certprox/zang.certproxywizard.com/wp/wp-includes/customize/class-wp-customize-header-image-setting.php

<?php
/**
 * Customize API: WP_Customize_Header_Image_Setting class
 *
 * @package WordPress
 * @subpackage Customize
 * @since 4.4.0
 */

/**
 * A setting that is used to filter a value, but will not save the results.
 *
 * Results should be properly handled using another setting or callback.
 *
 * @since 3.4.0
 *
 * @see WP_Customize_Setting
 */
final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {

	/**
	 * Unique string identifier for the setting.
	 *
	 * @since 3.4.0
	 * @var string
	 */
	public $id = 'header_image_data';

	/**
	 * @since 3.4.0
	 * @since 7.0.0 Return type updated from void to true for compatibility with base class.
	 *
	 * @global Custom_Image_Header $custom_image_header
	 *
	 * @param mixed $value The value to update.
	 * @return true Always returns true.
	 */
	public function update( $value ) {
		global $custom_image_header;

		// If _custom_header_background_just_in_time() fails to initialize $custom_image_header when not is_admin().
		if ( empty( $custom_image_header ) ) {
			require_once ABSPATH . 'wp-admin/includes/class-custom-image-header.php';
			$args                   = get_theme_support( 'custom-header' );
			$admin_head_callback    = $args[0]['admin-head-callback'] ?? null;
			$admin_preview_callback = $args[0]['admin-preview-callback'] ?? null;
			$custom_image_header    = new Custom_Image_Header( $admin_head_callback, $admin_preview_callback );
		}

		/*
		 * If the value doesn't exist (removed or random),
		 * use the header_image value.
		 */
		if ( ! $value ) {
			$value = $this->manager->get_setting( 'header_image' )->post_value();
		}

		if ( is_array( $value ) && isset( $value['choice'] ) ) {
			$custom_image_header->set_header_image( $value['choice'] );
		} else {
			$custom_image_header->set_header_image( $value );
		}
		return true;
	}
}

Directory Contents

Dirs: 0 × Files: 36

Name Size Perms Modified Actions
1.25 KB lrw-r--r-- 2022-05-18 12:24:14
Edit Download
782 B lrw-r--r-- 2026-05-21 18:01:52
Edit Download
2.96 KB lrw-r--r-- 2023-02-07 15:10:22
Edit Download
2.26 KB lrw-r--r-- 2020-06-16 18:07:14
Edit Download
3.13 KB lrw-r--r-- 2025-07-16 19:52:40
Edit Download
1.42 KB lrw-r--r-- 2023-09-08 06:32:24
Edit Download
7.51 KB lrw-r--r-- 2026-05-21 18:01:52
Edit Download
9.22 KB lrw-r--r-- 2025-03-05 21:27:22
Edit Download
733 B lrw-r--r-- 2026-05-21 18:01:52
Edit Download
8.12 KB lrw-r--r-- 2026-05-21 18:01:52
Edit Download
1.79 KB lrw-r--r-- 2026-05-21 18:01:52
Edit Download
1.18 KB lrw-r--r-- 2020-11-22 13:53:04
Edit Download
9.24 KB lrw-r--r-- 2026-05-21 18:01:51
Edit Download
1.10 KB lrw-r--r-- 2017-10-04 23:22:50
Edit Download
2.08 KB lrw-r--r-- 2023-02-07 15:10:22
Edit Download
7.97 KB lrw-r--r-- 2024-06-03 17:35:14
Edit Download
27.42 KB lrw-r--r-- 2026-05-21 18:01:52
Edit Download
2.25 KB lrw-r--r-- 2024-01-28 05:50:18
Edit Download
2.75 KB lrw-r--r-- 2023-02-23 09:06:20
Edit Download
1.10 KB lrw-r--r-- 2017-10-04 23:22:50
Edit Download
716 B lrw-r--r-- 2020-10-08 18:15:14
Edit Download
18.68 KB lrw-r--r-- 2026-05-21 18:01:51
Edit Download
3.23 KB lrw-r--r-- 2023-02-07 15:10:22
Edit Download
1.67 KB lrw-r--r-- 2020-02-26 11:30:08
Edit Download
1.65 KB lrw-r--r-- 2020-02-26 13:33:06
Edit Download
10.30 KB lrw-r--r-- 2026-05-21 18:01:52
Edit Download
13.52 KB lrw-r--r-- 2025-10-06 22:24:36
Edit Download
1.03 KB lrw-r--r-- 2017-11-30 21:11:00
Edit Download
5.04 KB lrw-r--r-- 2025-08-18 17:27:38
Edit Download
11.61 KB lrw-r--r-- 2023-09-13 22:25:16
Edit Download
3.31 KB lrw-r--r-- 2024-10-13 16:09:12
Edit Download
6.79 KB lrw-r--r-- 2025-03-18 11:15:22
Edit Download
1.17 KB lrw-r--r-- 2020-11-22 13:51:04
Edit Download
686 B lrw-r--r-- 2021-05-25 05:52:58
Edit Download
1.68 KB lrw-r--r-- 2023-02-07 15:10:22
Edit Download
2.58 KB lrw-r--r-- 2019-04-13 01:46:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).