HTTP/2 301
server: nginx
date: Fri, 26 Dec 2025 12:22:52 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/functions/wp_edit_attachments_query/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
HTTP/2 200
server: nginx
date: Fri, 26 Dec 2025 12:22:52 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 2
wp_edit_attachments_query() – Function | Developer.WordPress.org
wp_edit_attachments_query( array|false $q = false ): array
Executes a query for attachments. An array of WP_Query arguments can be passed in, which will override the arguments set by this function.
$qarray|falseoptionalArray of query variables to use to build the query.
Defaults to the $_GET superglobal.
Default:false
array Array containing the post mime types and available post mime types.
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 );
}
View all references View on Trac View on GitHub
| Version | Description |
|---|
| 2.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.