开发者 |
scribu
xwp kucrut jrf |
---|---|
更新时间 | 2014年12月12日 06:57 |
PHP版本: | 3.1 及以上 |
WordPress版本: | 4.0 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/* Plugin Name: BuddyPress Debug Depends: BuddyPress, Debug Bar */
What this does:
= Enriching dependency information = Unfortunately, very few plugins currently contain dependency information. If you'd like to enhance the information available to this plugin, you might want to install the Known Plugin Dependencies plugin which acts as an add-on to this one.Links: Plugin News | Author's Site Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum.
Make sure your host is running PHP 5. The only foolproof way to do this is to add this line to wp-config.php (after the opening <?php
tag):
var_dump(PHP_VERSION);
Nothing. The Depends: header will simply be ignored.
Yes, the dependency chain can go as deep as you want.
Say you have some useful functions that you would like to package up as a library plugin:
/* Plugin Name: Facebook Lib Provides: lib-facebook */
Now, dependant plugins can specify 'lib-facebook' as a dependency:
/* Plugin Name: Cool Facebook Plugin Depends: lib-facebook */
Besides being more robust, the Provides: header allows multiple plugins to implement the same set of functionality and be used interchangeably.