\MainWP\DashboardMainWP_DB_Common

Class MainWP_DB_Common

Summary

Methods
Properties
Constants
instance()
get_option_view()
get_connected_websites()
get_disconnected_websites()
get_websites_count()
get_website_option()
get_website_options_array()
update_website_option()
get_websites_by_user_id()
get_sql_websites()
get_sql_websites_to_check_status()
get_sql_websites_by_user_id()
get_sql_websites_for_current_user()
get_websites_for_current_user()
get_sql_search_websites_for_current_user()
get_sql_where_allow_access_sites()
get_sql_where_allow_groups()
get_website_by_id()
get_sql_website_by_id()
get_websites_by_ids()
get_websites_by_group_ids()
get_websites_by_group_id()
get_sql_websites_by_group_id()
get_websites_by_group_name()
get_sql_websites_by_group_name()
get_wp_ip()
add_website()
remove_website()
update_website_values()
update_website_sync_values()
update_website()
get_websites_check_updates_count()
get_websites_count_where_dts_automatic_sync_smaller_then_start()
get_websites_last_automatic_sync()
get_websites_check_updates()
get_websites_stats_update_sql()
update_website_stats()
get_websites_by_url()
get_websites_offline_status_to_send_notice()
get_websites_to_notice_health_threshold()
get_websites_offline_check_status()
__construct()
get_my_sql_version()
get_row_result()
get_results_result()
query()
use_mysqli()
ping()
m_query()
fetch_object()
free_result()
data_seek()
fetch_array()
num_rows()
is_result()
get_last_sync_status()
get_group_by_name()
get_group_by_id()
get_groups_for_manage_sites()
get_groups_for_current_user()
get_groups_by_website_id()
get_groups_and_count()
get_not_empty_groups()
get_sql_log()
insert_action_log()
delete_action_log()
insert_or_update_request_log()
close_open_requests()
get_nrof_open_requests()
get_last_request_timestamp()
update_group_site()
clear_group()
add_group()
remove_group()
update_note()
update_group()
get_user_notification_email()
get_user_extension()
get_user_extension_by_user_id()
update_user_extension()
rest_api_update_website()
No public properties found
No constants found
test_connection()
table_name()
escape()
create_user_extension()
$table_prefix
$wpdb
N/A
No private methods found
$instance
N/A

Properties

$table_prefix

$table_prefix : string

Table prefix.

Type

string

$wpdb

$wpdb : mixed

WordPress Database.

Type

mixed — WordPress Database.

$instance

$instance : mixed

Private static variable to hold the single instance of the class.

Type

mixed — Default null

Methods

get_option_view()

get_option_view(array  $fields = array(), boolean  $default = true) : array

Get wp_options database table view.

Parameters

array $fields

Extra option fields.

boolean $default

Whether or not to get default option fields.

Returns

array —

wp_options view.

get_connected_websites()

get_connected_websites(array  $sites_ids = false) : array

Get connected child sites.

Parameters

array $sites_ids

Websites ids - option field.

Returns

array —

$connected_sites Array of connected sites.

get_disconnected_websites()

get_disconnected_websites(array  $sites_ids = false) : array

Get disconnected child sites.

Parameters

array $sites_ids

Websites ids - option field.

Returns

array —

$disc_sites Array of disonnected sites.

get_websites_count()

get_websites_count(null  $userId = null, boolean  $all_access = false) : integer

Get child site count.

Parameters

null $userId

Current user ID.

boolean $all_access

Check if user has access to all sites.

Returns

integer —

Child site count.

get_website_option()

get_website_option(array  $website, mixed  $option) : string|null

Get Child site wp_options database table.

Parameters

array $website

Child Site array.

mixed $option

Child Site wp_options table name.

Returns

string|null —

Database query result (as string), or null on failure.

get_website_options_array()

get_website_options_array(array  $website, mixed  $options) : string|null

Get child site options.

Parameters

array $website

Child site.

mixed $options

Child site options name.

Returns

string|null —

Database query result (as string), or null on failure.

update_website_option()

update_website_option(object  $website, mixed  $option, mixed  $value) 

Update child site options.

Parameters

object $website

Child site object.

mixed $option

Option to update.

mixed $value

Value to update with.

get_websites_by_user_id()

