Download the PHP package alleyinteractive/wp-experimental-features without Composer

On this page you can find all versions of the php package alleyinteractive/wp-experimental-features. 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-experimental-features

Experimental Features

A WordPress plugin that creates a feature flags system for beta testing experimental features in your themes or plugins.

Usage

Defining Feature Flags

Feature flags are defined using a filter:

Checking the Value of Feature Flags

The value of a feature flag can be checked by running the feature flag slug through the experimental_features_flag filter. This allows for plugins and themes to not break if the Experimental Features plugin is deactivated, because the filter will simply return the default value.

If the flag is not enabled, or if the Experimental Features plugin is not active, then the default value (first parameter, false in the example above) will be returned.

If you like, you could create a helper function for this in your plugin or theme:

Toggling Feature Flags in the Admin

If you navigate to Settings > Experimental Features while logged in to the WordPress admin as an administrator (or a user with the manage_options capability) you can turn feature flags on and off via a simple checkbox interface.

Toggling Feature Flags in the Admin Bar

By default the admin bar will include links to toggle all available feature flags individually. This can be turned off using a filter:

Screen Shot 2021-07-08 at 4 55 08 PM

Listening for Flag Changes

WordPress actions are fired when flags are enabled/disabled.

On Any Flag Update

When a Specific Flag is Enabled

When a Specific Flag is Disabled

Retrieving Feature Flag Status in the REST API.

The status of feature flags can be retrieved via the REST API. The endpoint /wp-json/experimental-features/v1/features will return a JSON object with the status of all feature flags on the site.

By default, this is disabled. To enable it, use the following filter:

The default permissions for accessing the REST API endpoint would be for all users. To restrict access you can filter the permissions callback to retrieve it to your needs:

All feature flags will appear on the endpoint by default. This can be filtered using the experimental_features_rest_api_flags filter:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

This project is actively maintained by Alley Interactive.

License

The GNU General Public License (GPL) license. Please see License File for more information.


All versions of wp-experimental-features with dependencies

PHP Build Version
Package Version
No informations.
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 alleyinteractive/wp-experimental-features contains the following files

Loading the files please wait ....