phpnomad/wordpress-plugin

There is no license information available for the latest version (1.0.0) of this package.

PHPNomad packages bundle

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:wordpress-plugin

pkg:composer/phpnomad/wordpress-plugin


README

A comprehensive bundle of PHPNomad packages providing modular PHP components for WordPress including core utilities, database abstraction, REST API, templating, events, and more.

What It Does

This plugin serves as a centralized bundle that loads all PHPNomad framework packages into WordPress. It provides a complete set of modern PHP development tools and abstractions specifically designed for WordPress plugin and theme development.

Requirements

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

Dependencies

Core Foundation

  • phpnomad/core - Core interfaces and base functionality for the PHPNomad framework
  • phpnomad/framework - Main framework orchestration and bootstrapping
  • phpnomad/utils - Common utility functions and helpers (includes Arr and Str helpers)

Configuration & Loading

Dependency Injection & Design Patterns

Database & Data Management

HTTP & REST API

Authentication & Security

Templating & Content

Events & Background Tasks

Caching & Performance

CLI & Console

Email & Communication

Internationalization & Localization

Asset Management

Utilities & Helpers

WordPress Integration

Using PHPNomad as a Dependency

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

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 ensure 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, ensuring all PHPNomad classes and interfaces are available.

How It Works

  • WordPress will automatically prevent your plugin from being activated if PHPNomad is not installed
  • Users will 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 will display a notice about missing dependencies

Important Notes

  • The Requires Plugins header uses the plugin slug (phpnomad), not the file path format
  • 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

License

GPLv3 or later - http://www.gnu.org/licenses/gpl-3.0.txt

Links