/home/u523506497/domains/mymelon.in/public_html/info/wp-includes UP
<?php
/**
* Script Modules API: Script Module functions
*
* @since 6.5.0
*
* @package WordPress
* @subpackage Script Modules
*/
/**
* Retrieves the main WP_Script_Modules instance.
*
* This function provides access to the WP_Script_Modules instance, creating one
* if it doesn't exist yet.
*
* @since 6.5.0
*
* @global WP_Script_Modules $wp_script_modules
*
* @return WP_Script_Modules The main WP_Script_Modules instance.
*/
function wp_script_modules(): WP_Script_Modules {
global $wp_script_modules;
if ( ! ( $wp_script_modules instanceof WP_Script_Modules ) ) {
$wp_script_modules = new WP_Script_Modules();
}
return $wp_script_modules;
}
/**
* Registers the script module if no script module with that script module
* identifier has already been registered.
*
* @since 6.5.0
* @since 6.9.0 Added the $args parameter.
*
* @param string $id The identifier of the script module. Should be unique. It will be used in the
* final import map.
* @param string $src Optional. Full URL of the script module, or path of the script module relative
* to the WordPress root directory. If it is provided and the script module has
* not been registered yet, it will be registered.
* @param array<string|array<string, string>> $deps {
* Optional. List of dependencies.
*
* @type string|array<string, string> ...$0 {
* An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays,
* they need an `id` key with the script module identifier, and can contain
* an `import` key with either `static` or `dynamic`. By default,
* dependencies that don't contain an `import` key are considered static.
*
* @type string $id The script module identifier.
* @type string $import Optional. Import type. May be either `static` or
* `dynamic`. Defaults to `static`.
* }
* }
* @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.
* It is added to the URL as a query string for cache busting purposes. If $version
* is set to false, the version number is the currently installed WordPress version.
* If $version is set to null, no version is added.
* @param array<string, string|bool> $args {
* Optional. An array of additional args. Default empty array.
*
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
* }
*/
function wp_register_script_module( string $id, string $src, array $deps = array(), $version = false, array $args = array() ) {
wp_script_modules()->register( $id, $src, $deps, $version, $args );
}
/**
* Marks the script module to be enqueued in the page.
*
* If a src is provided and the script module has not been registered yet, it
* will be registered.
*
* @since 6.5.0
* @since 6.9.0 Added the $args parameter.
*
* @param string $id The identifier of the script module. Should be unique. It will be used in the
* final import map.
* @param string $src Optional. Full URL of the script module, or path of the script module relative
* to the WordPress root directory. If it is provided and the script module has
* not been registered yet, it will be registered.
* @param array<string|array<string, string>> $deps {
* Optional. List of dependencies.
*
* @type string|array<string, string> ...$0 {
* An array of script module identifiers of the dependencies of this script
* module. The dependencies can be strings or arrays. If they are arrays,
* they need an `id` key with the script module identifier, and can contain
* an `import` key with either `static` or `dynamic`. By default,
* dependencies that don't contain an `import` key are considered static.
*
* @type string $id The script module identifier.
* @type string $import Optional. Import type. May be either `static` or
* `dynamic`. Defaults to `static`.
* }
* }
* @param string|false|null $version Optional. String specifying the script module version number. Defaults to false.
* It is added to the URL as a query string for cache busting purposes. If $version
* is set to false, the version number is the currently installed WordPress version.
* If $version is set to null, no version is added.
* @param array<string, string|bool> $args {
* Optional. An array of additional args. Default empty array.
*
* @type bool $in_footer Whether to print the script module in the footer. Only relevant to block themes. Default 'false'. Optional.
* @type 'auto'|'low'|'high' $fetchpriority Fetch priority. Default 'auto'. Optional.
* }
*/
function wp_enqueue_script_module( string $id, string $src = '', array $deps = array(), $version = false, array $args = array() ) {
wp_script_modules()->enqueue( $id, $src, $deps, $version, $args );
}
/**
* Unmarks the script module so it is no longer enqueued in the page.
*
* @since 6.5.0
*
* @param string $id The identifier of the script module.
*/
function wp_dequeue_script_module( string $id ) {
wp_script_modules()->dequeue( $id );
}
/**
* Deregisters the script module.
*
* @since 6.5.0
*
* @param string $id The identifier of the script module.
*/
function wp_deregister_script_module( string $id ) {
wp_script_modules()->deregister( $id );
}
/**
* Overrides the text domain and path used to load translations for a script module.
*
* Translations for script modules are loaded automatically from the default
* text domain and language directory. Use this function only when a module's
* text domain differs from `'default'` or when translation files live outside
* the standard location, for example plugin modules using their own text domain.
*
* @since 7.0.0
*
* @see WP_Script_Modules::set_translations()
*
* @param string $id The identifier of the script module.
* @param string $domain Optional. Text domain. Default 'default'.
* @param string $path Optional. The full file path to the directory containing translation files.
* @return bool True if the text domain was registered, false if the module is not registered.
*/
function wp_set_script_module_translations( string $id, string $domain = 'default', string $path = '' ): bool {
return wp_script_modules()->set_translations( $id, $domain, $path );
}
/**
* Registers all the default WordPress Script Modules.
*
* @since 6.7.0
*/
function wp_default_script_modules() {
$suffix = defined( 'WP_RUN_CORE_TESTS' ) ? '.min' : wp_scripts_get_suffix();
/*
* Expects multidimensional array like:
*
* 'interactivity/index.js' => array('dependencies' => array(…), 'version' => '…'),
* 'interactivity-router/index.js' => array('dependencies' => array(…), 'version' => '…'),
* 'block-library/navigation/view.js' => …
*/
$assets_file = ABSPATH . WPINC . '/assets/script-modules-packages.php';
$assets = file_exists( $assets_file ) ? include $assets_file : array();
foreach ( $assets as $file_name => $script_module_data ) {
/*
* Build the WordPress Script Module ID from the file name.
* Prepend `@wordpress/` and remove extensions and `/index` if present:
* - interactivity/index.min.js => @wordpress/interactivity
* - interactivity-router/index.min.js => @wordpress/interactivity-router
* - block-library/navigation/view.js => @wordpress/block-library/navigation/view
*/
$script_module_id = '@wordpress/' . preg_replace( '~(?:/index)?(?:\.min)?\.js$~D', '', $file_name, 1 );
/*
* The Interactivity API is designed with server-side rendering as its primary goal, so all of its script modules
* should be loaded with low fetchpriority and printed in the footer since they should not be needed in the
* critical rendering path. Also, the @wordpress/a11y script module is intended to be used as a dynamic import
* dependency, in which case the fetchpriority is irrelevant. See <https://make.wordpress.org/core/2024/10/14/updates-to-script-modules-in-6-7/>.
* However, in case it is added as a static import dependency, the fetchpriority is explicitly set to be 'low'
* since the module should not be involved in the critical rendering path, and if it is, its fetchpriority will
* be bumped to match the fetchpriority of the dependent script.
*/
$args = array();
if (
str_starts_with( $script_module_id, '@wordpress/interactivity' ) ||
str_starts_with( $script_module_id, '@wordpress/block-library' ) ||
'@wordpress/a11y' === $script_module_id
) {
$args['fetchpriority'] = 'low';
$args['in_footer'] = true;
}
// Marks all Core blocks as compatible with client-side navigation.
if ( str_starts_with( $script_module_id, '@wordpress/block-library' ) ) {
wp_interactivity()->add_client_navigation_support_to_script_module( $script_module_id );
}
// VIPS files and the video-conversion worker are always minified — the
// non-minified versions are not shipped because they consist of large
// inlined WASM/worker code with no debugging value.
if ( str_starts_with( $file_name, 'vips/' ) || 'video-conversion/worker.js' === $file_name ) {
$file_name = str_replace( '.js', '.min.js', $file_name );
} elseif ( '' !== $suffix ) {
$file_name = str_replace( '.js', $suffix . '.js', $file_name );
}
$path = includes_url( "js/dist/script-modules/{$file_name}" );
$module_deps = $script_module_data['module_dependencies'] ?? array();
wp_register_script_module( $script_module_id, $path, $module_deps, $script_module_data['version'], $args );
}
}
/**
* Enqueues script modules required by the block editor.
*
* @since 6.9.0
*/
function wp_enqueue_block_editor_script_modules() {
/*
* Enqueue the LaTeX to MathML loader for the math block editor.
* The loader dynamically imports the main LaTeX to MathML module when needed.
*/
wp_enqueue_script_module( '@wordpress/latex-to-mathml/loader' );
}
| ID3 | - | |
| IXR | - | |
| PHPMailer | - | |
| Requests | - | |
| SimplePie | - | |
| Text | - | |
| abilities-api | - | |
| abilities-api.php | 32800 | V |
| abilities.php | 11797 | V |
| admin-bar.php | 40067 | V |
| ai-client | - | |
| ai-client.php | 2549 | V |
| assets | - | |
| atomlib.php | 12181 | V |
| author-template.php | 19844 | V |
| block-bindings | - | |
| block-bindings.php | 7632 | V |
| block-editor.php | 28724 | V |
| block-i18n.json | 316 | V |
| block-patterns | - | |
| block-patterns.php | 15606 | V |
| block-supports | - | |
| block-template-utils.php | 63477 | V |
| block-template.php | 18257 | V |
| blocks | - | |
| blocks.php | 124205 | V |
| bookmark-template.php | 12768 | V |
| bookmark.php | 15427 | V |
| build | - | |
| cache-compat.php | 11021 | V |
| cache.php | 13486 | V |
| canonical.php | 34786 | V |
| capabilities.php | 43584 | V |
| category-template.php | 56990 | V |
| category.php | 12834 | V |
| certificates | - | |
| class-IXR.php | 2609 | V |
| class-avif-info.php | 30008 | V |
| class-feed.php | 539 | V |
| class-http.php | 367 | V |
| class-json.php | 43676 | V |
| class-oembed.php | 401 | V |
| class-phpass.php | 6771 | V |
| class-phpmailer.php | 664 | V |
| class-pop3.php | 21100 | V |
| class-requests.php | 2237 | V |
| class-simplepie.php | 453 | V |
| class-smtp.php | 457 | V |
| class-snoopy.php | 37715 | V |
| class-walker-category-dropdown.php | 2469 | V |
| class-walker-category.php | 8477 | V |
| class-walker-comment.php | 14221 | V |
| class-walker-nav-menu.php | 12044 | V |
| class-walker-page-dropdown.php | 2710 | V |
| class-walker-page.php | 7612 | V |
| class-wp-admin-bar.php | 18002 | V |
| class-wp-ajax-response.php | 5288 | V |
| class-wp-application-passwords.php | 17099 | V |
| class-wp-block-bindings-registry.php | 8263 | V |
| class-wp-block-bindings-source.php | 2992 | V |
| class-wp-block-editor-context.php | 1350 | V |
| class-wp-block-list.php | 4713 | V |
| class-wp-block-metadata-registry.php | 11846 | V |
| class-wp-block-parser-block.php | 2555 | V |
| class-wp-block-parser-frame.php | 1994 | V |
| class-wp-block-parser.php | 11525 | V |
| class-wp-block-pattern-categories-registry.php | 4383 | V |
| class-wp-block-patterns-registry.php | 10265 | V |
| class-wp-block-processor.php | 69914 | V |
| class-wp-block-styles-registry.php | 6419 | V |
| class-wp-block-supports.php | 7578 | V |
| class-wp-block-template.php | 2111 | V |
| class-wp-block-templates-registry.php | 7080 | V |
| class-wp-block-type-registry.php | 5305 | V |
| class-wp-block-type.php | 17222 | V |
| class-wp-block.php | 28236 | V |
| class-wp-classic-to-block-menu-converter.php | 4026 | V |
| class-wp-comment-query.php | 49040 | V |
| class-wp-comment.php | 17249 | V |
| class-wp-connector-registry.php | 15181 | V |
| class-wp-customize-control.php | 26112 | V |
| class-wp-customize-manager.php | 202908 | V |
| class-wp-customize-nav-menus.php | 58034 | V |
| class-wp-customize-panel.php | 10703 | V |
| class-wp-customize-section.php | 11209 | V |
| class-wp-customize-setting.php | 29956 | V |
| class-wp-customize-widgets.php | 72596 | V |
| class-wp-date-query.php | 35970 | V |
| class-wp-dependencies.php | 17089 | V |
| class-wp-dependency.php | 2653 | V |
| class-wp-duotone.php | 40836 | V |
| class-wp-editor.php | 72228 | V |
| class-wp-embed.php | 15908 | V |
| class-wp-error.php | 7514 | V |
| class-wp-exception.php | 253 | V |
| class-wp-fatal-error-handler.php | 8150 | V |
| class-wp-feed-cache-transient.php | 3304 | V |
| class-wp-feed-cache.php | 969 | V |
| class-wp-filter-sentinel.php | 760 | V |
| class-wp-hook.php | 17584 | V |
| class-wp-http-cookie.php | 7269 | V |
| class-wp-http-curl.php | 13261 | V |
| class-wp-http-encoding.php | 6689 | V |
| class-wp-http-ixr-client.php | 3516 | V |
| class-wp-http-proxy.php | 5980 | V |
| class-wp-http-requests-hooks.php | 2022 | V |
| class-wp-http-requests-response.php | 4243 | V |
| class-wp-http-response.php | 2977 | V |
| class-wp-http-streams.php | 16764 | V |
| class-wp-http.php | 41641 | V |
| class-wp-icon-collections-registry.php | 5805 | V |
| class-wp-icons-registry.php | 9903 | V |
| class-wp-image-editor-gd.php | 20741 | V |
| class-wp-image-editor-imagick.php | 43454 | V |
| class-wp-image-editor.php | 17456 | V |
| class-wp-list-util.php | 7443 | V |
| class-wp-locale-switcher.php | 6776 | V |
| class-wp-locale.php | 16848 | V |
| class-wp-matchesmapregex.php | 1828 | V |
| class-wp-meta-query.php | 30507 | V |
| class-wp-metadata-lazyloader.php | 6833 | V |
| class-wp-navigation-fallback.php | 9193 | V |
| class-wp-network-query.php | 19989 | V |
| class-wp-network.php | 12411 | V |
| class-wp-object-cache.php | 17524 | V |
| class-wp-oembed-controller.php | 6905 | V |
| class-wp-oembed.php | 34372 | V |
| class-wp-paused-extensions-storage.php | 5067 | V |
| class-wp-phpmailer.php | 4348 | V |
| class-wp-plugin-dependencies.php | 25209 | V |
| class-wp-post-type.php | 30672 | V |
| class-wp-post.php | 8806 | V |
| class-wp-query.php | 164148 | V |
| class-wp-recovery-mode-cookie-service.php | 6877 | V |
| class-wp-recovery-mode-email-service.php | 11162 | V |
| class-wp-recovery-mode-key-service.php | 4914 | V |
| class-wp-recovery-mode-link-service.php | 3523 | V |
| class-wp-recovery-mode.php | 11460 | V |
| class-wp-rewrite.php | 63693 | V |
| class-wp-role.php | 2523 | V |
| class-wp-roles.php | 9326 | V |
| class-wp-script-modules.php | 40743 | V |
| class-wp-scripts.php | 36754 | V |
| class-wp-session-tokens.php | 7319 | V |
| class-wp-simplepie-file.php | 3552 | V |
| class-wp-simplepie-sanitize-kses.php | 1903 | V |
| class-wp-site-query.php | 31482 | V |
| class-wp-site.php | 7836 | V |
| class-wp-speculation-rules.php | 7884 | V |
| class-wp-styles.php | 13316 | V |
| class-wp-tax-query.php | 19577 | V |
| class-wp-taxonomy.php | 18559 | V |
| class-wp-term-query.php | 40751 | V |
| class-wp-term.php | 5263 | V |
| class-wp-text-diff-renderer-inline.php | 979 | V |
| class-wp-text-diff-renderer-table.php | 18925 | V |
| class-wp-textdomain-registry.php | 10481 | V |
| class-wp-theme-json-data.php | 1805 | V |
| class-wp-theme-json-resolver.php | 35692 | V |
| class-wp-theme-json-schema.php | 7367 | V |
| class-wp-theme-json.php | 222059 | V |
| class-wp-theme.php | 65811 | V |
| class-wp-token-map.php | 29032 | V |
| class-wp-url-pattern-prefixer.php | 4802 | V |
| class-wp-user-meta-session-tokens.php | 2954 | V |
| class-wp-user-query.php | 44102 | V |
| class-wp-user-request.php | 2342 | V |
| class-wp-user.php | 23189 | V |
| class-wp-view-config-data.php | 29427 | V |
| class-wp-walker.php | 13292 | V |
| class-wp-widget-factory.php | 4113 | V |
| class-wp-widget.php | 18452 | V |
| class-wp-xmlrpc-server.php | 217288 | V |
| class-wp.php | 26520 | V |
| class-wpdb.php | 121437 | V |
| class.wp-dependencies.php | 373 | V |
| class.wp-scripts.php | 343 | V |
| class.wp-styles.php | 338 | V |
| comment-template.php | 103211 | V |
| comment.php | 150630 | V |
| compat-utf8.php | 19386 | V |
| compat.php | 22479 | V |
| connectors.php | 32922 | V |
| cron.php | 46266 | V |
| css | - | |
| customize | - | |
| date.php | 400 | V |
| default-constants.php | 11365 | V |
| default-filters.php | 39500 | V |
| default-widgets.php | 2288 | V |
| deprecated.php | 193977 | V |
| embed-template.php | 338 | V |
| embed.php | 39215 | V |
| error-protection.php | 4092 | V |
| feed-atom-comments.php | 5504 | V |
| feed-atom.php | 3114 | V |
| feed-rdf.php | 2668 | V |
| feed-rss.php | 1189 | V |
| feed-rss2-comments.php | 4136 | V |
| feed-rss2.php | 3799 | V |
| feed.php | 25189 | V |
| fonts | - | |
| fonts.php | 9789 | V |
| formatting.php | 357678 | V |
| functions.php | 295481 | V |
| functions.wp-scripts.php | 20492 | V |
| functions.wp-styles.php | 8654 | V |
| general-template.php | 184198 | V |
| global-styles-and-settings.php | 20780 | V |
| html-api | - | |
| http.php | 28961 | V |
| https-detection.php | 5857 | V |
| https-migration.php | 4741 | V |
| icons.php | 6334 | V |
| images | - | |
| interactivity-api | - | |
| js | - | |
| json-schema.php | 7802 | V |
| kses.php | 88497 | V |
| l10n | - | |
| l10n.php | 71415 | V |
| link-template.php | 160143 | V |
| load.php | 56475 | V |
| locale.php | 162 | V |
| media-template.php | 65759 | V |
| media.php | 236804 | V |
| meta.php | 66739 | V |
| ms-blogs.php | 26324 | V |
| ms-default-constants.php | 4921 | V |
| ms-default-filters.php | 6636 | V |
| ms-deprecated.php | 21787 | V |
| ms-files.php | 2857 | V |
| ms-functions.php | 92530 | V |
| ms-load.php | 20055 | V |
| ms-network.php | 3782 | V |
| ms-settings.php | 4197 | V |
| ms-site.php | 41729 | V |
| nav-menu-template.php | 25983 | V |
| nav-menu.php | 44269 | V |
| option.php | 105246 | V |
| php-ai-client | - | |
| php-compat | - | |
| pluggable-deprecated.php | 6324 | V |
| pluggable.php | 127919 | V |
| plugin.php | 37123 | V |
| pomo | - | |
| post-formats.php | 7070 | V |
| post-template.php | 69129 | V |
| post-thumbnail-template.php | 10879 | V |
| post.php | 305215 | V |
| query.php | 37554 | V |
| registration-functions.php | 200 | V |
| registration.php | 200 | V |
| rest-api | - | |
| rest-api.php | 102951 | V |
| revision.php | 31241 | V |
| rewrite.php | 19567 | V |
| robots-template.php | 5185 | V |
| rss-functions.php | 277 | V |
| rss.php | 23203 | V |
| script-loader.php | 163550 | V |
| script-modules.php | 12311 | V |
| session.php | 258 | V |
| shortcodes.php | 24034 | V |
| sitemaps | - | |
| sitemaps.php | 3238 | V |
| sodium_compat | - | |
| speculative-loading.php | 11880 | V |
| spl-autoload-compat.php | 441 | V |
| style-engine | - | |
| style-engine.php | 8045 | V |
| taxonomy.php | 178307 | V |
| template-canvas.php | 544 | V |
| template-loader.php | 4267 | V |
| template.php | 38826 | V |
| theme-compat | - | |
| theme-i18n.json | 1892 | V |
| theme-previews.php | 2887 | V |
| theme-templates.php | 4060 | V |
| theme.json | 9480 | V |
| theme.php | 134913 | V |
| update.php | 38269 | V |
| user.php | 180301 | V |
| utf8.php | 6977 | V |
| vars.php | 6600 | V |
| version.php | 1103 | V |
| view-config.php | 19087 | V |
| view-transitions.php | 602 | V |
| widgets | - | |
| widgets.php | 70866 | V |
| wp-db.php | 445 | V |
| wp-diff.php | 792 | V |