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

Improve flush_rewrite_rules warning #701

Open
mikeyarce opened this issue Oct 19, 2021 · 1 comment
Open

Improve flush_rewrite_rules warning #701

mikeyarce opened this issue Oct 19, 2021 · 1 comment

Comments

@mikeyarce
Copy link
Member

What problem would the enhancement address for VIP?

Right now here's the rule that we see when you try to use flush_rewrite_rules():

🚫 Error( severity 5 ): flush_rewrite_rules should not be used in any normal circumstances in the theme code (WordPressVIPMinimum.Functions.RestrictedFunctions.flush_rewrite_rules_flush_rewrite_rules).

I feel like adding more context here as to "why" would be helpful, and also adding cases where this might be appropriate? For example, what about in a plugin activation/deactivation hook?

Describe the solution you'd like

  1. Why should you not use it
  2. When it might be ok to use
  3. What the effect of using it would have
  4. Link to a doc on docs.wpvip.com to more details
@pratik-londhe4
Copy link

Hi, I am getting this error in my plugin code when used in activation hook function. Is this expected ?

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

No branches or pull requests

2 participants