$config
$config : array
Clone configuration settings.
Class MainWP_Clone_Install
This file handles installing a cloned child site.
get_instance() : \MainWP\Child\MainWP_Clone_Install
Create a public static instance of MainWP_Clone_Install.
icit_srdb_replacer(\MainWP\Child\mysql $connection, string $search = '', string $replace = '', array $tables = array()) : array
The main loop triggered in step 5. Up here to keep it out of the way of the HTML. This walks every table in the db that was selected in step 3 and then walks every row and column replacing all occurrences of a string with another.
We split large tables into 50,000 row blocks when dealing with them to save on memory consumption.
\MainWP\Child\mysql | $connection | The db connection object. |
string | $search | What we want to replace. |
string | $replace | What we want to replace it with. |
array | $tables | The tables we want to look at. |
Collection of information gathered during the run.
recursive_unserialize_replace(string $from = '', string $to = '', array $data = '', boolean $serialised = false) : array
Take a serialised array and un-serialize it replacing elements as needed and un-serializing any subordinate arrays and performing the replace on those too.
string | $from | String we're looking to replace. |
string | $to | What we want it to be replaced with. |
array | $data | Used to pass any subordinate arrays back. |
boolean | $serialised | Does the array passed via $data need serialising. |
The original array with all elements replaced as needed.
replace_define(string $constant, string $value, string $content) : string
Replace define statement to work with wp-config.php.
string | $constant | The constant name. |
string | $value | The new value. |
string | $content | The PHP file content. |
Replaced define statement with new value.
replace_var(string $varname, string $value, string $content) : string
Replace variable value to work with wp-config.php.
string | $varname | The variable name. |
string | $value | The new value. |
string | $content | The PHP file content. |
Replaced variable value with new value.