PHP Class Carbon_Fields\Container\Theme_Options_Container

Inheritance: extends Container
Afficher le fichier Open project: htmlburger/carbon-fields

Méthodes publiques

Свойство Type Description
$icon
$settings

Protected Properties

Свойство Type Description
$registered_pages

Méthodes publiques

Méthode Description
__construct ( string $title ) Create a new theme options fields container
add_fields ( array $fields ) Append array of fields to the current fields set. All items of the array must be instances of Field and their names should be unique for all Carbon containers.
attach ( ) Add theme options container pages.
detach ( ) Revert the result of attach()
drop_unique_page ( ) Unregister the container parent and child pages.
init ( ) Attach container as a theme options page/subpage.
is_active ( ) Whether this container is currently viewed.
is_valid_save ( ) : boolean Perform checks whether the current save() request is valid.
render ( ) Output the container markup
save ( mixed $user_data = null ) Perform save operation after successful is_valid_save() check.
set_icon ( $icon ) Set the icon of this theme options page.
set_page_file ( $file ) Set the theme options file name of this container.
set_page_parent ( $parent ) Change the parent theme options page of this container
set_page_permissions ( $permissions ) Set the permissions necessary to view the corresponding theme options page
verify_unique_page ( ) Make sure that there are no duplicate containers with the same name.

Méthodes protégées

Méthode Description
clear_string ( $string ) Sanitize the container title for use in the theme options file name.

Method Details

__construct() public méthode

Create a new theme options fields container
public __construct ( string $title )
$title string Unique title of the container

add_fields() public méthode

If a field does not have DataStore already, the container data store is assigned to them instead.
public add_fields ( array $fields )
$fields array

attach() public méthode

Hook the container saving action.
public attach ( )

clear_string() protected méthode

Sanitize the container title for use in the theme options file name.
protected clear_string ( $string )

detach() public méthode

Revert the result of attach()
public detach ( )

drop_unique_page() public méthode

Unregister the container parent and child pages.
public drop_unique_page ( )

init() public méthode

Attach container as a theme options page/subpage.
public init ( )

is_active() public méthode

Whether this container is currently viewed.
public is_active ( )

is_valid_save() public méthode

Perform checks whether the current save() request is valid.
public is_valid_save ( ) : boolean
Résultat boolean

render() public méthode

Output the container markup
public render ( )

save() public méthode

The call is propagated to all fields in the container.
public save ( mixed $user_data = null )
$user_data mixed

set_icon() public méthode

Applicable only for parent theme option pages.
public set_icon ( $icon )

set_page_file() public méthode

Set the theme options file name of this container.
public set_page_file ( $file )

set_page_parent() public méthode

Change the parent theme options page of this container
public set_page_parent ( $parent )

set_page_permissions() public méthode

Set the permissions necessary to view the corresponding theme options page
public set_page_permissions ( $permissions )

verify_unique_page() public méthode

Make sure that there are no duplicate containers with the same name.
public verify_unique_page ( )

Property Details

$icon public_oe property

public $icon

$registered_pages protected_oe static_oe property

protected static $registered_pages

$settings public_oe property

public $settings