Source
File: wp-includes/functions.php
function _deprecated_constructor( $class, $version, $parent_class = '' ) {
do_action( 'deprecated_constructor_run', $class, $version, $parent_class );
if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) {
if ( function_exists( '__' ) ) {
if ( $parent_class ) {
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.' ),
$class,
$parent_class,
$version,
'<code>__construct()</code>'
),
E_USER_DEPRECATED
);
} else {
trigger_error(
sprintf(
__( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ),
$class,
$version,
'<code>__construct()</code>'
),
E_USER_DEPRECATED
);
}
} else {
if ( $parent_class ) {
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.',
$class,
$parent_class,
$version,
'<code>__construct()</code>'
),
E_USER_DEPRECATED
);
} else {
trigger_error(
sprintf(
'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.',
$class,
$version,
'<code>__construct()</code>'
),
E_USER_DEPRECATED
);
}
}
}
}