Download the PHP package digitalerase/wp-remote-users-sync without Composer

On this page you can find all versions of the php package digitalerase/wp-remote-users-sync. 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-remote-users-sync

WP Remote Users Sync - Synchronise WordPress Users across Multiple Sites

General Description

If you run multiple websites and want to keep users separated, but synchronise them automatically and securely for specific user operations, then WP Remote Users Sync is the plugin to use.

Overview

This plugin adds the following major features to WordPress:


Adding User Actions

Developers can extend the plugin and add their own custom User Actions by using a few filter and action hooks as well as a class inheriting Wprus_Api_Abstract.
Below is a simple example of implementation of an Example action calling the example API endpoint, firing 1 synchronous request and 1 asynchronous request whenever the wp action hook is called by WordPress, and logs the received data (not to be used in production environment!).

Implementing filter and actions hooks and including a custom User Action API class - example

In this example, we are first creating a simple plugin to implement the action and filter hooks, and include the User Action API class.

Implementing a custom User Action class - example

The User Action's logic is then implemented in the file class-wprus-api-example.php included by the plugin.


Hooks - actions & filters

WP Remote Users Sync gives developers the possibilty to customise its behavior with a series of custom actions and filters.

Actions

Actions index:


wprus_loaded

Description
Fired before initializing the plugin's settings.


wprus_loaded

Description
Fired when all the required files have been loaded and the plugin settings are valid.


wprus_ready

Description
Fired when the plugin apis have been fully instantiated, plugin settings are valid, and the plugin is ready to run.

Parameters
$wprus

(mixed) An instance of the Wprus class.

$api

(mixed) Array of API handlers.

$settings

(mixed) Array of settings.

$wprus_logger

(mixed) An instance of the Wprus_Logger class.


wprus_unauthorized_access

Description
Fired when an action is received and the token could not be validated.

Parameters
$endpoint

(string) The API endpoint receiving the action.

$remote_data

(mixed) Decrypted data received from the remote site. Should not be trusted.

$token

(string) The token used to attempt to authorise the request. May contain encrypted data in the case of an asynchronous request.

$wprus_api_object

(mixed) The Wprus_Api_Abstract object used to handle the request.


wprus_authorized_access

Description
Fired when an action is received and the token was successfully validated.

Parameters
$endpoint

(string) The API endpoint receiving the action.

$remote_data

(mixed) Decrypted data received from the remote site.

$token

(string) The token used to authorise the request. Contains encrypted data in the case of an asynchronous request.

$wprus_api_object

(mixed) The Wprus_Api_Abstract object used to handle the request.


wprus_ping_fired

Description
Fired when a test ping was sent to a remote site.

Parameters
$endpoint

(string) The API endpoint the test ping was sent to.

$ping_data

(mixed) The data sent to perform the ping.

$response

(mixed) The response received from the remote site.


wprus_ping_success

Description
Fired when a test ping was received from a remote site and was successful.

Parameters
$endpoint

(string) The API endpoint receiving the test ping.

$ping_remote_data

(mixed) The data received from the remote site to perform the ping.

$remote_addr

(string) The IP address of the remote site.


wprus_ping_failure

Description
Fired when a test ping was received from a remote site and failed.

Parameters
$endpoint

(string) The API endpoint receiving the test ping.

$ping_remote_data

(mixed) The data received from the remote site to perform the ping.

$remote_addr

(string) The IP address of the remote site.


wprus_before_firing_async_actions

Description
Fired before outputting the asynchronous scripts sending requests to remote sites in the front end.

Parameters
$endpoint

(string) The API endpoint the requests will be sent to.

$actions

(mixed) An array of request data to send to the remote sites. Structure:

$user_id

(int) The ID of the user for which the actions are to be performed.


wprus_after_firing_async_actions

Description
Fired after outputting the asynchronous scripts sending requests to remote sites in the front end.

Parameters
$endpoint

(string) The API endpoint the requests were sent to.

$actions

(mixed) An array of request data to send to the remote sites. Structure:

$user_id

(int) The ID of the user for which the actions were performed.


wprus_before_firing_action

Description
Fired before sending a synchronous request to a remote site.

