Filter hook 'media_view_settings'

in WP Core File wp-includes/media.php at line 5102

View Source

media_view_settings

Filter Hook
Description
Filters the media view settings.

Hook Information

File Location wp-includes/media.php View on GitHub
Hook Type Filter
Line Number 5102

Hook Parameters

Type Name Description
array $settings List of media view settings.
WP_Post $post Post object.

Usage Examples

Basic Usage
<?php
// Hook into media_view_settings
add_filter('media_view_settings', 'my_custom_filter', 10, 2);

function my_custom_filter($settings, $post) {
    // Your custom filtering logic here
    return $settings;
}

Source Code Context

wp-includes/media.php:5102 - How this hook is used in WordPress core
<?php
5097  	 * @since 3.5.0
5098  	 *
5099  	 * @param array   $settings List of media view settings.
5100  	 * @param WP_Post $post     Post object.
5101  	 */
5102  	$settings = apply_filters( 'media_view_settings', $settings, $post );
5103  
5104  	/**
5105  	 * Filters the media view strings.
5106  	 *
5107  	 * @since 3.5.0

PHP Documentation

<?php
/**
	 * Filters the media view settings.
	 *
	 * @since 3.5.0
	 *
	 * @param array   $settings List of media view settings.
	 * @param WP_Post $post     Post object.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/media.php
Related Hooks

Related hooks will be displayed here in future updates.