
內容簡介
如果您的網站有建置/部署過程,那麼在提交或部署代碼更改後執行主題或外掛中的程式碼通常是非常有用的。
GitHub、Bitbucket 和 Beanstalk 是常見的工具,它們允許您配置一個 Webhook URL,該 URL 會在您進行檢入或部署後立即被調用。
常見用途包括:
在部署新的佈景主題代碼(如 WP Super Cache 或 W3 Total Cache)之後清除緩存
在構建 JavaScript/CSS 之後觸發實時網站的備份
觸發任何 WordPress 鉤子
運行任何其他您希望運行的插件或佈景主題代碼!
有關如何使用此插件(包括如何設置 GitHub、Bitbucket 和 Beanstalk)的更多信息,請參見 http://jaredcobb.com/post-deployment-hook。
該插件也可以在 GitHub 上進行託管。歡迎提交拉取請求!
外掛標籤
開發者團隊
原文外掛簡介
If you have a build / deployment process for your site, it’s often useful to have a way to execute code in your theme or plugins after you commit or deploy your code changes.
GitHub, Bitbucket, and Beanstalk are common tools that allow you to configure a webhook URL that gets called as soon as you make a check-in or deployment.
Common uses are
Purge the cache after you deploy new theme code (WP Super Cache or W3 Total Cache)
After you build your JavaScript/CSS, trigger a backup of the live site
Trigger any WordPress hook
Run any other plugin or theme code you wish!
More information on how to use this plugin (including how to setup GitHub, Bitbucket, and Beanstalk) can be found at http://jaredcobb.com/post-deployment-hook
The plugin is also hosted on GitHub. Pull requests are welcome!
