bp_blogs_update_option_close_comments_for_old_posts( string $oldvalue, string $newvalue )

Update “Close comments for old posts” option in BuddyPress blogmeta table.

Description

Parameters

$oldvalue

(string) (Required) Value before save. Passed by do_action() but unused here.

$newvalue

(string) (Required) Value to change meta to.

Source

File: bp-blogs/bp-blogs-functions.php

function bp_blogs_update_option_close_comments_for_old_posts( $oldvalue, $newvalue ) {
	global $wpdb;

	bp_blogs_update_blogmeta( $wpdb->blogid, 'close_comments_for_old_posts', $newvalue );
}

Changelog

Changelog
Version Description
BuddyPress 2.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.