Automattic\WooCommerce\Database\Migrations
MigrationHelper::escape_and_add_backtick()
Helper method to escape backtick in column and table names. WP does not provide a method to escape table/columns names yet, but hopefully soon in @link https://core.trac.wordpress.org/ticket/52506
Метод класса: MigrationHelper{}
Хуков нет.
Возвращает
Массив|Строку|Строку[]
. Escaped identifier.
Использование
$result = MigrationHelper::escape_and_add_backtick( $identifier );
- $identifier(строка|массив) (обязательный)
- Column or table name.
Код MigrationHelper::escape_and_add_backtick() MigrationHelper::escape and add backtick WC 9.3.3
public static function escape_and_add_backtick( $identifier ) { return '`' . str_replace( '`', '``', $identifier ) . '`'; }