LLMS_Post_Types::get_tax_caps( string|array $tax )
Retrieve taxonomy capabilities for custom taxonomies
Parameters Parameters
- $tax
-
(string|array) (Required) Taxonomy name/names (pass array of singular, plural to customize plural spelling).
Return Return
(array)
Source Source
File: includes/class.llms.post-types.php
public static function get_tax_caps( $tax ) { if ( ! is_array( $tax ) ) { $singular = $tax; $plural = $tax . 's'; } else { $singular = $tax[0]; $plural = $tax[1]; } /** * Customize the taxonomy capabilities for the given taxonomy. * * The dynamic portion of this hook, `$singular` refers to the taxonomy's * registered name. * * @since 3.13.0 * * @param array $caps Array of capabilities. */ return apply_filters( "llms_get_{$singular}_tax_caps", array( 'manage_terms' => sprintf( 'manage_%s', $plural ), 'edit_terms' => sprintf( 'edit_%s', $plural ), 'delete_terms' => sprintf( 'delete_%s', $plural ), 'assign_terms' => sprintf( 'assign_%s', $plural ), ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |