🚀 Hostinger Optimized
🖥️ Server: Apache
💻 System: Linux webm015.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
👤 User: stakrfrcol (69043)
🐘 PHP: 8.3.31
🚫 Disabled: _dyuweyrj4,_dyuweyrj4r,dl

💻 Terminal

📁 /home/stakrfrcol/agency
$

📄 LazyloadCSSContext.php

📁 Path: ./wp-content/plugins/wp-rocket/inc/Engine/Media/Lazyload/CSS/Context/LazyloadCSSContext.php
📊 Size: 1.26 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php

namespace WP_Rocket\Engine\Media\Lazyload\CSS\Context;

use WP_Rocket\Admin\Options_Data;
use WP_Rocket\Engine\Common\Cache\CacheInterface;
use WP_Rocket\Engine\Common\Context\AbstractContext;
use WP_Rocket\Engine\Media\Lazyload\CanLazyloadTrait;

class LazyloadCSSContext extends AbstractContext {
	use CanLazyloadTrait;

	/**
	 * Cache instance.
	 *
	 * @var CacheInterface
	 */
	protected $cache;

	/**
	 * Instantiate the class.
	 *
	 * @param Options_Data   $options WPR options.
	 * @param CacheInterface $cache Cache instance.
	 */
	public function __construct( Options_Data $options, CacheInterface $cache ) {
		parent::__construct( $options );
		$this->cache = $cache;
	}

	/**
	 * Determine if the action is allowed.
	 *
	 * @param array $data Data to pass to the context.
	 * @return bool
	 */
	public function is_allowed( array $data = [] ): bool {
		$is_allowed = $this->run_common_checks(
			[
				'do_not_optimize'    => false,
				'bypass'             => false,
				'option'             => 'lazyload_css_bg_img',
				'password_protected' => false,
				'post_excluded'      => 'lazyload_css_bg_img',
				'logged_in'          => false,
			]
		);

		if ( ! $is_allowed || ! $this->should_lazyload() ) {
			return false;
		}

		return $this->cache->is_accessible();
	}
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