Skip to:
Content

BuddyPress.org

Ticket #2621: patch-2621.patch

File patch-2621.patch, 2.6 KB (added by DJPaul, 15 years ago)

v1

  • bp-themes/bp-default/comments.php

     
    9595
    9696                                        <?php do_action( 'bp_before_blog_comment_form' ) ?>
    9797
    98                                         <form action="<?php echo get_option( 'siteurl' ); ?>/wp-comments-post.php" method="post" id="commentform" class="standard-form">
     98                                        <form action="<?php echo site_url( 'wp-comments-post.php' ) ?>" method="post" id="commentform" class="standard-form">
    9999
    100100                                                <?php if ( $user_ID ) : ?>
    101101
  • bp-blogs.php

     
    320320        }
    321321}
    322322
     323/**
     324 * Makes BuddyPress aware of a new site so that it can track its activity.
     325 *
     326 * @global object $bp BuddyPress global settings
     327 * @param int $blog_id
     328 * @param int $user_id
     329 * @param $bool $no_activity ; optional.
     330 * @since 1.0
     331 * @uses BP_Blogs_Blog
     332 */
    323333function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) {
    324334        global $bp;
    325335
     
    347357                /* Record this in activity streams */
    348358                bp_blogs_record_activity( array(
    349359                        'user_id' => $recorded_blog->user_id,
    350                         'action' => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_blog_option( $recorded_blog->blog_id, 'siteurl' ) . '">' . esc_attr( $name ) . '</a>' ), &$recorded_blog, $name, $description ),
    351                         'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_blog_option( $recorded_blog->blog_id, 'siteurl' ), $recorded_blog->blog_id ),
     360                        'action' => apply_filters( 'bp_blogs_activity_created_blog_action', sprintf( __( '%s created the blog %s', 'buddypress'), bp_core_get_userlink( $recorded_blog->user_id ), '<a href="' . get_site_url( $recorded_blog->blog_id ) . '">' . esc_attr( $name ) . '</a>' ), &$recorded_blog, $name, $description ),
     361                        'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', get_site_url( $recorded_blog->blog_id ), $recorded_blog->blog_id ),
    352362                        'type' => 'new_blog',
    353363                        'item_id' => $recorded_blog->blog_id
    354364                ) );
     
    649659        if ( $bp->current_component == $bp->blogs->slug && isset( $_GET['random-blog'] ) ) {
    650660                $blog = bp_blogs_get_random_blogs( 1, 1 );
    651661
    652                 bp_core_redirect( get_blog_option( $blog['blogs'][0]->blog_id, 'siteurl') );
     662                bp_core_redirect( get_site_url( $blog['blogs'][0]->blog_id ) );
    653663        }
    654664}
    655665add_action( 'wp', 'bp_blogs_redirect_to_random_blog', 6 );