wemakecustom/wp-mu-required-plugins

该包已被废弃,不再维护。未建议替代包。

Wordpress插件依赖管理器

安装数: 1,041

依赖者: 2

建议者: 0

安全: 0

星标: 3

关注者: 8

分支: 1

开放问题: 0

类型:wordpress-muplugin

v0.1.2 2014-12-09 22:36 UTC

This package is not auto-updated.

Last update: 2022-07-18 08:53:19 UTC


README

声明所需插件并在不存在时提示安装

使用方法

<?php
add_action('required_plugins_register', function() {
    required_plugins_register(array(
        array(
            'name'                  => 'Plugin Name', // The plugin name
            'slug'                  => 'plugin-name', // The plugin slug (typically the folder name)
            'required'              => true, // If false, the plugin is only 'recommended' instead of required
            'force_activation'      => true, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch
        ),
    ));
});
?>

作者

原始插件位于https://github.com/thomasgriffin/TGM-Plugin-Activation

重写

重写了插件以更好地进行代码管理和样式设计,并更好地与composer集成。

Composer和namespaces的使用不是Wordpress的方式,因此这个插件从未打算合并到官方插件中。