Parameters
$endpoint

(string) The API endpoint the request will be sent to.

$url

(string) The URL to send the request to.

$data

(mixed) The data sent to the remote site. Structure:


wprus_after_firing_action

Description
Fired after sending a synchronous request to a remote site.

$endpoint

(string) The API endpoint the request will be sent to.

$url

(string) The URL to send the request to.

$data

(mixed) The data sent to the remote site. Structure:

$response

(mixed) Array containing headers, body, response, cookies, filename. A WP_Error instance upon error.


wprus_before_handle_action_notification

Description
Fired before handling a notification received from a remote site.

Parameters
$endpoint

(string) The API endpoint receiving the notification request.

$data

(mixed) The data received from the remote site. Structure:


wprus_after_handle_action_notification

Description
Fired after handling a notification received from a remote site.

Parameters
$endpoint

(string) The API endpoint receiving the notification request.

$data

(mixed) The data received from the remote site. Structure:

$result

(bool) Wether handling the notification was successful or failed ; any change to user data is considered successful even if warnings were raised (for example, if the Update action was received and a user was created instead of updated).


wprus_before_init_notification_hooks

Description
Fired before adding hooks used to notify remote sites.

Parameters
$endpoint

(string) The API endpoint name of the object adding the notification hooks.

$wprus_api_object

(mixed) The Wprus_Api_Abstract object adding the notification hooks.


wprus_after_init_notification_hooks

Description
Fired after adding hooks used to notify remote sites.

Parameters
$endpoint

(string) The API endpoint name of the object adding the notification hooks.

$wprus_api_object

(mixed) The Wprus_Api_Abstract object adding the notification hooks.


wprus_require_integration_file

Description
Fired when an integration with a third-party plugin needs to load a class file inheriting Wprus_Integration.

Parameters
$plugin_slug

(string) The slug of the plugin integrated.

$class_name

(string) The name of the integration class - must inherit Wprus_Integration.


wprus_integration

Description
Fired when an integration with a third-party plugin is active and loaded.

Parameters
$wprus_integration_obj

(mixed) The Wprus_Integration object used to provide features integration.

$plugin_slug

(string) The slug of the plugin integrated.


wprus_integration_run

Description
Fired when an integration with a third-party plugin hooks is fully initialized.

Parameters
$wprus_integration_obj

(mixed) The Wprus_Integration object used to provide features integration.


Filters

Filters index:


wprus_enabled_api_endpoints

Description
Filter the enabled endpoints.

Parameters
$endpoints

(array) Array of enabled API endpoints. Default:


wprus_api_endpoint

Description
Filter the handler object for a custom endpoint.

Parameters
$endpoint_handler

(mixed) The object instance of a class inherhiting the Wprus_Api_Abstract API class. Default false.

$api_endpoint

(string) The custom API endpoint.

$settings

(mixed) Array of all the settings.


wprus_api

Description
Filter the collection of API handlers.

Parameters
$api

(mixed) Array of API handlers. Default:


wprus_wp_endpoints

Description
Filter the endpoints to add to WordPress.
Documented here for the sake of completeness and in case some developers find it useful in very specific cases - adding endpoints to the list should be handled automatically by a class inheriting the Wprus_Api_Abstract class instead of using this filter.

Parameters
$wprus_endpoints

(mixed) Array of endpoints to add. Default:


wprus_actions

Description
Filter the supported actions.

Parameters
$actions

(mixed) Array of actions - key is the action key, value is the action display value. Default:


wprus_settings

Description
Filter the settings' values.

Parameters
$settings

(mixed) Array of all the settings.


wprus_option

Description
Filter a single setting's option value.

Parameters
$value

(mixed) the value of the option
$key (string) the key used to retrieve the option value


wprus_settings_valid

Description
Filter wether the settings are valid ; called before running any other part of the plugin.

Parameters
$valid

(bool) Wether the settings are valid.

$settings

(mixed ) Array of all the settings.


wprus_settings_metaboxes

Description
Filter the setting's metaboxes of the plugin's screen.

Parameters
$metaboxes

(mixed) Array representing the metaboxes. Structure:


wprus_sanitize_settings

