Changeset 58236
- Timestamp:
- 05/29/2024 03:42:46 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-textdomain-registry.php
r57831 r58236 89 89 * @param string $locale Locale. 90 90 * 91 * @return string|false MO filepath or false if there is none available.91 * @return string|false Languages directory path or false if there is none available. 92 92 */ 93 93 public function get( $domain, $locale ) { 94 if ( isset( $this->all[ $domain ][ $locale ] ) ) { 95 return $this->all[ $domain ][ $locale ]; 96 } 97 98 return $this->get_path_from_lang_dir( $domain, $locale ); 94 $path = $this->all[ $domain ][ $locale ] ?? $this->get_path_from_lang_dir( $domain, $locale ); 95 96 /** 97 * Filters the determined languages directory path for a specific domain and locale. 98 * 99 * @since 6.6.0 100 * 101 * @param string|false $path Languages directory path for the given domain and locale. 102 * @param string $domain Text domain. 103 * @param string $locale Locale. 104 **/ 105 return apply_filters( 'lang_dir_for_domain', $path, $domain, $locale ); 99 106 } 100 107
Note: See TracChangeset
for help on using the changeset viewer.