這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Post Deployment Hook

描述

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!

螢幕截圖

  • The settings page will allow you to set a password and create a webhook url. You may also automatically purge the cache (WP Super Cache or W3 Total Cache).
  • You can define your own function (I recommend placing it into functions.php) and run any code you wish once the token url is hit.

安裝

  1. Upload the plugin folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Enter a passphrase in the Settings > Post Deployment Hook options to secure your webhook
  4. Use the generated URL (including it’s token) as your post-deployment / post-commit hook url

常見問題

Will this slow down my site?

Nope. While the plugin does execute on each page request, it simply checks if the request is a webhook call first. If not, it just exits.

Who would use this plugin?

Probably developers. But anyone with some knowledge of WordPress could use this plugin to run jobs in WordPress by hitting the URL this plugin provides.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Post Deployment Hook” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Post Deployment Hook 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0.1

  • Updated README.txt and added screenshots

1.0.0

  • Initial commit