deprecated_argument_trigger_error
Filter HookDescription
Filters whether to trigger an error for deprecated arguments.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 5880 |
Hook Parameters
Type | Name | Description |
---|---|---|
bool
|
$trigger
|
Whether to trigger the error for deprecated arguments. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into deprecated_argument_trigger_error
add_filter('deprecated_argument_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:5880
- How this hook is used in WordPress core
<?php
5875 *
5876 * @since 3.0.0
5877 *
5878 * @param bool $trigger Whether to trigger the error for deprecated arguments. Default true.
5879 */
5880 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) {
5881 if ( function_exists( '__' ) ) {
5882 if ( $message ) {
5883 $message = sprintf(
5884 /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
5885 __( 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ),
PHP Documentation
<?php
/**
* Filters whether to trigger an error for deprecated arguments.
*
* @since 3.0.0
*
* @param bool $trigger Whether to trigger the error for deprecated arguments. 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.