wpdiggerstudio/wpzylos-hooks

WordPress hook management with plugin-scoped custom hooks for WPZylos framework

Fund package maintenance!
Paypal

Installs: 231

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/wpdiggerstudio/wpzylos-hooks

v1.0.0 2026-02-01 13:01 UTC

This package is auto-updated.

Last update: 2026-02-01 13:03:46 UTC


README

PHP Version License GitHub

WordPress hook management with plugin-scoped custom hooks for WPZylos framework.

📖 Full Documentation | 🐛 Report Issues

✨ Features

  • Plugin-scoped Hooks — Automatically prefixed actions and filters
  • Hook Manager — Centralized hook registration
  • Fluent API — Chainable hook methods
  • Priority Control — Easy priority management
  • Bulk Registration — Register multiple hooks at once

📋 Requirements

Requirement Version
PHP ^8.0
WordPress 6.0+

🚀 Installation

composer require wpdiggerstudio/wpzylos-hooks

📖 Quick Start

use WPZylos\Framework\Hooks\HookManager;

$hooks = new HookManager($context);

// Add WordPress action
$hooks->action('init', [$this, 'initialize']);

// Add WordPress filter
$hooks->filter('the_content', [$this, 'modifyContent']);

// Plugin-scoped hooks (auto-prefixed)
$hooks->pluginAction('activated', [$this, 'onActivate']);
$hooks->pluginFilter('settings', [$this, 'filterSettings']);

🏗️ Core Features

WordPress Hooks

// Actions
$hooks->action('wp_enqueue_scripts', [$this, 'enqueueAssets']);
$hooks->action('admin_menu', [$this, 'registerMenu'], 20);

// Filters
$hooks->filter('the_title', [$this, 'filterTitle']);
$hooks->filter('body_class', [$this, 'addBodyClasses'], 10, 2);

Plugin-Scoped Hooks

// Creates: myplugin_user_created
$hooks->pluginAction('user_created', [$listener, 'onUserCreated']);

// Creates: myplugin_settings filter
$hooks->pluginFilter('settings', [$this, 'filterSettings']);

Triggering Hooks

// Trigger plugin action
$hooks->doPluginAction('user_created', $user);

// Apply plugin filter
$settings = $hooks->applyPluginFilter('settings', $defaults);

📦 Related Packages

Package Description
wpzylos-core Application foundation
wpzylos-events PSR-14 event dispatcher
wpzylos-scaffold Plugin template

📖 Documentation

For comprehensive documentation, tutorials, and API reference, visit wpzylos.com.

☕ Support the Project

If you find this package helpful, consider buying me a coffee! Your support helps maintain and improve the WPZylos ecosystem.

Donate with PayPal

📄 License

MIT License. See LICENSE for details.

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Made with ❤️ by WPDiggerStudio