- Timestamp:
- 01/28/2026 09:28:06 PM (6 months ago)
- Location:
- branches/6.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-script-modules.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/6.9
- Property svn:mergeinfo changed
/trunk merged: 61323,61357,61542
- Property svn:mergeinfo changed
-
branches/6.9/src/wp-includes/class-wp-script-modules.php
r61506 r61550 70 70 'high', 71 71 ); 72 73 /** 74 * List of IDs for script modules encountered which have missing dependencies. 75 * 76 * An ID is added to this list when it is discovered to have missing dependencies. At this time, a warning is 77 * emitted with {@see _doing_it_wrong()}. The ID is then added to this list, so that duplicate warnings don't occur. 78 * 79 * @since 6.9.1 80 * @var string[] 81 */ 82 private $modules_with_missing_dependencies = array(); 72 83 73 84 /** … … 723 734 724 735 // If the item requires dependencies that do not exist, fail. 725 if ( count( array_diff( $dependency_ids, array_keys( $this->registered ) ) ) > 0 ) { 736 $missing_dependencies = array_diff( $dependency_ids, array_keys( $this->registered ) ); 737 if ( count( $missing_dependencies ) > 0 ) { 738 if ( ! in_array( $id, $this->modules_with_missing_dependencies, true ) ) { 739 _doing_it_wrong( 740 get_class( $this ) . '::register', 741 sprintf( 742 /* translators: 1: Script module ID, 2: List of missing dependency IDs. */ 743 __( 'The script module with the ID "%1$s" was enqueued with dependencies that are not registered: %2$s.' ), 744 $id, 745 implode( wp_get_list_item_separator(), $missing_dependencies ) 746 ), 747 '6.9.1' 748 ); 749 $this->modules_with_missing_dependencies[] = $id; 750 } 751 726 752 return false; 727 753 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)