bp_blogs_update_option_thread_comments( string $oldvalue, string $newvalue )

When toggling threaded comments, update thread depth in blogmeta table.


Parameters Parameters

$oldvalue

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

$newvalue

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


Source Source

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

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

	if ( empty( $newvalue ) ) {
		$thread_depth = 1;
	} else {
		$thread_depth = get_option( 'thread_comments_depth' );
	}

	bp_blogs_update_blogmeta( $wpdb->blogid, 'thread_comments_depth', $thread_depth );
}


Top ↑

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.