wp_edit_attachments_query() WordPress Function
The wp_edit_attachments_query function is used to modify the SQL query that is used to retrieve attachment records for the WP_List_Table class in the WordPress admin.
wp_edit_attachments_query( array|false $q = false ) #
Executes a query for attachments. An array of WP_Query arguments can be passed in, which will override the arguments set by this function.
Parameters
- $q
(array|false)(Optional) Array of query variables to use to build the query. Defaults to the
$_GET
superglobal.Default value: false
Return
(array)
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 ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |