Skip to content

Commit

Permalink
Minor variable rename
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgeatches committed Jan 2, 2025
1 parent 1ee8e0e commit 5552dc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inc/Editor/BlockManagement/BlockRegistration.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ public static function add_block_category( array $block_categories ): array {
}

public static function register_blocks(): void {
$all_remote_data_config = [];
$all_remote_block_configs = [];
$scripts_to_localize = [];

foreach ( ConfigStore::get_block_configurations() as $block_configuration ) {
$block_name = $block_configuration['name'];

[ $config, $script_handle ] = self::register_block_configuration( $block_configuration );
$all_remote_data_config[ $block_name ] = $config;
$all_remote_block_configs[ $block_name ] = $config;
$scripts_to_localize[] = $script_handle;
}

foreach ( array_unique( $scripts_to_localize ) as $script_handle ) {
wp_localize_script( $script_handle, 'REMOTE_DATA_BLOCKS', [
'config' => $all_remote_data_config,
'config' => $all_remote_block_configs,
'rest_url' => RemoteDataController::get_url(),
'tracks_global_properties' => TracksAnalytics::get_global_properties(),
] );
Expand Down

0 comments on commit 5552dc7

Please sign in to comment.