Changeset 13343 for trunk/src/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 10/23/2022 02:21:19 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-functions.php
r13236 r13343 351 351 function bp_blogs_record_blog( $blog_id, $user_id, $no_activity = false ) { 352 352 353 if ( empty( $user_id ) ) 353 if ( empty( $user_id ) ) { 354 354 $user_id = bp_loggedin_user_id(); 355 } 355 356 356 357 // If blog is not recordable, do not record the activity. 357 if ( ! bp_blogs_is_blog_recordable( $blog_id, $user_id ) )358 if ( ! bp_blogs_is_blog_recordable( $blog_id, $user_id ) ) { 358 359 return false; 360 } 359 361 360 362 $name = get_blog_option( $blog_id, 'blogname' ); … … 382 384 $recorded_blog->blog_id = $blog_id; 383 385 $recorded_blog_id = $recorded_blog->save(); 384 $is_recorded = ! empty( $recorded_blog_id ) ? true : false;386 $is_recorded = ! empty( $recorded_blog_id ) ? true : false; 385 387 386 388 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'url', $url ); … … 393 395 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'comment_moderation', $moderation ); 394 396 395 $is_private = !empty( $_POST['blog_public'] ) && (int) $_POST['blog_public'] ? false : true;396 397 397 /** 398 398 * Filters whether or not a new blog is public. … … 402 402 * @param bool $is_private Whether or not blog is public. 403 403 */ 404 $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private ); 404 $is_private = ! apply_filters( 405 'bp_is_new_blog_public', 406 (bool) get_blog_option( $blog_id, 'blog_public' ) 407 ); 405 408 406 409 /**
Note: See TracChangeset
for help on using the changeset viewer.