get_websites_by_user_id(integer  $userid, boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url') : array|object|null

Get child sites by user ID.

Parameters

integer $userid

User ID.

boolean $selectgroups

Selected groups.

null $search_site

Site search field value.

string $orderBy

Order list by. Default: URL.

Returns

array|object|null —

Database query results or null on failer.

get_sql_websites()

get_sql_websites() : string

Get child sites.

Returns

string —

SQL string.

get_sql_websites_to_check_status()

get_sql_websites_to_check_status(integer  $last_check, integer  $count = 20) : string

Get child sites to run the status check process.

Parameters

integer $last_check

Time of the last check.

integer $count

Number of websites.

Returns

string —

SQL string.

get_sql_websites_by_user_id()

get_sql_websites_by_user_id(integer  $userid, boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false) : object|null

Get child sites by user id via SQL.

Parameters

integer $userid

Given user ID.

boolean $selectgroups

Selected groups. Default: false.

null $search_site

Site search field value. Default: null.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: falese.

Returns

object|null —

Return database query or null on failure.

get_sql_websites_for_current_user()

get_sql_websites_for_current_user(boolean  $selectgroups = false, null  $search_site = null, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false, null  $extraWhere = null, boolean  $for_manager = false, mixed  $extra_view = array('favi_icon'), string  $is_staging = 'no') : object|null

Get SQL to get child sites for current user.

Parameters

boolean $selectgroups

Selected groups. Default: false.

null $search_site

Site search field value. Default: null.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: false.

null $extraWhere

Extra WHERE. Default: null.

boolean $for_manager

For role manager. Default: false.

mixed $extra_view

Extra view. Default favi_icon.

string $is_staging

yes|no Is child site a staging site.

Returns

object|null —

Database query results or null on failure.

get_websites_for_current_user()

get_websites_for_current_user(array  $params = array()) : array

Get child sites for current user.

Parameters

array $params

to get sites. Default: array().

Returns

array —

Results or null on failure.

get_sql_search_websites_for_current_user()

get_sql_search_websites_for_current_user(array  $params) : boolean|null

Get the child sites the current user has searched for.

Parameters

array $params

Query parameters.

Returns

boolean|null —

$qry Database query results or null on failure.

get_sql_where_allow_access_sites()

get_sql_where_allow_access_sites(string  $site_table_alias = '', string  $is_staging = 'no') : boolean|null

Get child sites where allowed access via SQL.

Parameters

string $site_table_alias

Child site table alias.

string $is_staging

yes|no Is child site a staging site.

Returns

boolean|null —

$_where Database query results or null on failure.

get_sql_where_allow_groups()

get_sql_where_allow_groups(string  $group_table_alias = '', string  $with_staging = 'no') : boolean|null

Get groupd where allowed access via SQL.

Parameters

string $group_table_alias

Child site table alias.

string $with_staging

yes|no Is child site a staging site.

Returns

boolean|null —

$_where Database query results or null on failer.

get_website_by_id()

get_website_by_id(integer  $id, array  $selectGroups = false, array  $fields = array()) : object|null

Get child site by id.

Parameters

integer $id

Child site ID.

array $selectGroups

Select groups.

array $fields

Get extra option fields.

Returns

object|null —

Database query results or null on failure.

get_sql_website_by_id()

get_sql_website_by_id(integer  $id, boolean  $selectGroups = false, mixed  $extra_view = array()) : object|null

Get child site by id via SQL.

Parameters

integer $id

Child site ID.

boolean $selectGroups

Selected groups.

mixed $extra_view

Extra view value.

Returns

object|null —

Database query result or null on failure.

get_websites_by_ids()

get_websites_by_ids(array  $ids, integer  $userId = null) : object|null

Method get_websites_by_ids()

Get child sites by child site IDs.

Parameters

array $ids

Child site IDs.

integer $userId

User ID.

Returns

object|null —

Database query result or null on failure.

get_websites_by_group_ids()

get_websites_by_group_ids(array  $ids, integer  $userId = null) : object|null

Get child sites by groups IDs.

Parameters

array $ids

Groups IDs.

integer $userId

User ID.

Returns

object|null —

Database query result or null on failure.

get_websites_by_group_id()

get_websites_by_group_id(integer  $id) : object|null

Get child sites by group ID.

Parameters

integer $id

Group ID.

Returns

object|null —

Database query result or null on failure.

get_sql_websites_by_group_id()

get_sql_websites_by_group_id(integer  $id, boolean  $selectgroups = false, string  $orderBy = 'wp.url', boolean  $offset = false, boolean  $rowcount = false, null  $where = null, null  $search_site = null) : object|null

Get child sites by group id via SQL.

Parameters

integer $id

Group ID.

boolean $selectgroups

Selected groups. Default: false.

string $orderBy

Order list by. Default: URL.

boolean $offset

Query offset. Default: false.

boolean $rowcount

Row count. Default: falese.

null $where

SQL WHERE value.

null $search_site

Site search field value. Default: null.

Returns

object|null —

Return database query or null on failure.

get_websites_by_group_name()

get_websites_by_group_name(integer  $userid, string  $groupname) : object|null

Get child sites by group name.

Parameters

integer $userid

Current user ID.

string $groupname

Group name.

Returns

object|null —

Database query result or null on failure.

get_sql_websites_by_group_name()

get_sql_websites_by_group_name(string  $groupname, integer  $userid = null) : object|null

Get child sites by group name.

Parameters

string $groupname

Group name.

integer $userid

Current user ID.

Returns

object|null —

Database query result or null on failure.

get_wp_ip()

get_wp_ip(integer  $wpid) : string|null

Get child site IP address.

Parameters

integer $wpid

Child site ID.

Returns

string|null —

Child site IP address or null on failure.

add_website()

add_website(integer  $userid, string  $name, string  $url, string  $admin, string  $pubkey, string  $privkey, mixed  $nossl, mixed  $nosslkey, array  $groupids, array  $groupnames, integer  $verifyCertificate = 1, string  $uniqueId = '', string  $http_user, string  $http_pass, integer  $sslVersion, integer  $wpe, integer  $isStaging) : integer|false

Add website to the MainWP Dashboard.

Parameters

integer $userid

Current user ID.

string $name

Child site name.

string $url

Child site URL.

string $admin

Child site administrator username.

string $pubkey

OpenSSL public key.

string $privkey

OpenSSL private key.

mixed $nossl

SSL suppoted connection.

mixed $nosslkey

SSL not supported connection key.

array $groupids

Group IDs.

array $groupnames

Group names.

integer $verifyCertificate

Whether or not to verify SSL Certificate.

string $uniqueId

Unique security ID.

string $http_user

HTTP Basic Authentication username.

string $http_pass

HTTP Basic Authentication password.

integer $sslVersion

SSL Version.

integer $wpe

Is it WP Engine hosted site.

integer $isStaging

Whether or not child site is staging site.

Returns

integer|false —

Child site ID or false on failure.

remove_website()

remove_website(integer  $websiteid) : integer|boolean

Remove child site from the MainWP Dashboard.

Parameters

integer $websiteid

Child site ID.

Returns

integer|boolean —

Return child site ID that was removed or false on failure.

update_website_values()

update_website_values(integer  $websiteid, array  $fields) : integer|boolean

Update child site db values.

Parameters

integer $websiteid

Child site ID.

array $fields

Database fields to update.

Returns

integer|boolean —

The number of rows updated, or false on error.

update_website_sync_values()

update_website_sync_values(integer  $websiteid, array  $fields) : integer|boolean

Update child site sync values.

Parameters

integer $websiteid

Child site ID.

array $fields

Database fields to update.

Returns

integer|boolean —

The number of rows updated, or false on error.

update_website()

update_website(integer  $websiteid, string  $url, integer  $userid, string  $name, string  $siteadmin, array  $groupids, array  $groupnames, string  $pluginDir, mixed  $maximumFileDescriptorsOverride, mixed  $maximumFileDescriptorsAuto, mixed  $maximumFileDescriptors, integer  $verifyCertificate = 1, mixed  $archiveFormat, string  $uniqueId = '', string  $http_user = null, string  $http_pass = null, integer  $sslVersion, integer  $disableChecking, integer  $checkInterval, boolean  $disableHealthChecking, integer  $healthThreshold, integer  $wpe) : boolean

Update child site.

Parameters

integer $websiteid

Website ID.

string $url

Child site URL.

integer $userid

Current user ID.

string $name

Child site name.

string $siteadmin

Child site administrator username.

array $groupids

Group IDs.

array $groupnames

Group Names.

string $pluginDir

Plugin directory.

mixed $maximumFileDescriptorsOverride

Overwrite the Maximum File Descriptors option.

mixed $maximumFileDescriptorsAuto

Auto set the Maximum File Descriptors option.

mixed $maximumFileDescriptors

Set the Maximum File Descriptors option.

integer $verifyCertificate

Whether or not to verify SSL Certificate.

mixed $archiveFormat

Backup archive formate.

string $uniqueId

Unique security ID.

string $http_user

HTTP Basic Authentication username.

string $http_pass

HTTP Basic Authentication password.

integer $sslVersion

SSL Version.

integer $disableChecking

Wether or not disable sites status checking.

integer $checkInterval

Status checking interval.

boolean $disableHealthChecking

Disable Site health threshold.

integer $healthThreshold

Site health threshold.

integer $wpe

Is it WP Engine hosted site.

Returns

boolean —

ture on success or false on failure.

get_websites_check_updates_count()

get_websites_check_updates_count(integer  $lasttime_start) : integer

Get websites check updates count.

Parameters

integer $lasttime_start

Lasttime start automatic update.

Returns

integer —

Child sites update count.

get_websites_count_where_dts_automatic_sync_smaller_then_start()

get_websites_count_where_dts_automatic_sync_smaller_then_start(integer  $lasttime_start) : integer

Get child site count where date & time Session sync is smaller then start.

Parameters

integer $lasttime_start

Last time start automatic.

Returns

integer —

Returned child site count.

get_websites_last_automatic_sync()

get_websites_last_automatic_sync() : string

Get child site last automatic sync date & time.

Returns

string —

Date and time of last automatic sync.

get_websites_check_updates()

get_websites_check_updates(integer  $limit, integer  $lasttime_start) : object|null

Get child sites check updates.

Parameters

integer $limit

Query limit.

integer $lasttime_start

Lasttime start automatic update.

Returns

object|null —

Database query result or null on failure.

get_websites_stats_update_sql()

get_websites_stats_update_sql() : object|null

Get website update stats via SQL.

Returns

object|null —

Database query result of null on failure.

update_website_stats()

update_website_stats(mixed  $websiteid, mixed  $statsUpdated) : \MainWP\Dashboard\(int|\MainWP\Dashboard\boolean)

Update child site statistics.

Update whether or not a child site has been updated.

Parameters

mixed $websiteid

Child site ID.

mixed $statsUpdated

Child site Update status.

Returns

\MainWP\Dashboard\(int|\MainWP\Dashboard\boolean) —

Number of rows effected in update or false on failure.

get_websites_by_url()

get_websites_by_url(string  $url) : object|null

Get child site by url.

Parameters

string $url

Child site URL.

Returns

object|null —

Database query result or null on failure.

get_websites_offline_status_to_send_notice()

get_websites_offline_status_to_send_notice() : array

Get websites offline status.

Returns

array —

Child site monitoring status.

get_websites_to_notice_health_threshold()

get_websites_to_notice_health_threshold(integer  $globalThreshold, integer  $count = 10) 

Method get_websites_to_notice_health_threshold()

Get websites to notice site health.

Parameters

integer $globalThreshold

Global site health threshold.

integer $count

Limit count.

get_websites_offline_check_status()

get_websites_offline_check_status() : array

Get websites offline status.

Returns

array —

Sites with offline status.

__construct()

__construct() 

MainWP_DB_Base constructor.

Run each time the class is called.

get_my_sql_version()

get_my_sql_version() : mixed

Method get_my_sql_version()

Get MySQL Version.

Returns

mixed —

MySQL vresion.

get_row_result()

get_row_result(mixed  $sql) : mixed

Method get_row_result()

Get row result.

Parameters

mixed $sql

SQL Query.

Returns

mixed —

null|Row

get_results_result()

get_results_result(mixed  $sql) : mixed

Method get_results_result()

Get Results of result.

Parameters

mixed $sql

SQL query.

Returns

mixed —

null|get_results()

query()

query(mixed  $sql) : mixed

Method query()

SQL Query.

Parameters

mixed $sql

SQL Query.

Returns

mixed —

false|$result.

use_mysqli()

use_mysqli() : boolean|self

Method use_mysqli()

Use MySQLi, Support old & new versions of WordPress (3.9+).

Returns

boolean|self —

false|$instance Instance of \mysqli

ping()

ping(mixed  $link) : mixed

Method ping()

Ping MySQLi.

Parameters

mixed $link

Query link.

Returns

mixed —

\mysqli_ping

m_query()

m_query(mixed  $query, mixed  $link) : mixed

Method m_query()

MySQLi m_query.

Parameters

mixed $query

Query params.

mixed $link

Query link.

Returns

mixed —

\mysqli_query

fetch_object()

fetch_object(mixed  $result) : boolean|mixed

Method fetch_object()

Fetch object.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_fetch_object

free_result()

free_result(mixed  $result) : boolean|mixed

Method free_result()

MySQLi free result.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_free_result

data_seek()

data_seek(mixed  $result, mixed  $offset) : boolean|mixed

Method data_seek()

MySQLi data seek.

Parameters

mixed $result

Query result.

mixed $offset

Query offset.

Returns

boolean|mixed —

false|\mysqli_data_seek

fetch_array()

fetch_array(mixed  $result, null  $result_type = null) : boolean|mixed

Method fetch_array()

MySQLi fetch array.

Parameters

mixed $result

Query result.

null $result_type

Query result type.

Returns

boolean|mixed —

false|\mysqli_fetch_array.

num_rows()

num_rows(mixed  $result) : boolean|mixed

Method num_rows()

MySQLi number of rows.

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_num_rows.

is_result()

is_result(mixed  $result) : boolean|mixed

Method is_result()

Return instance of \mysqli_result

Parameters

mixed $result

Query result.

Returns

boolean|mixed —

false|\mysqli_result

get_last_sync_status()

get_last_sync_status(string|null  $userId = null) : string

Method get_last_sync_status()

Get last sync status.

Parameters

string|null $userId

User ID.

Returns

string —

$return all_synced|not_synced|last_sync

get_group_by_name()

get_group_by_name(mixed  $name, null  $userid = null) : object|null

Method get_group_by_name()

Get group by name.

Parameters

mixed $name

Group name.

null $userid

user ID.

Returns

object|null —

Database query result for chosen group name or null on failure

get_group_by_id()

get_group_by_id(mixed  $id) : object|null

Method get_group_by_id()

Get group by ID.

Parameters

mixed $id

Group ID.

Returns

object|null —

Database query result for chosen Group ID or null on failure.

get_groups_for_manage_sites()

get_groups_for_manage_sites() : object|null

Method get_groups_for_manage_sites()

Get groups for mananged sites.

Returns

object|null —

Database query result for Managed Sites Groups or null on failure.

get_groups_for_current_user()

get_groups_for_current_user() : object|null

Method get_groups_for_current_user()

Get groups for current user.

Returns

object|null —

Database query result for Current User Groups or null on failure.

get_groups_by_website_id()

get_groups_by_website_id(mixed  $websiteid) : object|null

Method get_groups_by_website_id()

Get groups by website ID.

Parameters

mixed $websiteid

Child Site ID.

Returns

object|null —

Database query result for groups by website ID or null on failure.

get_groups_and_count()

get_groups_and_count(null  $userid = null, boolean  $for_manager = false) : object|null

Medthod get_groups_and_count()

Get groups and count.

Parameters

null $userid

Current user ID.

boolean $for_manager

Default: false.

Returns

object|null —

Database query result for groups and count or null on failure.

get_not_empty_groups()

get_not_empty_groups(null  $userid = null, boolean  $enableOfflineSites = true) : object|null

Method get_not_empty_groups()

Get non-empty groups.

Parameters

null $userid

Current user ID.

boolean $enableOfflineSites

Include offline sites? Default: true.

Returns

object|null —

Database query result for non-empty groups or null on failure.

get_sql_log()

get_sql_log() : string

Method get_sql_log()

Get sql log.

Returns

string —

sql query.

insert_action_log()

insert_action_log(array  $data) : void

Method insert_action_log()

Insert action log.

Parameters

array $data

log data.

delete_action_log()

delete_action_log(integer  $days = false) : void

Method delete_action_log()

Delete action log.

Parameters

integer $days

number days.

insert_or_update_request_log()

insert_or_update_request_log(mixed  $wpid, mixed  $ip, mixed  $start, mixed  $stop) : void

Method insert_or_update_request_log()

Insert or update request log.

Parameters

mixed $wpid

WordPress ID.

mixed $ip

IP address.

mixed $start

Start time.

mixed $stop

Stop Time.

close_open_requests()

close_open_requests() : void

Method close_open_requests()

Close open request.

get_nrof_open_requests()

get_nrof_open_requests(null  $ip = null) : \MainWP\Dashboard\(string|\MainWP\Dashboard\null)

Method get_nrof_open_requests()

Get number of requests.

Parameters

null $ip

IP Address.

Returns

\MainWP\Dashboard\(string|\MainWP\Dashboard\null) —

Database query result for number of requests or null on failure.

get_last_request_timestamp()

get_last_request_timestamp(null  $ip = null) : \MainWP\Dashboard\(int|\MainWP\Dashboard\null)

Method get_last_request_timestamp()

Get timestamp of last request sent.

Parameters

null $ip

Child Site IP address, default: null.

Returns

\MainWP\Dashboard\(int|\MainWP\Dashboard\null) —

Database query result for timestamp of last request sent or null on failure.

update_group_site()

update_group_site(mixed  $groupId, mixed  $websiteId) : void

Method update_group_site()

Parameters

mixed $groupId

Group ID.

mixed $websiteId

Child Site ID.

clear_group()

clear_group(mixed  $groupId) 

Method clear_group()

Clear sites in group.

Parameters

mixed $groupId

ID of group.

add_group()

add_group(mixed  $userid, mixed  $name) : boolean

Method add_group()

Add group.

Parameters

mixed $userid

Current User ID.

mixed $name

Name of group to add.

Returns

boolean —

true

remove_group()

remove_group(mixed  $groupid) : integer|boolean

Method remove_group()

Remove group.

Parameters

mixed $groupid

Group ID.

Returns

integer|boolean —

Group that was deleted or false on failure.

update_note()

update_note(mixed  $websiteid, mixed  $note) : void

Method update_note()

Update Note.

Parameters

mixed $websiteid

Child Site ID.

mixed $note

Note data.

update_group()

update_group(mixed  $groupid, mixed  $groupname) : boolean

Method update_group()

Update group.

Parameters

mixed $groupid

Group ID.

mixed $groupname

Group Name.

Returns

boolean —

true|false.

get_user_notification_email()

get_user_notification_email(mixed  $userid) : string

Method get_user_notification_email()

Get user notification email.

Parameters

mixed $userid

Current user ID.

Returns

string —

$user_email User email address.

get_user_extension()

get_user_extension() : boolean|integer

Method get_user_extension()

Get user extension.

Returns

boolean|integer —

false|get_user_extension_by_user_id()

get_user_extension_by_user_id()

get_user_extension_by_user_id(mixed  $userid) : object

Method get_user_extension_by_user_id()

Get user extension by user id.

Parameters

mixed $userid

Current user ID.

Returns

object —

$row User extension.

update_user_extension()

update_user_extension(mixed  $userExtension) : object

Method update_user_extension()

Update user extension.

Parameters

mixed $userExtension

User extention to update.

Returns

object —

$row User extension.

rest_api_update_website()

rest_api_update_website(integer  $websiteid, array  $data) : boolean

Method rest_api_update_website().

Rest API update website.

Parameters

integer $websiteid

website ID.

array $data

Update fields array. 'http_user'. 'http_pass'. 'name'. 'admin'. 'sslversion'. 'uniqueid'. 'verify'. 'protocol'. 'disablechecking'. 'checkinterval'. 'disablehealthchecking'. 'healththreshold'. 'groupids'. 'automatic_update'. 'backup_before_upgrade'. 'force_use_ipv4'. 'ignore_core_updates'. 'ignore_plugin_updates'. 'ignore_theme_updates'. 'monitoring_emails'.

Returns

boolean —

true|false.

test_connection()

test_connection() 

Method test_connection()

Test db connection.

table_name()

table_name(mixed  $suffix, null  $tablePrefix = null) : string

Method table_name()

Create entire table name.

Parameters

mixed $suffix

Table suffix.

null $tablePrefix

Table prefix.

Returns

string —

Table name.

escape()

escape(mixed  $data) : mixed

Method escape()

Escape SQL Data.

Parameters

mixed $data

Data to escape.

Returns

mixed —

Escapped SQL Data.

create_user_extension()

create_user_extension(mixed  $userId) : void

Method create_user_extension()

Create user extension

Parameters

mixed $userId

Current user ID.