PHP Class Admin_Apple_Settings_Section, apple-news

Since: 0.6.0
Inheritance: extends Apple_News
ファイルを表示 Open project: alleyinteractive/apple-news Class Usage Examples

Public Properties

Property Type Description
$allowed_html array Allowed HTML for settings pages.

Protected Properties

Property Type Description
$base_settings Apple_Exporter\Settings Base settings.
$fonts array All available iOS fonts.
$groups array Groups for the section.
$name string Name of the settings section.
$page string Settings page.
$settings array Settings for the section.
$slug string Slug of the settings section.

Public Methods

Method Description
__construct ( string $page ) Constructor.
after_section ( ) : string HTML to display after the section.
before_section ( ) : string HTML to display before the section.
get_section_info ( ) : string Gets section info.
get_value ( string $key, array $saved_settings = null ) : mixed Get the current value for an option.
groups ( ) : array Return an array which contains all groups and their related settings, embedded.
id ( ) : string Get the ID of the settings section.
name ( ) : string Get the settings section name.
render_field ( array $args ) Render a settings field.
sanitize_array ( array $value ) : array Sanitizes a single dimension array with text values.
save_settings ( ) Each section is responsible for saving its own settings since only it knows the nature of the fields and sanitization methods.

Protected Methods

Method Description
get_default_for ( string $name ) : string Get the default for a field.
get_description_for ( string $name ) : string Get the description for a field.
get_size_for ( string $name ) : integer Get the size for a field.
get_type_for ( string $name ) : string Get the type for a field.
is_multiple ( string $name ) : boolean Check if the field can hold multiple values.
is_required ( string $name ) : integer Check if a field is required.

Method Details

__construct() public method

Constructor.
public __construct ( string $page )
$page string

after_section() public method

HTML to display after the section.
public after_section ( ) : string
return string

before_section() public method

HTML to display before the section.
public before_section ( ) : string
return string

get_default_for() protected static method

Get the default for a field.
protected static get_default_for ( string $name ) : string
$name string
return string

get_description_for() protected method

Get the description for a field.
protected get_description_for ( string $name ) : string
$name string
return string

get_section_info() public method

Gets section info.
public get_section_info ( ) : string
return string

get_size_for() protected method

Get the size for a field.
protected get_size_for ( string $name ) : integer
$name string
return integer

get_type_for() protected method

Get the type for a field.
protected get_type_for ( string $name ) : string
$name string
return string

get_value() public static method

Get the current value for an option.
public static get_value ( string $key, array $saved_settings = null ) : mixed
$key string
$saved_settings array
return mixed

groups() public method

Return an array which contains all groups and their related settings, embedded.
public groups ( ) : array
return array

id() public method

Get the ID of the settings section.
public id ( ) : string
return string

is_multiple() protected method

Check if the field can hold multiple values.
protected is_multiple ( string $name ) : boolean
$name string
return boolean

is_required() protected method

Check if a field is required.
protected is_required ( string $name ) : integer
$name string
return integer

name() public method

Get the settings section name.
public name ( ) : string
return string

render_field() public method

Render a settings field.
public render_field ( array $args )
$args array

sanitize_array() public method

Sanitizes a single dimension array with text values.
public sanitize_array ( array $value ) : array
$value array
return array

save_settings() public method

Each section is responsible for saving its own settings since only it knows the nature of the fields and sanitization methods.
public save_settings ( )

Property Details

$allowed_html public_oe static_oe property

Allowed HTML for settings pages.
public static array $allowed_html
return array

$base_settings protected_oe static_oe property

Base settings.
protected static Settings,Apple_Exporter $base_settings
return Apple_Exporter\Settings

$fonts protected_oe static_oe property

All available iOS fonts.
Since: 0.4.0
protected static array $fonts
return array

$groups protected_oe property

Groups for the section.
protected array $groups
return array

$name protected_oe property

Name of the settings section.
protected string $name
return string

$page protected_oe property

Settings page.
protected string $page
return string

$settings protected_oe property

Settings for the section.
protected array $settings
return array

$slug protected_oe property

Slug of the settings section.
protected string $slug
return string