Recent

Settingsclass

Settings

Registers plugin settings.

Namespace: WebberZone\Image_Optimizer\Admin
Since: 1.0.0
Source: includes/admin/class-settings.php line 26

Methods

__construct()

Main constructor class.

Since: 1.0.0
Line: 75

public function __construct(  );

enqueue_htaccess_assets()

Enqueue the .htaccess install/remove button script on the settings screen.

Since: 1.0.0
Line: 99

public function enqueue_htaccess_assets( $hook_suffix ): void;
Type Name Description
string $hook_suffix Current admin page.

Returns: void

ajax_install_htaccess()

Write the Apache rules into .htaccess.

Since: 1.0.0
Line: 135

public function ajax_install_htaccess(  ): void;

Returns: void

ajax_remove_htaccess()

Remove this plugin’s block from .htaccess.

Since: 1.0.0
Line: 156

public function ajax_remove_htaccess(  ): void;

Returns: void

initialise_settings()

Initialise the settings API.

Since: 1.0.0
Line: 177

public function initialise_settings(  ): void;

Returns: void

settings_defaults() static

Get settings defaults.

Since: 1.0.0
Line: 204

static public function settings_defaults(  ): array;

Returns: array — Default settings.

get_translation_strings()

Array containing the translation strings.

Since: 1.0.0
Line: 263

public function get_translation_strings(  ): array;

Returns: array — Translation strings.

get_menus()

Get the admin menus.

Since: 1.0.0
Line: 291

public function get_menus(  ): array;

Returns: array — Admin menus.

get_defaults() static

Raw default values for every setting, keyed by option ID.

Deliberately contains no translation calls, so it is safe to invoke before init. Values are pre-normalised (checkboxes as 1/0) and the array is intentionally unfiltered — consumers apply the wzio_settings_defaults filter themselves.

Since: 0.10.0
Line: 317

static public function get_defaults(  ): array;

Returns: array — Raw default values keyed by option ID.

get_settings_sections() static

Array containing the settings’ sections.

Since: 1.0.0
Line: 357

static public function get_settings_sections(  ): array;

Returns: array — Settings sections.

get_registered_settings() static

Array containing the settings’ fields.

Since: 1.0.0
Line: 375

static public function get_registered_settings(  ): array;

Returns: array — Settings fields.

settings_general() static

General settings.

Since: 1.0.0
Line: 393

static public function settings_general(  ): array;

Returns: array — General settings.

settings_quality() static

Quality settings.

Since: 1.0.0
Line: 452

static public function settings_quality(  ): array;

Returns: array — Quality settings.

settings_delivery() static

Delivery settings.

Since: 1.0.0
Line: 521

static public function settings_delivery(  ): array;

Returns: array — Delivery settings.

settings_advanced() static

Advanced settings.

Since: 1.0.0
Line: 573

static public function settings_advanced(  ): array;

Returns: array — Advanced settings.

get_format_options() static

Get the selectable target formats, flagging any this server cannot encode.

Since: 1.0.0
Line: 633

static public function get_format_options(  ): array;

Returns: array — string> Format slug to label.

get_size_options() static

Get the registered image sizes as checkbox options.

Since: 1.0.0
Line: 660

static public function get_size_options(  ): array;

Returns: array — string> Size name to label.

change_settings_on_save()

Modify settings on save.

Since: 1.0.0
Line: 680

public function change_settings_on_save( $settings ): array;
Type Name Description
array $settings Settings array.

Returns: array — Modified settings array.

get_help_sidebar()

Get the help sidebar.

Since: 1.0.0
Line: 699

public function get_help_sidebar(  ): string;

Returns: string — Help sidebar content.

get_help_tabs()

Get the help tabs.

Since: 1.0.0
Line: 715

public function get_help_tabs(  ): array;

Returns: array — Help tabs.

Get the admin footer text.

Since: 1.0.0
Line: 742

public function get_admin_footer_text(  ): string;

Returns: string — Admin footer text.

Add plugin action links.

Since: 1.0.0
Line: 759

public function plugin_actions_links( $links ): array;
Type Name Description
array $links Array of links.

Returns: array — Modified array of links.

plugin_row_meta()

Add plugin row meta.

Since: 1.0.0
Line: 778

public function plugin_row_meta( $links, $file ): array;
Type Name Description
array $links Array of links.
string $file Plugin file.

Returns: array — Modified array of links.