Linux 软件免费装
Banner图

Stage WP Plugin Manager

开发者 andrezrv
更新时间 2014年12月7日 10:50
捐献地址: 去捐款
PHP版本: 3.0 及以上
WordPress版本: 4.0.1
版权: GPL2+
版权网址: 版权信息

标签

plugin manager development testing plugins local environment staging production stage stages

下载

1.0

详情介绍:

If you develop in a local machine, at some point you'll have some active plugins there that you don't need in the servers that you're deploying to. Sure, you can deactivate them in your local machine before deploying, or after deploying in the remote ones, but you're gonna need them again to be active if you want to perform local work in the future, specially when you update your local database from a remote one. On such kind of scenarios, the whole process of manually activating and deactivating plugins for each stage can be really frustrating, sometimes even taking a lot of your time. Stage WP Plugin Manager is meant to solve that problem in an quick and elegant way, by doing an automatic "fake" activation of the plugins you select for each stage: every plugin you attach to a stage will be immediatly treated as an active plugin on that stage, no matter what its previous status was, or its current status on the other stages. Since the list of active plugins is just filtered instead of rewritten, you can restore the previous status of a plugin by detaching it, and go back to your original setup by deactivating Stage WP Plugin Manager. Please read the following instructions very carefully. Getting Started Stage WP Plugin Manager works on some assumptions about your workflow: Some developers prefer to keep different configuration files for each one of their stages, or change the values of their constants based on some evaluation. For example, you could have something like this in your wp-config.php file: if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { define( 'WP_STAGE', 'local' ); } elseif ( file_exists( dirname( __FILE__ ) . '/staging-config.php' ) ) { define( 'WP_STAGE', 'staging' ); } else { define( 'WP_STAGE', 'production' ); } If you follow this example, note that local-config.php should not be included in your deployments to staging and production, and both local-config.php and staging-config.php should not exist in your production stage. Attach & Detach Once you have installed this plugin, you will notice that a new link appears under each active plugin of the list, which reads "Attach to [your-stage] stage". By clicking that link, you are setting a plugin to be always active in the stage you're working at, and not active on the other stages (unless you attach the plugin to the other stages too). In case you want to remove a plugin from the list of active plugins for a stage, you just need to click the "Detach from [your-stage] stage". Additionally, you can make bulk selections of plugins to be attached or detached for each stage by going to Plugins > Stage Management. Add & Extend Functionality Stage WP Plugin Manager allows you to extend its functionality by offering hooks for filters and actions. For example, you can add your custom stages or even remove the default ones by hooking in the stage_wp_plugin_manager_stages filter, having something like this in your plugin: function add_stages( $stages ) { $stages[] = 'other'; return $stages; } add_filter( 'stage_wp_plugin_manager_stages', 'add_stages' ); Additionally, you can give a nicer name to your new stage by hooking in the stage_wp_plugin_manager_stages_txt filter: function add_stages_txt( $stages_txt ) { $stages_txt['other'] = __( 'Other stage' ); return $stages_txt; } add_filter( 'stage_wp_plugin_manager_stages_txt', 'add_stages_txt' ); Here's the complete list of actions and filters that Stage WP Plugin Manager offers: Action hooks Filter hooks WordPress MultiSite Compatibility If you're using MultiSite and set this plugin to network activated, you can use it to attach plugins to stages on a sitewide basis :) Improve Your Workflow This plugin was originally meant as a complement for WP Bareboner, an advanced Git model repo, and Stage WP, a deployment tool based in Capistrano. The three projects work really well separated, but their real power can only be seen by using them together. Contribute You can make suggestions and submit your own modifications to this plugin on Github.

安装:

  1. Unzip stage-wp-plugin-manager.zip and upload the stage-wp-plugin-manager folder to your /wp-content/plugins/ directory.
  2. Activate the plugin through the "Plugins" menu in WordPress.
  3. Read carefully the instructions in description page.

屏幕截图:

  • Plugins page with links to attach the plugin to the current stage.
  • Stage WP Plugin Manager settings, where you can attach plugins to any stage.
  • Advanced help.

更新日志:

1.0 First public release.