PATH:
home
/
beestk
/
autocaz
/
wp-includes
<?php /** * Locale API: WP_Textdomain_Registry class. * * This file uses rtrim() instead of untrailingslashit() and trailingslashit() * to avoid formatting.php dependency. * * @package WordPress * @subpackage i18n * @since 6.1.0 */ /** * Core class used for registering text domains. * * @since 6.1.0 */ #[AllowDynamicProperties] class WP_Textdomain_Registry { /** * List of domains and all their language directory paths for each locale. * * @since 6.1.0 * * @var array */ protected $all = array(); /** * List of domains and their language directory path for the current (most recent) locale. * * @since 6.1.0 * * @var array */ protected $current = array(); /** * List of domains and their custom language directory paths. * * @see load_plugin_textdomain() * @see load_theme_textdomain() * * @since 6.1.0 * * @var array */ protected $custom_paths = array(); /** * Holds a cached list of available .mo files to improve performance. * * @since 6.1.0 * * @var array */ protected $cached_mo_files = array(); /** * Holds a cached list of domains with translations to improve performance. * * @since 6.2.0 * * @var string[] */ protected $domains_with_translations = array(); /** * Returns the languages directory path for a specific domain and locale. * * @since 6.1.0 * * @param string $domain Text domain. * @param string $locale Locale. * * @return string|false MO file path or false if there is none available. */ public function get( $domain, $locale ) { if ( isset( $this->all[ $domain ][ $locale ] ) ) { return $this->all[ $domain ][ $locale ]; } return $this->get_path_from_lang_dir( $domain, $locale ); } /** * Determines whether any MO file paths are available for the domain. * * This is the case if a path has been set for the current locale, * or if there is no information stored yet, in which case * {@see _load_textdomain_just_in_time()} will fetch the information first. * * @since 6.1.0 * * @param string $domain Text domain. * @return bool Whether any MO file paths are available for the domain. */ public function has( $domain ) { return ( isset( $this->current[ $domain ] ) || empty( $this->all[ $domain ] ) || in_array( $domain, $this->domains_with_translations, true ) ); } /** * Sets the language directory path for a specific domain and locale. * * Also sets the 'current' property for direct access * to the path for the current (most recent) locale. * * @since 6.1.0 * * @param string $domain Text domain. * @param string $locale Locale. * @param string|false $path Language directory path or false if there is none available. */ public function set( $domain, $locale, $path ) { $this->all[ $domain ][ $locale ] = $path ? rtrim( $path, '/' ) . '/' : false; $this->current[ $domain ] = $this->all[ $domain ][ $locale ]; } /** * Sets the custom path to the plugin's/theme's languages directory. * * Used by {@see load_plugin_textdomain()} and {@see load_theme_textdomain()}. * * @since 6.1.0 * * @param string $domain Text domain. * @param string $path Language directory path. */ public function set_custom_path( $domain, $path ) { $this->custom_paths[ $domain ] = rtrim( $path, '/' ); } /** * Returns possible language directory paths for a given text domain. * * @since 6.2.0 * * @param string $domain Text domain. * @return string[] Array of language directory paths. */ private function get_paths_for_domain( $domain ) { $locations = array( WP_LANG_DIR . '/plugins', WP_LANG_DIR . '/themes', ); if ( isset( $this->custom_paths[ $domain ] ) ) { $locations[] = $this->custom_paths[ $domain ]; } return $locations; } /** * Gets the path to the language directory for the current locale. * * Checks the plugins and themes language directories as well as any * custom directory set via {@see load_plugin_textdomain()} or {@see load_theme_textdomain()}. * * @since 6.1.0 * * @see _get_path_to_translation_from_lang_dir() * * @param string $domain Text domain. * @param string $locale Locale. * @return string|false Language directory path or false if there is none available. */ private function get_path_from_lang_dir( $domain, $locale ) { $locations = $this->get_paths_for_domain( $domain ); $found_location = false; foreach ( $locations as $location ) { if ( ! isset( $this->cached_mo_files[ $location ] ) ) { $this->set_cached_mo_files( $location ); } $path = "$location/$domain-$locale.mo"; foreach ( $this->cached_mo_files[ $location ] as $mo_path ) { if ( ! in_array( $domain, $this->domains_with_translations, true ) && str_starts_with( str_replace( "$location/", '', $mo_path ), "$domain-" ) ) { $this->domains_with_translations[] = $domain; } if ( $mo_path === $path ) { $found_location = rtrim( $location, '/' ) . '/'; } } } if ( $found_location ) { $this->set( $domain, $locale, $found_location ); return $found_location; } /* * If no path is found for the given locale and a custom path has been set * using load_plugin_textdomain/load_theme_textdomain, use that one. */ if ( 'en_US' !== $locale && isset( $this->custom_paths[ $domain ] ) ) { $fallback_location = rtrim( $this->custom_paths[ $domain ], '/' ) . '/'; $this->set( $domain, $locale, $fallback_location ); return $fallback_location; } $this->set( $domain, $locale, false ); return false; } /** * Reads and caches all available MO files from a given directory. * * @since 6.1.0 * * @param string $path Language directory path. */ private function set_cached_mo_files( $path ) { $this->cached_mo_files[ $path ] = array(); $mo_files = glob( $path . '/*.mo' ); if ( $mo_files ) { $this->cached_mo_files[ $path ] = $mo_files; } } }
[+]
..
[-] class-wp-http-proxy.php
[open]
[-] template.php
[open]
[+]
fonts
[-] vars.php
[open]
[-] l10n.php
[open]
[-] load.php
[open]
[-] class-wp-block-pattern-categories-registry.php
[open]
[-] class-wp-network.php
[open]
[-] capabilities.php
[open]
[-] class-wp-image-editor-imagick.php
[open]
[+]
sodium_compat
[-] class-wp-post.php
[open]
[+]
theme-compat
[-] block-editor.php
[open]
[-] class-wp-image-editor-gd.php
[open]
[-] template-canvas.php
[open]
[-] class-smtp.php
[open]
[-] class-wp-block-styles-registry.php
[open]
[-] class-wp-http-requests-response.php
[open]
[-] class-wp-widget-factory.php
[open]
[-] class-wp-http.php
[open]
[-] class-wp-theme-json.php
[open]
[-] feed-rdf.php
[open]
[-] class-wp-tax-query.php
[open]
[-] class-wp-role.php
[open]
[-] block-template-utils.php
[open]
[-] global-styles-and-settings.php
[open]
[-] class-phpass.php
[open]
[-] class-wp-site-query.php
[open]
[+]
IXR
[-] class-walker-comment.php
[open]
[-] class-wp-http-encoding.php
[open]
[-] class-wp-session-tokens.php
[open]
[-] sitemaps.php
[open]
[-] admin-bar.php
[open]
[-] class-wp-xmlrpc-server.php
[open]
[-] class-wp.php
[open]
[-] theme.php
[open]
[-] class-wp-post-type.php
[open]
[-] atomlib.php
[open]
[-] class-wp-theme-json-schema.php
[open]
[+]
sitemaps
[-] class.wp-dependencies.php
[open]
[-] rss.php
[open]
[-] registration.php
[open]
[-] taxonomy.php
[open]
[+]
style-engine
[-] shortcodes.php
[open]
[-] class-wp-http-ixr-client.php
[open]
[-] wp-diff.php
[open]
[-] class-wp-list-util.php
[open]
[-] class-walker-page-dropdown.php
[open]
[-] query.php
[open]
[-] session.php
[open]
[-] error-protection.php
[open]
[-] widgets.php
[open]
[-] class-wp-block-patterns-registry.php
[open]
[-] class-wp-http-cookie.php
[open]
[-] class-wp-duotone.php
[open]
[-] class-pop3.php
[open]
[-] class-wp-block-parser-block.php
[open]
[-] class-wp-date-query.php
[open]
[-] ms-blogs.php
[open]
[-] theme.json
[open]
[-] class-wp-recovery-mode-cookie-service.php
[open]
[-] compat.php
[open]
[-] class-wp-term.php
[open]
[-] embed.php
[open]
[-] class-wp-feed-cache.php
[open]
[-] post.php
[open]
[-] class.wp-scripts.php
[open]
[-] class-wp-text-diff-renderer-inline.php
[open]
[-] deprecated.php
[open]
[-] class-wp-image-editor.php
[open]
[-] default-filters.php
[open]
[-] class-wp-oembed-controller.php
[open]
[-] feed-rss2-comments.php
[open]
[-] ms-default-constants.php
[open]
[-] class-json.php
[open]
[-] post-formats.php
[open]
[-] category.php
[open]
[-] general-template.php
[open]
[-] revision.php
[open]
[-] pluggable.php
[open]
[+]
assets
[-] class-wp-meta-query.php
[open]
[-] class-wp-network-query.php
[open]
[+]
blocks
[-] registration-functions.php
[open]
[-] class-wp-locale-switcher.php
[open]
[-] post-thumbnail-template.php
[open]
[-] post-template.php
[open]
[-] ms-network.php
[open]
[-] http.php
[open]
[-] fonts.php
[open]
[-] class-walker-nav-menu.php
[open]
[-] ms-load.php
[open]
[-] default-widgets.php
[open]
[-] class-wp-taxonomy.php
[open]
[-] class-wp-simplepie-sanitize-kses.php
[open]
[-] class-IXR.php
[open]
[-] class-wp-term-query.php
[open]
[-] class-wp-block-type-registry.php
[open]
[-] class-wp-oembed.php
[open]
[+]
js
[-] theme-templates.php
[open]
[-] bookmark.php
[open]
[-] class-wp-widget.php
[open]
[-] plugin.php
[open]
[+]
widgets
[+]
rest-api
[-] class-wp-customize-section.php
[open]
[-] block-i18n.json
[open]
[-] feed.php
[open]
[-] class-wp-http-response.php
[open]
[-] ms-site.php
[open]
[-] class-wp-http-requests-hooks.php
[open]
[+]
Requests
[-] ms-files.php
[open]
[-] version.php
[open]
[-] class-wp-theme-json-resolver.php
[open]
[-] class-wp-block-list.php
[open]
[+]
pomo
[-] class-wp-fatal-error-handler.php
[open]
[-] functions.php
[open]
[-] class-simplepie.php
[open]
[-] class-wp-site.php
[open]
[-] ms-default-filters.php
[open]
[-] class-wp-block.php
[open]
[-] class-wp-customize-nav-menus.php
[open]
[-] template-loader.php
[open]
[-] option.php
[open]
[-] cache.php
[open]
[-] class-wp-ajax-response.php
[open]
[-] cache-compat.php
[open]
[+]
SimplePie
[-] theme-previews.php
[open]
[-] class-wp-block-supports.php
[open]
[-] pluggable-deprecated.php
[open]
[-] class-walker-category-dropdown.php
[open]
[-] rewrite.php
[open]
[-] class.wp-styles.php
[open]
[-] category-template.php
[open]
[-] class-wp-dependencies.php
[open]
[-] class-wp-recovery-mode-key-service.php
[open]
[-] meta.php
[open]
[-] blocks.php
[open]
[-] nav-menu-template.php
[open]
[-] https-detection.php
[open]
[-] class-wp-block-editor-context.php
[open]
[+]
certificates
[-] cron.php
[open]
[-] feed-atom-comments.php
[open]
[-] block-patterns.php
[open]
[-] class-wp-block-type.php
[open]
[-] class-wp-application-passwords.php
[open]
[-] class-wp-textdomain-registry.php
[open]
[-] media.php
[open]
[-] class-wp-metadata-lazyloader.php
[open]
[-] class-wp-styles.php
[open]
[-] robots-template.php
[open]
[-] feed-atom.php
[open]
[-] comment.php
[open]
[-] class-wp-http-curl.php
[open]
[-] user.php
[open]
[-] kses.php
[open]
[-] spl-autoload-compat.php
[open]
[+]
html-api
[-] class-wp-text-diff-renderer-table.php
[open]
[-] class-wp-feed-cache-transient.php
[open]
[-] class-snoopy.php
[open]
[-] class-wp-error.php
[open]
[-] locale.php
[open]
[-] class-wp-block-parser-frame.php
[open]
[-] class-wp-embed.php
[open]
[-] class-wp-comment-query.php
[open]
[-] nav-menu.php
[open]
[-] wp-db.php
[open]
[-] class-wp-recovery-mode-email-service.php
[open]
[+]
images
[-] date.php
[open]
[-] ms-settings.php
[open]
[+]
block-patterns
[-] rest-api.php
[open]
[-] class-requests.php
[open]
[-] class-wp-object-cache.php
[open]
[-] class-wp-recovery-mode-link-service.php
[open]
[-] class-wp-customize-setting.php
[open]
[-] class-wp-matchesmapregex.php
[open]
[-] class-wp-hook.php
[open]
[-] class-wp-walker.php
[open]
[-] class-walker-category.php
[open]
[-] class-wp-editor.php
[open]
[-] class-wp-recovery-mode.php
[open]
[-] class-wpdb.php
[open]
[-] class-wp-admin-bar.php
[open]
[-] class-wp-user-request.php
[open]
[-] class-wp-dependency.php
[open]
[-] class-wp-http-streams.php
[open]
[-] class-wp-customize-manager.php
[open]
[-] feed-rss2.php
[open]
[-] class-wp-navigation-fallback.php
[open]
[+]
customize
[-] class-wp-user-meta-session-tokens.php
[open]
[-] class-wp-roles.php
[open]
[-] media-template.php
[open]
[+]
ID3
[-] class-wp-theme.php
[open]
[-] class-wp-classic-to-block-menu-converter.php
[open]
[-] class-wp-scripts.php
[open]
[-] class-oembed.php
[open]
[-] class-wp-customize-panel.php
[open]
[-] functions.wp-scripts.php
[open]
[-] rss-functions.php
[open]
[-] class-wp-paused-extensions-storage.php
[open]
[-] class-feed.php
[open]
[-] class-wp-comment.php
[open]
[-] class-wp-user-query.php
[open]
[-] class-wp-user.php
[open]
[-] class-wp-customize-control.php
[open]
[-] functions.wp-styles.php
[open]
[-] class-phpmailer.php
[open]
[-] script-loader.php
[open]
[-] class-wp-block-template.php
[open]
[-] author-template.php
[open]
[-] ms-deprecated.php
[open]
[+]
css
[-] canonical.php
[open]
[-] class-wp-rewrite.php
[open]
[-] class-wp-block-parser.php
[open]
[-] class-wp-query.php
[open]
[-] class-walker-page.php
[open]
[-] bookmark-template.php
[open]
[-] class-wp-customize-widgets.php
[open]
[-] class-wp-locale.php
[open]
[+]
PHPMailer
[-] block-template.php
[open]
[-] theme-i18n.json
[open]
[-] embed-template.php
[open]
[-] feed-rss.php
[open]
[-] formatting.php
[open]
[-] update.php
[open]
[-] class-wp-simplepie-file.php
[open]
[-] link-template.php
[open]
[-] https-migration.php
[open]
[+]
php-compat
[-] comment-template.php
[open]
[-] style-engine.php
[open]
[+]
Text
[+]
block-supports
[-] class-http.php
[open]
[-] class-wp-theme-json-data.php
[open]
[-] ms-functions.php
[open]
[-] default-constants.php
[open]