media_meta
Filter HookDescription
Displays non-editable attachment metadata in the publish meta box.Hook Information
File Location |
wp-admin/includes/media.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3326 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into media_meta
add_filter('media_meta', 'my_custom_filter');
function my_custom_filter() {
// Your custom filtering logic here
return 'modified_value';
}
Source Code Context
wp-admin/includes/media.php:3326
- How this hook is used in WordPress core
<?php
3321 if ( isset( $meta['width'], $meta['height'] ) ) {
3322 /* translators: 1: A number of pixels wide, 2: A number of pixels tall. */
3323 $media_dims .= "<span id='media-dims-$attachment_id'>" . sprintf( __( '%1$s by %2$s pixels' ), $meta['width'], $meta['height'] ) . '</span>';
3324 }
3325 /** This filter is documented in wp-admin/includes/media.php */
3326 $media_dims = apply_filters( 'media_meta', $media_dims, $post );
3327
3328 $att_url = wp_get_attachment_url( $attachment_id );
3329
3330 $author = new WP_User( $post->post_author );
3331
PHP Documentation
<?php
/**
* Displays non-editable attachment metadata in the publish meta box.
*
* @since 3.5.0
*/
Quick Info
- Hook Type: Filter
- Parameters: 0
- File: wp-admin/includes/media.php
Related Hooks
Related hooks will be displayed here in future updates.