承接 wp-plus/composer-autoload 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wp-plus/composer-autoload

最新稳定版本:v1.0.2

Composer 安装命令:

composer require wp-plus/composer-autoload

包简介

Composer Autoload for WordPress: automagically require the autoload.php generated by Composer (as a must-use plugin).

README 文档

README

Seamlessly integrate Composer into a standard WordPress installation.

This plugin automatically loads Composer’s vendor/autoload.php (via an automatically generated must-use (MU) plugin), so any Composer-installed libraries are available without modifying WordPress core, themes, plugins or restructuring directories.

Key features:

  • Drop-in solution for stock WordPress installs
  • No changes to wp-config.php or core files
  • Fully automatic Composer autoloader inclusion
  • Works with themes, plugins, or custom PHP libraries managed via Composer

Usage:

  1. If Composer is not yet used in the project:

    • Initialize Composer in your WordPress root:
      composer init
    • Install any libraries you need, e.g.:
      composer require monolog/monolog
    • Require this plugin:
      composer require wp-plus/composer-autoload
    • Done - all Composer dependencies, including the newly added ones, are automatically available in WordPress.
  2. If the project is already using Composer:

    • Require this plugin via Composer:
      composer require wp-plus/composer-autoload
    • Done - your existing Composer dependencies are now autoloaded in WordPress.
    • Optional cleanup: remove any hardcoded require 'vendor/autoload.php' lines from your theme or plugin files, as this plugin handles it automatically.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-04