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(); } }