Download the PHP package automattic/jetpack-wp-abilities without Composer

On this page you can find all versions of the php package automattic/jetpack-wp-abilities. 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 jetpack-wp-abilities

Jetpack WP Abilities

Shared utilities for registering a category and its abilities with the WordPress Abilities API from Jetpack packages and plugins.

The Registrar base class owns the boilerplate every consumer would otherwise hand-roll: hooking into wp_abilities_api_categories_init / wp_abilities_api_init (or dispatching immediately when those actions have already fired), and guarding the Abilities API function calls so the class is safe on WordPress versions older than 6.9.

Usage

Extend Registrar, override the three static getters, and call init() from the consumer's bootstrap.

If an ability spec omits category, the registrar auto-injects get_category_slug(). If the spec sets category explicitly (for cross-registrar shared abilities), the explicit value is preserved.

Gating registration for gradual rollout

Registration is opt-in. init() checks the jetpack_wp_abilities_enabled filter, which defaults to false. Return true to turn registration on for this request, typically gated on a site option, user capability, or feature flag.

Because the default is false, a plugin that extends Registrar and calls MyRegistrar::init() registers nothing until a site explicitly flips the flag.

Per-registration gate

For finer-grained control, every category and every ability also passes through the jetpack_wp_abilities_should_register filter (only reached when jetpack_wp_abilities_enabled has already returned true). Returning false skips a single registration.

The filter fires once per category and once per individual ability, so callbacks can switch on $type ('category' or 'ability') and/or $slug for granular control.

Using this package in your WordPress plugin

If you plan on using this package in your WordPress plugin, we recommend using Jetpack Autoloader as your autoloader for maximum interoperability with other plugins that use this package.

Security

Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.

License

Jetpack WP Abilities is licensed under GNU General Public License v2 (or later).


All versions of jetpack-wp-abilities with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
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 automattic/jetpack-wp-abilities contains the following files

Loading the files please wait ...