Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/23/2015 03:55:00 AM (9 years ago)
Author:
tw2113
Message:

More documentation cleanup for BP-Blogs component.

See #6397.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r10277 r10374  
    77 */
    88
    9 // Exit if accessed directly
     9// Exit if accessed directly.
    1010defined( 'ABSPATH' ) || exit;
    1111
     
    4343function bp_blogs_get_blogs( $args = '' ) {
    4444
    45     // Parse query arguments
     45    // Parse query arguments.
    4646    $r = bp_parse_args( $args, array(
    4747        'type'              => 'active', // 'active', 'alphabetical', 'newest', or 'random'
     
    5454    ), 'blogs_get_blogs' );
    5555
    56     // Get the blogs
     56    // Get the blogs.
    5757    $blogs = BP_Blogs_Blog::get(
    5858        $r['type'],
     
    6565    );
    6666
    67     // Filter and return
     67    // Filter and return.
    6868    return apply_filters( 'bp_blogs_get_blogs', $blogs, $r );
    6969}
     
    8383    global $wpdb;
    8484
    85     // Query for all sites in network
     85    // Query for all sites in network.
    8686    if ( is_multisite() ) {
    8787
    88         // Get blog ID's if not a large network
     88        // Get blog ID's if not a large network.
    8989        if ( ! wp_is_large_network() ) {
    9090            $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d", $wpdb->siteid ) );
    9191
    92             // If error running this query, set blog ID's to false
     92            // If error running this query, set blog ID's to false.
    9393            if ( is_wp_error( $blog_ids ) ) {
    9494                $blog_ids = false;
    9595            }
    9696
    97         // Large networks are not currently supported
     97        // Large networks are not currently supported.
    9898        } else {
    9999            $blog_ids = false;
    100100        }
    101101
    102     // Record a single site
     102    // Record a single site.
    103103    } else {
    104104        $blog_ids = $wpdb->blogid;
    105105    }
    106106
    107     // Bail if there are no blogs in the network
     107    // Bail if there are no blogs in the network.
    108108    if ( empty( $blog_ids ) ) {
    109109        return false;
    110110    }
    111111
    112     // Get BuddyPress
     112    // Get BuddyPress.
    113113    $bp = buddypress();
    114114
    115     // Truncate user blogs table
     115    // Truncate user blogs table.
    116116    $truncate = $wpdb->query( "TRUNCATE {$bp->blogs->table_name}" );
    117117    if ( is_wp_error( $truncate ) ) {
     
    119119    }
    120120
    121     // Truncate user blogsmeta table
     121    // Truncate user blogsmeta table.
    122122    $truncate = $wpdb->query( "TRUNCATE {$bp->blogs->table_name_blogmeta}" );
    123123    if ( is_wp_error( $truncate ) ) {
     
    125125    }
    126126
    127     // Loop through users of blogs and record the relationship
     127    // Loop through users of blogs and record the relationship.
    128128    foreach ( (array) $blog_ids as $blog_id ) {
    129129
    130         // Ensure that the cache is clear after the table TRUNCATE above
     130        // Ensure that the cache is clear after the table TRUNCATE above.
    131131        wp_cache_delete( $blog_id, 'blog_meta' );
    132132
    133         // Get all users
     133        // Get all users.
    134134        $users = get_users( array(
    135135            'blog_id' => $blog_id
    136136        ) );
    137137
    138         // Continue on if no users exist for this site (how did this happen?)
     138        // Continue on if no users exist for this site (how did this happen?).
    139139        if ( empty( $users ) ) {
    140140            continue;
    141141        }
    142142
    143         // Loop through users and record their relationship to this blog
     143        // Loop through users and record their relationship to this blog.
    144144        foreach ( (array) $users as $user ) {
    145145            bp_blogs_add_user_to_blog( $user->ID, false, $blog_id );
     
    154154    do_action( 'bp_blogs_recorded_existing_blogs' );
    155155
    156     // No errors
     156    // No errors.
    157157    return true;
    158158}
     
    170170 * @param int $blog_id ID of the blog being checked.
    171171 * @param int $user_id Optional. ID of the user for whom access is being checked.
    172  *
    173172 * @return bool True if blog is recordable, otherwise false.
    174173 */
     
    203202 * @param int $blog_id ID of the blog being checked.
    204203 * @param int $user_id Optional. ID of the user for whom access is being checked.
    205  *
    206204 * @return bool True if blog is trackable, otherwise false.
    207205 */
     
    234232 * @param bool $no_activity Optional. Whether to skip recording an activity
    235233 *                          item about this blog creation. Default: false.
    236  *
    237234 * @return bool|null Returns false on failure.
    238235 */
     
    261258        $thread_depth = get_blog_option( $blog_id, 'thread_comments_depth' );
    262259    } else {
    263         // perhaps filter this?
     260        // Perhaps filter this?
    264261        $thread_depth = 1;
    265262    }
     
    282279    $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private );
    283280
    284     // Only record this activity if the blog is public
     281    // Only record this activity if the blog is public.
    285282    if ( !$is_private && !$no_activity && bp_blogs_is_blog_trackable( $blog_id, $user_id ) ) {
    286283
    287         // Record this in activity streams
     284        // Record this in activity streams.
    288285        bp_blogs_record_activity( array(
    289286            'user_id'      => $recorded_blog->user_id,
     
    565562 * @param bool|string $is_approved Optional. The $is_approved value passed to
    566563 *                                 the 'comment_post' action. Default: true.
    567  *
    568564 * @return bool|object Returns false on failure, the comment object on success.
    569565 */
    570566function bp_blogs_record_comment( $comment_id, $is_approved = true ) {
    571     // bail if activity component is not active
     567    // Bail if activity component is not active.
    572568    if ( ! bp_is_active( 'activity' ) ) {
    573569        return;
    574570    }
    575571
    576     // Get the users comment
     572    // Get the users comment.
    577573    $recorded_comment = get_comment( $comment_id );
    578574
    579     // Don't record activity if the comment hasn't been approved
     575    // Don't record activity if the comment hasn't been approved.
    580576    if ( empty( $is_approved ) )
    581577        return false;
    582578
    583     // Don't record activity if no email address has been included
     579    // Don't record activity if no email address has been included.
    584580    if ( empty( $recorded_comment->comment_author_email ) )
    585581        return false;
    586582
    587     // Don't record activity if the comment has already been marked as spam
     583    // Don't record activity if the comment has already been marked as spam.
    588584    if ( 'spam' === $is_approved )
    589585        return false;
     
    592588    $user = get_user_by( 'email', $recorded_comment->comment_author_email );
    593589
    594     // If user isn't registered, don't record activity
     590    // If user isn't registered, don't record activity.
    595591    if ( empty( $user ) )
    596592        return false;
    597593
    598     // Get the user_id
     594    // Get the user_id.
    599595    $user_id = (int) $user->ID;
    600596
    601     // Get blog and post data
     597    // Get blog and post data.
    602598    $blog_id = get_current_blog_id();
    603599
     
    611607        return false;
    612608
    613     // If this is a password protected post, don't record the comment
     609    // If this is a password protected post, don't record the comment.
    614610    if ( !empty( $recorded_comment->post->post_password ) )
    615611        return false;
    616612
    617     // Don't record activity if the comment's associated post isn't a WordPress Post
     613    // Don't record activity if the comment's associated post isn't a WordPress Post.
    618614    if ( !in_array( $recorded_comment->post->post_type, apply_filters( 'bp_blogs_record_comment_post_types', array( 'post' ) ) ) )
    619615        return false;
     
    621617    $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
    622618
    623     // If blog is public allow activity to be posted
     619    // If blog is public allow activity to be posted.
    624620    if ( $is_blog_public ) {
    625621
    626         // Get activity related links
     622        // Get activity related links.
    627623        $post_permalink = get_permalink( $recorded_comment->comment_post_ID );
    628624        $comment_link   = get_comment_link( $recorded_comment->comment_ID );
    629625
    630         // Setup activity args
     626        // Setup activity args.
    631627        $args = array();
    632628
     
    637633
    638634        // Setup some different activity args depending if activity commenting is
    639         // enabled or not
    640 
     635        // enabled or not.
    641636        // if cannot comment, record separate activity entry
    642         // this is the old way of doing things
     637        // this is the old way of doing things.
    643638        if ( bp_disable_blogforum_comments() ) {
    644639            $args['type']              = 'new_blog_comment';
     
    646641            $args['secondary_item_id'] = $comment_id;
    647642
    648             // record the activity entry
     643            // Record the activity entry.
    649644            $activity_id = bp_blogs_record_activity( $args );
    650645
    651             // add some post info in activity meta
     646            // Add some post info in activity meta.
    652647            bp_activity_update_meta( $activity_id, 'post_title', $recorded_comment->post->post_title );
    653648            bp_activity_update_meta( $activity_id, 'post_url',   add_query_arg( 'p', $recorded_comment->post->ID, home_url( '/' ) ) );
    654649
    655         // record comment as BP activity comment under the parent 'new_blog_post'
    656         // activity item
     650        // Record comment as BP activity comment under the parent 'new_blog_post'
     651        // activity item.
    657652        } else {
    658             // this is a comment edit
    659             // check to see if corresponding activity entry already exists
     653            // This is a comment edit
     654            // check to see if corresponding activity entry already exists.
    660655            if ( ! empty( $_REQUEST['action'] ) ) {
    661656                $existing_activity_id = get_comment_meta( $comment_id, 'bp_activity_comment_id', true );
     
    666661            }
    667662
    668             // find the parent 'new_blog_post' activity entry
     663            // Find the parent 'new_blog_post' activity entry.
    669664            $parent_activity_id = bp_activity_get_activity_id( array(
    670665                'component'         => 'blogs',
     
    674669            ) );
    675670
    676             // Try to create a new activity item for the parent blog post
     671            // Try to create a new activity item for the parent blog post.
    677672            if ( empty( $parent_activity_id ) ) {
    678673                $parent_activity_id = bp_activity_post_type_publish( $recorded_comment->comment_post_ID, $recorded_comment->post );
    679674            }
    680675
    681             // we found the parent activity entry
    682             // so let's go ahead and reconfigure some activity args
     676            // We found the parent activity entry
     677            // so let's go ahead and reconfigure some activity args.
    683678            if ( ! empty( $parent_activity_id ) ) {
    684                 // set the 'item_id' with the parent activity entry ID
     679                // Set the 'item_id' with the parent activity entry ID.
    685680                $args['item_id'] = $parent_activity_id;
    686681
    687                 // now see if the WP parent comment has a BP activity ID
     682                // Now see if the WP parent comment has a BP activity ID.
    688683                $comment_parent = 0;
    689684                if ( ! empty( $recorded_comment->comment_parent ) ) {
     
    692687
    693688                // WP parent comment does not have a BP activity ID
    694                 // so set to 'new_blog_post' activity ID
     689                // so set to 'new_blog_post' activity ID.
    695690                if ( empty( $comment_parent ) ) {
    696691                    $comment_parent = $parent_activity_id;
     
    701696                $args['type']              = 'activity_comment';
    702697
    703             // could not find corresponding parent activity entry
    704             // so wipe out $args array
     698            // Could not find corresponding parent activity entry
     699            // so wipe out $args array.
    705700            } else {
    706701                $args = array();
    707702            }
    708703
    709             // Record in activity streams
     704            // Record in activity streams.
    710705            if ( ! empty( $args ) ) {
    711706                // @todo should we use bp_activity_new_comment()? that function will also send
    712                 // an email to people in the activity comment thread
     707                // an email to people in the activity comment thread.
    713708                //
    714                 // what if a site already has some comment email notification plugin setup?
     709                // What if a site already has some comment email notification plugin setup?
    715710                // this is why I decided to go with bp_activity_add() to avoid any conflict
    716                 // with existing comment email notification plugins
     711                // with existing comment email notification plugins.
    717712                $comment_activity_id = bp_activity_add( $args );
    718713
    719714                if ( empty( $args['id'] ) ) {
    720                     // add meta to activity comment
     715                    // Add meta to activity comment.
    721716                    bp_activity_update_meta( $comment_activity_id, 'bp_blogs_post_comment_id', $comment_id );
    722717                    bp_activity_update_meta( $comment_activity_id, 'post_title', $recorded_comment->post->post_title );
    723718                    bp_activity_update_meta( $comment_activity_id, 'post_url', add_query_arg( 'p', $recorded_comment->post->ID, home_url( '/' ) ) );
    724719
    725                     // add meta to comment
     720                    // Add meta to comment.
    726721                    add_comment_meta( $comment_id, 'bp_activity_comment_id', $comment_activity_id );
    727722                }
     
    729724        }
    730725
    731         // Update the blogs last active date
     726        // Update the blogs last active date.
    732727        bp_blogs_update_blogmeta( $blog_id, 'last_activity', bp_core_current_time() );
    733728    }
     
    752747 * @param string|bool $role    User's WordPress role for this blog ID.
    753748 * @param int         $blog_id Blog ID user is being added to.
    754  *
    755749 * @return bool|null False on failure.
    756750 */
     
    758752    global $wpdb;
    759753
    760     // If no blog ID was passed, use the root blog ID
     754    // If no blog ID was passed, use the root blog ID.
    761755    if ( empty( $blog_id ) ) {
    762756        $blog_id = isset( $wpdb->blogid ) ? $wpdb->blogid : bp_get_root_blog_id();
    763757    }
    764758
    765     // If no role was passed, try to find the blog role
     759    // If no role was passed, try to find the blog role.
    766760    if ( empty( $role ) ) {
    767761
    768         // Get user capabilities
     762        // Get user capabilities.
    769763        $key        = $wpdb->get_blog_prefix( $blog_id ). 'capabilities';
    770764        $user_roles = array_keys( (array) bp_get_user_meta( $user_id, $key, true ) );
    771765
    772         // User has roles so lets
     766        // User has roles so lets.
    773767        if ( ! empty( $user_roles ) ) {
    774768
    775             // Get blog roles
     769            // Get blog roles.
    776770            $blog_roles      = array_keys( bp_get_current_blog_roles() );
    777771
    778             // Look for blog only roles of the user
     772            // Look for blog only roles of the user.
    779773            $intersect_roles = array_intersect( $user_roles, $blog_roles );
    780774
     
    789783    }
    790784
    791     // Bail if no role was found or role is not in the allowed roles array
     785    // Bail if no role was found or role is not in the allowed roles array.
    792786    if ( empty( $role ) || ! in_array( $role, bp_blogs_get_allowed_roles() ) ) {
    793787        return false;
    794788    }
    795789
    796     // Record the blog activity for this user being added to this blog
     790    // Record the blog activity for this user being added to this blog.
    797791    bp_blogs_record_blog( $blog_id, $user_id, true );
    798792}
     
    873867    BP_Blogs_Blog::delete_blog_for_all( $blog_id );
    874868
    875     // Delete activity stream item
     869    // Delete activity stream item.
    876870    bp_blogs_delete_activity( array(
    877871        'item_id'   => $blog_id,
     
    915909    BP_Blogs_Blog::delete_blog_for_user( $blog_id, $user_id );
    916910
    917     // Delete activity stream item
     911    // Delete activity stream item.
    918912    bp_blogs_delete_activity( array(
    919913        'item_id'   => $blog_id,
     
    941935 * @param int $user_id Optional. Defaults to the logged-in user ID. This param
    942936 *                     is currently unused in the function (but is passed to hooks).
    943  *
    944937 * @return bool
    945938 */
     
    969962    do_action( 'bp_blogs_before_remove_post', $blog_id, $post_id, $user_id );
    970963
    971     // Delete activity stream item
     964    // Delete activity stream item.
    972965    bp_blogs_delete_activity( array(
    973966        'item_id'           => $blog_id,
     
    998991    global $wpdb;
    999992
    1000     // activity comments are disabled for blog posts
    1001     // which means that individual activity items exist for blog comments
     993    // Activity comments are disabled for blog posts
     994    // which means that individual activity items exist for blog comments.
    1002995    if ( bp_disable_blogforum_comments() ) {
    1003         // Delete the individual activity stream item
     996        // Delete the individual activity stream item.
    1004997        bp_blogs_delete_activity( array(
    1005998            'item_id'           => $wpdb->blogid,
     
    10081001        ) );
    10091002
    1010     // activity comments are enabled for blog posts
    1011     // remove the associated activity item
     1003    // Activity comments are enabled for blog posts
     1004    // remove the associated activity item.
    10121005    } else {
    1013         // get associated activity ID from comment meta
     1006        // Get associated activity ID from comment meta.
    10141007        $activity_id = get_comment_meta( $comment_id, 'bp_activity_comment_id', true );
    10151008
    1016         // delete the associated activity comment
     1009        // Delete the associated activity comment.
    10171010        //
    1018         // also removes child post comments and associated activity comments
     1011        // Also removes child post comments and associated activity comments.
    10191012        if ( ! empty( $activity_id ) && bp_is_active( 'activity' ) ) {
    1020             // fetch the activity comments for the activity item
     1013            // Fetch the activity comments for the activity item.
    10211014            $activity = bp_activity_get( array(
    10221015                'in'               => $activity_id,
     
    10251018            ) );
    10261019
    1027             // get all activity comment IDs for the pending deleted item
     1020            // Get all activity comment IDs for the pending deleted item.
    10281021            if ( ! empty( $activity['activities'] ) ) {
    10291022                $activity_ids   = bp_activity_recurse_comments_activity_ids( $activity );
    10301023                $activity_ids[] = $activity_id;
    10311024
    1032                 // delete activity items
     1025                // Delete activity items.
    10331026                foreach ( $activity_ids as $activity_id ) {
    10341027                    bp_activity_delete( array(
     
    10371030                }
    10381031
    1039                 // remove associated blog comments
     1032                // Remove associated blog comments.
    10401033                bp_blogs_remove_associated_blog_comments( $activity_ids );
    10411034
    1042                 // rebuild activity comment tree
     1035                // Rebuild activity comment tree.
    10431036                BP_Activity_Activity::rebuild_activity_comment_tree( $activity['activities'][0]->item_id );
    10441037            }
     
    10691062 * @param array $activity_ids The activity IDs to check association with blog
    10701063 *                            comments.
    1071  * @param bool $force_delete  Whether to force delete the comments. If false,
     1064 * @param bool  $force_delete  Whether to force delete the comments. If false,
    10721065 *                            comments are trashed instead.
    10731066 */
    10741067function bp_blogs_remove_associated_blog_comments( $activity_ids = array(), $force_delete = true ) {
    1075     // query args
     1068    // Query args.
    10761069    $query_args = array(
    10771070        'meta_query' => array(
     
    10841077    );
    10851078
    1086     // get comment
     1079    // Get comment.
    10871080    $comment_query = new WP_Comment_Query;
    10881081    $comments = $comment_query->query( $query_args );
    10891082
    1090     // found the corresponding comments
     1083    // Found the corresponding comments
    10911084    // let's delete them!
    10921085    foreach ( $comments as $comment ) {
    10931086        wp_delete_comment( $comment->comment_ID, $force_delete );
    10941087
    1095         // if we're trashing the comment, remove the meta key as well
     1088        // If we're trashing the comment, remove the meta key as well.
    10961089        if ( empty( $force_delete ) ) {
    10971090            delete_comment_meta( $comment->comment_ID, 'bp_activity_comment_id' );
     
    11111104function bp_blogs_transition_activity_status( $new_status, $old_status, $comment ) {
    11121105
    1113     // Check the Activity component is active
     1106    // Check the Activity component is active.
    11141107    if ( ! bp_is_active( 'activity' ) )
    11151108        return;
     
    11361129    }
    11371130
    1138     // Get the activity
     1131    // Get the activity.
    11391132    if ( bp_disable_blogforum_comments() ) {
    11401133        $activity_id = bp_activity_get_activity_id( array(
     
    11481141    }
    11491142
    1150     // Check activity item exists
     1143    // Check activity item exists.
    11511144    if ( empty( $activity_id ) ) {
    11521145        // If no activity exists, but the comment has been approved, record it into the activity table.
     
    11581151    }
    11591152
    1160     // Create an activity object
     1153    // Create an activity object.
    11611154    $activity = new BP_Activity_Activity( $activity_id );
    11621155    if ( empty( $activity->component ) )
    11631156        return;
    11641157
    1165     // Spam/ham the activity if it's not already in that state
     1158    // Spam/ham the activity if it's not already in that state.
    11661159    if ( 'spam_activity' == $action && ! $activity->is_spam ) {
    11671160        bp_activity_mark_as_spam( $activity );
     
    11701163    }
    11711164
    1172     // Add "new_blog_comment" to the whitelisted activity types, so that the activity's Akismet history is generated
     1165    // Add "new_blog_comment" to the whitelisted activity types, so that the activity's Akismet history is generated.
    11731166    $comment_akismet_history = create_function( '$t', '$t[] = "new_blog_comment"; return $t;' );
    11741167    add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
    11751168
    1176     // Save the updated activity
     1169    // Save the updated activity.
    11771170    $activity->save();
    11781171
    1179     // Remove the "new_blog_comment" activity type whitelist so we don't break anything
     1172    // Remove the "new_blog_comment" activity type whitelist so we don't break anything.
    11801173    remove_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
    11811174}
     
    12051198 * @param int $user_id ID of the user being queried. Default: on a user page,
    12061199 *                     the displayed user. Otherwise, the logged-in user.
    1207  *
    12081200 * @return int $count Total blog count for the user.
    12091201 */
     
    12131205    }
    12141206
    1215     // no user ID? do not attempt to look at cache
     1207    // No user ID? do not attempt to look at cache.
    12161208    if ( empty( $user_id ) ) {
    12171209        return 0;
     
    12471239    BP_Blogs_Blog::delete_blog_for_all( $blog_id );
    12481240
    1249     // Delete activity stream item
     1241    // Delete activity stream item.
    12501242    bp_blogs_delete_activity( array(
    12511243        'item_id'   => $blog_id,
     
    12741266 * @param int  $user_id     See {@BP_Blogs_Blog::get_blogs_for_user()}.
    12751267 * @param bool $show_hidden See {@BP_Blogs_Blog::get_blogs_for_user()}.
    1276  *
    12771268 * @return array See {@BP_Blogs_Blog::get_blogs_for_user()}.
    12781269 */
     
    12881279 * @param int $limit See {@BP_Blogs_Blog::get_all()}.
    12891280 * @param int $page  See {@BP_Blogs_Blog::get_all()}.
    1290  *
    12911281 * @return array See {@BP_Blogs_Blog::get_all()}.
    12921282 */
     
    13021292 * @param int $limit See {@BP_Blogs_Blog::get()}.
    13031293 * @param int $page  See {@BP_Blogs_Blog::get()}.
    1304  *
    13051294 * @return array See {@BP_Blogs_Blog::get()}.
    13061295 */
     
    13151304 *
    13161305 * @param int $blog_id See {@BP_Blogs_Blog::is_hidden()}.
    1317  *
    13181306 * @return bool See {@BP_Blogs_Blog::is_hidden()}.
    13191307 */
     
    13221310}
    13231311
    1324 /*******************************************************************************
     1312/*
    13251313 * Blog meta functions
    13261314 *
     
    13431331 *                                deleted if the meta_value matches this parameter.
    13441332 * @param bool        $delete_all Optional. If true, delete matching metadata entries for
    1345  *                               all objects, ignoring the specified blog_id. Otherwise, only
    1346  *                               delete matching metadata entries for the specified blog.
    1347  *                               Default: false.
    1348  *
     1333 *                                all objects, ignoring the specified blog_id. Otherwise, only
     1334 *                                delete matching metadata entries for the specified blog.
     1335 *                                Default: false.
    13491336 * @return bool True on success, false on failure.
    13501337 */
     
    13521339    global $wpdb;
    13531340
    1354     // Legacy - if no meta_key is passed, delete all for the blog_id
     1341    // Legacy - if no meta_key is passed, delete all for the blog_id.
    13551342    if ( empty( $meta_key ) ) {
    13561343        $keys = $wpdb->get_col( $wpdb->prepare( "SELECT meta_key FROM {$wpdb->blogmeta} WHERE blog_id = %d", $blog_id ) );
     
    13841371 *                         metadata for the blog will be fetched.
    13851372 * @param bool   $single   Optional. If true, return only the first value of the
    1386  *                          specified meta_key. This parameter has no effect if
    1387  *                          meta_key is not specified. Default: true.
    1388  *
     1373 *                         specified meta_key. This parameter has no effect if
     1374 *                         meta_key is not specified. Default: true.
    13891375 * @return mixed The meta value(s) being requested.
    13901376 */
     
    14081394 *                           metadata entries with the specified value.
    14091395 *                           Otherwise, update all entries.
    1410  *
    14111396 * @return bool|int Returns false on failure. On successful update of existing
    14121397 *                  metadata, returns true. On successful creation of new metadata,
     
    14321417 *                           for the given key. If true, and the object already has a value for
    14331418 *                           the key, no change will be made. Default: false.
    1434  *
    14351419 * @return int|bool The meta ID on successful update, false on failure.
    14361420 */
     
    14461430 *
    14471431 * @param int $user_id ID whose blog data should be removed.
    1448  *
    1449  * @return bool|null Returns false on failure.
     1432 * @return bool Returns false on failure.
    14501433 */
    14511434function bp_blogs_remove_data( $user_id ) {
     
    14901473    }
    14911474
    1492     // Get the user's blogs
     1475    // Get the user's blogs.
    14931476    $user_blogs = get_blogs_of_user( $user_id );
    14941477    if ( empty( $user_blogs ) ) {
Note: See TracChangeset for help on using the changeset viewer.