cptui_taxonomy_slug_exists

Check if we already have a post type of that name.

Description

apply_filters( 'cptui_taxonomy_slug_exists', (bool) $false, (string) $data_cpt_custom_tax_name, (array) $taxonomies ); 

Parameters (3)

0. $false (bool) => false
Assume we have no conflict by default.
1. $data_cpt_custom_tax_name (string)
The data cpt custom tax name.
2. $taxonomies (array)
Array of existing post types from CPTUI.

Usage

To run the hook, copy the example below.
  1. $false = apply_filters( 'cptui_taxonomy_slug_exists', $false, $data_cpt_custom_tax_name, $taxonomies ); 
  2.  
  3. if ( !empty( $false ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the cptui_taxonomy_slug_exists callback 
  2. function filter_cptui_taxonomy_slug_exists( $false, $data_cpt_custom_tax_name, $taxonomies ) { 
  3. // make filter magic happen here... 
  4. return $false
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'cptui_taxonomy_slug_exists', 'filter_cptui_taxonomy_slug_exists', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'cptui_taxonomy_slug_exists', 'filter_cptui_taxonomy_slug_exists', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/inc/taxonomies.php  
  1. $slug_exists = apply_filters( 'cptui_taxonomy_slug_exists', false, $data['cpt_custom_tax']['name'], $taxonomies );