Automattic / Automattic/VIP-Coding-Standards
Improve flush_rewrite_rules warning
- Lenguaje dominante
- PHP
- Estrellas
- 261
- Forks
- 44
- Merge medio
- 19 min
- PR fusionados (30 d)
- 1
Descripción
## 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
Guía de contribución
Línea de trabajo
Localiza la regla de PHP_CodeSniffer que emite la advertencia sobre flush_rewrite_rules y revisa su mensaje actual y la documentación relacionada. Actualiza la advertencia para explicar por qué se desaconseja la función, cuándo pueden ser apropiados los hooks de activación o desactivación, sus efectos y el enlace relevante de docs.wpvip.com; verifica las pruebas de la regla, si existen.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- php, wordpress
- Área
- documentation, tooling
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100