WP_Theme_JSON_Schema::rename_paths() – Processes the settings subtree.

You appear to be a bot. Output may be restricted

Description

Processes the settings subtree.

Usage

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

Parameters

$settings
( array ) required – Array to process.
$paths_to_rename
( array ) required – Paths to rename.

Returns

array The settings in the new format.

Source

File name: wordpress/wp-includes/class-wp-theme-json-schema.php


Lines:

1 to 16 of 16
  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;
  }
 

 View on GitHub View on Trac