Skip to:
Content

BuddyPress.org

Changeset 3671


Ignore:
Timestamp:
01/08/2011 04:57:52 PM (16 years ago)
Author:
boonebgorges
Message:

Adds argument swapping to blog activity stream strings. Fixes #2028. Props sorich87

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r3640 r3671  
    2626        $bp->active_components[$bp->blogs->slug] = $bp->blogs->id;
    2727
    28         // The default text for the blogs directory search box 
    29         $bp->default_search_strings[$bp->blogs->slug] = __( 'Search Blogs...', 'buddypress' ); 
     28        // The default text for the blogs directory search box
     29        $bp->default_search_strings[$bp->blogs->slug] = __( 'Search Blogs...', 'buddypress' );
    3030
    3131        do_action( 'bp_blogs_setup_globals' );
    … …  
    292292
    293293        $recorded_blog_id = $recorded_blog->save();
    294        
    295         $is_recorded = !empty( $recorded_blog_id ) ? true : false; 
     294
     295        $is_recorded = !empty( $recorded_blog_id ) ? true : false;
    296296
    297297        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'name', $name );
    298298        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description );
    299299        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', bp_core_current_time() );
    300        
     300
    301301        $is_private = !empty( $_POST['blog_public'] ) && (int)$_POST['blog_public'] ? false : true;
    302302
    … …  
    368368                        // Record this in activity streams
    369369                        $post_permalink   = get_permalink( $post_id );
    370                        
     370
    371371                        if ( is_multisite() ) {
    372                                 $activity_action  = sprintf( __( '%s wrote a new blog post: %s on the blog %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
     372                                $activity_action  = sprintf( __( '%1$s wrote a new blog post: %2$s on the blog %3$s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
    373373                        } else {
    374                                 $activity_action  = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
     374                                $activity_action  = sprintf( __( '%1$s wrote a new blog post: %2$s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
    375375                        }
    376376
    … …  
    450450                // Prepare to record in activity streams
    451451                if ( is_multisite() ) {
    452                         $activity_action        = sprintf( __( '%s commented on the blog post %s on the blog %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
     452                        $activity_action        = sprintf( __( '%1$s commented on the blog post %2$s on the blog %3$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>', '<a href="' . get_blog_option( $blog_id, 'home' ) . '">' . get_blog_option( $blog_id, 'blogname' ) . '</a>' );
    453453                } else {
    454                         $activity_action        = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>' );
     454                        $activity_action        = sprintf( __( '%1$s commented on the blog post %2$s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $post_permalink . '">' . apply_filters( 'the_title', $recorded_comment->post->post_title ) . '</a>' );
    455455                }
    456                
     456
    457457                $activity_content       = $recorded_comment->comment_content;
    458                
     458
    459459                // Record in activity streams
    460460                bp_blogs_record_activity( array(
    … …  
    494494        if ( empty( $role ) ) {
    495495                $key = $wpdb->get_blog_prefix( $blog_id ). 'capabilities';
    496                
     496
    497497                $roles = get_user_meta( $user_id, $key, true );
    498                
     498
    499499                if ( is_array( $roles ) )
    500500                        $role = array_search( 1, $roles );
Note: See TracChangeset for help on using the changeset viewer.