{"id":10958,"date":"2010-10-24T21:51:39","date_gmt":"2010-10-24T21:51:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/plugin-dependencies\/"},"modified":"2014-11-13T02:47:18","modified_gmt":"2014-11-13T02:47:18","slug":"plugin-dependencies","status":"publish","type":"plugin","link":"https:\/\/azb.wordpress.org\/plugins\/plugin-dependencies\/","author":180901,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3","stable_tag":"trunk","tested":"4.0.38","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"Plugin Dependencies","header_author":"scribu","header_description":"","assets_banners_color":"","last_updated":"2014-11-13 02:47:18","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/scribu.net\/wordpress\/plugin-dependencies","header_author_uri":"http:\/\/scribu.net\/","rating":5,"author_block_rating":0,"active_installs":200,"downloads":8090,"num_ratings":7,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","faq","changelog"],"tags":[],"upgrade_notice":{"1.3":"<ul>\n<li>Upgrade highly recommended - Plugin now fully compatible with multisite and dependency management will now also work outside of the plugins page context, including for bulk actions.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"7"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2","1.2.1","1.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"598613","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"598613","resolution":"2","location":"assets"}},"screenshots":{"1":"Activation prevention","2":"Cascade deactivation"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[19240],"plugin_category":[],"plugin_contributors":[78237,78133,77621,78325],"plugin_business_model":[],"class_list":["post-10958","plugin","type-plugin","status-publish","hentry","plugin_tags-dependency","plugin_contributors-jrf","plugin_contributors-kucrut","plugin_contributors-scribu","plugin_contributors-xwp","plugin_committers-kucrut","plugin_committers-scribu","plugin_committers-westonruter"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/plugin-dependencies.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/plugin-dependencies\/assets\/screenshot-1.png?rev=598613","caption":"Activation prevention"},{"src":"https:\/\/ps.w.org\/plugin-dependencies\/assets\/screenshot-2.png?rev=598613","caption":"Cascade deactivation"}],"raw_content":"<!--section=description-->\n<p>This meta-plugin allows regular plugins to specify other plugins that they depend upon.<\/p>\n\n<p>Example:<\/p>\n\n<pre><code>\/*\nPlugin Name: BuddyPress Debug\nDepends: BuddyPress, Debug Bar\n*\/\n<\/code><\/pre>\n\n<p>What this does:<\/p>\n\n<ul>\n<li>Disables activation of <em>BuddyPress Debug<\/em> until both <em>BuddyPress<\/em> and <em>Debug Bar<\/em> are already activated.<\/li>\n<li>When either <em>BuddyPress<\/em> or <em>Debug Bar<\/em> are deactivated, <em>BuddyPress Debug<\/em> will also be deactivated.<\/li>\n<\/ul>\n\n<blockquote>\n  <p>= Enriching dependency information =\n  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 <a href=\"https:\/\/wordpress.org\/plugins\/known-plugin-dependencies\/\">Known Plugin Dependencies<\/a> plugin which acts as an add-on to this one.<\/p>\n<\/blockquote>\n\n<p>Links: <a href=\"http:\/\/scribu.net\/wordpress\/plugin-dependencies\">Plugin News<\/a> | <a href=\"http:\/\/scribu.net\">Author's Site<\/a><\/p>\n\n<p><strong>Development of this plugin is done <a href=\"https:\/\/github.com\/xwp\/wp-plugin-dependencies\">on GitHub<\/a>. Pull requests welcome. Please see <a href=\"https:\/\/github.com\/xwp\/wp-plugin-dependencies\/issues\">issues<\/a> reported there before going to the plugin forum.<\/strong><\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Error on activation: \"Parse error: syntax error, unexpected...\"<\/dt>\n<dd><p>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 <code>&lt;?php<\/code> tag):<\/p>\n\n<pre><code>var_dump(PHP_VERSION);\n<\/code><\/pre><\/dd>\n<dt>What happens if a user doesn't have Plugin Dependencies installed?<\/dt>\n<dd><p>Nothing. The <em>Depends:<\/em> header will simply be ignored.<\/p><\/dd>\n<dt>Can I have grand-child plugins?<\/dt>\n<dd><p>Yes, the dependency chain can go as deep as you want.<\/p><\/dd>\n<dt>Defining virtual packages<\/dt>\n<dd><p>Say you have some useful functions that you would like to package up as a library plugin:<\/p>\n\n<pre><code>\/*\nPlugin Name: Facebook Lib\nProvides: lib-facebook\n*\/\n<\/code><\/pre>\n\n<p>Now, dependant plugins can specify 'lib-facebook' as a dependency:<\/p>\n\n<pre><code>\/*\nPlugin Name: Cool Facebook Plugin\nDepends: lib-facebook\n*\/\n<\/code><\/pre>\n\n<p>Besides being more robust, the <em>Provides:<\/em> header allows multiple plugins to implement the same set of functionality and be used interchangeably.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3<\/h4>\n\n<ul>\n<li><p>Add Dependency Loader class. Props <a href=\"http:\/\/profiles.wordpress.org\/kucrut\/\">kucrut<\/a>.<\/p><\/li>\n<li><p>Make it work with bulk actions. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/p>\n\n<ul>\n<li>Usability: Remove bulk action checkboxes for plugins with unsatisfied dependencies on single site plugins page within a network. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/li>\n<\/ul><\/li>\n<li><p>Guard dependencies even when a plugin is (de)activated outside of the plugins page context. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/p><\/li>\n<li><p>Fix compatibility with multi-site. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/p>\n\n<ul>\n<li>New: Show dependencies in the network admin plugins page.<\/li>\n<li>Bug fix: network activated plugins were not recognized (at all) and deactivating one would throw PHP notices.<\/li>\n<li>Bug fix: network activation action was not correctly unset if dependencies were not met (WP 3.4+).<\/li>\n<li>Bug fix: network deactivation would only check dependencies for the network and the main site, not for the other sites in the network<\/li>\n<li>Improved: logic for recognizing whether dependencies have been satisfied.<\/li>\n<li>Usability: On single site plugin page in a multisite network: added a \"network\" textual indicator for dependencies which were met by a network activated plugin.<\/li>\n<li>Usability: On single site plugin page in a multisite network: the required plugin names now only link to the plugin if the current user can activate that plugin.<\/li>\n<li>Usability: Improved information to single site admins when dependent plugins have been deactivated because a required plugin has been network deactivated - show all deactivated plugins since last admin login, not just what happened in the last change round.<\/li>\n<li>Usability: Notifications about deactivated plugins are now shown on any admin page which will help admins notice changes made by this plugin earlier in case of a network deactivation. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/li>\n<\/ul><\/li>\n<li><p>Clean up coding standards. Props <a href=\"http:\/\/profiles.wordpress.org\/kucrut\/\">kucrut<\/a>, <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/p><\/li>\n<li>Improve style of plugin dependency notices. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/li>\n<li>Usability: Add plugins deactivated by this plugin to the 'recently active' plugins list. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/li>\n<li>Add Dutch translation. Props <a href=\"http:\/\/profiles.wordpress.org\/jrf\/\">jrf<\/a>.<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>fixed notices. props <a href=\"http:\/\/profiles.wordpress.org\/cfoellmann\">cfoellmann<\/a><\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>added ability to use plugin names as dependencies<\/li>\n<li><a href=\"http:\/\/scribu.net\/wordpress\/plugin-dependencies\/pd-1-2.html\">more info<\/a><\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>added 'Provides:' header<\/li>\n<li>replaced 'Dependencies:' with 'Depends:'<\/li>\n<li><a href=\"http:\/\/scribu.net\/wordpress\/plugin-dependencies\/pd-1-1.html\">more info<\/a><\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>fixed critical bug when not running MultiSite<\/li>\n<li>better network activation handling<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>initial release<\/li>\n<li><a href=\"http:\/\/scribu.net\/wordpress\/plugin-dependencies\/pd-1-0.html\">more info<\/a><\/li>\n<\/ul>","raw_excerpt":"Plugin dependency management","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/10958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=10958"}],"author":[{"embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/scribu"}],"wp:attachment":[{"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=10958"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=10958"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=10958"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=10958"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=10958"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/azb.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=10958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}