pre_get_col_charset filter-hookWP 4.2.0

Filters the column charset value before the DB is checked.

Passing a non-null value to the filter will short-circuit checking the DB for the charset, returning that value instead.

Usage

add_filter( 'pre_get_col_charset', 'wp_kama_pre_get_col_charset_filter', 10, 3 );

/**
 * Function for `pre_get_col_charset` filter-hook.
 * 
 * @param string|null|false|WP_Error $charset The character set to use.
 * @param string                     $table   The name of the table being checked.
 * @param string                     $column  The name of the column being checked.
 *
 * @return string|null|false|WP_Error
 */
function wp_kama_pre_get_col_charset_filter( $charset, $table, $column ){

	// filter...
	return $charset;
}
$charset(string|null|false|WP_Error)
The character set to use.
Default: null
$table(string)
The name of the table being checked.
$column(string)
The name of the column being checked.

Changelog

Since 4.2.0 Introduced.

Where the hook is called

wpdb::get_col_charset()
pre_get_col_charset
wp-includes/class-wpdb.php 3321
$charset = apply_filters( 'pre_get_col_charset', null, $table, $column );

Where the hook is used in WordPress

Usage not found.