filtrod 4.2.0
pre_get_table_charset
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
| Parametr | Typ | Opis |
|---|---|---|
$charset | string | \WP_Error | null | The character set to use, WP_Error object if it couldn't be found. Default null. |
$table | string | The 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
}
// 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