Server IP : 170.150.155.74 / Your IP : 18.222.147.59 Web Server : Apache/2.4.53 (Debian) System : Linux b22bf132354b 5.4.0-162-generic #179-Ubuntu SMP Mon Aug 14 08:51:31 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/html/wp-content/plugins/google-site-kit/includes/Core/Assets/ |
Upload File : |
<?php /** * Class Google\Site_Kit\Core\Assets\Manifest * * @package GoogleSite_Kit * @copyright 2021 Google LLC * @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 * @link https://sitekit.withgoogle.com */ namespace Google\Site_Kit\Core\Assets; use Google\Site_Kit\Plugin; /** * Assets manifest. * * @since 1.15.0 * @access private * @ignore */ class Manifest { /** * Entries as $handle => [ $filename, $hash ] map. * * @since 1.48.0 * @var array */ private static $data; /** * Gets the manifest entry for the given handle. * * @since 1.48.0 * * @param string $handle Asset handle to get manifest data for. * @return array List of $filename and $hash, or `null` for both if not found. */ public static function get( $handle ) { if ( null === self::$data ) { self::load(); } if ( isset( self::$data[ $handle ] ) ) { return self::$data[ $handle ]; } return array( null, null ); } /** * Loads the generated manifest file. * * @since 1.48.0 */ private static function load() { $path = Plugin::instance()->context()->path( 'dist/manifest.php' ); if ( file_exists( $path ) ) { // If the include fails, $data will be `false` // so this should only be attempted once. self::$data = include $path; } } }