Changeset 11788 for trunk/src/bp-blogs/bp-blogs-functions.php
- Timestamp:
- 01/02/2018 10:28:52 PM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-blogs/bp-blogs-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-functions.php
r11721 r11788 363 363 $close_old_posts = get_blog_option( $blog_id, 'close_comments_for_old_posts' ); 364 364 $close_days_old = get_blog_option( $blog_id, 'close_comments_days_old' ); 365 $moderation = get_blog_option( $blog_id, 'comment_moderation' ); 365 366 366 367 $thread_depth = get_blog_option( $blog_id, 'thread_comments' ); … … 385 386 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'close_comments_days_old', $close_days_old ); 386 387 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'thread_comments_depth', $thread_depth ); 388 bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'comment_moderation', $moderation ); 387 389 388 390 $is_private = !empty( $_POST['blog_public'] ) && (int) $_POST['blog_public'] ? false : true; … … 525 527 } 526 528 add_action( 'update_option_thread_comments_depth', 'bp_blogs_update_option_thread_comments_depth', 10, 2 ); 529 530 /** 531 * When updating comment moderation, mirror value in blogmeta table. 532 * 533 * @since 3.0.0 534 * 535 * @param string $oldvalue Value before save. Passed by do_action() but unused here. 536 * @param string $newvalue Value to change meta to. 537 */ 538 function bp_blogs_update_option_comment_moderation( $oldvalue, $newvalue ) { 539 bp_blogs_update_blogmeta( $GLOBALS['wpdb']->blogid, 'comment_moderation', $newvalue ); 540 } 541 add_action( 'update_option_comment_moderation', 'bp_blogs_update_option_comment_moderation', 10, 2 ); 527 542 528 543 /**
Note: See TracChangeset
for help on using the changeset viewer.