Settings
Class to register the settings.
Namespace: WebberZone\Contextual_Related_Posts\Admin
Since: 3.5.0
Source: includes/admin/class-settings.php line 26
Methods
__construct()
Main constructor class.
Since: 3.5.0
Line: 70
public function __construct( );
initialise_settings()
Initialise the settings API.
Since: 3.5.0
Line: 94
public function initialise_settings( );
get_translation_strings()
Array containing the translation strings.
Since: 1.8.0
Line: 122
public function get_translation_strings( ): array;
Returns: array — Translation strings.
get_menus()
Get the admin menus.
Line: 151
public function get_menus( ): array;
Returns: array — Admin menus.
get_settings_sections() static
Array containing the settings’ sections.
Since: 3.5.0
Line: 173
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: 212
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: 369
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: 397
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: 547
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: 727
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: 1042
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: 1167
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: 1205
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: 1282
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: 1412
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: 1657
static public function settings_performance( ): array;
Returns: array — Performance settings array
get_styles() static
Get the various styles.
Since: 3.5.0
Line: 1799
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: 1850
static public function get_orderings( ): array;
Returns: array — Order settings.
plugin_actions_links()
Adding WordPress plugin action links.
Since: 3.5.0
Line: 1876
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: 1895
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: 1914
public function get_help_sidebar( );
get_help_tabs()
Get the help tabs to display on the plugin settings page.
Since: 3.5.0
Line: 1940
public function get_help_tabs( );
get_admin_footer_text() static
Add footer text on the plugin page.
Since: 2.0.0
Line: 1982
static public function get_admin_footer_text( );
change_settings_on_save()
Modify settings when they are being saved.
Since: 3.5.0
Line: 2000
public function change_settings_on_save( $settings ): array;
| Type | Name | Description |
|---|---|---|
array |
$settings |
Settings array. |
Returns: array — Sanitized settings array.
display_admin_thumbnail()
Display the default thumbnail below the setting.
Since: 3.5.0
Line: 2067
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: 2088
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: 2106
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: 2164
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: 2228
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: 2373
static public function settings_page_header( );
after_setting_output() static
Updated the settings fields to display a pro version link.
Line: 2394
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: 2422
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: 2441
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: 2464
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.