Changeset 36541 for trunk/src/wp-includes/functions.php
- Timestamp:
- 02/16/2016 11:19:38 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r36500 r36541 3629 3629 * 3630 3630 * @since 4.3.0 3631 * @since 4.5.0 Added the `$parent_class` parameter. 3632 * 3631 3633 * @access private 3632 3634 * 3633 * @param string $class The class containing the deprecated constructor. 3634 * @param string $version The version of WordPress that deprecated the function. 3635 */ 3636 function _deprecated_constructor( $class, $version ) { 3635 * @param string $class The class containing the deprecated constructor. 3636 * @param string $version The version of WordPress that deprecated the function. 3637 * @param string $parent_class Optional. The parent class calling the deprecated constructor. 3638 * Default empty string. 3639 */ 3640 function _deprecated_constructor( $class, $version, $parent_class = '' ) { 3637 3641 3638 3642 /** … … 3640 3644 * 3641 3645 * @since 4.3.0 3642 * 3643 * @param string $class The class containing the deprecated constructor. 3644 * @param string $version The version of WordPress that deprecated the function. 3646 * @since 4.5.0 Added the `$parent_class` parameter. 3647 * 3648 * @param string $class The class containing the deprecated constructor. 3649 * @param string $version The version of WordPress that deprecated the function. 3650 * @param string $parent_class The parent class calling the deprecated constructor. 3645 3651 */ 3646 do_action( 'deprecated_constructor_run', $class, $version );3652 do_action( 'deprecated_constructor_run', $class, $version, $parent_class ); 3647 3653 3648 3654 /** … … 3657 3663 if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) { 3658 3664 if ( function_exists( '__' ) ) { 3659 trigger_error( sprintf( __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $class, $version, '<pre>__construct()</pre>' ) ); 3665 if ( ! empty( $parent_class ) ) { 3666 /* translators: 1: PHP class name, 2: PHP parent class name, 3: version number, 4: __construct() method */ 3667 trigger_error( sprintf( __( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ), 3668 $class, $parent_class, $version, '<pre>__construct()</pre>' ) ); 3669 } else { 3670 /* translators: 1: PHP class name, 2: version number, 3: __construct() method */ 3671 trigger_error( sprintf( __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 3672 $class, $version, '<pre>__construct()</pre>' ) ); 3673 } 3660 3674 } else { 3661 trigger_error( sprintf( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $class, $version, '<pre>__construct()</pre>' ) ); 3675 if ( ! empty( $parent_class ) ) { 3676 trigger_error( sprintf( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.', 3677 $class, $parent_class, $version, '<pre>__construct()</pre>' ) ); 3678 } else { 3679 trigger_error( sprintf( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 3680 $class, $version, '<pre>__construct()</pre>' ) ); 3681 } 3662 3682 } 3663 3683 }
Note: See TracChangeset
for help on using the changeset viewer.