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

4.0 #2083

Merged
merged 107 commits into from Mar 31, 2019

Conversation

@aristath
Copy link
Owner

commented Feb 16, 2019

In April 2019 WordPress will require PHP 5.6, so this is a great opportunity to clean things up a bit and restructure the plugin.

As it currently stands, Kirki has a pretty bloated codebase. Most themes don't use everything Kirki has to offer, they only use parts of it. Some just want a repeater control, others want 10 control types, others want controls + css-output + webfonts + postMessage and so on.

So all elements will be split to individual composer packages and theme developers will be able to use a composer.json file to include just the packages they want and avoid all the clutter and unnecessary code that the current implementation has.

The Kirki plugin will be a combination of all sub-packages and the goal is to have it work just like it used to, nothing will change for themes that are already using it as-is.

Packages can be found on https://github.com/kirki-framework

If you're testing this branch or working on it, then you'll need to run composer install to pull the packages.

This will be a long process and it will have to be done in steps:

  • Split Control files, each control a separate package
  • Split Modules files, each module a separate package
  • Go through all controls and make them self-contained. They may require another package (usually control-base as all controls extend that base class), but there should not be any js or css dependencies unresolved.
  • Move Field classes to their controls
  • Make sure all package URLs are hookable
  • Make sure each module is self-contained
  • Any output classes related to a specific control should be moved to that control.
  • More to come soon.

UPDATE Mar.18:
The "branding" & "styling" modules were both removed.
wp.customize.controlConstructor['kirki-color'] = wp.customize.kirkiDynamicControl.extend( {} );


UPDATE Mar.31:
a new url-getter package was added to help get control urls for assets regardless of where the control files are located.

aristath added some commits Feb 16, 2019

Repository owner deleted a comment from codacy-bot Feb 16, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

@codacy-bot

This comment has been minimized.

Copy link

commented Mar 31, 2019

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 61
           

See the complete overview on Codacy

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

Repository owner deleted a comment from codacy-bot Mar 31, 2019

@aristath aristath merged commit 3351d2f into develop Mar 31, 2019

1 of 3 checks passed

codeclimate 2715 issues to fix
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@aristath

This comment has been minimized.

Copy link
Owner Author

commented Mar 31, 2019

v3.0.39 was released so there's nothing pending on that front.
I'm merging this branch on develop so that others can also start working with it and experiment with the new approach.
We still have about a month to go before this is released so we'll make it in time.

@aristath aristath deleted the refactor/packages branch Mar 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.