PHP Class The_SEO_Framework\Admin_Pages

Renders admin pages content for this plugin.
Since: 2.7.1
Inheritance: extends Inpost
ファイルを表示 Open project: sybrew/the-seo-framework

Public Properties

Property Type Description
$load_options Load the options.
$page_defaults Page Defaults.
$seo_settings_page_hook Name of the page hook when the menu is registered.

Public Methods

Method Description
add_menu_link ( ) : void Adds menu links under "settings" in the wp-admin dashboard
admin ( ) Use this as the settings admin callback to create an admin page with sortable metaboxes.
do_metaboxes ( ) Echo out the do_metaboxes() and wrapping markup.
enqueue_page_defaults ( ) Enqueue page defaults early.
field_id ( string $id, boolean $echo = true ) : string Echo constructed id attributes in form fields.
field_name ( string $name ) Echo constructed name attributes in form fields.
field_value ( string $key ) Echo a setting value from this form's settings field for use in form fields.
get_field_id ( string $id ) : string Helper function that constructs id attributes for use in form fields.
get_field_name ( string $name ) : string Helper function that constructs name attributes for use in form fields.
get_field_value ( string $key ) : string Helper function that returns a setting value from this form's settings field for use in form fields.
get_is_conditional_checked ( string $key ) Helper function that constructs id attributes for use in form fields.
is_conditional_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string Returns the HTML class wrap for warning/default Checkbox options.
is_default_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true ) Returns the HTML class wrap for default Checkbox options.
is_default_radio ( string $key, string $value, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string | null Returns the HTML class wrap for default radio options.
is_warning_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string Returns the HTML class wrap for warning Checkbox options.
load_assets ( ) Load script and stylesheet assets via metabox_scripts() methods.
make_checkbox ( string $field_id = '', string $label = '', string $description = '', boolean $escape = true ) : HTML Return a chechbox wrapper.
make_info ( string $description = '', string $link = '', boolean $echo = true ) : HTML Return a wrapped question mark.
metabox_scripts ( ) Includes the necessary sortable metabox scripts.
metaboxes ( ) Register meta boxes on the Site SEO Settings page.
notices ( ) : void Display notices on the save or reset of settings.
settings_init ( ) Initialize the settings page.
wrap_fields ( string $input = '', boolean $echo = false ) : Wrapped Echo or return a chechbox fields wrapper.

Protected Methods

Method Description
__construct ( ) Constructor. Loads parent constructor, does actions and sets up variables.

Method Details

__construct() protected method

Constructor. Loads parent constructor, does actions and sets up variables.
protected __construct ( )

admin() public method

Create a 'settings_boxes' method to add metaboxes.
Since: 2.2.2
public admin ( )

do_metaboxes() public method

Echo out the do_metaboxes() and wrapping markup.
Since: 2.2.2
public do_metaboxes ( )

enqueue_page_defaults() public method

Applies filter 'the_seo_framework_admin_page_defaults' : Array This filter adds i18n support for buttons and notices.
Since: 2.3.1

field_id() public method

Echo constructed id attributes in form fields.
Since: 2.2.2
public field_id ( string $id, boolean $echo = true ) : string
$id string Field id base
$echo boolean echo or return
return string Full field id

field_name() public method

Echo constructed name attributes in form fields.
Since: 2.2.2
public field_name ( string $name )
$name string Field name base

field_value() public method

Echo a setting value from this form's settings field for use in form fields.
Since: 2.2.2
public field_value ( string $key )
$key string Field key

get_field_id() public method

Helper function that constructs id attributes for use in form fields.
Since: 2.2.2
public get_field_id ( string $id ) : string
$id string Field id base
return string Full field id

get_field_name() public method

Other page implementation classes may wish to construct and use a get_field_id() method, if the naming format needs to be different.
Since: 2.2.2
public get_field_name ( string $name ) : string
$name string Field name base
return string Full field name

get_field_value() public method

Fetches blog option.
Since: 2.2.2
public get_field_value ( string $key ) : string
$key string Field key
return string Field value

get_is_conditional_checked() public method

Helper function that constructs id attributes for use in form fields.
Since: 2.6.0
public get_is_conditional_checked ( string $key )
$key string The option name which returns boolean.

is_conditional_checked() public method

This function does nothing special. But is merely a simple wrapper. Just like code_wrap.
Since: 2.3.4
public is_conditional_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string
$key string required The option name which returns boolean.
$setting string optional The settings field
$wrap boolean optional output class="" or just the class name.
$echo boolean optional echo or return the output.
return string Empty on echo or The class with an optional wrapper.

is_default_checked() public method

This function does nothing special. But is merely a simple wrapper. Just like code_wrap.
Since: 2.2.5
public is_default_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true )
$key string required The option name which returns boolean.
$setting string optional The settings field
$wrap boolean optional output class="" or just the class name.
$echo boolean optional echo or return the output.

is_default_radio() public method

Returns the HTML class wrap for default radio options.
Since: 2.2.5
public is_default_radio ( string $key, string $value, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string | null
$key string required The option name which returns boolean.
$value string required The option value which returns boolean.
$setting string optional The settings field
$wrap boolean optional output class="" or just the class name.
$echo boolean optional echo or return the output.
return string | null the default selected class.

is_warning_checked() public method

Returns the HTML class wrap for warning Checkbox options.
Since: 2.3.4
public is_warning_checked ( string $key, string $setting = '', boolean $wrap = true, boolean $echo = true ) : string
$key string required The option name which returns boolean.
$setting string optional The settings field
$wrap boolean optional output class="" or just the class name.
$echo boolean optional echo or return the output.
return string Empty on echo or The class with an optional wrapper.

load_assets() public method

Load script and stylesheet assets via metabox_scripts() methods.
Since: 2.2.2
public load_assets ( )

make_checkbox() public method

Return a chechbox wrapper.
Since: 2.6.0
Since: 2.7.0 Added escape parameter. Defaults to true.
public make_checkbox ( string $field_id = '', string $label = '', string $description = '', boolean $escape = true ) : HTML
$field_id string The option ID. Must be within the Autodescription settings.
$label string The checkbox description label.
$description string Addition description to place beneath the checkbox.
$escape boolean Whether to escape the label and description.
return HTML checkbox output.

make_info() public method

Return a wrapped question mark.
Since: 2.6.0
public make_info ( string $description = '', string $link = '', boolean $echo = true ) : HTML
$description string The descriptive on-hover title.
$link string The non-escaped link.
$echo boolean Whether to echo or return.
return HTML checkbox output if $echo is false.

metabox_scripts() public method

Includes the necessary sortable metabox scripts.
Since: 2.2.2
public metabox_scripts ( )

metaboxes() public method

Register meta boxes on the Site SEO Settings page.
Since: 2.2.2
public metaboxes ( )

notices() public method

Display notices on the save or reset of settings.
Since: 2.2.2
public notices ( ) : void
return void

settings_init() public method

Initialize the settings page.
Since: 2.2.2
public settings_init ( )

wrap_fields() public method

Echo or return a chechbox fields wrapper.
Since: 2.6.0
public wrap_fields ( string $input = '', boolean $echo = false ) : Wrapped
$input string The input to wrap. Should already be escaped.
$echo boolean Whether to echo or return.
return Wrapped $input.

Property Details

$load_options public_oe property

Load the options.
Since: 2.6.0
public $load_options

$page_defaults public_oe property

Page Defaults.
Since: 2.2.2
public $page_defaults

$seo_settings_page_hook public_oe property

Name of the page hook when the menu is registered.
Since: 2.7.0
public $seo_settings_page_hook