WordPress at a glance
function is not described

wpdb::_weak_escape() public WP 2.8.0

Deprecated in from version 3.6.0. It is no longer supported and can be removed in future releases. Use wpdb::prepare() instead.

Do not use, deprecated.

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

{} It's a method of the class: wpdb{}

No Hooks.

Return

String.

Usage

global $wpdb;
$wpdb->_weak_escape( $string );
$string(string) (required)

Notes

  • See: wpdb::prepare()
  • See: esc_sql()

Changelog

Since 2.8.0 Introduced.
Deprecated Since 3.6.0 Use wpdb::prepare()

Code of wpdb::_weak_escape() WP 5.5.2

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