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

v1.5.0 #22

merged 84 commits into from Jun 29, 2017


Copy link

commented Jun 19, 2017

Ready for testing!

This PR will address version 1.5.0, fixing mutiple issues:


  • Feature: Option to try and fix the widget parameters if they are invalid: #24
  • Feature: Option to remove duplicate classes: #25
    • This method also enhances the speed of how classes are added!
      • In a loop of 500 times the new method is approx 3 times faster.
        In a loop of 50000 times over 30 times!
  • Enhancement: Sort classes based on the predefined classes on the frontend by default. #19
  • Enhancement: Classes filter for frontend (for sorting or modifications): #19
    • widget_css_classes modify all classes added by this plugin.
    • widget_css_classes_custom modify custom input classes.
  • Enhancement: Plugin settings filter (widget_css_classes_set_settings), overwrites user settings: #16
  • Enhancement: Plugin default settings filter (widget_css_classes_default_settings): #4
  • Enhancement: Capability filters for form fields: #21
    • widget_css_classes_id_input_capability ID input
    • widget_css_classes_class_input_capability classes input
    • widget_css_classes_class_select_capability predefined classes select (also hides classes input if invalid)
  • Compatibility: WP External Links: #17, thanks to Victor @freelancephp
  • Fix: Form wrapper div style: #18, thanks to Chuck Reynolds @ryno267
  • Fix: Enable sortable input selection (IE-11 fix): #20
  • UI: Enhance setting page JavaScript and remove relCopy library dependency.
  • i18n: Remove Dutch and Russian languages from plugin distribution (available on #23
  • CodeClimate fixes (related PR: #15)

Core changes:

  • Refactoring for CC fixes
  • Added setting handlers in the library to make sure settings are always of the correct type and format
    • Also added a unit test for this.
  • Simplified code where possible
  • Improved inline PHPdocs


Settingpage & Widget form

  • Check saving and displaying options.
  • Try to save wrong stuff by manually edit the form content in the console.
    • Add some malicious stuff in there.

Widget form

  • Test capability filters
    • Existing settings should save even if the input isn't shown
    • Disallowing predefined select should also hide the custom CSS input


  • Check correct rendering of all set classes (custom, predefined and other)
  • Check order of predefined classes
  • Check params fix option (register sidebar with empty before and after parameters to test)
  • Check appending classes with double and single quote format attributes.
  • Removing duplicates


  • Import from current version after fresh export
  • Import from older versions (see update method in library)
    • 1.1
    • 1.2
    • 1.4


  • Configure plugin in an older version and update to the new version. All settings should stay the same and the front-end should work without changes (excerpt for class order)
    • 1.1
    • 1.2
    • 1.4
@JoryHogeveen JoryHogeveen added this to the 1.4.1 milestone Jun 19, 2017
@JoryHogeveen JoryHogeveen self-assigned this Jun 19, 2017
@JoryHogeveen JoryHogeveen requested a review from cleverness Jun 19, 2017

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 20, 2017

Let me know if you see anything you don't like or you would like to change.

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.


This comment has been minimized.

Copy link

commented Jun 22, 2017

I did some quick basic testing from just the previous version to this. I didn't run into any issues.


This comment has been minimized.

Copy link
Collaborator Author

commented Jun 22, 2017

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!

JoryHogeveen added 18 commits Jun 22, 2017
Also enhanced the code. Use more native array functions instead of
foreach loops.
…ff not working (class constant).

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 22, 2017

If/when you have the time, can you test again? Also frontend display etc?
I've added another new option "remove duplicate classes" and enhanced the code a bit more.
All tests in the tasklist are done and checked in two of my test sites but an extra pair of eyes is always good!

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!

@JoryHogeveen JoryHogeveen merged commit 0ccf09e into cleverness:master Jun 29, 2017
2 checks passed
2 checks passed
codeclimate 29 fixed issues
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.