media_view_settings
Filters the media view settings.
Usage
add_filter( 'media_view_settings', 'wp_kama_media_view_settings_filter', 10, 2 ); /** * Function for `media_view_settings` filter-hook. * * @param array $settings List of media view settings. * @param WP_Post $post Post object. * * @return array */ function wp_kama_media_view_settings_filter( $settings, $post ){ // filter... return $settings; }
- $settings(array)
- List of media view settings.
- $post(WP_Post)
- Post object.
Changelog
Since 3.5.0 | Introduced. |
Where the hook is called
media_view_settings
wp-includes/media.php 4924
$settings = apply_filters( 'media_view_settings', $settings, $post );