Skip to content
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

Navigation: Refactor the PHP render function to make it easier to make changes in the future #55605

Merged
merged 61 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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 Oct 25, 2023
5bcde61
move code to get_inner_blocks_html
scruffian Oct 25, 2023
dcd97b7
remove is-fallback class
scruffian Oct 25, 2023
e268651
allow multiple menus
scruffian Oct 25, 2023
8f54d44
add some comments
scruffian Oct 25, 2023
a9f0328
refactor directives to a different function
scruffian Oct 25, 2023
f087c4e
fix submenus
scruffian Oct 25, 2023
b40caa5
refactor responseive navigation function
scruffian Oct 25, 2023
a6ffa85
remove a passed param
scruffian Oct 25, 2023
2991d1e
create a function for get_styles
scruffian Oct 25, 2023
afe3474
dont pass the container_attributes as a param
scruffian Oct 25, 2023
58906ca
handle view script loading
scruffian Oct 25, 2023
67d5ec3
reorder code
scruffian Oct 25, 2023
40c4cce
simplify the return
scruffian Oct 25, 2023
0544d33
tidy up the wrapper attributes
scruffian Oct 25, 2023
21e973d
remove one dependence on has_submenu
scruffian Oct 25, 2023
c7e010a
remove the should load view script variable
scruffian Oct 25, 2023
001ed21
more simplification
scruffian Oct 25, 2023
e8b57df
Update packages/block-library/src/navigation/index.php
scruffian Oct 26, 2023
7826b78
rename class
scruffian Oct 26, 2023
dc5fb2c
remname is_responsive_navigation
scruffian Oct 26, 2023
0a7c0d1
rename does_navigation_have_submenus
scruffian Oct 26, 2023
362d7bd
rename get_inner_blocks_for_navigation
scruffian Oct 26, 2023
04f245e
rename get_layout_class_for_navigation
scruffian Oct 26, 2023
7123f27
Update packages/block-library/src/navigation/index.php
scruffian Oct 26, 2023
af5f8cd
Update packages/block-library/src/navigation/index.php
scruffian Oct 26, 2023
5157393
change name of get_nav_markup
scruffian Nov 2, 2023
cd2c7fd
split get_inner_blocks into smaller functions
scruffian Nov 2, 2023
5514082
add comment
scruffian Nov 2, 2023
34fde64
remove unnecessary spaces
scruffian Nov 2, 2023
8998c2b
update docs
scruffian Nov 2, 2023
62d192f
reverse parameter order
scruffian Nov 2, 2023
fdabfa4
reverse parameter order
scruffian Nov 2, 2023
1ae2f05
reverse parameter order
scruffian Nov 2, 2023
5ab9ae5
move the class to a new file
scruffian Nov 2, 2023
d51d7c3
add docs
scruffian Nov 2, 2023
9a7a313
rename to
scruffian Nov 2, 2023
70cf09b
move function that's only used by the plugin into that section of the…
scruffian Nov 2, 2023
643c967
fix linter
scruffian Nov 2, 2023
d3c876b
reference the class internally using static
scruffian Nov 3, 2023
736e27d
move variable to static variables
scruffian Nov 7, 2023
dcad41f
Update lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php
scruffian Nov 7, 2023
07f65eb
Update lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php
scruffian Nov 7, 2023
103c27a
move the logic for inner block rendering to a separate function
scruffian Nov 7, 2023
d98037e
test for navigation link markup
MaggieCabrera Nov 7, 2023
a19a890
test for site title markup
MaggieCabrera Nov 7, 2023
c5261b6
removed comments, changed assertSame to assertEquals
MaggieCabrera Nov 7, 2023
0e63a3a
format php
MaggieCabrera Nov 7, 2023
295bd03
hide the condition in a function
scruffian Nov 7, 2023
94dd338
hide the condition in a function
scruffian Nov 7, 2023
939c50f
return early from has_submenus
scruffian Nov 7, 2023
d21547c
comments for the tests
MaggieCabrera Nov 7, 2023
b16a3bd
create a function to get the name
scruffian Nov 7, 2023
aceed2e
rename variable to nav_blocks_wrapped_in_list_item
scruffian Nov 7, 2023
05ab18f
phpcs
scruffian Nov 7, 2023
5310ede
phpcs
scruffian Nov 7, 2023
163f08f
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera Nov 8, 2023
649f813
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera Nov 8, 2023
73764c9
Update phpunit/class-wp-navigation-block-renderer-test.php
MaggieCabrera Nov 8, 2023
9b669a1
Apply suggestions from code review
MaggieCabrera Nov 8, 2023
c56237d
dynamic url for links on test
MaggieCabrera Nov 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Loading