wp_edit_attachments_query

Advertisement

Summery Summery

Executes a query for attachments. An array of WP_Query arguments can be passed in, which will override the arguments set by this function.

Syntax Syntax

wp_edit_attachments_query( array|false $q = false )

Parameters Parameters

$q

(array|false) (Optional) Array of query variables to use to build the query or false to use $_GET superglobal.

Default value: false

Return Return

(array)

Source Source

File: wp-admin/includes/post.php

function wp_edit_attachments_query( $q = false ) {
	wp( wp_edit_attachments_query_vars( $q ) );

	$post_mime_types       = get_post_mime_types();
	$avail_post_mime_types = get_available_post_mime_types( 'attachment' );

	return array( $post_mime_types, $avail_post_mime_types );
}

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.