Returns a data structure used in theme.json translation.

Return Return

(array) An array of theme.json fields that are translatable and the keys that are translatable.

Top ↑

Source Source

File: wp-includes/class-wp-theme-json-resolver.php

	public static function get_fields_to_translate() {
		if ( null === self::$theme_json_i18n ) {
			$file_structure        = self::read_json_file( __DIR__ . '/theme-i18n.json' );
			self::$theme_json_i18n = self::extract_paths_to_translate( $file_structure );
		return self::$theme_json_i18n;

Top ↑

Changelog Changelog

Version Description
5.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.