-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Navigation: Refactor the PHP render function to make it easier to make changes in the future #55605
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
65f5793
Navigation: Refactor the PHP render function to make it easier to mak…
scruffian 5bcde61
move code to get_inner_blocks_html
scruffian dcd97b7
remove is-fallback class
scruffian e268651
allow multiple menus
scruffian 8f54d44
add some comments
scruffian a9f0328
refactor directives to a different function
scruffian f087c4e
fix submenus
scruffian b40caa5
refactor responseive navigation function
scruffian a6ffa85
remove a passed param
scruffian 2991d1e
create a function for get_styles
scruffian afe3474
dont pass the container_attributes as a param
scruffian 58906ca
handle view script loading
scruffian 67d5ec3
reorder code
scruffian 40c4cce
simplify the return
scruffian 0544d33
tidy up the wrapper attributes
scruffian 21e973d
remove one dependence on has_submenu
scruffian c7e010a
remove the should load view script variable
scruffian 001ed21
more simplification
scruffian e8b57df
Update packages/block-library/src/navigation/index.php
scruffian 7826b78
rename class
scruffian dc5fb2c
remname is_responsive_navigation
scruffian 0a7c0d1
rename does_navigation_have_submenus
scruffian 362d7bd
rename get_inner_blocks_for_navigation
scruffian 04f245e
rename get_layout_class_for_navigation
scruffian 7123f27
Update packages/block-library/src/navigation/index.php
scruffian af5f8cd
Update packages/block-library/src/navigation/index.php
scruffian 5157393
change name of get_nav_markup
scruffian cd2c7fd
split get_inner_blocks into smaller functions
scruffian 5514082
add comment
scruffian 34fde64
remove unnecessary spaces
scruffian 8998c2b
update docs
scruffian 62d192f
reverse parameter order
scruffian fdabfa4
reverse parameter order
scruffian 1ae2f05
reverse parameter order
scruffian 5ab9ae5
move the class to a new file
scruffian d51d7c3
add docs
scruffian 9a7a313
rename to
scruffian 70cf09b
move function that's only used by the plugin into that section of the…
scruffian 643c967
fix linter
scruffian d3c876b
reference the class internally using static
scruffian 736e27d
move variable to static variables
scruffian dcad41f
Update lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php
scruffian 07f65eb
Update lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php
scruffian 103c27a
move the logic for inner block rendering to a separate function
scruffian d98037e
test for navigation link markup
MaggieCabrera a19a890
test for site title markup
MaggieCabrera c5261b6
removed comments, changed assertSame to assertEquals
MaggieCabrera 0e63a3a
format php
MaggieCabrera 295bd03
hide the condition in a function
scruffian 94dd338
hide the condition in a function
scruffian 939c50f
return early from has_submenus
scruffian d21547c
comments for the tests
MaggieCabrera b16a3bd
create a function to get the name
scruffian aceed2e
rename variable to nav_blocks_wrapped_in_list_item
scruffian 05ab18f
phpcs
scruffian 5310ede
phpcs
scruffian 163f08f
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera 649f813
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera 73764c9
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera 9b669a1
Apply suggestions from code review
MaggieCabrera c56237d
dynamic url for links on test
MaggieCabrera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
move the logic for inner block rendering to a separate function
- Loading branch information
commit 103c27ab2d2cb7d9ad7522c16122369f81fd7fd3
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.