diff --git src/wp-includes/class.wp-scripts.php src/wp-includes/class.wp-scripts.php
index 531bb3a165..65d16c8728 100644
|
|
|
class WP_Scripts extends WP_Dependencies { |
| 514 | 514 | /** @var \_WP_Dependency $obj */ |
| 515 | 515 | $obj = $this->registered[ $handle ]; |
| 516 | 516 | |
| 517 | | if ( ! in_array( 'wp-i18n', $obj->deps, true ) ) { |
| | 517 | // To avoid a circular dependency, avoid enqueuing `wp-i18n` as a |
| | 518 | // dependency of itself or of its own dependencies. |
| | 519 | if ( 'wp-i18n' !== $handle && 'wp-polyfill' !== $handle && ! in_array( 'wp-i18n', $obj->deps, true ) ) { |
| 518 | 520 | $obj->deps[] = 'wp-i18n'; |
| 519 | 521 | } |
| 520 | 522 | |