wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_edit_attachments_query › WordPress Function

Since2.5.0
已弃用n/a
wp_edit_attachments_query ( $q = false )
参数:
  • (array|false) $q Optional. Array of query variables to use to build the query. Defaults to the `$_GET` superglobal.
    Required: No
    默认: 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.



源码

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 );
}