Created
January 25, 2017 22:55
-
-
Save ScottDeLuzio/1ad5ced5910ff5ba684a5f13488b8556 to your computer and use it in GitHub Desktop.
mainwp_addsite and mainwp_editsite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for add child site | |
$params = array( | |
'url' => 'http://childsite.com', // child site url | |
'name' => 'my child site', // set name | |
'wpadmin' => 'admin-user-name', | |
'unique_id' => '', // set value if needed | |
'groupids' => array( ... ), // array of group ids | |
'ssl_verify' => 0, // or 1, 2 | |
'ssl_version' => 'auto', | |
'http_user' => '', // set value if needed | |
'http_pass' => '', // set value if needed | |
); | |
$result = apply_filters('mainwp_addsite', $params); | |
// for update child site | |
$params = array( | |
'websiteid' => ID-NUMBER, // child site id | |
'name' => 'my child site', // set name | |
'wpadmin' => 'admin-user-name', | |
'unique_id' => '', // set value if needed | |
); | |
$result = apply_filters('mainwp_editsite', $params); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment