get_media_item_args

get_media_item_args

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('get_media_item_args') is found 2 times:

  • /wp-admin/includes/media.php line 1618
    	 * @see get_media_item
    	 *
    	 * @param array $parsed_args An array of arguments.
    	 */
    	$parsed_args = apply_filters( 'get_media_item_args', $parsed_args );
    
    	$toggle_on  = __( 'Show' );
    	$toggle_off = __( 'Hide' );
    
    	$file     = get_attached_file( $post->ID );
    	$filename = esc_html( wp_basename( $file ) );
    
  • /wp-admin/includes/media.php line 1887
     
    	$args = wp_parse_args( $args, $default_args );
    
    	/** This filter is documented in wp-admin/includes/media.php */
    	$args = apply_filters( 'get_media_item_args', $args );
    
    	$form_fields = array();
    
    	if ( $args['in_modal'] ) {
    		foreach ( get_attachment_taxonomies( $post ) as $taxonomy ) {
    			$t = (array) get_taxonomy( $taxonomy );
    

See this hook used in plugins: