$version
$version : string
Fluent_Options main framework class. Create and stores fields and sections, displays in the admin based on $context supplied
register_field_type(array $field) : \none
Register a field type for use by the framework.
Static interface used so field types can be regsitered at any point, and for any istance of the class.
array | $field | the data to be supplied. Should be an array similar to:
|
__construct(array $args, array $sections) : \none
__construct() parse arguments supplied, setup framework options class.
array | $args | framework setup arguments. Used to change some base settings for the options including context. |
array | $sections | the sections an fields to be used. |
prepare_sections(array $sections, $id) : \none
Loops through supplied data and prepares the $sections array.
This is different for each type of options so lets leave it blank
array | $sections | framework setup arguments. Used to change some base settings for the options including context. |
$id |
prepare_fields(array $fields, array $options, string $key) : array
Loops through supplied data and prepares the $fields array.
Function may also call itself on nested fields (groups). Returns a multilevel fields array.
array | $fields | |
array | $options | |
string | $key |
remove_clones(array $value) : array
Saving the options usually means the <code>$_POST</code> array conatins the group clones in the array keys.
These usually look like ##field-id-clone##
. this function simply looks for the existance of two hashes at the start of the supplied keys and removes them from the returning array if present.
array | $value | data supplied from the save action. |
$out the sanitized and trimmed array data.
prepare_meta_box_titles(string $context) : \none
The prepare meta box titles function is used to run through all the sections, check if a dashicon is to be prepended to the title, and if it is alter the global <code>$wp_meta_boxes</code> titles accordingly.
string | $context | which meta boxes we are going to alter. |
parse_args(array $a, array $b, string $filter) : array
Recursive array merging from a default and supplied array.
Very similar function to wp_parse_args
except it filters through the whole array tree.
array | $a | supplied value array. |
array | $b | default value array. |
string | $filter | optionally run the array through |