# gutenberg/22.3.0/build/modules.php

Gutenberg, version 22.3.0. 45 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/22.3.0/code/build/modules.php
- Raw: https://pluginprobe.com/plugins/gutenberg/22.3.0/raw/build/modules.php
- Modified: 2025-11-05T15:23:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/22.3.0/code/build/modules.php#L10-L20`.

```php
<?php
/**
 * Script module registration - Auto-generated by build process.
 * Do not edit this file manually.
 *
 * @package gutenberg
 */

if ( ! function_exists( 'gutenberg_register_script_modules' ) ) {
	/**
	 * Register all script modules.
	 */
	function gutenberg_register_script_modules() {
		$modules_dir = __DIR__ . '/modules';
		$modules_file = $modules_dir . '/index.php';

		if ( ! file_exists( $modules_file ) ) {
			return;
		}

		$modules = require $modules_file;
		$base_url = plugins_url( 'build/modules/', dirname( __FILE__ ) );
		$extension = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.js' : '.min.js';

		foreach ( $modules as $module ) {
			$asset_path = $modules_dir . '/' . $module['asset'];
			$asset = file_exists( $asset_path ) ? require $asset_path : array();

			wp_register_script_module(
				$module['id'],
				$base_url . $module['path'] . $extension,
				$asset['module_dependencies'] ?? array(),
				$asset['version'] ?? false,
				array(
					'fetchpriority' => 'low',
					'in_footer'     => true,
				)
			);
		}
	}

	add_action( 'wp_default_scripts', 'gutenberg_register_script_modules' );
	remove_action( 'wp_default_scripts', 'wp_default_script_modules' );
}

```
