Settings_Page implements Standard_Service, Registerable, Conditional

This class handles our plugin settings page in the admin.

Tags
author

Barn2 Plugins [email protected]

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Standard_Service
Registerable
Conditional

Table of Contents

MENU_SLUG  = 'posts_table'
OPTION_GROUP  = 'posts_table_pro'
$default_settings  : mixed
$plugin  : mixed
$services  : mixed
__construct()  : mixed
Constructor.
add_settings_page()  : mixed
Add the settings page.
add_settings_sections()  : mixed
Add the settings sections.
add_table_builder_wizard_link()  : array<string|int, mixed>
Add the table builder wizard link to the help links.
backwards_compatibility()  : void
Add backwards compatibility for specific settings.
clear_table_cache()  : void
Clear table cache on AJAX request and set a transient to display a one time admin notice
display_cache_cleared_notice()  : void
Display admin notice after cache cleared
display_pagination_description()  : mixed
Display pagination description.
display_search_description()  : mixed
Display the search description.
display_settings_page()  : mixed
Display the settings page.
display_sort_description()  : mixed
Display the sort description.
filter_settings_for_display()  : mixed
Mask remembered locations only while rendering the settings form.
is_required()  : mixed
{@inheritdoc}
register()  : mixed
{@inheritdoc}
register_settings()  : mixed
{@inheritdoc}
sanitize_additional_post_types()  : array<string, bool>
Sanitize explicitly selected additional post types.
sanitize_misc_settings()  : mixed
Sanitize misc settings.
sanitize_search_page_setting()  : string|int|float
Sanitize search page setting.
sanitize_shortcode_settings()  : mixed
Sanitize shortcode settings.
support_links()  : void
Support links for the settings page.
get_additional_post_type_choices()  : array<string, string>
Get eligible additional post-type choices, excluding automatic types.
get_advanced_settings()  : array<string|int, mixed>
Get the advanced settings for the table.
get_content_settings()  : array<string|int, mixed>
Get the content settings.
get_load_settings()  : array<string|int, mixed>
Get the load settings.
get_pagination_settings()  : array<string|int, mixed>
Get the pagination settings.
get_registered_post_types()  : array<string|int, mixed>
Get registered post types.
get_search_settings()  : array<string|int, mixed>
Get the search settings.
get_sort_settings()  : array<string|int, mixed>
Get the sort settings.
read_more()  : string
Read more link.

Constants

OPTION_GROUP

public mixed OPTION_GROUP = 'posts_table_pro'
Tags

Properties

Methods

__construct()

Constructor.

public __construct(Licensed_Plugin $plugin) : mixed
Parameters
$plugin : Licensed_Plugin
Tags
Return values
mixed —

add_settings_page()

Add the settings page.

public add_settings_page() : mixed
Tags
Return values
mixed —

add_settings_sections()

Add the settings sections.

public add_settings_sections() : mixed
Tags
Return values
mixed —

Add the table builder wizard link to the help links.

public add_table_builder_wizard_link(array<string|int, mixed> $links, Licensed_Plugin $plugin) : array<string|int, mixed>
Parameters
$links : array<string|int, mixed>
$plugin : Licensed_Plugin
Tags
Return values
array<string|int, mixed> —

backwards_compatibility()

Add backwards compatibility for specific settings.

public backwards_compatibility() : void
Tags
Return values
void —

clear_table_cache()

Clear table cache on AJAX request and set a transient to display a one time admin notice

public clear_table_cache() : void
Tags
Return values
void —

display_cache_cleared_notice()

Display admin notice after cache cleared

public display_cache_cleared_notice() : void
Tags
Return values
void —

display_pagination_description()

Display pagination description.

public display_pagination_description() : mixed
Tags
Return values
mixed —

display_search_description()

Display the search description.

public display_search_description() : mixed
Tags
Return values
mixed —

display_settings_page()

Display the settings page.

public display_settings_page() : mixed
Tags
Return values
mixed —

display_sort_description()

Display the sort description.

public display_sort_description() : mixed
Tags
Return values
mixed —

filter_settings_for_display()

Mask remembered locations only while rendering the settings form.

public filter_settings_for_display(mixed $settings) : mixed
Parameters
$settings : mixed

Stored options.

Tags
Return values
mixed —

is_required()

{@inheritdoc}

public is_required() : mixed
Tags
Return values
mixed —

register()

{@inheritdoc}

public register() : mixed
Tags
Return values
mixed —

register_settings()

{@inheritdoc}

public register_settings() : mixed
Tags
Return values
mixed —

sanitize_additional_post_types()

Sanitize explicitly selected additional post types.

public sanitize_additional_post_types(mixed $settings) : array<string, bool>
Parameters
$settings : mixed

Submitted slug-keyed checkbox values.

Tags
Return values
array<string, bool> —

sanitize_misc_settings()

Sanitize misc settings.

public sanitize_misc_settings(mixed $settings) : mixed
Parameters
$settings : mixed
Tags
Return values
mixed —

sanitize_search_page_setting()

Sanitize search page setting.

public sanitize_search_page_setting(mixed $page_setting) : string|int|float
Parameters
$page_setting : mixed
Tags
Return values
string|int|float —

sanitize_shortcode_settings()

Sanitize shortcode settings.

public sanitize_shortcode_settings(mixed $settings) : mixed
Parameters
$settings : mixed
Tags
Return values
mixed —

Support links for the settings page.

public support_links() : void
Tags
Return values
void —

get_additional_post_type_choices()

Get eligible additional post-type choices, excluding automatic types.

private get_additional_post_type_choices() : array<string, string>
Tags
Return values
array<string, string> —

get_advanced_settings()

Get the advanced settings for the table.

private get_advanced_settings() : array<string|int, mixed>
Tags
since
1.0.0
Return values
array<string|int, mixed> —

Array of advanced settings for the table

get_content_settings()

Get the content settings.

private get_content_settings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

get_load_settings()

Get the load settings.

private get_load_settings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

get_pagination_settings()

Get the pagination settings.

private get_pagination_settings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

get_registered_post_types()

Get registered post types.

private get_registered_post_types() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

get_search_settings()

Get the search settings.

private get_search_settings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

get_sort_settings()

Get the sort settings.

private get_sort_settings() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —

read_more()

Read more link.

private read_more(mixed $path) : string
Parameters
$path : mixed
Tags
Return values
string —

Search results