Download the PHP package pinkcrab/wp-hook-subscriber without Composer

On this page you can find all versions of the php package pinkcrab/wp-hook-subscriber. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp-hook-subscriber

Perique Hook Subscriber

Creates a single subscriber for a hook, part of the PinkCrab Plugin Framework

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require GitHub contributors GitHub issues

WordPress 5.9 Test Suite [PHP7.2-8.1] WordPress 6.0 Test Suite [PHP7.2-8.1] WordPress 6.1 Test Suite [PHP7.2-8.2] WP6.2 [PHP7.2-8.2] Tests

codecov Scrutinizer Code Quality Maintainability

Requirements

Requires PinkCrab Perique Framework V2.0.*

Installation

This module allows for the creation of single Hook Subscriptions for creating an interface with WordPress. Under the hood it still uses the same registration process, the PinkCrab framework is built on, but gives a clean abstraction for single calls.

Each class which extends the provided base class, will have its hook added to the loader on either the defined action or differed. Allowing full use of the DI container.

Due to the way the Loader registers hook calls, classes are instanced on the init hook. Which can be problematic for WooCommerce and other extendable plugins, where some globals are populated later. The Hook_Subscriber allows for late construction, so your callback will be created in the global scope at that time.

None Deferred Subscriber

Deferred Subscriber

Somewhere in another plugin or wp-core $some_global is populated, we can then hook in anytime from when thats created and our hook is actually called.

When some_global_populated is fired, a new instance of Deferred_Hook is created and the callback is registered. This gives us access to Some_Global no matter whenever some_global_populated(). We end up creating 2 instances of our deferred hooks, once on init to register the first call, then again on our deferred hook, for the actual hook call.

Previous Versions

Changelog


All versions of wp-hook-subscriber with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
pinkcrab/perique-framework-core Version 2.0.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pinkcrab/wp-hook-subscriber contains the following files

Loading the files please wait ....