option-tree
option-tree copied to clipboard
OptionTree 3.0.0
The Possible Future
The following list of fixes and enhancements is what I envision the next major iteration of OptionTree could be. The main take away is to replace as much of the PHP with JavaScript as possible, all while keeping backwards compatible with the current set of options and the custom user created ones. Deeply integrating with the Customizer and speeding up data manipulation. Hardening security, sanitation, and validation.
- Recreate every option as a Customizer control
- Implement the JS so that it mimics
wp.customize
when not in the Customizer - Build controls in a way that allows most of them to be repeater fields and make all of them Backbone.js templates
- Utilize Customize Partial Refresh coming in WP 4.5 to speed up the preview
- Build classes like
OT_Manger
,OT_Panel
,OT_Section
, andOT_Control
to not only harden Customizer integration but as the mechanism to create options and generate admin pages - Rework the metaboxes to use the same JS based UI and new classes
- Do a minor UI overhaul that feels more like built-in WordPress
- Sanitize and validate every control and the incoming data
- Do not save standard values to the database, they should only be a fallback in the absence of real data
- Save as
option
ortheme_mod
- Create an upgrade & compatibility script to migrate data from older versions of OT to 3.0.0
- Throw
doing_it_wrong
messages to nag developers about changes and deprecated functionality - Pass data around as a
JSON
object and save via Ajax - Throw validation errors back to the UI
- Convert
dynamic.css
intowp_head
output and implement PHP conditionals and potentially Sass like preprocessing - Rethink how conditions work and expand the ones available
- The UI Builder should work with the Customizer and remap the current items
- OT Section->Panel
- OT Tab->Section
- OT Setting->Control
- Travis CI builds
- PHPUnit with Coveralls and a minimum 85% coverage
- QUnit with a minimum 60% coverage
- Grunt for compiling Sass & JS, unit testing, & deploying to wordpress.org
-
wpcs
sniffs for WordPress -
jscs
sniffs for JavaScript - Optimizing how data is rendered and saved heavily utilizing JavaScript for both
- A full security review for XSS attack vectors and data pollution
- Remove all
base64
functions - Remove
theme_mode
- Implement import/export as a JSON non-backwards compatible control and create a converter script as a plugin for old
base64
encoded export files - Deprecate the layouts functionality
- Require PHP 5.3+ for namespacing, and closures
- Rewrite and expand on the documents somewhere on the web, and remove them from the plugin
- Save options individually and create a new
get
andset
function - Ensure compatiblity with WPML
Next Steps
This has to either be funded through a Kickstarter campaign or similar crowd funding site, or by volunteers. I cannot undertake this type of overhaul by myself. If you are interested in contributing time or money to rebuild OptionTree please leave a comment or contact me [email protected].
I am open to discussing all of these items and possibly others, but once the project starts the scope needs to be very well defined and a roadmap created with an achievable timeline utilizing the available resources. There can be no deviation from the plan or feature creep. It's a very lofty goal and one that will take many minds to accomplish and test.
Note: Items can be added or removed from the list at any time. If an item is removed I will strike through instead of deleting it incase we decide it should be added back.
Hey Derek, nice to hear you want to push OptionTree to the next level. I was afraid you were too busy with the work on the WP Core and would find no time to continue OptionTree development.
The list sounds great. Most points are what I had wished for a long time. Looking forward to support you via donations. :+1:
@doitmax Thank you! That's great to hear. And yes, I wasn't very sure of it's future either. My time is limited and split between Core and XWP and is why I'm looking for support from the community. I want to rebuild it and document it but I cannot afford to use that many hours towards an unpaid project and I would loose all my weekends for a really long time. So any and all help is very much appreciated. I think creating a Kickstarter may be the best option. If anyone wants to help me create it, please do reach out.
Hi Derek, as I wrote to you in a mail a few days ago, I am available to make a donation :+1: I think that a Kickstarter campaign is the best choice.
If you create a Kickstarter I'd be up for making a donation and maybe donate some time to this project. OptionTree has been super helpful to me over the years.
I would gladly make a donation as well.
:+1: I can make a donation too. I have one concern, WordPress is still working on PHP 5.2.4+ so we should stick with it.
@BassemN Upgrading to 5.3+ allows for namespacing and closures, but that's not the only reason to upgrade. Even though WP supports 5.2.4 it's plugins that help to get users upgraded. The sooner we as a community embrace newer versions of PHP the sooner WordPress can. So supporting the oldest version does not help move WordPress forward, it's actually doing the opposite. I understand your concerns, and they are heard. However, we are talking about a smaller set of users compared to the whole, and if we can help educate and get them to force their host to upgrade to at least 5.3 we are doing the community a service.
@valendesigns +1
As well, we can continue patching the 2.x branch which does support less than 5.3.
Remove
theme_mode
any particular reasons? I'm a frequent user of this feature :)
If you are still interested in upgrading, I am ready to join hands and give time for development.
Personally I do not support Remove theme_mode.
We are too ++