_post_format_get_term

Remove the post format prefix from the name property of the term object created by get_term().

Description

(object) _post_format_get_term( (object) $term ); 

Returns (object)

Parameters (1)

0. $term (object)
The term.

Usage

  1. if ( !function_exists( '_post_format_get_term' ) ) { 
  2. require_once ABSPATH . WPINC . '/post-formats.php'; 
  3.  
  4. // The term. 
  5. $term = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _post_format_get_term($term); 
  9.  

Defined (1)

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

/wp-includes/post-formats.php  
  1. function _post_format_get_term( $term ) { 
  2. if ( isset( $term->slug ) ) { 
  3. $term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) ); 
  4. return $term;