post_type_archive_title

Filters the post type archive title.

Description

apply_filters( 'post_type_archive_title', (string) $object_labels_name, (string) $object_name ); 

Parameters (2)

0. $object_labels_name (string)
The object labels name.
1. $object_name (string)
The object name.

Usage

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

Defined (1)

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

/class.bcn_breadcrumb_trail.php  
  1. return apply_filters('post_type_archive_title', $object->labels->name, $object->name);