$version
$version : string
Fluent_Taxonomy simple class for creating taxonomies
__construct( $taxonomy, $args) : \none
Called on class instance creation, adds the new taxonomy to the static $taxonomies array for registering at the correct points.
Replaces spaces and dashes with underscores in the taxonomy name but doesnt run sanitize_key() as register_taxonomy() does this already and we would just be adding proccessing time. Trims post type name length to 20 chars at most.
$taxonomy | ||
$args |
flush_rewrite_rules() : \none
Registers taxonomies from the static $taxonomies array and flushes the rewrite rules. This is done on admin init, and only if new taxonomies exist in the option.
This is quite neat because it checks for new taxonomies against the saved option, but only flushes if 1 or more hasnt already been added. It then only updates the option if flush == true. Its done on admin init as activation of plugins/themes can only be done via the admin so there is no need to do it on normal init.
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 |