Ticket #33440: 35470.patch
File 35470.patch, 3.6 KB (added by , 9 years ago) |
---|
-
wp-includes/class-wp-widget.php
IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8
168 168 * @param array $control_options 169 169 */ 170 170 public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) { 171 _deprecated_constructor( 'WP_Widget', '4.3.0' );171 _deprecated_constructor( 'WP_Widget', '4.3.0', get_class( $this ) ); 172 172 WP_Widget::__construct( $id_base, $name, $widget_options, $control_options ); 173 173 } 174 174 -
wp-includes/functions.php
IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8
3628 3628 * This function is to be used in every PHP4 style constructor method that is deprecated. 3629 3629 * 3630 3630 * @since 4.3.0 3631 * @since 4.5.0 Parent Class. 3632 * 3631 3633 * @access private 3632 3634 * 3633 3635 * @param string $class The class containing the deprecated constructor. 3634 3636 * @param string $version The version of WordPress that deprecated the function. 3637 * @param string $parent_class The parent class. 3635 3638 */ 3636 function _deprecated_constructor( $class, $version ) {3639 function _deprecated_constructor( $class, $version, $parent_class = '' ) { 3637 3640 3638 3641 /** 3639 3642 * Fires when a deprecated constructor is called. 3640 3643 * 3641 3644 * @since 4.3.0 3645 * @since 4.5.0 Add param `$parent_class` 3642 3646 * 3643 3647 * @param string $class The class containing the deprecated constructor. 3644 3648 * @param string $version The version of WordPress that deprecated the function. 3649 * @param string $parent_class The parent class. 3645 3650 */ 3646 do_action( 'deprecated_constructor_run', $class, $version );3651 do_action( 'deprecated_constructor_run', $class, $version, $parent_class ); 3647 3652 3648 3653 /** 3649 3654 * Filter whether to trigger an error for deprecated functions. … … 3656 3661 */ 3657 3662 if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) { 3658 3663 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>' ) ); 3660 } 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>' ) ); 3664 if ( ! empty( $parent_class ) ) { 3665 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.' ), 3666 $class, $parent_class, $version, '<pre>__construct()</pre>' ) ); 3667 } else { 3668 trigger_error( sprintf( __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 3669 $class, $version, '<pre>__construct()</pre>' ) ); 3670 } 3671 } else { 3672 if ( ! empty( $parent_class ) ) { 3673 trigger_error( sprintf( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 3674 $class, $version, '<pre>__construct()</pre>' ) ); 3675 } else { 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 } 3662 3679 } 3663 3680 } 3664 3681