Methods

init_menu()

init_menu() : \MainWP\Dashboard\add_submenu_page()

Method init_menu()

Initiate Sites sub menu.

Returns

\MainWP\Dashboard\add_submenu_page()

init_subpages_menu()

init_subpages_menu(array  $subPages) 

Method init_subpages_menu()

Parameters

array $subPages

Sub pages array.

init_left_menu()

init_left_menu(array  $subPages = array()) 

Method init_left_menu()

Initiate left Sites menu.

Parameters

array $subPages

Sub pages array.

render_header()

render_header(string  $shownPage = '', string  $subPages = '') 

Method render_header()

Build Sites page header.

Parameters

string $shownPage

Current Page.

string $subPages

Sites subpages.

render_footer()

render_footer() 

Method render_footer()

Close the page container.

render_import_sites()

render_import_sites() 

Method render_import_sites()

Render import sites dialog.

render_sync_exts_settings()

render_sync_exts_settings() 

Method render_sync_exts_settings()

Render sync extension settings.

render_dashboard()

render_dashboard(mixed  $website) : string

Method render_dashboard()

Render individual Child Site Overview page.

Parameters

mixed $website

Child Site.

Returns

string —

Sites Overview Page.

render_header_tabs()

render_header_tabs(mixed  $active_tab, mixed  $active_text, mixed  $show_language_updates) 

Method render_header_tabs()

Render Sites sub page header tabs.

Parameters

mixed $active_tab

Currently active tab.

mixed $active_text

Currently active drop down text.

mixed $show_language_updates

Whether or not to show translations.

render_scan_site()

render_scan_site(mixed  $website) 

Method render_scan_site()

Render Site Hardening sub page.

Parameters

mixed $website

Child Site.

render_edit_site()

render_edit_site(mixed  $websiteid, mixed  $updated) : string

Method render_edit_site()

Render individual Child Site Edit sub page.

Parameters

mixed $websiteid

Child Site ID.

mixed $updated

Site settings updated check.

Returns

string —

Edit Child Site sub page.

render_site_edit_email_settings()

render_site_edit_email_settings(object  $website, string  $type, boolean  $updated_templ) 

Render single site Email notification settings.

Credits.

Plugin-Name: WooCommerce. Plugin URI: https://woocommerce.com/. Author: Automattic. Author URI: https://woocommerce.com. License: GPLv3 or later.

Parameters

object $website

Object containng the website info.

string $type

Email type.

boolean $updated_templ

True if page loaded after update, false if not.

render_edit_template()

render_edit_template(string  $type, boolean  $siteid = false) 

Render the email notification edit form.

Credits.

Plugin-Name: WooCommerce. Plugin URI: https://woocommerce.com/. Author: Automattic. Author URI: https://woocommerce.com. License: GPLv3 or later.

Parameters

string $type

Email type.

boolean $siteid

Child site ID.

render_edit_site_email_settings()

render_edit_site_email_settings(object  $website, boolean  $updated) 

Render all email settings options.

Parameters

object $website

Object containing the website info.

boolean $updated

True if page loaded after update, false if not.

m_reconnect_site()

m_reconnect_site(object  $website, boolean  $sync_first = true) : boolean

Method m_reconnect_site()

Reconnect child site.

Parameters

object $website

The website object.

boolean $sync_first

True try to sync before reconnect.

Throws

\Exception

Exception On errors.

Returns

boolean —

true|false.

add_site()

add_site(mixed  $website = false, array  $output = array()) : self

Method add_site()

Add Child Site.

Parameters

mixed $website

Child Site.

array $output

Output values.

Returns

self —

add_wp_site()

add_wp_site()

add_wp_site(mixed  $website, array  $params = array(), array  $output = array()) : array

Medthod add_wp_site()

Add new Child Site.

Parameters

mixed $website

Child Site.

array $params

Array of new Child Site to add.

array $output

Output values.

Returns

array —

$message, $error, $id

update_wp_site()

update_wp_site(mixed  $params) : integer

Method update_wp_site()

Update Child Site.

Parameters

mixed $params

Udate parameters.

Throws

\Exception

Error message.

Returns

integer —

Child Site ID on success and return 0 on failure.

render_managesites_header()

render_managesites_header(array  $site_pages, array  $managesites_pages, array  $subPages, integer  $site_id, string  $shownPage) 

Method render_managesites_header()

Render manage sites header.

Parameters

array $site_pages

site pages.

array $managesites_pages

manage site pages.

array $subPages

sub pages.

integer $site_id

Site id.

string $shownPage

Current Page.