$version
$version : string
Fluent_Taxonomy simple class for creating post types
__construct( $post_type, $args) : \none
Called on class instance creation, adds the new post type to the static $post_types array for registering at the correct points.
Replaces spaces and dashes with underscores in the post type name but doesnt run sanitize_key() as register_post_type() does this already and we would just be adding proccessing time. Trims post type name length to 20 chars at most.
$post_type | ||
$args |
flush_rewrite_rules() : \none
Registers post types from the static $post_types array and flushes the rewrite rules. This is done on admin init, and only if new post types exist in the option.
This is quite neat because it checks for new post types 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.
post_update_messages( $messages) : array
Returns any custom update messages for the post type notices.
WordPress should really allow you to do this in the labels arg of registering the post type, but hey its easy enough to work round. This function exits if it isnt a framework created post type, or provides the messages from the default array, or user supplied if it is.
$messages |
$messages
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 |