deprecated_class_trigger_error
Filter HookDescription
Filters whether to trigger an error for a deprecated class.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5714 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$trigger
|
Whether to trigger an error for a deprecated class. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into deprecated_class_trigger_error
add_filter('deprecated_class_trigger_error', 'my_custom_filter', 10, 1);
function my_custom_filter($trigger) {
// Your custom filtering logic here
return $trigger;
}
Source Code Context
wp-includes/functions.php:5714
- How this hook is used in WordPress core
<?php
5709 *
5710 * @since 6.4.0
5711 *
5712 * @param bool $trigger Whether to trigger an error for a deprecated class. Default true.
5713 */
5714 if ( WP_DEBUG && apply_filters( 'deprecated_class_trigger_error', true ) ) {
5715 if ( function_exists( '__' ) ) {
5716 if ( $replacement ) {
5717 $message = sprintf(
5718 /* translators: 1: PHP class name, 2: Version number, 3: Alternative class or function name. */
5719 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
PHP Documentation
<?php
/**
* Filters whether to trigger an error for a deprecated class.
*
* @since 6.4.0
*
* @param bool $trigger Whether to trigger an error for a deprecated class. Default true.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/functions.php
Related Hooks
Related hooks will be displayed here in future updates.