pre_get_table_charset

FILTER wp-includes\class-wpdb.php (ligne 3220) github
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.

Paramètres

Entrée :
null, $table
Sortie :
@param string|WP_Error|null $charset The character set to use, WP_Error object
@param string               $table   The name of the table being checked.

Utilisation

// Modifier la valeur avec le filtre 'pre_get_table_charset'
add_filter('pre_get_table_charset', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...