$instance
$instance : mixed
Public static variable to hold the single instance of the class.
Class MainWP_Child_Misc
Misc functions that don't really belong anywhere else.
uploader_upload_file(string $file_url, string $path, string $file_name) : array
Method uploader_upload_file()
Upload file from the MainWP Dashboard.
string | $file_url | URL of file to be uploaded. |
string | $path | Path to upload to. |
string | $file_name | Name of file to upload. |
Error message.
Full path and file name of uploaded file.
snippet_update_wp_config(string $action, string $slug, string $code = '') : boolean
Method snippet_update_wp_config()
Update the child site wp-config.php file.
string | $action | Action to perform: Delete, Save. |
string | $slug | Snippet slug. |
string | $code | Code snippet. |
If remvoed, return true, if not, return false.
snippet_save_snippet(string $slug, string $type, string $code, array $snippets) : array
Method snippet_save_snippet()
Save code snippet.
string | $slug | Snippet slug. |
string | $type | Type of snippet. |
string | $code | Snippet code. |
array | $snippets | An array containing all snippets. |
$return Status response.
snippet_delete_snippet(string $slug, string $type, array $snippets) : array
Method snippet_delete_snippet()
Delete code snippet.
string | $slug | Snippet slug. |
string | $type | Type of snippet. |
array | $snippets | An array containing all snippets. |
$return Status response.