메소드 |
설명 |
|
__construct ( string $title ) |
Create a new container |
|
_attach ( ) |
Called first as part of the container attachment procedure. |
|
_save ( ) |
Called first as part of the container save procedure. |
|
activate_container ( $container ) |
Adds a container to the active containers array and triggers an action |
|
activate_field ( $field ) |
Adds a field to the active fields array and triggers an action |
|
add_fields ( array $fields ) : object |
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. |
|
add_tab ( string $tab_name, array $fields ) : object |
Configuration function for adding tab with fields |
|
add_template ( $name, $callback ) |
Adds a new Backbone template |
|
admin_hook_scripts ( ) |
Enqueue admin scripts |
|
admin_hook_styles ( ) |
Enqueue admin styles |
|
attach ( ) |
Attach the container rendering and helping methods
to concrete WordPress Action hooks |
|
boot ( ) |
Boot the container once it's attached. |
|
check_setup_settings ( array &$settings = [] ) |
Check if all required container settings have been specified |
|
detach ( ) |
Revert the result of attach() |
|
drop_unique_field_name ( string $name ) |
Remove field name $name from the list of unique field names |
|
drop_unique_panel_id ( string $id ) |
Remove container identificator $id from the list of unique container ids |
|
factory ( string $type, string $name ) : object |
Create a new container of type $type and name $name and label $label. |
|
get_active_containers ( ) : array |
Returns all the active containers created via factory |
|
get_active_fields ( ) : array |
Returns all the active fields created via factory |
|
get_datastore ( ) : object |
Return the DataStore instance used by container fields |
|
get_fields ( ) : array |
Returns the private container array of fields. |
|
get_nonce_field ( ) : string |
Return WordPress nonce field |
|
get_nonce_name ( ) : string |
Return WordPress nonce name used to identify the current container instance |
|
get_tabs ( ) : array |
Retrieve all tabs. |
|
get_tabs_json ( ) : array |
Build the tabs JSON |
|
get_templates ( ) : array |
Returns all the Backbone templates |
|
get_untabbed_fields ( ) : array |
Retrieve all fields that are not defined under a specific tab |
|
has_fields ( ) : boolean |
Perform a check whether the current container has fields |
|
init ( ) |
Perform instance initialization after calling setup() |
|
init_containers ( ) : object |
Initialize containers created via factory |
|
is_active ( ) : boolean |
Perform checks whether the container is active for current request |
|
is_tabbed ( ) : boolean |
Whether the container is tabbed or not |
|
is_valid_attach ( ) : boolean |
Perform checks whether the container should be attached during the current request |
|
is_valid_save ( ) : boolean |
Checks whether the current request is valid |
|
load ( ) |
Load the value for each field in the container. |
|
make ( $type, $name ) |
An alias of factory(). |
|
save ( $data ) |
Load submitted data and save each field in the container |
|
set_datastore ( object $store ) : object |
Assign DataStore instance for use by the container fields |
|
setup ( array $settings = [] ) : object |
Update container settings and begin initialization |
|
template ( ) |
Prints the container Underscore template |
|
template_tabs ( ) |
Underscore template for tabs |
|
to_json ( boolean $load ) : array |
Returns an array that holds the container data, suitable for JSON representation. |
|
verify_unique_field_name ( string $name ) |
Perform checks whether there is a field registered with the name $name. |
|
verify_unique_panel_id ( $id ) |
Perform checks whether there is a container registered with identificator $id |
|