wp_edit_attachments_query [ WordPress Function ]
wp_edit_attachments_query ( $q = false )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: _edit_attachments_query_helper, wp_get_attachment_url, wp_get_attachment_image, wp_get_attachment_thumb_url, wp_edit_posts_query
{@internal Missing Short Description}}
Source
<?php
function wp_edit_attachments_query( $q = false ) {
if ( false === $q )
$q = $_GET;
$q['m'] = isset( $q['m'] ) ? (int) $q['m'] : 0;
$q['cat'] = isset( $q['cat'] ) ? (int) $q['cat'] : 0;
$q['post_type'] = 'attachment';
$post_type = get_post_type_object( 'attachment' );
$states = 'inherit';
if ( current_user_can( $post_type->cap->read_private_posts ) )
$states .= ',private';
$q['post_status'] = isset( $q['status'] ) && 'trash' == $q['status'] ? 'trash' : $states;
$media_per_page = (int) get_user_option( 'upload_per_page' );
if ( empty( $media_per_page ) || $media_per_page < 1 )
$media_per_page = 20;
$q['posts_per_page'] = apply_filters( 'upload_per_page', $media_per_page );
$post_mime_types = get_post_mime_types();
$avail_post_mime_types = get_available_post_mime_types('attachment');
if ( isset($q['post_mime_type']) && !array_intersect( (array) $q['post_mime_type'], array_keys($post_mime_types) ) )
unset($q['post_mime_type']);
if ( isset($q['detached']) )
add_filter('posts_where', '_edit_attachments_query_helper');
wp( $q );
if ( isset($q['detached']) )
remove_filter('posts_where', '_edit_attachments_query_helper');
return array($post_mime_types, $avail_post_mime_types);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- wp_edit_attachments_query
Function and Method Cross Reference. wp_edit_attachments_query(). Defined at : /wp-admin/includes/post.php -> line 927. Referenced 3 times: ...
phpxref.ftwr.co.uk - wp_edit_attachments_query (WordPress Function) - WPSeek.com
WordPress lookup for wp_edit_attachments_query, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - #17600 (Warnings showing in media-upload.php chain ...
... calling wp() /home/rhuancom/public_html/blog/wp-admin/includes/media.php 1916 calling wp_edit_attachments_query() calling media_upload_library_form() ...
core.trac.wordpress.org - Media menu in WP Admin panel show warning errors above media panel ...
May 31, 2011 ... 3 0.2408 22869088 wp_edit_attachments_query( ) ..\class-wp-media-list-table. php:32 4 0.2417 22873744 wp( ) ..\post.php:1019 5 0.2417 ...
forums.tutorialchip.com