Recent

Server_Rulesclass

Server_Rules

Generates optional Vary: Accept rules for stylesheet images.

Namespace: WebberZone\Image_Optimizer\Frontend
Since: 1.0.0
Source: includes/frontend/class-server-rules.php line 21

Methods

get_apache_rule_lines() static

Build the Apache rule lines, without the surrounding marker comments.

Since: 1.0.0
Line: 39

static public function get_apache_rule_lines(  ): array;

Returns: array — string> Rule lines.

get_apache_rules() static

Build the Apache rules, including the marker comments, for display.

Since: 1.0.0
Line: 75

static public function get_apache_rules(  ): string;

Returns: string — Rules block.

htaccess_path() static

Absolute path to the site’s .htaccess file.

Since: 1.0.0
Line: 92

static public function htaccess_path(  ): string;

Returns: string — Path.

is_apache_rules_installed() static

Whether this plugin’s marker block is currently present in .htaccess.

Since: 1.0.0
Line: 105

static public function is_apache_rules_installed(  ): bool;

Returns: bool — True when installed.

is_htaccess_writable() static

Whether .htaccess exists and is writable, or can be created.

Since: 1.0.0
Line: 124

static public function is_htaccess_writable(  ): bool;

Returns: bool — True when the file can be written to.

install_apache_rules() static

Write this plugin’s marker block into .htaccess.

Since: 1.0.0
Line: 139

static public function install_apache_rules(  ): bool;

Returns: bool — True on success.

remove_apache_rules() static

Remove this plugin’s marker block from .htaccess, leaving the rest alone.

Since: 1.0.0
Line: 152

static public function remove_apache_rules(  ): bool;

Returns: bool — True on success.

get_nginx_rules() static

Build the nginx rules.

Since: 1.0.0
Line: 169

static public function get_nginx_rules(  ): string;

Returns: string — Rules block.

get_settings_description() static

The description rendered on the Delivery settings tab.

Since: 1.0.0
Line: 202

static public function get_settings_description(  ): string;

Returns: string — HTML.