Action
rpress_deprecated_argument_run
On this page
Fires when a function is called with a deprecated argument.
Fired by the deprecated-argument helper before any notice is triggered. Use it to log such calls. The argument order differs from the order of the helper function's own parameters.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$argument | string | Name of the deprecated argument. |
$function | string | Function that was called. |
$replacement | string|null | Replacement to use, if given. |
$version | string | RestroPress version in which the argument was deprecated. |
Example#
function my_log_deprecated_argument( $argument, $function, $replacement, $version ) {
error_log( sprintf( 'Argument %s of %s is deprecated since %s', $argument, $function, $version ) );
}
add_action( 'rpress_deprecated_argument_run', 'my_log_deprecated_argument', 10, 4 );
Source#
Fired from:
includes/rp-core-functions.php(line 2334), in_rpress_deprected_argument()
See also#
Was this page helpful?
