定制 creode/mu-plugin-installer 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

creode/mu-plugin-installer

最新稳定版本:1.2.0

Composer 安装命令:

composer require creode/mu-plugin-installer

包简介

Facilitates WordPress MU-Plugin installation and separates them into different files.

README 文档

README

This is a Composer plugin that installs mu plugins into the wp-content/mu-plugins directory. This differs from other solutions as each mu-plugin has it's own dedicated entrypoint file. This means that mu-plugins screen in WordPress has a more accurate representation of which plugins are installed and at what version they are running.

Installation

You can install this package as part of your mu-plugin's composer.json file.

composer require creode/mu-plugin-installer

Usage

Add the following to your composer.json file of your mu-plugin:

{
    "extra": {
        "wordpress-muplugin-entry": "{an-entrypoint-file-name}.php"
    }
}

Supported Package Types

  • wordpress-muplugin

Available Placeholders

  • :PLUGIN_VERSION: - The version of the plugin which will be pulled in dynamically from composer at install time.

Example

Below is an example of a mu-plugin entrypoint file that will be installed into the wp-content/mu-plugins directory. This demonstrates the use of the :PLUGIN_VERSION: placeholder.

/**
 * Plugin Name: WordPress Blocks
 * Description: WordPress Blocks plugin used by Creode to assist in the development of WordPress blocks.
 * Version: :PLUGIN_VERSION:
 *
 * @package Creode Blocks
 */

// This is a loader for the plugin from the parent directory to handle MU Plugin installation.
require_once __DIR__ . '/wordpress-blocks/plugin.php';

The above example will install the plugin into the wp-content/mu-plugins directory and create a file called wordpress-blocks.php in the wp-content/mu-plugins directory. The file will contain the following content:

/**
 * Plugin Name: WordPress Blocks
 * Description: WordPress Blocks plugin used by Creode to assist in the development of WordPress blocks.
 * Version: 1.9.0
 *
 * @package Creode Blocks
 */

// This is a loader for the plugin from the parent directory to handle MU Plugin installation.
require_once __DIR__ . '/wordpress-blocks/plugin.php';

统计信息

  • 总下载量: 686
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固