Marks a function argument as deprecated and inform when it has been used.
Description
See also
Parameters
- $function
-
(string) (Required) The function that was called.
- $version
-
(string) (Required) The version of the plugin that deprecated the argument used.
- $message
-
(string) (Optional) A message regarding the change.
Default value: null
Source
File: src/error-handler.php
public function deprecated_argument( $function, $version, $message = null ) { do_action( 'deprecated_argument_run', $function, $message, $version ); if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { if ( ! is_null( $message ) ) { $message = sprintf( $this->get_translation( 'deprecated_argument' ), $function, $version, $message ); } else { $message = sprintf( $this->get_translation( 'deprecated_argument_no_alt' ), $function, $version ); } torro()->logger()->debug( $message, array( 'deprecated' => true ) ); } }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |