$height = 64;
$response['image'
] =
compact( 'src', 'width', 'height'
);
$response['thumb'
] =
compact( 'src', 'width', 'height'
);
} } if ( function_exists( 'get_compat_media_markup'
) ) { $response['compat'
] =
get_compat_media_markup( $attachment->ID, array
( 'in_modal' => true
) );
} if ( function_exists( 'get_media_states'
) ) { $media_states =
get_media_states( $attachment );
if ( !
empty( $media_states ) ) { $response['mediaStates'
] =
implode( ', ',
$media_states );
} } /**
* Filters the attachment data prepared for JavaScript.
*
* @since 3.5.0
*
* @param array $response Array of prepared attachment data. @see wp_prepare_attachment_for_js().
* @param WP_Post $attachment Attachment object.
* @param array|false $meta Array of attachment meta data, or false if there is none.
*/