WP HOOKS
filtrod 4.2.0

pre_get_table_charset

Args 2Plik wp-includes/class-wpdb.phpDokumentacja WP ↗

Opis — z kodu źródłowego

Filters the table charset value before the DB is checked.

Returning a non-null value from the filter will effectively short-circuit checking the DB for the charset, returning that value instead.

Parametry

ParametrTypOpis
$charsetstring | \WP_Error | nullThe character set to use, WP_Error object if it couldn't be found. Default null.
$tablestringThe name of the table being checked.

Wywołanie

Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'pre_get_table_charset', 'twoja_funkcja', 10, 2 );

function twoja_funkcja($param_1, $param_2) {
	// Twój kod
}

Popularne w tej kategorii