media_view_strings

Filters the media view strings.

Description

apply_filters( 'media_view_strings', (array) $strings, (WP_Post) $post ); 

Parameters (2)

0. $strings (array)
List of media view strings.
1. $post (WP_Post)
Post object.

Usage

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

Defined (1)

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

/wp-includes/media.php  
  1. $strings = apply_filters( 'media_view_strings', $strings, $post );