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

Reset button does not work in the Static Front Page section #1580

Closed
pagelab opened this issue Oct 11, 2017 · 7 comments
Closed

Reset button does not work in the Static Front Page section #1580

pagelab opened this issue Oct 11, 2017 · 7 comments

Comments

@pagelab
Copy link
Contributor

pagelab commented Oct 11, 2017

Issue description:

Pressing the "Reset" button does not actually reset the fields in the Static Front Page section.

Version used:

(Did you try using the develop branch from github? There's a chance your issue has already been adressed there)
Yes, I tried this with the dev branch.

Using theme_mods or options?

options

Code to reproduce the issue (config + field(s))

Do not apply (this is a WordPress default panel)

screen-recording-2017-10-11-15-39-50

@aristath
Copy link
Contributor

Nice catch, fixed. 👍

@pagelab
Copy link
Contributor Author

pagelab commented Oct 12, 2017

Thanks, @aristath. I just realized that the Reset button isn't' working also with widgets.

Tested with three themes: Twenty Seventeen, Twenty Fifteen and Riba Lite (just a random theme I installed to test this).

screen-recording-2017-10-11-16-22-32

@aristath
Copy link
Contributor

Did you try pulling the latest commits?
Reset is now only added to Kirki sections

@pagelab
Copy link
Contributor Author

pagelab commented Oct 12, 2017

Oh, I see. Yes, I tried the last commit and the Reset button was indeed removed in default sections. 👍

@pagelab
Copy link
Contributor Author

pagelab commented Oct 12, 2017

@aristath, 1f59e2e does not work with fields created using the default customizer API methods.

The class control-section-kirki-default, used in the conditional check, is added to the code only when Kirki methods are being used to add fields.

@aristath
Copy link
Contributor

aristath commented Oct 12, 2017

Yes, that was the intention.
TBH if I could I would completely remove the reset feature... It's problematic and there's already a ticket in WP-Core to add reset there, so I can't wait for that to happen :P
But if a plugin provides a reset feature, it makes sense that it would be intended for the sections created by that plugin.
Any section created using Kirki::add_section() will have the reset on top.

@pagelab
Copy link
Contributor Author

pagelab commented Oct 12, 2017

Ok, got it. I'll use the Kirki methods then. Thanks @aristath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants