filesystem = $filesystem; } /** * Check if the operation is allowed. * * @param array $data Data to provide 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' => 'remove_unused_css', 'password_protected' => false, 'post_excluded' => 'remove_unused_css', 'logged_in' => false, ] ); if ( ! $is_allowed ) { return false; } return $this->filesystem->is_writable_folder(); } }