Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Wp Hooks Laravel Package

morningtrain/wp-hooks

A Laravel package bringing WordPress-style actions and filters to your PHP applications. Register, fire, and remove hooks with a familiar API, making it easy to add extensibility and event-driven customization to your code.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for hook architecture: If your product is a large WordPress plugin or theme where functions.php and scattered add_action/add_filter calls have become a maintenance liability, this package is a cheap "buy" (MIT, trivial to vendor) to impose class-based structure on hooks instead of hand-rolling your own registration layer.
  • Adoption/architecture decision for Laravel-flavored WordPress stacks: It supports the decision to standardize on an OOP hook-registration convention (hooks as class methods rather than global closures), which improves discoverability, namespacing, and testability. This matters most if your team already thinks in service-provider/container terms.
  • Roadmap and technical-debt prioritization: Use it as a data point when deciding whether to refactor a legacy theme/plugin's hook sprawl now or defer. The package lowers the cost of the refactor, but the low maturity means you should budget for owning the code if you adopt it.
  • Hiring and onboarding decisions: A consistent, class-based hook pattern reduces the ramp-up cost for Laravel developers moving onto a WordPress codebase — a real factor if your team is PHP/Laravel-native rather than WordPress-native.
  • Vendor/ecosystem risk decisions: With ~2 stars and 0 dependents, this is a signal to avoid making it a load-bearing dependency in anything customer-facing without a fork-and-own plan.

When to Consider This Package

Consider it when all of the following hold:

  • You are building WordPress code (plugin or theme) inside a Laravel-adjacent or heavily OOP PHP codebase, and you want hooks organized as class methods rather than procedural calls.
  • You are already in, or willing to align with, the Morning-Train ecosystem — the strongest reason to pick this over writing 100 lines yourself.
  • The scope is internal tooling, agency client sites, or a codebase you control end-to-end, where you can fork under MIT if maintenance stops.
  • You want a small, readable convention layer, not a framework.

Look elsewhere (or build it yourself) when:

  • Community validation is a requirement. 2 stars, 0 dependents, and a composite score of 0.04 are hard signals of thin adoption, limited peer review, and an unproven API surface. There is no ecosystem to lean on for answers.
  • Bus factor matters. A single-maintainer package with no dependents is a single point of failure; if you cannot fork and own it, don't adopt it.
  • You need richer hook tooling — conditional/priority management, hook introspection, testing utilities, or container-integrated auto-registration. Mature alternatives (e.g., Roots/Acorn's service providers, Brain\Hooks, or Inpsyde's hook utilities) cover more ground with real community backing.
  • You're on vanilla WordPress with a procedural team. The abstraction cost outweighs the benefit; add_action is not the problem you have.
  • Compatibility surface is unverified. Confirm it supports your PHP and WordPress versions before committing; low-adoption packages often lag major PHP releases.

How to Pitch It (Stakeholders)

To executives: This is a small, free (MIT) utility that tidies how our WordPress code registers hooks. It is not a strategic bet — treat it as a low-cost internal convention, not a platform dependency. The honest framing: it costs us almost nothing to try, but we should assume we may have to maintain a fork, so no customer-facing commitments should rest on it.

To engineering: It gives us a class-based way to organize WordPress actions and filters, which makes hook registration discoverable, namespaced, and unit-testable instead of buried in global closures. The trade-off is real: adoption is essentially zero (2 stars, 0 dependents), the API is unproven, and the bus factor is one. Recommendation is to pilot it on a single internal project, vendor the source, and only promote it to a standard if the pattern earns its keep — otherwise write the equivalent in-house in an afternoon and keep full ownership.

Bottom line for the decision: the pattern is worth adopting; the package is optional and should be treated as a forkable starting point rather than a dependency.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib