update_gallery_tab [ WordPress Function ]
update_gallery_tab ( $tabs )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: update_user_meta, update_meta, update_user_status, update_usermeta, update_category_cache
{@internal Missing Short Description}}
Source
<?php
function update_gallery_tab($tabs) {
global $wpdb;
if ( !isset($_REQUEST['post_id']) ) {
unset($tabs['gallery']);
return $tabs;
}
$post_id = intval($_REQUEST['post_id']);
if ( $post_id )
$attachments = intval( $wpdb->get_var( $wpdb->prepare( "SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status != 'trash' AND post_parent = %d", $post_id ) ) );
if ( empty($attachments) ) {
unset($tabs['gallery']);
return $tabs;
}
$tabs['gallery'] = sprintf(__('Gallery (%s)'), "<span id='attachments-count'>$attachments</span>");
return $tabs;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- php _e('Uploads') - WordPress SVN
... update_gallery_tab($tabs) { global $wpdb; if ( !isset($_REQUEST['post_id']) ) ... 'update_gallery_tab'); /** * {@internal Missing Short Description}} * * @since ...
core.svn.wordpress.org - wp-admin/includes/media.php source
Aug 19, 2010... unknown 34 */ 35 function update_gallery_tab($tabs) { 36 global $wpdb; 37 38 if ( !isset($_REQUEST['post_id']) ) { 39 unset($tabs['gallery']); ...
phpxref.com - PHPXRef 0.7 : WordPress : Detail view of media.php
update_gallery_tab() the_media_upload_tabs() ...
phpxref.ftwr.co.uk - /wp-admin/includes/media.php source - PHP Cross Reference ...
Jun 1, 2011... $tabs 33 * @return unknown 34 */ 35 function update_gallery_tab($tabs) ... 56 } 57 add_filter('media_upload_tabs', 'update_gallery_tab'); ...
xref.yoast.com