nal. Locale. Default current locale. * @return string|false Translation on success, false otherwise. */ public function translate_plural( array $plurals, int $number, string $context = '', string $textdomain = 'default', string $locale = null ) { if ( '' !== $context ) { $context .= "\4"; } $text = implode( "\0", $plurals ); $translation = $this->locate_translation( "{$context}{$text}", $textdomain, $locale ); if ( false === $translation ) { $text = $plurals[0]; $translation = $this->locate_translation( "{$context}{$text}", $textdomain, $locale ); if ( false === $translation ) { return false; } } /** @var WP_Translation_File $source */ $source = $translation['source']; $num = $source->get_plural_form( $number ); // See \Translations::translate_plural(). return $translation['entries'][ $num ] ?? $translation['entries'][0]; } /** * Returns all existing headers for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @return array Headers. */ public function get_headers( string $textdomain = 'default' ): array { if ( array() === $this->loaded_translations ) { return array(); } $headers = array(); foreach ( $this->get_files( $textdomain ) as $moe ) { foreach ( $moe->headers() as $header => $value ) { $headers[ $this->normalize_header( $header ) ] = $value; } } return $headers; } /** * Normalizes header names to be capitalized. * * @since 6.5.0 * * @param string $header Header name. * @return string Normalized header name. */ protected function normalize_header( string $header ): string { $parts = explode( '-', $header ); $parts = array_map( 'ucfirst', $parts ); return implode( '-', $parts ); } /** * Returns all entries for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @return array Entries. */ public function get_entries( string $textdomain = 'default' ): array { if ( array() === $this->loaded_translations ) { return array(); } $entries = array(); foreach ( $this->get_files( $textdomain ) as $moe ) { $entries = array_merge( $entries, $moe->entries() ); } return $entries; } /** * Locates translation for a given string and text domain. * * @since 6.5.0 * * @param string $singular Singular translation. * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return array{source: WP_Translation_File, entries: string[]}|false { * Translations on success, false otherwise. * * @type WP_Translation_File $source Translation file instance. * @type string[] $entries Array of translation entries. * } */ protected function locate_translation( string $singular, string $textdomain = 'default', string $locale = null ) { if ( array() === $this->loaded_translations ) { return false; } // Find the translation in all loaded files for this text domain. foreach ( $this->get_files( $textdomain, $locale ) as $moe ) { $translation = $moe->translate( $singular ); if ( false !== $translation ) { return array( 'entries' => explode( "\0", $translation ), 'source' => $moe, ); } if ( null !== $moe->error() ) { // Unload this file, something is wrong. $this->unload_file( $moe, $textdomain, $locale ); } } // Nothing could be found. return false; } /** * Returns all translation files for a given text domain. * * @since 6.5.0 * * @param string $textdomain Optional. Text domain. Default 'default'. * @param string $locale Optional. Locale. Default current locale. * @return WP_Translation_File[] List of translation files. */ protected function get_files( string $textdomain = 'default', string $locale = null ): array { if ( null === $locale ) { $locale = $this->current_locale; } return $this->loaded_translations[ $locale ][ $textdomain ] ?? array(); } }
Fatal error: Uncaught Error: Class 'WP_Translation_Controller' not found in /var/www/html/helitower.com.br/web/wp-includes/l10n.php:800 Stack trace: #0 /var/www/html/helitower.com.br/web/wp-includes/l10n.php(1383): load_textdomain('insert-headers-...', '/var/www/html/h...', 'pt_BR') #1 /var/www/html/helitower.com.br/web/wp-includes/l10n.php(1400): _load_textdomain_just_in_time('insert-headers-...') #2 /var/www/html/helitower.com.br/web/wp-includes/l10n.php(194): get_translations_for_domain('insert-headers-...') #3 /var/www/html/helitower.com.br/web/wp-includes/l10n.php(306): translate('Global', 'insert-headers-...') #4 /var/www/html/helitower.com.br/web/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-auto-insert.php(53): __('Global', 'insert-headers-...') #5 /var/www/html/helitower.com.br/web/wp-content/plugins/insert-headers-and-footers/includes/class-wpcode-auto-insert.php(33): WPCode_Auto_Insert->define_categories() #6 /var/www/html/helitower.com.br/web/wp-content/plugins/insert-headers-and-footers/ in /var/www/html/helitower.com.br/web/wp-includes/l10n.php on line 800

Fatal error: Uncaught Error: Class 'WP_Translation_Controller' not found in /var/www/html/helitower.com.br/web/wp-includes/l10n.php:800 Stack trace: #0 /var/www/html/helitower.com.br/web/wp-includes/l10n.php(957): load_textdomain('default', '/var/www/html/h...', 'pt_BR') #1 /var/www/html/helitower.com.br/web/wp-includes/class-wp-fatal-error-handler.php(49): load_default_textdomain() #2 [internal function]: WP_Fatal_Error_Handler->handle() #3 {main} thrown in /var/www/html/helitower.com.br/web/wp-includes/l10n.php on line 800