Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_Theme_JSON_Schema::rename_paths( array $settings, array $paths_to_rename ): array

Processes the settings subtree.


Parameters

$settings array Required
Array to process.
$paths_to_rename array Required
Paths to rename.

Top ↑

Return

array The settings in the new format.


Top ↑

Source

File: wp-includes/class-wp-theme-json-schema.php. View all references

private static function rename_paths( $settings, $paths_to_rename ) {
	$new_settings = $settings;

	// Process any renamed/moved paths within default settings.
	self::rename_settings( $new_settings, $paths_to_rename );

	// Process individual block settings.
	if ( isset( $new_settings['blocks'] ) && is_array( $new_settings['blocks'] ) ) {
		foreach ( $new_settings['blocks'] as &$block_settings ) {
			self::rename_settings( $block_settings, $paths_to_rename );
		}
	}

	return $new_settings;
}


Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.

Top ↑

User Contributed Notes

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