
內容簡介
Theme Mentor 是 Theme-Check 外掛的衍生版本,提供更深入的程式碼分析。
該外掛使用不同的方法監控 WordPress 佈景主題檢查團隊常見的問題,請將其視為改進程式碼的參考依據,但仍可能會產生錯誤分析。
目前支援下列驗證:
在樣板檔案中標記所有 <title>標籤
在樣板檔案中標記所有 <meta>標籤
警告使用 query_posts() 的用法
capital_P_dangit 控制(禁止使用「WordPress」以外的其他拼寫方式,即 WORDPRESS 和 WordPress)
禁止使用 wp_deregister_script(‘jquery’)
禁止使用 wp_dequeue_script(‘jquery’)
防止全域 $data; 調用常見問題(感謝 @pippinsplugins)
僅適用於 header.php 的轉換
確保 wp_head 出現在 </head>之前
確保 wp_title(…) 在 <title>和 </title>標籤之間呼叫
僅適用於 footer.php 的轉換
確保 wp_footer 出現在 </body>之前
外掛標籤
開發者團隊
原文外掛簡介
Theme Mentor is a cousin of the Theme-Check plugin getting deeper into the code analysis.
It’s using different approaches to monitor for common problems regarding theme reviews from the WordPress Theme Reviewers Team. It is prone to fault analysis, so use only as a reference for improving your code base even further.
Currently supported validations:
Mark all tags in template files
Mark all tags in template files
Warn about query_posts() usage
capital_P_dangit control (disallow any WordPress spelling other than WordPress as is – that is WORDPRESS and WordPress, ugh)
wp_deregister_script(‘jquery’) is forbidden
wp_dequeue_script(‘jquery’) is forbidden
prevent global $data; call as a common troublemaker (props @pippinsplugins)
header.php specific
Make sure that wp_head is before
Ensure that wp_title(…) is called within and tags
footer.php specific
Make sure that wp_footer is before
