wpdb::_escape_identifier_value( string $identifier ): string

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Escapes an identifier value without adding the surrounding quotes.

Description

  • Permitted characters in quoted identifiers include the full Unicode Basic Multilingual Plane (BMP), except U+0000.
  • To quote the identifier itself, you need to double the character, e.g. a``b.

Parameters

$identifierstringrequired
Identifier to escape.

Return

string Escaped identifier.

Source

private function _escape_identifier_value( $identifier ) {
	return str_replace( '`', '``', $identifier );
}

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

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