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
v1.5.0 #22
v1.5.0 #22
Conversation
…set filters Related: cleverness#16 New filter: `widget_css_classes_set_settings`
@cleverness Also, with the patches for the mentioned issues (new hooks for example) it might be good to set the version to 1.5.0. Let me know what you think. |
|
||
// Add first, last, even, and odd classes | ||
if ( 1 === (int) $widget_css_classes['show_number'] || 1 === (int) $widget_css_classes['show_location'] || 1 === (int) $widget_css_classes['show_evenodd'] ) { | ||
if ( ! $widget_number ) { | ||
$widget_number = array(); |
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.
@cleverness
At the start of this method $widget_number
is declared as a global variable. Is there a specific reason to make it a global variable? It doesn't look like it's supposed to be modified externally so maybe it's better to declare it as a static variable inside this method.
Let me know!
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.
I don't think there is a reason it needs to global, but again, that was in the initial build in 2012 I did so the details on why are pretty fuzzy.
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.
Fixed!
I did some quick basic testing from just the previous version to this. I didn't run into any issues. |
Alrighty, I'll make some time today or this weekend to test some more and if that's all good that I think it's good to go! |
Also enhanced the code. Use more native array functions instead of foreach loops.
…ff not working (class constant).
…nique replacement
@cleverness I'm going to wrap it up for this release, other stuff will need to go in a next one. If you can think of anything I should check/fix/change for 1.5 let me know! |
Ready for testing!
This PR will address version 1.5.0, fixing mutiple issues:
Changelog
In a loop of 50000 times over 30 times!
widget_css_classes
modify all classes added by this plugin.widget_css_classes_custom
modify custom input classes.widget_css_classes_set_settings
), overwrites user settings: Add hook for predefined classes based on the current theme #16widget_css_classes_default_settings
): Feature Request #4widget_css_classes_id_input_capability
ID inputwidget_css_classes_class_input_capability
classes inputwidget_css_classes_class_select_capability
predefined classes select (also hides classes input if invalid)relCopy
library dependency.Core changes:
Tests:
Settingpage & Widget form
Widget form
Frontend
ImportExport
Updating