Changeset 5343
- Timestamp:
- 11/21/2011 08:57:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-admin.php
r5341 r5343 159 159 ); 160 160 161 $dev = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? 'dev.' : ''; 162 161 163 // Enqueue CSS and JavaScript 162 if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) { 163 wp_enqueue_script( 'bp_activity_admin_js', BP_PLUGIN_URL . 'bp-activity/admin/js/admin.dev.js', array( 'jquery', 'wp-ajax-response' ), '20111120' ); 164 wp_enqueue_style( 'bp_activity_admin_css', BP_PLUGIN_URL . 'bp-activity/admin/css/admin.dev.css', array(), '20111120' ); 165 166 } else { 167 wp_enqueue_script( 'bp_activity_admin_js', BP_PLUGIN_URL . 'bp-activity/admin/js/admin.js', array( 'jquery', 'wp-ajax-response' ), '20111120' ); 168 wp_enqueue_style( 'bp_activity_admin_css', BP_PLUGIN_URL . 'bp-activity/admin/css/admin.css', array(), '20111120' ); 169 } 164 wp_enqueue_script( 'bp_activity_admin_js', BP_PLUGIN_URL . "bp-activity/admin/js/admin.{$dev}js", array( 'jquery', 'wp-ajax-response' ), '20111120' ); 165 wp_enqueue_style( 'bp_activity_admin_css', BP_PLUGIN_URL . "bp-activity/admin/css/admin.{$dev}css", array(), '20111120' ); 170 166 171 167 // Create the Activity screen list table … … 307 303 308 304 if ( $deleted > 0 ) 309 $messages[] = sprintf( _n( '%s activity was permanently deleted.', '%s activities were permanently deleted.', $deleted, 'buddypress' ), $deleted);305 $messages[] = sprintf( _n( '%s activity was permanently deleted.', '%s activities were permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) ); 310 306 311 307 if ( $error > 0 ) 312 $messages[] = sprintf( __( 'An error occured when updating Activity ID #% d.', 'buddypress' ), $error);308 $messages[] = sprintf( __( 'An error occured when updating Activity ID #%s.', 'buddypress' ), number_format_i18n( $error ) ); 313 309 314 310 if ( $spammed > 0 ) 315 $messages[] = sprintf( _n( '%s activity marked as spam.', '%s activities marked as spam.', $spammed, 'buddypress' ), $spammed);311 $messages[] = sprintf( _n( '%s activity marked as spam.', '%s activities marked as spam.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) ); 316 312 317 313 if ( $unspammed > 0 ) 318 $messages[] = sprintf( _n( '%s activity restored from the spam.', '%s activities restored from the spam.', $unspammed, 'buddypress' ), $unspammed);314 $messages[] = sprintf( _n( '%s activity restored from the spam.', '%s activities restored from the spam.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) ); 319 315 320 316 // Handle the edit screen … … 332 328 <h2> 333 329 <?php if ( !empty( $_REQUEST['aid'] ) ) : ?> 334 <?php printf( __( 'Activity (ID #% d)', 'buddypress' ), (int) $_REQUEST['aid']); ?>330 <?php printf( __( 'Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?> 335 331 <?php else : ?> 336 332 <?php _e( 'Activity', 'buddypress' ); ?> … … 352 348 <?php $bp_activity_list_table->search_box( __( 'Search Activities', 'buddypress' ), 'bp-activity' ); ?> 353 349 354 <input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />350 <input type="hidden" name="page" value="<?php echo esc_attr( (int) $_REQUEST['page'] ); ?>" /> 355 351 <?php $bp_activity_list_table->display(); ?> 356 352 </form> … … 594 590 <ul class="subsubsub"> 595 591 <li class="all"><a href="<?php echo esc_attr( esc_url( $redirect_to ) ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li> 596 <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $redirect_to ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(% d)</span>', 'buddypress' ), $this->spam_count); ?></a></li>592 <li class="spam"><a href="<?php echo esc_attr( esc_url( add_query_arg( 'activity_status', 'spam', $redirect_to ) ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li> 597 593 </ul> 598 594 <?php … … 812 808 return; 813 809 814 $root_activity_id = (int) $root_activity_id[1]; 810 $root_activity_id = (int) $root_activity_id[1]; 811 $root_activity_url = network_admin_url( 'admin.php?page=bp-activity&aid=' . $root_activity_id ); 815 812 816 813 // Is $item the root activity? … … 819 816 820 817 // Get root activity comment count 821 $comment_count = !empty( $root_activity->children ) ? bp_activity_recurse_comment_count( $root_activity ) : 0; 818 $comment_count = !empty( $root_activity->children ) ? number_format_i18n( bp_activity_recurse_comment_count( $root_activity ) ) : 0; 819 $title_attr = sprintf( __( '%s related activities', 'buddypress' ), $comment_count ); 822 820 823 821 // Display a link to the root activity's permalink, with its comment count in a speech bubble 824 printf( '<br /><a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$ d</span></a>', network_admin_url( 'admin.php?page=bp-activity&aid=' . $root_activity_id ), esc_attr( sprintf( __( '%d related activities', 'buddypress' ), $comment_count ) ), $comment_count);822 printf( '<br /><a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', $root_activity_url, esc_attr( $title_attr ), number_format_i18n( $comment_count ) ); 825 823 826 824 // $item is not the root activity (it is probably an activity_comment). … … 828 826 $comment_count = count( BP_Activity_Activity::get_child_comments( $item['id'] ) ); 829 827 830 // /If a non-root activity has zero (child) comments, then don't show a zero bubble to keep the UI tidy828 // If a non-root activity has zero (child) comments, then don't show a zero bubble to keep the UI tidy 831 829 if ( 0 == $comment_count ) { 832 830 echo '<br />'; 833 831 834 832 } else { 833 $comment_count = number_format_i18n( $comment_count ); 834 $title_attr = sprintf( __( '%s related activities', 'buddypress' ), $comment_count ); 835 835 836 // Display a link to the root activity's permalink, with the current activity's (child) comment count in a speech bubble 836 printf( '<br /><a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$ d</span></a>', network_admin_url( 'admin.php?page=bp-activity&aid=' . $root_activity_id ), esc_attr( sprintf( __( '%d related activities', 'buddypress' ), $comment_count ) ), $comment_count);837 printf( '<br /><a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', $root_activity_url, esc_attr( $title_attr ), number_format_i18n( $comment_count ) ); 837 838 } 838 839 }
Note: See TracChangeset
for help on using the changeset viewer.