Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Improve flush_rewrite_rules warning

Aperta
#701 1 commento 4 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
php, wordpress

Direzione di ricerca

Individua la regola PHP_CodeSniffer che emette l’avviso relativo a flush_rewrite_rules e rivedi il messaggio esistente e la documentazione correlata. Aggiorna l’avviso per spiegare perché la funzione è sconsigliata, quando gli hook di attivazione o disattivazione possono essere appropriati, i suoi effetti e il link pertinente a docs.wpvip.com; verifica i test della regola, se presenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Type: Enhancement

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
Lingua principale
PHP
Stelle
261
Fork
44
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Automattic/VIP-Coding-Standards

Tutte le issue di Automattic/VIP-Coding-Standards

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.