Changeset 4955 for trunk/bp-activity/bp-activity-template.php
- Timestamp:
- 08/09/2011 06:40:20 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-template.php (modified) (17 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-template.php
r4918 r4955 175 175 'total' => ceil( (int)$this->total_activity_count / (int)$this->pag_num ), 176 176 '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' ), 179 179 'mid_size' => 1 180 180 ) ); … … 270 270 $show_hidden = true; 271 271 } 272 272 273 273 // The default scope should recognize custom slugs 274 274 if ( array_key_exists( $bp->current_action, (array)$bp->loaded_components ) ) { … … 281 281 if ( bp_is_current_action( bp_get_activity_slug() ) ) 282 282 $include = bp_action_variable( 0 ); 283 283 284 284 // Note: any params used for filtering can be a single value, or multiple values comma separated. 285 285 $defaults = array( … … 755 755 // Insert the time since. 756 756 $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 758 758 // Insert the permalink 759 759 if ( !bp_is_single_activity() ) … … 770 770 if ( !$activity ) 771 771 $activity = $activities_template->activity; 772 772 773 773 if ( isset( $activity->current_comment ) ) 774 774 $activity = $activity->current_comment; … … 861 861 bp_activity_recurse_comments( $activities_template->activity ); 862 862 } 863 863 864 864 /** 865 865 * Loops through a level of activity comments and loads the template for each … … 875 875 function bp_activity_recurse_comments( $comment ) { 876 876 global $activities_template, $bp, $counter; 877 877 878 878 if ( !$comment ) 879 879 return false; 880 880 881 881 if ( empty( $comment->children ) ) 882 882 return false; … … 888 888 889 889 $template = locate_template( 'activity/comment.php', false, false ); 890 890 891 891 // Backward compatibility. In older versions of BP, the markup was 892 892 // generated in the PHP instead of a template. This ensures that … … 896 896 $template = BP_PLUGIN_DIR . '/bp-themes/bp-default/activity/comment.php'; 897 897 } 898 898 899 899 load_template( $template, false ); 900 900 901 901 unset( $activities_template->activity->current_comment ); 902 902 } … … 915 915 function bp_activity_current_comment() { 916 916 global $activities_template; 917 917 918 918 $current_comment = !empty( $activities_template->activity->current_comment ) ? $activities_template->activity->current_comment : false; 919 919 920 920 return apply_filters( 'bp_activity_current_comment', $current_comment ); 921 921 } … … 943 943 function bp_get_activity_comment_id() { 944 944 global $activities_template; 945 945 946 946 $comment_id = isset( $activities_template->activity->current_comment->id ) ? $activities_template->activity->current_comment->id : false; 947 947 948 948 return apply_filters( 'bp_activity_comment_id', $comment_id ); 949 949 } … … 970 970 function bp_get_activity_comment_user_id() { 971 971 global $activities_template; 972 972 973 973 $user_id = isset( $activities_template->activity->current_comment->user_id ) ? $activities_template->activity->current_comment->user_id : false; 974 974 975 975 return apply_filters( 'bp_activity_comment_user_id', $user_id ); 976 976 } … … 997 997 function bp_get_activity_comment_user_link() { 998 998 $user_link = bp_core_get_user_domain( bp_get_activity_comment_user_id() ); 999 999 1000 1000 return apply_filters( 'bp_activity_comment_user_link', $user_link ); 1001 1001 } … … 1024 1024 function bp_get_activity_comment_name() { 1025 1025 global $activities_template; 1026 1026 1027 1027 $name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment ); // backward compatibility 1028 1028 1029 1029 return apply_filters( 'bp_activity_comment_name', $name ); 1030 1030 } … … 1051 1051 function bp_get_activity_comment_date_recorded() { 1052 1052 global $activities_template; 1053 1053 1054 1054 if ( empty( $activities_template->activity->current_comment->date_recorded ) ) 1055 1055 return false; 1056 1056 1057 1057 $date_recorded = bp_core_time_since( $activities_template->activity->current_comment->date_recorded ); 1058 1058 1059 1059 return apply_filters( 'bp_activity_comment_date_recorded', $date_recorded ); 1060 1060 } … … 1081 1081 function bp_get_activity_comment_delete_link() { 1082 1082 global $bp; 1083 1083 1084 1084 $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 1086 1086 return apply_filters( 'bp_activity_comment_delete_link', $link ); 1087 1087 } … … 1112 1112 function bp_get_activity_comment_content() { 1113 1113 global $activities_template; 1114 1114 1115 1115 $content = apply_filters( 'bp_get_activity_content', $activities_template->activity->current_comment->content ); 1116 1116 1117 1117 return apply_filters( 'bp_activity_comment_content', $content ); 1118 1118 }
Note: See TracChangeset
for help on using the changeset viewer.