Docs: Fix typo in a translator comment in `_deprecated_class()`.
Includes a few other formatting adjustments for consistency. Follow-up to [48327], [56467], [56471]. See #58833. Built from https://develop.svn.wordpress.org/trunk@56474 git-svn-id: http://core.svn.wordpress.org/trunk@55986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
108b9f8ddb
commit
b79e69ba3b
|
@ -5413,9 +5413,8 @@ function absint( $maybeint ) {
|
|||
/**
|
||||
* Marks a function as deprecated and inform when it has been used.
|
||||
*
|
||||
* There is a hook {@see 'deprecated_function_run'} that will be called that can be used
|
||||
* to get the backtrace up to what file and function called the deprecated
|
||||
* function.
|
||||
* There is a {@see 'deprecated_function_run'} hook that will be called that can be used
|
||||
* to get the backtrace up to what file and function called the deprecated function.
|
||||
*
|
||||
* The current behavior is to trigger a user error if `WP_DEBUG` is true.
|
||||
*
|
||||
|
@ -5502,11 +5501,11 @@ function _deprecated_function( $function_name, $version, $replacement = '' ) {
|
|||
* Marks a constructor as deprecated and informs when it has been used.
|
||||
*
|
||||
* Similar to _deprecated_function(), but with different strings. Used to
|
||||
* remove PHP4 style constructors.
|
||||
* remove PHP4-style constructors.
|
||||
*
|
||||
* The current behavior is to trigger a user error if `WP_DEBUG` is true.
|
||||
*
|
||||
* This function is to be used in every PHP4 style constructor method that is deprecated.
|
||||
* This function is to be used in every PHP4-style constructor method that is deprecated.
|
||||
*
|
||||
* @since 4.3.0
|
||||
* @since 4.5.0 Added the `$parent_class` parameter.
|
||||
|
@ -5604,7 +5603,7 @@ function _deprecated_constructor( $class_name, $version, $parent_class = '' ) {
|
|||
* The current behavior is to trigger a user error if `WP_DEBUG` is true.
|
||||
*
|
||||
* This function is to be used in the class constructor for every deprecated class.
|
||||
* See {@see _deprecated_constructor()} for deprecating PHP4 style constructors.
|
||||
* See {@see _deprecated_constructor()} for deprecating PHP4-style constructors.
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
|
@ -5635,18 +5634,48 @@ function _deprecated_class( $class, $version, $replacement = '' ) {
|
|||
*/
|
||||
if ( WP_DEBUG && apply_filters( 'deprecated_class_trigger_error', true ) ) {
|
||||
if ( function_exists( '__' ) ) {
|
||||
if ( ! is_null( $replacement ) ) {
|
||||
/* translators: 1: PHP class name, 2: version number, 3: alternative clas or function name */
|
||||
trigger_error( sprintf( __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $class, $version, $replacement ), E_USER_DEPRECATED );
|
||||
if ( $replacement ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: 1: PHP class name, 2: Version number, 3: Alternative class or function name. */
|
||||
__( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
|
||||
$class,
|
||||
$version,
|
||||
$replacement
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
} else {
|
||||
/* translators: 1: PHP class name, 2: version number */
|
||||
trigger_error( sprintf( __( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $class, $version ), E_USER_DEPRECATED );
|
||||
trigger_error(
|
||||
sprintf(
|
||||
/* translators: 1: PHP class name, 2: Version number. */
|
||||
__( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ),
|
||||
$class,
|
||||
$version
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if ( ! is_null( $replacement ) ) {
|
||||
trigger_error( sprintf( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $class, $version, $replacement ), E_USER_DEPRECATED );
|
||||
if ( $replacement ) {
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.',
|
||||
$class,
|
||||
$version,
|
||||
$replacement
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
} else {
|
||||
trigger_error( sprintf( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $class, $version ), E_USER_DEPRECATED );
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.',
|
||||
$class,
|
||||
$version
|
||||
),
|
||||
E_USER_DEPRECATED
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5655,9 +5684,8 @@ function _deprecated_class( $class, $version, $replacement = '' ) {
|
|||
/**
|
||||
* Marks a file as deprecated and inform when it has been used.
|
||||
*
|
||||
* There is a hook {@see 'deprecated_file_included'} that will be called that can be used
|
||||
* to get the backtrace up to what file and function included the deprecated
|
||||
* file.
|
||||
* There is a {@see 'deprecated_file_included'} hook that will be called that can be used
|
||||
* to get the backtrace up to what file and function included the deprecated file.
|
||||
*
|
||||
* The current behavior is to trigger a user error if `WP_DEBUG` is true.
|
||||
*
|
||||
|
@ -5750,15 +5778,15 @@ function _deprecated_file( $file, $version, $replacement = '', $message = '' ) {
|
|||
* This function is to be used whenever a deprecated function argument is used.
|
||||
* Before this function is called, the argument must be checked for whether it was
|
||||
* used by comparing it to its default value or evaluating whether it is empty.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* if ( ! empty( $deprecated ) ) {
|
||||
* _deprecated_argument( __FUNCTION__, '3.0.0' );
|
||||
* }
|
||||
*
|
||||
* There is a hook deprecated_argument_run that will be called that can be used
|
||||
* to get the backtrace up to what file and function used the deprecated
|
||||
* argument.
|
||||
* There is a {@see 'deprecated_argument_run'} hook that will be called that can be used
|
||||
* to get the backtrace up to what file and function used the deprecated argument.
|
||||
*
|
||||
* The current behavior is to trigger a user error if WP_DEBUG is true.
|
||||
*
|
||||
|
@ -5911,9 +5939,8 @@ function _deprecated_hook( $hook, $version, $replacement = '', $message = '' ) {
|
|||
/**
|
||||
* Marks something as being incorrectly called.
|
||||
*
|
||||
* There is a hook {@see 'doing_it_wrong_run'} that will be called that can be used
|
||||
* to get the backtrace up to what file and function called the deprecated
|
||||
* function.
|
||||
* There is a {@see 'doing_it_wrong_run'} hook that will be called that can be used
|
||||
* to get the backtrace up to what file and function called the deprecated function.
|
||||
*
|
||||
* The current behavior is to trigger a user error if `WP_DEBUG` is true.
|
||||
*
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.4-alpha-56473';
|
||||
$wp_version = '6.4-alpha-56474';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue