wpdb::__set()publicWP 3.5.0

Makes private properties settable for backward compatibility.

Method of the class: wpdb{}

No Hooks.

Return

null. Nothing (null).

Usage

global $wpdb;
$wpdb->__set( $name, $value );
$name(string) (required)
The private member to set.
$value(mixed) (required)
The value to set.

Changelog

Since 3.5.0 Introduced.

wpdb::__set() code WP 6.5.2

public function __set( $name, $value ) {
	$protected_members = array(
		'col_meta',
		'table_charset',
		'check_current_query',
		'allow_unsafe_unquoted_parameters',
	);
	if ( in_array( $name, $protected_members, true ) ) {
		return;
	}
	$this->$name = $value;
}