wphooks.info - deprecated_constructor_trigger_error

deprecated_constructor_trigger_error

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/functions.php:
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
	/**
	 * Filters whether to trigger an error for deprecated functions.
	 *
	 * `WP_DEBUG` must be true in addition to the filter evaluating to true.
	 *
	 * @since 4.3.0
	 *
	 * @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
	 */
	if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) {
		if ( function_exists( '__' ) ) {
			if ( ! empty( $parent_class ) ) {
				/* translators: 1: PHP class name, 2: PHP parent class name, 3: version number, 4: __construct() method */
				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, '<pre>__construct()</pre>' ) );
			} else {
				/* translators: 1: PHP class name, 2: version number, 3: __construct() method */
				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>' ) );