abstract class Options_Page extends Page

A class to abstract and automate the process of creating a page under the 'settings' menu item.

Properties

static protected Singleton[] $_instances from  Singleton

Methods

__construct()

Construct the parent settings page.

static Singleton
instance(mixed $args = null)

Maybe initialize singleton instance and return the instance.

static array
get_instances()

Return a copy of the instances array.

get_class_reflection()

A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.

static 
add_menu_item()

The inherited, abstract menu item function.

static string
page_option_group()

The page slug for registering settings, adding menu items, etc.

from  Page
static string
page_title()

The page name/title for display.

from  Page
static string
menu_title()

The menu name/title for display.

from  Page
static string
page_capability()

The capability required for the page to be displayed to the user.

from  Page
static string
submenu_id()

The inherited function from the abstract returning the submenu ID.

static Settings_Section[]
get_sections()

Return the Sections associated with this Settings Page.

from  Page
static bool
menu_item_exists()

See if the Settings Page exists in the WP global $submenu.

from  Page
static 
render()

Get all of the settings for this page and display them.

add_section(Settings_Section $Settings_Section)

Register a section with this Page.

Details

at line 41
__construct()

Construct the parent settings page.

in Singleton at line 42
final static Singleton instance(mixed $args = null)

Maybe initialize singleton instance and return the instance.

Parameters

mixed $args

The arguments to pass to the singleton constructor if constructing.

Return Value

Singleton

This instance.

in Singleton at line 63
final static array get_instances()

Return a copy of the instances array.

Return Value

array

A list of Singleton instances that have been instantiated.

in Singleton at line 72
final protected ReflectionClass get_class_reflection()

A short one-liner tool to get a ReflectionClass so we can get runtime info for the static class instance and not this abstract.

Return Value

ReflectionClass

The runtime instance of this class being evalutated.

at line 48
final static protected add_menu_item()

The inherited, abstract menu item function.

in Page at line 38
abstract static string page_option_group()

The page slug for registering settings, adding menu items, etc.

Return Value

string

The page slug.

in Page at line 45
abstract static string page_title()

The page name/title for display.

Return Value

string

The page title.

in Page at line 52
abstract static string menu_title()

The menu name/title for display.

Return Value

string

The menu title.

in Page at line 59
abstract static string page_capability()

The capability required for the page to be displayed to the user.

Return Value

string

The capability required to display the settings page.

at line 36
final static string submenu_id()

The inherited function from the abstract returning the submenu ID.

Return Value

string

The ID of the submenu from the WordPress global $submenu.

in Page at line 73
final static Settings_Section[] get_sections()

Return the Sections associated with this Settings Page.

Return Value

Settings_Section[]

The Sections of this Page.

in Page at line 92
final static bool menu_item_exists()

See if the Settings Page exists in the WP global $submenu.

Return Value

bool

Whether or not the Page has been set.

at line 61
final static render()

Get all of the settings for this page and display them.

at line 81
final add_section(Settings_Section $Settings_Section)

Register a section with this Page.

Parameters

Settings_Section $Settings_Section

The Section to add to this Page.