Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2011 06:40:20 PM (15 years ago)
Author:
djpaul
Message:

Fix pagination symbol i18n. Tidy whitespace. Fixes #3456, props r-a-y

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r4918 r4955  
    175175                                'total'     => ceil( (int)$this->total_activity_count / (int)$this->pag_num ),
    176176                                'current'   => (int)$this->pag_page,
    177                                 'prev_text' => '←',
    178                                 'next_text' => '→',
     177                                'prev_text' => _x( '←', 'Activity pagination previous text', 'buddypress' ),
     178                                'next_text' => _x( '→', 'Activity pagination next text', 'buddypress' ),
    179179                                'mid_size'  => 1
    180180                        ) );
     
    270270                        $show_hidden = true;
    271271        }
    272        
     272
    273273        // The default scope should recognize custom slugs
    274274        if ( array_key_exists( $bp->current_action, (array)$bp->loaded_components ) ) {
     
    281281        if ( bp_is_current_action( bp_get_activity_slug() ) )
    282282                $include = bp_action_variable( 0 );
    283                
     283
    284284        // Note: any params used for filtering can be a single value, or multiple values comma separated.
    285285        $defaults = array(
     
    755755                // Insert the time since.
    756756                $time_since = apply_filters_ref_array( 'bp_activity_time_since', array( '<span class="time-since">' . bp_core_time_since( $activities_template->activity->date_recorded ) . '</span>', &$activities_template->activity ) );
    757        
     757
    758758                // Insert the permalink
    759759                if ( !bp_is_single_activity() )
     
    770770        if ( !$activity )
    771771                $activity = $activities_template->activity;
    772        
     772
    773773        if ( isset( $activity->current_comment ) )
    774774                $activity = $activity->current_comment;
     
    861861                bp_activity_recurse_comments( $activities_template->activity );
    862862        }
    863        
     863
    864864                /**
    865865                 * Loops through a level of activity comments and loads the template for each
     
    875875                function bp_activity_recurse_comments( $comment ) {
    876876                        global $activities_template, $bp, $counter;
    877                        
     877
    878878                        if ( !$comment )
    879879                                return false;
    880                                
     880
    881881                        if ( empty( $comment->children ) )
    882882                                return false;
     
    888888
    889889                                $template = locate_template( 'activity/comment.php', false, false );
    890                                
     890
    891891                                // Backward compatibility. In older versions of BP, the markup was
    892892                                // generated in the PHP instead of a template. This ensures that
     
    896896                                        $template = BP_PLUGIN_DIR . '/bp-themes/bp-default/activity/comment.php';
    897897                                }
    898                                
     898
    899899                                load_template( $template, false );
    900                                
     900
    901901                                unset( $activities_template->activity->current_comment );
    902902                        }
     
    915915function bp_activity_current_comment() {
    916916        global $activities_template;
    917        
     917
    918918        $current_comment = !empty( $activities_template->activity->current_comment ) ? $activities_template->activity->current_comment : false;
    919        
     919
    920920        return apply_filters( 'bp_activity_current_comment', $current_comment );
    921921}
     
    943943        function bp_get_activity_comment_id() {
    944944                global $activities_template;
    945                
     945
    946946                $comment_id = isset( $activities_template->activity->current_comment->id ) ? $activities_template->activity->current_comment->id : false;
    947        
     947
    948948                return apply_filters( 'bp_activity_comment_id', $comment_id );
    949949        }
     
    970970        function bp_get_activity_comment_user_id() {
    971971                global $activities_template;
    972                
     972
    973973                $user_id = isset( $activities_template->activity->current_comment->user_id ) ? $activities_template->activity->current_comment->user_id : false;
    974                
     974
    975975                return apply_filters( 'bp_activity_comment_user_id', $user_id );
    976976        }
     
    997997        function bp_get_activity_comment_user_link() {
    998998                $user_link = bp_core_get_user_domain( bp_get_activity_comment_user_id() );
    999        
     999
    10001000                return apply_filters( 'bp_activity_comment_user_link', $user_link );
    10011001        }
     
    10241024        function bp_get_activity_comment_name() {
    10251025                global $activities_template;
    1026                
     1026
    10271027                $name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment ); // backward compatibility
    1028                
     1028
    10291029                return apply_filters( 'bp_activity_comment_name', $name );
    10301030        }
     
    10511051        function bp_get_activity_comment_date_recorded() {
    10521052                global $activities_template;
    1053                
     1053
    10541054                if ( empty( $activities_template->activity->current_comment->date_recorded ) )
    10551055                        return false;
    1056                
     1056
    10571057                $date_recorded = bp_core_time_since( $activities_template->activity->current_comment->date_recorded );
    1058                
     1058
    10591059                return apply_filters( 'bp_activity_comment_date_recorded', $date_recorded );
    10601060        }
     
    10811081        function bp_get_activity_comment_delete_link() {
    10821082                global $bp;
    1083                
     1083
    10841084                $link = wp_nonce_url( bp_get_root_domain() . '/' . bp_get_activity_slug() . '/delete/?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' );
    1085                
     1085
    10861086                return apply_filters( 'bp_activity_comment_delete_link', $link );
    10871087        }
     
    11121112        function bp_get_activity_comment_content() {
    11131113                global $activities_template;
    1114                
     1114
    11151115                $content = apply_filters( 'bp_get_activity_content', $activities_template->activity->current_comment->content );
    1116                
     1116
    11171117                return apply_filters( 'bp_activity_comment_content', $content );
    11181118        }
Note: See TracChangeset for help on using the changeset viewer.