apply_filters( 'pre_get_col_charset', string|null|false|WP_Error $charset, string $table, string $column )
- Since
- 4.2.0
Filters the column charset value before the DB is checked.
Description
Passing a non-null value to the filter will short-circuit checking the DB for the charset, returning that value instead.
Compatibility
- WordPress
- since 4.2.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$charsetstring|null|false|WP_Error- The character set to use. Default null.
$tablestring- The name of the table being checked.
$columnstring- The name of the column being checked.
Where this hook fires · 1
wp-includes/class-wpdb.php:3312wpdb::get_col_charset()
Source code
* @since 4.2.0 * * @param string|null|false|WP_Error $charset The character set to use. Default null. * @param string $table The name of the table being checked. * @param string $column The name of the column being checked. */ $charset = apply_filters( 'pre_get_col_charset', null, $table, $column ); if ( null !== $charset ) { return $charset; } // Skip this entirely if this isn't a MySQL database. if ( empty( $this->is_mysql ) ) {Changelog
Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.7.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.