-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add navigation block #443
Add navigation block #443
Conversation
Copied from wporg-main-2022 for reuse
e88836b
to
8f03c79
Compare
* `wp_json_file_decode` & `register_block_script_handle. | ||
*/ | ||
function init() { | ||
$metadata_file = dirname( dirname( __DIR__ ) ) . '/blocks/navigation/build/block.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path changed from main due to different file structure
990ca72
to
14a0e95
Compare
14a0e95
to
9b73837
Compare
'enqueue_block_assets', | ||
function() use ( $editor_script_handle ) { | ||
if ( is_admin() && wp_should_load_block_editor_scripts_and_styles() ) { | ||
wp_localize_script( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass menus to block editor frontend
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great! I tested with both WordPress/wporg-documentation-2022#67 & WordPress/wporg-main-2022#323, and the frontend display works + editor UI looks good too.
A few minor comments, but nothing blocking 👍🏻
Co-authored-by: Kelly Dwan <[email protected]>
Closes #442
Copies the navigation block from wporg-main-2022 for reuse, and adds config for the documentation menu.
Testing