Recent

Settingsclass

Settings

Class to register the settings.

Namespace: WebberZone\Contextual_Related_Posts\Admin
Since: 3.5.0
Source: includes/admin/class-settings.php line 27

Methods

__construct()

Main constructor class.

Since: 3.5.0
Line: 71

public function __construct(  );

initialise_settings()

Initialise the settings API.

Since: 3.5.0
Line: 96

public function initialise_settings(  );

get_translation_strings()

Array containing the translation strings.

Since: 1.8.0
Line: 124

public function get_translation_strings(  ): array;

Returns: array — Translation strings.

get_menus()

Get the admin menus.

Line: 156

public function get_menus(  ): array;

Returns: array — Admin menus.

get_settings_sections() static

Array containing the settings’ sections.

Since: 3.5.0
Line: 178

static public function get_settings_sections(  ): array;

Returns: array — Settings array

get_defaults() static

Raw defaults for every registered setting, keyed by option ID.

Must exactly match what crp_settings_defaults() computes from get_registered_settings(), but without building the full (translated) field definitions. Values are pre-normalized: checkboxes are 1/0, not true/false, and thumb_default is represented as '' since its real value (from Display::get_default_thumbnail()) can’t be known statically.

Since: 4.3.0
Line: 217

static public function get_defaults(  ): array<string,;

Returns: array<string, — mixed> Default value for every option ID.

get_registered_settings() static

Retrieve the array of plugin settings

Since: 3.5.0
Line: 381

static public function get_registered_settings(  ): array;

Returns: array — Settings array

settings_general() static

Retrieve the array of General settings

Since: 3.5.0
Line: 425

static public function settings_general(  ): array;

Returns: array — General settings array

settings_output() static

Retrieve the array of Output settings

Since: 3.5.0
Line: 575

static public function settings_output(  ): array;

Returns: array — Output settings array

settings_list() static

Retrieve the array of List Tuning settings

Since: 3.5.0
Line: 755

static public function settings_list(  ): array;

Returns: array — List Tuning settings array

settings_thumbnail() static

Retrieve the array of Thumbnail settings

Since: 3.5.0
Line: 1106

static public function settings_thumbnail(  ): array;

Returns: array — Thumbnail settings array

settings_styles() static

Retrieve the array of Styles settings

Since: 3.5.0
Line: 1231

static public function settings_styles(  ): array;

Returns: array — Styles settings array

settings_feed() static

Retrieve the array of Feed settings

Since: 3.5.0
Line: 1269

static public function settings_feed(  ): array;

Returns: array — Feed settings array

settings_features() static

Retrieve the array of Features settings.

All features are enabled by default. Disabling a feature stops its classes from being loaded on any request.

Since: 4.4.1
Line: 1346

static public function settings_features(  ): array;

Returns: array — Features settings array.

settings_woocommerce() static

Retrieve the array of WooCommerce settings

Since: 4.2.0
Line: 1504

static public function settings_woocommerce(  ): array;

Returns: array — WooCommerce settings array

settings_performance() static

Retrieve the array of Performance settings

Since: 4.0.0
Line: 1749

static public function settings_performance(  ): array;

Returns: array — Performance settings array

get_styles() static

Get the various styles.

Since: 3.5.0
Line: 1891

static public function get_styles(  ): array;

Returns: array — Associative array of styles.

get_orderings() static

Get the various order settings.

Since: 3.5.0
Line: 1942

static public function get_orderings(  ): array;

Returns: array — Order settings.

Adding WordPress plugin action links.

Since: 3.5.0
Line: 1968

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

Returns: array

plugin_row_meta()

Add meta links on Plugins page.

Since: 3.5.0
Line: 1987

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

Returns: array

get_help_sidebar()

Get the help sidebar content to display on the plugin settings page.

Since: 1.8.0
Line: 2006

public function get_help_sidebar(  );

get_help_tabs()

Get the help tabs to display on the plugin settings page.

Since: 3.5.0
Line: 2032

public function get_help_tabs(  );

Add footer text on the plugin page.

Since: 2.0.0
Line: 2074

static public function get_admin_footer_text(  );

change_settings_on_save()

Modify settings when they are being saved.

Since: 3.5.0
Line: 2092

public function change_settings_on_save( $settings ): mixed;
Type Name Description
mixed $settings Settings array, or the reset value.

Returns: mixed — Sanitized settings array, or the reset value.

clear_cache_on_settings_reset()

Clear the cache when the settings are reset to their defaults.

The reset path deletes the option and returns before the sanitize filter runs, so the ranking can change without change_settings_on_save() ever seeing it.

Since: 4.5.0
Line: 2166

public function clear_cache_on_settings_reset( $option ): void;
Type Name Description
string $option Name of the option being deleted.

Returns: void

display_admin_thumbnail()

Display the default thumbnail below the setting.

Since: 3.5.0
Line: 2265

public function display_admin_thumbnail( $html, $args ): string;
Type Name Description
string $html Current HTML.
array $args Argument array of the setting.

Returns: string

reset_default_thumb_setting()

Display the default thumbnail below the setting.

Since: 3.5.0
Line: 2286

public function reset_default_thumb_setting( $html, $args ): string;
Type Name Description
string $html Current HTML.
array $args Argument array of the setting.

Returns: string

admin_enqueue_scripts()

Enqueue scripts and styles.

Since: 3.5.0
Line: 2304

public function admin_enqueue_scripts( $hook );
Type Name Description
string $hook The current admin page.

tags_search() static

Function to add an action to search for tags using Ajax.

Since: 3.5.0
Line: 2362

static public function tags_search(  ): void;

Returns: void

taxonomy_search_tom_select() static

AJAX handler for Tom Select taxonomy search.

Since: 3.5.0
Line: 2426

static public function taxonomy_search_tom_select(  ): void;

Returns: void

settings_page_header() static

Add a link to the Tools page from the settings page.

Since: 3.5.0
Line: 2571

static public function settings_page_header(  );

after_setting_output() static

Updated the settings fields to display a pro version link.

Line: 2592

static public function after_setting_output( $output, $args ): string;
Type Name Description
string $output Settings field HTML.
array $args Settings field arguments.

Returns: string — Updated HTML.

add_wizard_button()

Add a button to the settings page to start the settings wizard.

Since: 4.1.0
Line: 2620

public function add_wizard_button(  );

get_taxonomy_search_field_attributes() static

Get field attributes for Tom Select taxonomy search fields.

Since: 4.2.0
Line: 2639

static public function get_taxonomy_search_field_attributes( string $taxonomy, array $ts_config = ... ): array;
Type Name Description
string $taxonomy The taxonomy to search.
array $ts_config Optional Tom Select configuration.

Returns: array — Field attributes array.

get_meta_keys_search_field_attributes() static

Get field attributes for Tom Select meta key search fields.

Since: 4.2.0
Line: 2662

static public function get_meta_keys_search_field_attributes( array $ts_config = ... ): array;
Type Name Description
array $ts_config Optional Tom Select configuration.

Returns: array — Field attributes array.