定制 phpnomad/wordpress-plugin 二次开发

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

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

phpnomad/wordpress-plugin

最新稳定版本:2.0.0

Composer 安装命令:

composer require phpnomad/wordpress-plugin

包简介

PHPNomad packages bundle

README 文档

README

Latest Version Total Downloads PHP Version License

PHPNomad packaged as a single installable WordPress plugin. This bundle ships every PHPNomad package together with the WordPress integration layer, so other plugins can depend on PHPNomad through WordPress's built-in Plugin Dependencies feature instead of shipping their own vendored copy.

Requirements

  • PHP 8.2 or higher
  • WordPress 6.5 or higher (for the Plugin Dependencies feature)

What's Bundled

Core Foundation

Configuration & Loading

Dependency Injection & Design Patterns

Database & Data Management

HTTP & REST API

Authentication & Security

Templating & Content

Events & Background Tasks

Caching

CLI & Console

Email

Internationalization

Asset Management

Utilities & Helpers

WordPress Integration

Using PHPNomad as a Dependency

If you're building a plugin that depends on PHPNomad, use WordPress's built-in Plugin Dependencies feature (introduced in WordPress 6.5) so PHPNomad is installed and activated before your plugin loads.

Declaring the Dependency

Add the Requires Plugins header to your plugin's main PHP file:

/**
 * Plugin Name: My Plugin
 * Requires Plugins: phpnomad
 */

Using the phpnomad_ready Action

To make sure PHPNomad is fully loaded before your plugin initializes, hook into the phpnomad_ready action:

add_action('phpnomad_ready', function () {
    // PHPNomad is now loaded and ready to use.
    // Initialize your plugin here.
});

This action fires immediately after PHPNomad's Composer autoloader is loaded, so every PHPNomad class and interface is available by the time your callback runs.

How It Works

  • WordPress prevents your plugin from being activated if PHPNomad is not installed
  • Users see a clear indication that PHPNomad must be installed first
  • PHPNomad cannot be deactivated or deleted while your plugin is active
  • If PHPNomad is removed via FTP or deployment, WordPress displays a notice about missing dependencies

Important Notes

  • The Requires Plugins header uses the plugin slug (phpnomad), not the file path
  • This feature does not enforce version requirements or loading order
  • Continue to use function_exists(), class_exists(), interface_exists(), and version checks where your plugin relies on specific functionality
  • For more information, see Plugin Dependencies in WordPress 6.5

Documentation

Full PHPNomad documentation lives at phpnomad.com.

License

GPLv3 or later.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2026-01-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固