wpdb::_escape_identifier_value()privateWP 6.2.0

Escapes an identifier value without adding the surrounding quotes.

  • 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.

Method of the class: wpdb{}

No Hooks.

Return

String. Escaped identifier.

Usage

// private - for code of main (parent) class only
$result = $this->_escape_identifier_value( $identifier );
$identifier(string) (required)
Identifier to escape.

Changelog

Since 6.2.0 Introduced.

wpdb::_escape_identifier_value() code WP 6.5.4

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