Action
rpress_deprecated_function_run
On this page
Fires when a deprecated RestroPress function is called.
Fired by the deprecation helper at the start of its work, before any notice is triggered. Use it to log deprecated calls. Note that the argument order differs from the order of the helper function's own parameters.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$function | string | Name of the deprecated function. |
$replacement | string|null | Function that should be used instead, if given. |
$version | string | RestroPress version in which the function was deprecated. |
Example#
function my_log_deprecated_function( $function, $replacement, $version ) {
error_log( sprintf( '%s is deprecated since %s, use %s', $function, $version, $replacement ) );
}
add_action( 'rpress_deprecated_function_run', 'my_log_deprecated_function', 10, 3 );
Source#
Fired from:
includes/rp-core-functions.php(line 2284), in_rpress_deprecated_function()
See also#
Was this page helpful?