Description
Filter the settings after sanitatization.

Parameters
$sanitized_settings

(mixed) Array of all the settings after sanitatization.


wprus_excluded_meta_keys

Description
Filter the meta keys excluded from selection for synchronization (by default, keys referring to redundant or site-specific data).

Parameters
$excluded_meta_keys

(mixed) Array of exluded meta keys. Default:


wprus_excluded_meta_keys_like

Description
Filter the meta keys LIKE clauses used to exclude groups of meta keys from selection for synchronization (by default, keys referring to redundant or site-specific data).

Parameters
$excluded_meta_keys_like_expressions

(mixed) Array of meta keys LIKE expressions. Default:


wprus_init_notification_hooks

Description
Filter wether to initialise the notification hooks for the current request.
Warning: Must be added before WordPress runs the init action.

Parameters
$init_notification_hooks

(bool) If truthy, hooks will be initialised and notifications will be sent to remote sites upon user changes. Set to a falsy value to prevent notifications from being sent. Default true except in the case of user import.


wprus_fire_action_timeout

Description
Filter the timeout for a synchronous action request.

Parameters
$timeout

(int) The timeout for a synchronous action request expressed in seconds. Default 1.

$endpoint

(string) The destination endpoint.

$url

(string) The destination website's URL.

$blocking

(bool) Whether the request needs to wait for a response.


wprus_request_token_timeout

Description
Filter the timeout for an authentication token request.

Parameters
$token_timeout

(int) The timeout for a token request expressed in seconds. Default 1.


wprus_request_token_retry_timeout

Description
Filter the retry timeout for an authentication token request, in case the first request failed.

Parameters
$token_retry_timeout

(int) The retry timeout for token request expressed in seconds. Default 5.


wprus_is_authorized_remote

Description
Filter wether the received request should be authorised.

Parameters
$is_authorized_remote

(bool) Whether the request is authorised.

$method

(string) The request's method - post or get.

$remote_addr

(string) The IP address received in the REMOTE_ADDR header.

$ip_whitelist

(mixed) An array of strings as defined in the "IP Whitelist" settings.


wprus_debug

Description
Filter wether to activate debug mode (PHP error logs, JavaScript console messages, JavaScript alerts if any).

Parameters
$debug

(bool) Wether debug mode is activated - default WP_DEBUG constant value.


wprus_action_data

Description
Filter the data sent to a remote site.

Parameters
$data

(array) The data sent to the remote site.

$endpoint

(string) The API endpoint receiving the action.

$url

(string) The URL of the remote site.


wprus_registered_integration

Description
Filter integrations. See inc/integration/class-wprus-integration.php.

Parameters
$integrations

(array) The integrations info. Structure:


wprus_get_admin_template_name

Description
Filter the file name of the template to include.

Parameters
$template_name

(string) The file name of the template to include.

$args

(array) The variables passed to the template.


wprus_get_admin_template_args

Description
Filter the variables passed to the template.

Parameters
$args

(array) The variables passed to the template.

$template_name

(string) The file name of the template.


wprus_get_template_name

Description
Filter the file name of the template to include.

Parameters
$template_name

(string) The file name of the template to include.

$args

(array) The variables passed to the template.


wprus_get_template_args

Description
Filter the variables passed to the template.

Parameters
$args

(array) The variables passed to the template.

$template_name

(string) The file name of the template.


wprus_locate_template

Description
Filter the fully qualified path of the template file.

Parameters
$template_file

(string) The fully qualified path of the template file.

$template_name

(string) The file name.

$template_path

(string) The file path.


wprus_locate_admin_template

Description
Filter the fully qualified path of the admin template file.

Parameters
$template_file

(string) The fully qualified path of the admin template file.

$template_name

(string) The file name.

$template_path

(string) The file path.


wprus_locate_template_paths

Description
Filter the list of possible theme paths for the template file.

Parameters
$paths

(array) The list of possible theme paths for the template file. Structure:



All versions of wp-remote-users-sync with dependencies

PHP Build Version
Package Version
Requires composer/installers Version >=1.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 digitalerase/wp-remote-users-sync contains the following files

Loading the files please wait ....