✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.191
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/repositories/Modules/Analytics_4//Custom_Dimensions_Data_Available.php
<?php
/**
 * Class Google\Site_Kit\Modules\Analytics_4\Custom_Dimensions_Data_Available
 *
 * @package   Google\Site_Kit\Modules\Analytics_4
 * @copyright 2023 Google LLC
 * @license   https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
 * @link      https://sitekit.withgoogle.com
 */

namespace Google\Site_Kit\Modules\Analytics_4;

use Google\Site_Kit\Core\Storage\Transients;

/**
 * Class for updating Analytics 4 custom dimension data availability state.
 *
 * @since 1.113.0
 * @access private
 * @ignore
 */
class Custom_Dimensions_Data_Available {

	/**
	 * List of valid custom dimension slugs.
	 *
	 * @since 1.113.0
	 * @var array
	 */
	const CUSTOM_DIMENSION_SLUGS = array(
		'googlesitekit_post_date',
		'googlesitekit_post_author',
		'googlesitekit_post_categories',
		'googlesitekit_post_type',
	);

	/**
	 * Transients instance.
	 *
	 * @since 1.113.0
	 * @var Transients
	 */
	protected $transients;

	/**
	 * Constructor.
	 *
	 * @since 1.113.0
	 *
	 * @param Transients $transients Transients instance.
	 */
	public function __construct( Transients $transients ) {
		$this->transients = $transients;
	}

	/**
	 * Gets data available transient name for the custom dimension.
	 *
	 * @since 1.113.0
	 *
	 * @param string $custom_dimension Custom dimension slug.
	 * @return string Data available transient name.
	 */
	protected function get_data_available_transient_name( $custom_dimension ) {
		return "googlesitekit_custom_dimension_{$custom_dimension}_data_available";
	}

	/**
	 * Gets data availability for all custom dimensions.
	 *
	 * @since 1.113.0
	 *
	 * @return array Associative array of custom dimension names and their data availability state.
	 */
	public function get_data_availability() {
		return array_reduce(
			self::CUSTOM_DIMENSION_SLUGS,
			function ( $data_availability, $custom_dimension ) {
				$data_availability[ $custom_dimension ] = $this->is_data_available( $custom_dimension );
				return $data_availability;
			},
			array()
		);
	}

	/**
	 * Checks whether the data is available for the custom dimension.
	 *
	 * @since 1.113.0
	 *
	 * @param string $custom_dimension Custom dimension slug.
	 * @return bool True if data is available, false otherwise.
	 */
	protected function is_data_available( $custom_dimension ) {
		return (bool) $this->transients->get( $this->get_data_available_transient_name( $custom_dimension ) );
	}

	/**
	 * Sets the data available state for the custom dimension.
	 *
	 * @since 1.113.0
	 *
	 * @param string $custom_dimension Custom dimension slug.
	 * @return bool True on success, false otherwise.
	 */
	public function set_data_available( $custom_dimension ) {
		return $this->transients->set( $this->get_data_available_transient_name( $custom_dimension ), true );
	}

	/**
	 * Resets the data available state for all custom dimensions.
	 *
	 * @since 1.113.0
	 * @since 1.114.0 Added optional $custom_dimensions parameter.
	 *
	 * @param array $custom_dimensions Optional. List of custom dimension slugs to reset.
	 */
	public function reset_data_available(
		$custom_dimensions = self::CUSTOM_DIMENSION_SLUGS
	) {
		foreach ( $custom_dimensions as $custom_dimension ) {
			$this->transients->delete( $this->get_data_available_transient_name( $custom_dimension ) );
		}
	}

	/**
	 * Checks whether the custom dimension is valid.
	 *
	 * @since 1.113.0
	 *
	 * @param string $custom_dimension Custom dimension slug.
	 * @return bool True if valid, false otherwise.
	 */
	public function is_valid_custom_dimension( $custom_dimension ) {
		return in_array( $custom_dimension, self::CUSTOM_DIMENSION_SLUGS, true );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
24 Sep 2026 8.59 AM
docteuh / users
0755
GoogleAnalyticsAdmin
--
11 Sep 2026 10.34 AM
docteuh / users
0755
Report
--
11 Sep 2026 10.34 AM
docteuh / users
0755
AMP_Tag.php
2.493 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Custom_Dimensions_Data_Available.php
3.529 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Report.php
5.48 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Settings.php
6.181 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Tag_Guard.php
0.858 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Tag_Interface.php
0.631 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
Web_Tag.php
2.42 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
icon-redirect-manager-20260827192224.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF