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

[Feature Request]: Add check for Customizer #6

Open
1 task done
tyrann0us opened this issue Mar 9, 2022 · 2 comments
Open
1 task done

[Feature Request]: Add check for Customizer #6

tyrann0us opened this issue Mar 9, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tyrann0us
Copy link
Member

Is your feature request related to a problem?

Currently, it is not possible to check whether the current request is from the Customizer.

Describe the desired solution

Add a ->is(WpContext::CUSTOMIZER)/->isCustomizer() check.

Describe the alternatives that you have considered

The Customizer is gradually being replaced by FSE, so it will eventually cease to exist. The question is whether new logic should be introduced for a "legacy" feature.

Additional context

Without this feature, you have to cumbersome check for the Customizer yourself:

global $wp_customize;
if (isset($wp_customize)) {
    // do things
}

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tyrann0us tyrann0us added the enhancement New feature or request label Mar 9, 2022
@widoz
Copy link
Member

widoz commented Mar 9, 2022

This would also include something like isCustomizePreview ? The customizer is composed of two parts the Panels and the Preview.

@lkraav
Copy link

lkraav commented Mar 9, 2022

Customize will be around for long enough (years), I think yes, this request type availability is warranted for a while.

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

No branches or pull requests

3 participants