W3cubDocs

/WordPress

wpdb::escape_by_ref( string $data )

Escapes content by reference for insertion into the database, for security.

Parameters

$datastringrequired
String to escape.

Source

public function escape_by_ref( &$data ) {
	if ( ! is_float( $data ) ) {
		$data = $this->_real_escape( $data );
	}
}

Changelog

Version Description
2.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wpdb/escape_by_ref