-
Notifications
You must be signed in to change notification settings - Fork 8
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
refactored hard coded logic from homepage menu #236
refactored hard coded logic from homepage menu #236
Conversation
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.
This looks better, thanks @Yashita101, have suggested some more changes, please do take a look.
includes/Data/Patterns.php
Outdated
* | ||
* @return array | ||
*/ | ||
protected static function get_theme_step_patterns_callback() { |
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.
protected static function get_theme_step_patterns_callback() { | |
protected static function get_theme_step_filters() { |
includes/Data/Patterns.php
Outdated
public static function filter_pattern_data( $pattern_slugs ) { | ||
return in_array( 'yith-wonder-pages', $pattern_slugs['categories'] ); | ||
} |
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.
Can we combine the header
and footer
identification part with this? Seems like we're going through the entire array anyway with array_filter
? Also, this function name can be confusing, I think we should just stick to using a single foreach
in get_patterns_for_homepage_menu_slugs
to populate the header/footer/homepages
instead of array_filter
and then a foreach
on the remaining elements.
No description provided.