$instance
$instance : mixed
Public static variable to hold the single instance of the class.
Class MainWP_Connect
Manage connection between MainWP Dashboard and the child site.
auth(string $signature, string $func, string $nonce) : integer|boolean
Method auth()
Connection authentication handler. Verifies that the signature is correct for the specified data using the public key associated with pub_key_id. This must be the public key corresponding to the private key used for signing.
string | $signature | MainWP Dashboard signature. |
string | $func | Function to run. |
string | $nonce | Security nonce. |
$auth Returns 1 if authenticated, false if authentication fails.
connect_verify(string $data, string $signature, string $pubkey, mixed $alg) : boolean
Method connect_verify()
Verify connect.
string | $data | Data sign. |
string | $signature | signature. |
string | $pubkey | Public key. |
mixed | $alg | signature algorithm. |
Connect valid or not.
check_to_requires_reconnect_for_sha1_safe(integer $alg_new)
Method check_to_requires_reconnect_for_sha1_safe()
Check if need to deactive/active child plugin.
integer | $alg_new | Algo value. |
Error exception.
check_login_as(string $alter_login) : boolean
Method check_login_as()
Auto-login alternative user to the child site when the Open WP Admin feature from the MainWP Dashboard is used.
string | $alter_login | Alternative user account to log into. |
Return false will log in as default admin user. Return true will try to login as alternative user.