Warning: This method has been deprecated. Use wpdb::prepare() instead.

wpdb::_weak_escape( string $data ): string

Do not use, deprecated.


Description

Use esc_sql() or wpdb::prepare() instead.

Top ↑

See also


Top ↑

Parameters

$data string Required

Top ↑

Return

string


Top ↑

Source

File: wp-includes/class-wpdb.php. View all references

public function _weak_escape( $data ) {
	if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) {
		_deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
	}
	return addslashes( $data );
}


Top ↑

Changelog

Changelog
Version Description
3.6.0 Use wpdb::prepare()
2.8.0 Introduced.

Top ↑

User Contributed Notes

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