Improve flush_rewrite_rules warning
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 領域
- documentation, tooling
研究方向
找出發出 flush_rewrite_rules 警告的 PHP_CodeSniffer 規則,並檢視其現有訊息與相關文件。更新警告,說明為何不建議使用此函式、何時適合使用啟用或停用 hooks、它的影響,以及相關的 docs.wpvip.com 連結;如果有該規則的測試,請加以驗證。
由索引模型根據 Issue 內容生成。
描述
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
- Why should you not use it
- When it might be ok to use
- What the effect of using it would have
- Link to a doc on docs.wpvip.com to more details
- 主要語言
- PHP
- 星號
- 261
- 分支
- 44
- 平均合併
- 3 天 9 小時
- 30 天內合併 PR
- 10
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
Automattic/VIP-Coding-Standards 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#876 ·
維護者通常 1 天內回覆
-
Breaking Change Type: Maintenance
難度 4/5 3-5 天 新手友好度 35/100
Automattic/VIP-Coding-Standards#849 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 45/100
Automattic/VIP-Coding-Standards#832 ·
維護者通常 1 天內回覆
-
難度 3/5 1-2 天 新手友好度 48/100
Automattic/VIP-Coding-Standards#823 ·
維護者通常 1 天內回覆
-
Status: Awaiting feedback
難度 2/5 1-3 小時 新手友好度 45/100
Automattic/VIP-Coding-Standards#754 · 3 則留言 ·
維護者通常 1 天內回覆
查看 Automattic/VIP-Coding-Standards 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 90/100
yiisoft/yii2-docker#193 ·
-
難度 2/5 1-3 小時 新手友好度 66/100
doctrine/migrations#1605 ·
-
難度 1/5 1 小時以內 新手友好度 87/100
-
enhancement
難度 2/5 1-3 小時 新手友好度 64/100
-
難度 2/5 1-3 小時 新手友好度 76/100
Spomky-Labs/pwa-bundle#480 ·