wp_get_avif_info( string $filename ): array

In this article

Extracts meta information about an AVIF file: width, height, bit depth, and number of channels.

Parameters

$filenamestringrequired
Path to an AVIF file.

Return

array An array of AVIF image information.
  • width int|false
    Image width on success, false on failure.
  • height int|false
    Image height on success, false on failure.
  • bit_depth int|false
    Image bit depth on success, false on failure.
  • num_channels int|false
    Image number of channels on success, false on failure.

Source

 */
function wp_media_personal_data_exporter( $email_address, $page = 1 ) {
	// Limit us to 50 attachments at a time to avoid timing out.
	$number = 50;
	$page   = (int) $page;

	$data_to_export = array();

	$user = get_user_by( 'email', $email_address );
	if ( false === $user ) {
		return array(
			'data' => $data_to_export,
			'done' => true,
		);
	}

	$post_query = new WP_Query(
		array(
			'author'         => $user->ID,
			'posts_per_page' => $number,
			'paged'          => $page,
			'post_type'      => 'attachment',
			'post_status'    => 'any',
			'orderby'        => 'ID',
			'order'          => 'ASC',
		)

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.