403Webshell
Server IP : 198.38.94.13  /  Your IP : 216.73.217.33
Web Server : Apache
System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : revivere ( 1140)
PHP Version : 8.2.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/revivere/www/wp-content/plugins/astra-addon/classes/cache/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/revivere/www/wp-content/plugins/astra-addon/classes/cache/class-astra-dark-mode-cache.php
<?php
/**
 * Astra Dark Mode Cache
 *
 * @package Astra Addon
 * @since 4.11.2
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Class Astra_Dark_Mode_Cache
 *
 * @since 4.11.2
 */
class Astra_Dark_Mode_Cache {
	/**
	 * Constructor
	 *
	 * @since 4.11.2
	 */
	public function __construct() {
		add_filter( 'astra_dynamic_theme_css', array( $this, 'force_dark_palette_css_on_cache' ), 99 );
	}

	/**
	 * Force generation of dark-palette CSS when assets are written to files.
	 *
	 * Astra's dark mode styles are normally added only when the dark palette is
	 * active. When dynamic CSS is cached to static files, these rules might be
	 * missing if the palette wasn't enabled at build time. This filter ensures the
	 * rules are created regardless, so they are available whenever dark mode is
	 * toggled later.
	 *
	 * @param string $css Dynamic CSS accumulated from previous filters.
	 * @return string Modified CSS including dark-palette rules when needed.
	 * @since 4.11.2
	 */
	public function force_dark_palette_css_on_cache( $css ) {
		// Check if dynamic CSS is being generated as a file instead of inline.
		if ( class_exists( 'Astra_Cache_Base' ) && ! Astra_Cache_Base::inline_assets() ) {
			$css = astra_dark_palette_css( $css, true );
		}
		return $css;
	}
}

new Astra_Dark_Mode_Cache();

Youez - 2016 - github.com/yon3zu
LinuXploit