apply_filters( 'sfwd_cpt_tax', array $taxonomy_options, string $post_type, string $taxonomy_slug )
Filters taxonomy registration options.
Description #
Parameters #
- $taxonomy_options
-
(array) An array of taxonomy options.
- $post_type
-
(string) Post type slug.
- $taxonomy_slug
-
(string) Taxonomy slug.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for sfwd_cpt_tax filter.
*/
add_filter(
'sfwd_cpt_tax',
function( $taxonomy_options, $post_type, $taxonomy_slug ) {
// May add any custom logic using $taxonomy_options, $post_type, $taxonomy_slug.
// Always return $taxonomy_options.
return $taxonomy_options;
},
10,
3
);
Changelog #
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |