Download the PHP package stellarwp/installer without Composer

On this page you can find all versions of the php package stellarwp/installer. 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 installer

StellarWP Installer

CI Static Analysis

A library for installing / activating other plugins. Authored by the development team at StellarWP and provided free for the WordPress community.

Installation

It's recommended that you install Schema as a project dependency via Composer:

We actually recommend that this library gets included in your project using Strauss.

Luckily, adding Strauss to your composer.json is only slightly more complicated than adding a typical dependency, so checkout our strauss docs.

Handling text domains

This library has strings that are run through WordPress translation functions. Because of this, there's an extra step that needs to be taken to ensure that the placeholder %TEXTDOMAIN% is replaced with your project's text domain.

If you are using Strauss as a .phar file (recommended)

If you are using Strauss from within your vendor/bin directory

Initialization

During the plugins_loaded action, initialize the installer.

Registering a plugin

Registering plugins for installation should be done during (or after) the plugins_loaded action.

$installer->register_plugin( $slug, $plugin_name, $download_link, $did_action );

Parameter Type Description
$slug string Required. A simple slug for referring to your plugin.
$plugin_name string Required. The plugin name. This should not be translated. It must match what is in the plugin header docblock.
$download_link string The plugin download link. If this is omitted, it is assumed that the URL will come from WordPress.org plugin repository.
$did_action string If provided, the action will be checked with did_action() to indicate that the plugin is active.

Simple registration

Registration with download link

Registration with an action indicating that the plugin is active

Rendering an install/activate button

Buttons are the main point of this library. You can get or render a button. When you do, the relevant JavaScript will be enqueued to hook the button up with admin-ajax.php.

Render a button

Get a button

Get or render a button and redirect

PHP - Actions

stellarwp/installer/{$hook_prefix}/deregister_plugin

Fired when a plugin is deregistgered.

Parameters: string $slug

stellarwp/installer/{$hook_prefix}/register_plugin

Fired after registering a plugin.

Parameters: string $slug, string $plugin_name, string $download_link = null, string $did_action = null

PHP - Filters

stellarwp/installer/{$hook_prefix}/activated_label

Filters the label used for the "activated" button.

Parameters: string $label, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: Activated!

stellarwp/installer/{$hook_prefix}/activating_label

Filters the label used for the "activating" button.

Parameters: string $label, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: Activating...

stellarwp/installer/{$hook_prefix}/busy_class

Filters the class used for the "busy" state.

Parameters: string $class

Default: is-busy

stellarwp/installer/{$hook_prefix}/button_classes

Filters the classes used for the button.

Parameters: array $classes, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: An array of default namespaced classes.

stellarwp/installer/{$hook_prefix}/button_id

Filters the button id attribute for the button.

Parameters: string $id, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: null

stellarwp/installer/{$hook_prefix}/download_url

Filters the download_url used for the installation of the plugin.

stellarwp/installer/{$hook_prefix}/get_permission

Filters the permissions used for the installation of the plugin.

stellarwp/installer/{$hook_prefix}/install_error_message

Filters the install error message.

stellarwp/installer/{$hook_prefix}/installed_label

Filters the label used for the "installed" button.

Parameters: string $label, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: Installed!

stellarwp/installer/{$hook_prefix}/installing_label

Filter the label used for the "installing" button.

Parameters: string $label, string $slug, StellarWP\Installer\Contracts\Handler $handler

Default: Installing...

stellarwp/installer/{$hook_prefix}/nonce_name

The name of the nonce field that is used when interacting with an install/activate button.

stellarwp/installer/{$hook_prefix}/wordpress_org_data

Filters the data returned from the WordPress.org plugin repository.

JS - Actions

stellarwp_installer_{$hook_prefix}_error

Fires when an error occurs during the installation of a plugin.

Acknowledgements

Props to the folks at The Events Calendar for the efforts on the initial release of this library.


All versions of installer with dependencies

PHP Build Version
Package Version
Requires ext-json Version *
php Version >=7.2
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 stellarwp/installer contains the following files

Loading the files please wait ....