Skip to content

Commit

Permalink
Fix block category and asset enqueueing (#47)
Browse files Browse the repository at this point in the history
* Fix block category and asset enqueueing

* Use static config instead of hardcoded string
  • Loading branch information
chriszarate authored Sep 12, 2024
1 parent 261f07b commit 313321c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ function remote_data_blocks_example_theme_enqueue_block_styles() {
);
}
add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\\remote_data_blocks_example_theme_enqueue_block_styles', 15, 0 );
add_action( 'enqueue_block_editor_assets', __NAMESPACE__ . '\\remote_data_blocks_example_theme_enqueue_block_styles', 15, 0 );
add_action( 'enqueue_block_assets', __NAMESPACE__ . '\\remote_data_blocks_example_theme_enqueue_block_styles', 15, 0 );
2 changes: 1 addition & 1 deletion inc/editor/block-registration/block-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static function register_blocks() {
'overrides' => $overrides,
'selectors' => $config['selectors'],
'settings' => [
'category' => 'Remote Data Blocks',
'category' => self::$block_category['slug'],
'title' => $config['title'],
],
];
Expand Down

0 comments on commit 313321c

Please sign in to comment.