pods_unique_slug

The Pods - Custom Content Types and Fields pods unique slug hook.

Description

apply_filters( 'pods_unique_slug', (unknown) $slug, (unknown) $id, (string) $column_name, (unknown) $pod, (unknown) $pod_id, (unknown) $obj ); 

Parameters (6)

0. $slug (unknown)
The slug.
1. $id (unknown)
The id.
2. $column_name (string)
The column name.
3. $pod (unknown)
The pod.
4. $pod_id (unknown)
The pod id.
5. $obj (unknown)
The obj.

Usage

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

Defined (1)

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

/includes/data.php  
  1. $slug = apply_filters( 'pods_unique_slug', $slug, $id, $column_name, $pod, $pod_id, $obj );