mainwp.dev/source-code/child/classes/MainWP-Child-MainWP-Utility.html
2025-03-17 19:02:54 -04:00

3650 lines
198 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MainWP Child Documentation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href="../">
<link rel="icon" href="images/favicon.ico"/>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/base.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/template.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
<script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
<script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
<script src="js/template.js"></script>
<script src="js/search.js"></script>
<script defer src="js/searchIndex.js"></script>
</head>
<body id="top">
<header class="phpdocumentor-header phpdocumentor-section">
<h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">MainWP Child Documentation</a></h1>
<input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
<label class="phpdocumentor-header__menu-icon" for="menu-button">
<i class="fas fa-bars"></i>
</label>
<section data-search-form class="phpdocumentor-search">
<label>
<span class="visually-hidden">Search for</span>
<svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
<line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
</svg>
<input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
</label>
</section>
<nav class="phpdocumentor-topnav">
<ul class="phpdocumentor-topnav__menu">
</ul>
</nav>
</header>
<main class="phpdocumentor">
<div class="phpdocumentor-section">
<input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
<label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
Menu
</label>
<aside class="phpdocumentor-column -three phpdocumentor-sidebar">
<section class="phpdocumentor-sidebar__category -namespaces">
<h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="namespaces/mainwp.html" class="">MainWP</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="namespaces/mainwp-child.html" class="">Child</a>
</li>
</ul>
</section>
<section class="phpdocumentor-sidebar__category -packages">
<h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/MainWP.html" class="">MainWP</a>
</h4>
<ul class="phpdocumentor-list">
<li>
<a href="packages/MainWP-Child.html" class="">Child</a>
</li>
<li>
<a href="packages/MainWP-ChildCreditsPlugin.html" class="">ChildCreditsPlugin</a>
</li>
<li>
<a href="packages/MainWP-Dashboard.html" class="">Dashboard</a>
</li>
</ul>
<h4 class="phpdocumentor-sidebar__root-namespace">
<a href="packages/MainWPChild.html" class="">MainWPChild</a>
</h4>
</section>
<section class="phpdocumentor-sidebar__category -reports">
<h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="graphs/classes.html">Class Diagram</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
<h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
</section>
<section class="phpdocumentor-sidebar__category -indices">
<h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
<h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
</section>
</aside>
<div class="phpdocumentor-column -nine phpdocumentor-content">
<section>
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="namespaces/mainwp.html">MainWP</a></li>
<li class="phpdocumentor-breadcrumb"><a href="namespaces/mainwp-child.html">Child</a></li>
</ul>
<article class="phpdocumentor-element -class">
<h2 class="phpdocumentor-content__title">
MainWP_Utility
<div class="phpdocumentor-element__package">
in package
<ul class="phpdocumentor-breadcrumbs">
<li class="phpdocumentor-breadcrumb"><a href="packages/MainWPChild.html">MainWPChild</a></li>
</ul>
</div>
</h2>
<div class="phpdocumentor-label-line">
</div>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">17</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.17" class="phpdocumentor-element-found-in__source" data-line="17" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Class MainWP_Utility</p>
<section class="phpdocumentor-description"><p>MainWP Utility</p>
</section>
<h3 id="toc">
Table of Contents
<a href="classes/MainWP-Child-MainWP-Utility.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<h4 id="toc-properties">
Properties
<a href="classes/MainWP-Child-MainWP-Utility.html#toc-properties" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#property_instance">$instance</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Public static variable to hold the single instance of the class.</dd>
<dt class="phpdocumentor-table-of-contents__entry -property -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#property_mail_from">$mail_from</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Public variable to hold the mail from.</dd>
</dl>
<h4 id="toc-methods">
Methods
<a href="classes/MainWP-Child-MainWP-Utility.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<dl class="phpdocumentor-table-of-contents">
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_check_image_file_name">check_image_file_name()</a>
<span>
&nbsp;: true|false </span>
</dt>
<dd>Method check_image_file_name()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_close_connection">close_connection()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method close_connection()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_action">create_nonce_action()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method create_nonce_action()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_without_session">create_nonce_without_session()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method create_nonce_without_session()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_cron_active">cron_active()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Method cron_active()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_encrypt_decrypt">encrypt_decrypt()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Encrypt or Decrypt.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_esc_content">esc_content()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method esc_content()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_execute_snippet">execute_snippet()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Method execute_snippet()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_fetch_url">fetch_url()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method fetch_url()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_fix_for_custom_themes">fix_for_custom_themes()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method fix_for_custom_themes()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_get_class_name">get_class_name()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method get_class_name()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_get_lasttime_backup">get_lasttime_backup()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method get_lasttime_backup()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_get_maybe_existed_attached_id">get_maybe_existed_attached_id()</a>
<span>
&nbsp;: int </span>
</dt>
<dd>Method get_maybe_existed_attached_id()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_get_roles">get_roles()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Get an array of user roles</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_handle_fatal_error">handle_fatal_error()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method handle_fatal_error()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_handle_shutdown">handle_shutdown()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method handle_shutdown()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_hook_create_nonce_action">hook_create_nonce_action()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method hook_create_nonce_action()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_hook_get_ping_nonce">hook_get_ping_nonce()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method hook_get_ping_nonce()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_hook_verify_authed_action_nonce">hook_verify_authed_action_nonce()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method hook_verify_authed_action_nonce()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_hook_wp_mail_from">hook_wp_mail_from()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method hook_wp_mail_from()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_instance">instance()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method instance()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_m_fetch_url">m_fetch_url()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method fetch_url()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_maybe_base64_decode">maybe_base64_decode()</a>
<span>
&nbsp;: string </span>
</dt>
<dd>Method maybe_base64_decode()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_readfile_chunked">readfile_chunked()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method readfile_chunked()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_remove_filters_by_hook_name">remove_filters_by_hook_name()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Method remove_filters_by_hook_name()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_right_array_merge">right_array_merge()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Merge values from right array to left array.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_run_saved_snippets">run_saved_snippets()</a>
<span>
&nbsp;: void </span>
</dt>
<dd>Method run_saved_snippets()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_send_maintenance_alert">send_maintenance_alert()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method send_maintenance_alert()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_send_support_mail">send_support_mail()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Send support email.</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_send_wp_mail">send_wp_mail()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Method send_wp_mail()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_update_lasttime_backup">update_lasttime_backup()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Method update_lasttime_backup()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file">upload_file()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method upload_file()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file_backup">upload_file_backup()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method upload_file()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_upload_image">upload_image()</a>
<span>
&nbsp;: null </span>
</dt>
<dd>Method upload_image()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_validate_mainwp_dir">validate_mainwp_dir()</a>
<span>
&nbsp;: bool </span>
</dt>
<dd>Method validate_mainwp_dir()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_verify_action_nonce">verify_action_nonce()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method verify_action_nonce()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_verify_authed_nonce">verify_authed_nonce()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method verify_authed_nonce()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -public">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_verify_nonce_without_session">verify_nonce_without_session()</a>
<span>
&nbsp;: mixed </span>
</dt>
<dd>Method verify_nonce_without_session()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -private">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_check_media_file_existed">check_media_file_existed()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Method check_media_file_existed()</dd>
<dt class="phpdocumentor-table-of-contents__entry -method -private">
<a class="" href="classes/MainWP-Child-MainWP-Utility.html#method_insert_attachment_media">insert_attachment_media()</a>
<span>
&nbsp;: array&lt;string|int, mixed&gt; </span>
</dt>
<dd>Method insert_attachment_media()</dd>
</dl>
<section class="phpdocumentor-properties">
<h3 class="phpdocumentor-elements__header" id="properties">
Properties
<a href="classes/MainWP-Child-MainWP-Utility.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="
phpdocumentor-element
-property
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="property_instance">
$instance
<a href="classes/MainWP-Child-MainWP-Utility.html#property_instance" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">24</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.24" class="phpdocumentor-element-found-in__source" data-line="24" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Public static variable to hold the single instance of the class.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">$instance</span>
= <span class="phpdocumentor-signature__default-value">null</span></code>
<section class="phpdocumentor-description"><p>Default null</p>
</section>
</article>
<article
class="
phpdocumentor-element
-property
-public
"
>
<h4 class="phpdocumentor-element__name" id="property_mail_from">
$mail_from
<a href="classes/MainWP-Child-MainWP-Utility.html#property_mail_from" class="headerlink"><i class="fas fa-link"></i></a>
<span class="phpdocumentor-element__modifiers">
</span>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">32</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.32" class="phpdocumentor-element-found-in__source" data-line="32" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Public variable to hold the mail from.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__type">mixed</span>
<span class="phpdocumentor-signature__name">$mail_from</span>
= <span class="phpdocumentor-signature__default-value">&#039;&#039;</span></code>
<section class="phpdocumentor-description"><p>Default empty.</p>
</section>
</article>
</section>
<section class="phpdocumentor-methods">
<h3 class="phpdocumentor-elements__header" id="methods">
Methods
<a href="classes/MainWP-Child-MainWP-Utility.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
</h3>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_check_image_file_name">
check_image_file_name()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_check_image_file_name" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">381</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.381" class="phpdocumentor-element-found-in__source" data-line="381" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method check_image_file_name()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">check_image_file_name</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$filename</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">true|false</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Check if the file image.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$filename</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains image (file) name.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">true|false</span>
&mdash;
<section class="phpdocumentor-description"><p>valid name or not.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_close_connection">
close_connection()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_close_connection" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">654</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.654" class="phpdocumentor-element-found-in__source" data-line="654" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method close_connection()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">close_connection</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$val</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">null</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Close connection.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$val</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array containing connection information.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_close_connection#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Updraft-Plus-Backups.html#method_vault_disconnect"><abbr title="\MainWP\Child\MainWP_Child_Updraft_Plus_Backups::vault_disconnect()">MainWP_Child_Updraft_Plus_Backups::vault_disconnect()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_create_nonce_action">
create_nonce_action()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_action" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">911</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.911" class="phpdocumentor-element-found-in__source" data-line="911" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method create_nonce_action()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">create_nonce_action</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$action</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">-1</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Create nonce without session and user id.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$action</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">-1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Action to perform.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>Custom nonce.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_create_nonce_without_session">
create_nonce_without_session()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_without_session" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">821</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.821" class="phpdocumentor-element-found-in__source" data-line="821" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method create_nonce_without_session()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">create_nonce_without_session</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$action</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">-1</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Create nonce without session.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$action</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">-1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Action to perform.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_without_session#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-Up-Buddy.html#method_get_backup_list"><abbr title="\MainWP\Child\MainWP_Child_Back_Up_Buddy::get_backup_list()">MainWP_Child_Back_Up_Buddy::get_backup_list()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Wordfence.html#method_check_falcon_htaccess"><abbr title="\MainWP\Child\MainWP_Child_Wordfence::check_falcon_htaccess()">MainWP_Child_Wordfence::check_falcon_htaccess()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>Custom nonce.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_cron_active">
cron_active()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_cron_active" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">183</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.183" class="phpdocumentor-element-found-in__source" data-line="183" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method cron_active()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">cron_active</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Start job if in cron and run query args are set.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_cron_active#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child.html#property_version"><abbr title="\MainWP\Child\MainWP_Child::$version">MainWP_Child::$version</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_encrypt_decrypt">
encrypt_decrypt()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_encrypt_decrypt" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1316</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1316" class="phpdocumentor-element-found-in__source" data-line="1316" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Encrypt or Decrypt.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">encrypt_decrypt</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$str</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$encrypt</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">true</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$str</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>String input.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$encrypt</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">true</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>True to encrypt, FAlSE to decrypt.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>Encrypted string.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_esc_content">
esc_content()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_esc_content" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1171</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1171" class="phpdocumentor-element-found-in__source" data-line="1171" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method esc_content()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">esc_content</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$content</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$type</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;note&#039;</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$more_allowed</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">array()</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Escape content,
allowed content (a,href,title,br,em,strong,p,hr,ul,ol,li,h1,h2 ... ).</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$content</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Content to escape.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$type</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;note&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Type of content. Default = note.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$more_allowed</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">array()</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>input allowed tags - options.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>Filtered content containing only the allowed HTML.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_execute_snippet">
execute_snippet()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_execute_snippet" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">94</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.94" class="phpdocumentor-element-found-in__source" data-line="94" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method execute_snippet()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">execute_snippet</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$code</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Execute MainWP Code Snippets Extension custom code snippets.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$code</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Custom code snippet code (content).</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_execute_snippet#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Misc.html#method_code_snippet"><abbr title="\MainWP\Child\MainWP_Child_Misc::code_snippet()">MainWP_Child_Misc::code_snippet()</abbr></a></span>
<section class="phpdocumentor-description"><p>Execute code snippet.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Misc.html#method_code_snippet"><abbr title="\MainWP\Child\MainWP_Child_Misc::code_snippet()">MainWP_Child_Misc::code_snippet()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>Array contaning result information.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_fetch_url">
fetch_url()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_fetch_url" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">534</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.534" class="phpdocumentor-element-found-in__source" data-line="534" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method fetch_url()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fetch_url</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$url</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$postdata</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Fire off the m_fetch_url() to execute communication with the MainWP Dashboard.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the URL.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$postdata</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array containg the post request information.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_fetch_url#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link">string</span>
<section class="phpdocumentor-description"><p>$e Error message.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Clone.html#method_clone_backup_create"><abbr title="\MainWP\Child\MainWP_Clone::clone_backup_create()">MainWP_Clone::clone_backup_create()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Clone.html#method_clone_backup_create_poll"><abbr title="\MainWP\Child\MainWP_Clone::clone_backup_create_poll()">MainWP_Clone::clone_backup_create_poll()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Clone.html#method_clone_backup_download"><abbr title="\MainWP\Child\MainWP_Clone::clone_backup_download()">MainWP_Clone::clone_backup_download()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_fix_for_custom_themes">
fix_for_custom_themes()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_fix_for_custom_themes" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">116</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.116" class="phpdocumentor-element-found-in__source" data-line="116" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method fix_for_custom_themes()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">fix_for_custom_themes</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Custom fix for the Elegant Themes products compatibility.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_fix_for_custom_themes#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Callable.html#method_init_call_functions"><abbr title="\MainWP\Child\MainWP_Child_Callable::init_call_functions()">MainWP_Child_Callable::init_call_functions()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child.html#method_parse_init"><abbr title="\MainWP\Child\MainWP_Child::parse_init()">MainWP_Child::parse_init()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_get_class_name">
get_class_name()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_class_name" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">41</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.41" class="phpdocumentor-element-found-in__source" data-line="41" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method get_class_name()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">get_class_name</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Get class name.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_class_name#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child.html#method___construct"><abbr title="\MainWP\Child\MainWP_Child::__construct()">MainWP_Child::__construct()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p><strong>CLASS</strong> Class name.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_get_lasttime_backup">
get_lasttime_backup()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_lasttime_backup" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1035</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1035" class="phpdocumentor-element-found-in__source" data-line="1035" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method get_lasttime_backup()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">get_lasttime_backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$by</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Get the last backup timestap.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$by</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Selected backup system.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_lasttime_backup#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-WP-Up.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Back_WP_Up::do_reports_log()">MainWP_Child_Back_WP_Up::do_reports_log()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-WP-Up.html#method_sync_others_data"><abbr title="\MainWP\Child\MainWP_Child_Back_WP_Up::sync_others_data()">MainWP_Child_Back_WP_Up::sync_others_data()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Stats.html#method_get_site_stats"><abbr title="\MainWP\Child\MainWP_Child_Stats::get_site_stats()">MainWP_Child_Stats::get_site_stats()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Timecapsule.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Timecapsule::do_reports_log()">MainWP_Child_Timecapsule::do_reports_log()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>If activated any of the supported backup systems, return the last backup timestamp.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_get_maybe_existed_attached_id">
get_maybe_existed_attached_id()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_maybe_existed_attached_id" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">509</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.509" class="phpdocumentor-element-found-in__source" data-line="509" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method get_maybe_existed_attached_id()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">get_maybe_existed_attached_id</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$filename</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$full_guid</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">true</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">int</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>If the media file exists, get the attachment ID.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$filename</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the media file name.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$full_guid</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">true</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Full global unique identifier.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">int</span>
&mdash;
<section class="phpdocumentor-description"><p>Attachment ID.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_get_roles">
get_roles()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_get_roles" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1127</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1127" class="phpdocumentor-element-found-in__source" data-line="1127" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Get an array of user roles</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">get_roles</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<div class="phpdocumentor-label-line">
</div>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_handle_fatal_error">
handle_fatal_error()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_fatal_error" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">166</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.166" class="phpdocumentor-element-found-in__source" data-line="166" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method handle_fatal_error()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">handle_fatal_error</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Handle fatal error for requests from the MainWP Dashboard.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_fatal_error#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_shutdown"><abbr title="\MainWP\Child\MainWP_Utility::handle_shutdown()">MainWP_Utility::handle_shutdown()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Callable.html#method_init_call_functions"><abbr title="\MainWP\Child\MainWP_Child_Callable::init_call_functions()">MainWP_Child_Callable::init_call_functions()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_handle_shutdown">
handle_shutdown()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_shutdown" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">152</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.152" class="phpdocumentor-element-found-in__source" data-line="152" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method handle_shutdown()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">handle_shutdown</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Handle fatal and compile errors.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_hook_create_nonce_action">
hook_create_nonce_action()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_create_nonce_action" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">893</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.893" class="phpdocumentor-element-found-in__source" data-line="893" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method hook_create_nonce_action()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">hook_create_nonce_action</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$false_value</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$action</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">-1</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Create nonce without session and user id.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$false_value</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Boolean value, it should always be FALSE.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$action</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">-1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Action to perform.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>Custom nonce.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_hook_get_ping_nonce">
hook_get_ping_nonce()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_get_ping_nonce" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">879</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.879" class="phpdocumentor-element-found-in__source" data-line="879" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method hook_get_ping_nonce()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">hook_get_ping_nonce</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Get mainwp ping nonce.</p>
</section>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>nonce.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_hook_verify_authed_action_nonce">
hook_verify_authed_action_nonce()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_verify_authed_action_nonce" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">927</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.927" class="phpdocumentor-element-found-in__source" data-line="927" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method hook_verify_authed_action_nonce()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">hook_verify_authed_action_nonce</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$false_value</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$act_nonce</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Verify nonce without session and user id.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$false_value</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Boolean value, it should always be FALSE.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$act_nonce</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Nonce action to verify.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>If verified return 1 or 2, if not return false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_hook_wp_mail_from">
hook_wp_mail_from()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_wp_mail_from" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">805</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.805" class="phpdocumentor-element-found-in__source" data-line="805" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method hook_wp_mail_from()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">hook_wp_mail_from</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$from_name</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Hook hook_wp_mail.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$from_name</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>From email.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>$from_name From email.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_instance">
instance()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_instance" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">52</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.52" class="phpdocumentor-element-found-in__source" data-line="52" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method instance()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">instance</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Create a public static instance.</p>
</section>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>Class instance.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_m_fetch_url">
m_fetch_url()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_m_fetch_url" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">563</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.563" class="phpdocumentor-element-found-in__source" data-line="563" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method fetch_url()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">m_fetch_url</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$url</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$postdata</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Execute communication with the MainWP Dashboard.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the URL.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$postdata</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array containg the post request information.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_m_fetch_url#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Exception.html"><abbr title="\MainWP\Child\MainWP_Exception">MainWP_Exception</abbr></a></span>
<section class="phpdocumentor-description"><p>Error message.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child.html#property_version"><abbr title="\MainWP\Child\MainWP_Child::$version">MainWP_Child::$version</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_maybe_base64_decode">
maybe_base64_decode()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_maybe_base64_decode" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1149</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1149" class="phpdocumentor-element-found-in__source" data-line="1149" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method maybe_base64_decode()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">maybe_base64_decode</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$str</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">string</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Maybe base64 decode string.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$str</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>input string.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">string</span>
&mdash;
<section class="phpdocumentor-description"><p>$decoded Maybe base64 decode string.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_readfile_chunked">
readfile_chunked()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_readfile_chunked" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">270</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.270" class="phpdocumentor-element-found-in__source" data-line="270" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method readfile_chunked()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">readfile_chunked</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$filename</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Read chunked backup file.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$filename</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Backup file name.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Offset value.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>Close file.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_remove_filters_by_hook_name">
remove_filters_by_hook_name()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_remove_filters_by_hook_name" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1094</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1094" class="phpdocumentor-element-found-in__source" data-line="1094" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method remove_filters_by_hook_name()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">remove_filters_by_hook_name</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$hook_name</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$priority</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Remove filters with method name.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$hook_name</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the hook name.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$priority</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">0</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the priority value.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Return false if filtr is not set.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_right_array_merge">
right_array_merge()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_right_array_merge" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1346</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1346" class="phpdocumentor-element-found-in__source" data-line="1346" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Merge values from right array to left array.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">right_array_merge</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$left_array</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$right_array</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<div class="phpdocumentor-label-line">
</div>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$left_array</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>left array.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$right_array</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>right array.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>$result result array.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_run_saved_snippets">
run_saved_snippets()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_run_saved_snippets" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">66</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.66" class="phpdocumentor-element-found-in__source" data-line="66" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method run_saved_snippets()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">run_saved_snippets</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Fire off MainWP Code Snippets Extension code snipets execution.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_run_saved_snippets#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child.html#method___construct"><abbr title="\MainWP\Child\MainWP_Child::__construct()">MainWP_Child::__construct()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_send_maintenance_alert">
send_maintenance_alert()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_send_maintenance_alert" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">677</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.677" class="phpdocumentor-element-found-in__source" data-line="677" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method send_maintenance_alert()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">send_maintenance_alert</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>MainWP Maintenance Extension feature to send email notification for 404 (Page not found) errors.</p>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_send_support_mail">
send_support_mail()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_send_support_mail" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">747</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.747" class="phpdocumentor-element-found-in__source" data-line="747" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Send support email.</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">send_support_mail</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
</div>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_send_support_mail#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Branding.html#method_get_branding_options"><abbr title="\MainWP\Child\MainWP_Child_Branding::get_branding_options()">MainWP_Child_Branding::get_branding_options()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Return TRUE on success FALSE on failure.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_send_wp_mail">
send_wp_mail()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_send_wp_mail" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">137</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.137" class="phpdocumentor-element-found-in__source" data-line="137" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method send_wp_mail()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">send_wp_mail</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$to</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$subject</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$message</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$headers</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Sends notification email.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$to</span>
: <span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array or comma-separated list of email addresses to send message.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$subject</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Email subject.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$message</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Message contents.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$headers</span>
: <span class="phpdocumentor-signature__argument__return-type">string|array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Optional. Additional headers.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>Whether the email contents were sent successfully.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_update_lasttime_backup">
update_lasttime_backup()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_update_lasttime_backup" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">1012</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.1012" class="phpdocumentor-element-found-in__source" data-line="1012" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method update_lasttime_backup()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">update_lasttime_backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$by</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$time</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Update the last backup timestap.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$by</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Selected backup system.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$time</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Time of the backup exacution.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_update_lasttime_backup#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-Up-Buddy.html#method_get_sync_data"><abbr title="\MainWP\Child\MainWP_Child_Back_Up_Buddy::get_sync_data()">MainWP_Child_Back_Up_Buddy::get_sync_data()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-Up-WordPress.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Back_Up_WordPress::do_reports_log()">MainWP_Child_Back_Up_WordPress::do_reports_log()</abbr></a></span>
<section class="phpdocumentor-description"><p>Get the last backup timestamp</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-Up-WordPress.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Back_Up_WordPress::do_reports_log()">MainWP_Child_Back_Up_WordPress::do_reports_log()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-WP-Up.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Back_WP_Up::do_reports_log()">MainWP_Child_Back_WP_Up::do_reports_log()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Timecapsule.html#method_do_reports_log"><abbr title="\MainWP\Child\MainWP_Child_Timecapsule::do_reports_log()">MainWP_Child_Timecapsule::do_reports_log()</abbr></a></span>
<section class="phpdocumentor-description"><p>Get the last backup timestamp.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Updraft-Plus-Backups.html#method_hook_updraft_plus_save_last_backup"><abbr title="\MainWP\Child\MainWP_Child_Updraft_Plus_Backups::hook_updraft_plus_save_last_backup()">MainWP_Child_Updraft_Plus_Backups::hook_updraft_plus_save_last_backup()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>true|false If updated, return true, if the last backup time not updated, return false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_upload_file">
upload_file()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">230</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.230" class="phpdocumentor-element-found-in__source" data-line="230" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method upload_file()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">upload_file</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$file</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed|false&nbsp;</span><span class="phpdocumentor-signature__argument__name">$dir</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Upload bacup fils to execute clone or restore proces.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$file</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Backup file.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$dir</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed|false</span>
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>dir value.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">0</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Offset value.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
"
>
<h4 class="phpdocumentor-element__name" id="method_upload_file_backup">
upload_file_backup()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file_backup" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">209</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.209" class="phpdocumentor-element-found-in__source" data-line="209" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method upload_file()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__name">upload_file_backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$file</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$offset</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Upload bacup fils to execute clone or restore proces.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$file</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Backup file.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$offset</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">0</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Offset value.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file_backup#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</abbr></a></span>
</dd>
</dl>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_upload_image">
upload_image()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_image" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">307</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.307" class="phpdocumentor-element-found-in__source" data-line="307" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method upload_image()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">upload_image</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$img_url</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$img_data</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">array()</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool&nbsp;</span><span class="phpdocumentor-signature__argument__name">$check_file_existed</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$parent_id</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">null</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Upload images from the MainWP Dashboard while posting Posts and/or Pages.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$img_url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains image URL.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$img_data</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
= <span class="phpdocumentor-signature__argument__default-value">array()</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains image data.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$check_file_existed</span>
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
= <span class="phpdocumentor-signature__argument__default-value">false</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Does the file exist? True or false.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$parent_id</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
= <span class="phpdocumentor-signature__argument__default-value">0</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Attachment parent post ID.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_image#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">throws</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Exception.html"><abbr title="\MainWP\Child\MainWP_Exception">MainWP_Exception</abbr></a></span>
<section class="phpdocumentor-description"><p>Error message.</p>
</section>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_wp_filesystem"><abbr title="\MainWP\Child\MainWP_Helper::get_wp_filesystem()">MainWP_Helper::get_wp_filesystem()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_class_name"><abbr title="\MainWP\Child\MainWP_Helper::get_class_name()">MainWP_Helper::get_class_name()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Posts.html#method_update_found_images"><abbr title="\MainWP\Child\MainWP_Child_Posts::update_found_images()">MainWP_Child_Posts::update_found_images()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Posts.html#method_create_has_shortcode_gallery"><abbr title="\MainWP\Child\MainWP_Child_Posts::create_has_shortcode_gallery()">MainWP_Child_Posts::create_has_shortcode_gallery()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Posts.html#method_update_seo_meta"><abbr title="\MainWP\Child\MainWP_Child_Posts::update_seo_meta()">MainWP_Child_Posts::update_seo_meta()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Posts.html#method_create_featured_image"><abbr title="\MainWP\Child\MainWP_Child_Posts::create_featured_image()">MainWP_Child_Posts::create_featured_image()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Custom-Post-Type.html#method_search_images"><abbr title="\MainWP\Child\MainWP_Custom_Post_Type::search_images()">MainWP_Custom_Post_Type::search_images()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Custom-Post-Type.html#method_upload_postmeta_image"><abbr title="\MainWP\Child\MainWP_Custom_Post_Type::upload_postmeta_image()">MainWP_Custom_Post_Type::upload_postmeta_image()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">null</span>
&mdash;
<section class="phpdocumentor-description"><p>NULL</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_validate_mainwp_dir">
validate_mainwp_dir()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_validate_mainwp_dir" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">610</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.610" class="phpdocumentor-element-found-in__source" data-line="610" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method validate_mainwp_dir()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">validate_mainwp_dir</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Check if the /mainwp/ directory is writable.</p>
</section>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_validate_mainwp_dir#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_get_wp_filesystem"><abbr title="\MainWP\Child\MainWP_Helper::get_wp_filesystem()">MainWP_Helper::get_wp_filesystem()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">uses</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Helper.html#method_check_dir"><abbr title="\MainWP\Child\MainWP_Helper::check_dir()">MainWP_Helper::check_dir()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Stats.html#method_get_site_stats"><abbr title="\MainWP\Child\MainWP_Child_Stats::get_site_stats()">MainWP_Child_Stats::get_site_stats()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">bool</span>
&mdash;
<section class="phpdocumentor-description"><p>$done Is the /mainwp/ directory writable? True or false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_verify_action_nonce">
verify_action_nonce()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_action_nonce" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">941</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.941" class="phpdocumentor-element-found-in__source" data-line="941" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method verify_action_nonce()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">verify_action_nonce</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$act_nonce</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Verify nonce without session and user id.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$act_nonce</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
= <span class="phpdocumentor-signature__argument__default-value">&#039;&#039;</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Nonce action to verify.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>If verified return 1 or 2, if not return false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_verify_authed_nonce">
verify_authed_nonce()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_authed_nonce" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">975</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.975" class="phpdocumentor-element-found-in__source" data-line="975" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method verify_authed_nonce()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">verify_authed_nonce</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nonce</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$action</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">-1</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Verify nonce without session and user id.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$nonce</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Nonce to verify.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$action</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">-1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Action to perform.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>If verified return 1 or 2, if not return false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-public
-static "
>
<h4 class="phpdocumentor-element__name" id="method_verify_nonce_without_session">
verify_nonce_without_session()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_nonce_without_session" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">844</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.844" class="phpdocumentor-element-found-in__source" data-line="844" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method verify_nonce_without_session()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">public</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">verify_nonce_without_session</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$nonce</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">mixed&nbsp;</span><span class="phpdocumentor-signature__argument__name">$action</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">-1</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Verify nonce without session.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$nonce</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Nonce to verify.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$action</span>
: <span class="phpdocumentor-signature__argument__return-type">mixed</span>
= <span class="phpdocumentor-signature__argument__default-value">-1</span> </dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Action to perform.</p>
</section>
</dd>
</dl>
<h5 class="phpdocumentor-tag-list__heading" id="tags">
Tags
<a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_nonce_without_session#tags" class="headerlink"><i class="fas fa-link"></i></a>
</h5>
<dl class="phpdocumentor-tag-list">
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Back-Up-Buddy.html#method_download_archive"><abbr title="\MainWP\Child\MainWP_Child_Back_Up_Buddy::download_archive()">MainWP_Child_Back_Up_Buddy::download_archive()</abbr></a></span>
</dd>
<dt class="phpdocumentor-tag-list__entry">
<span class="phpdocumentor-tag__name">used-by</span>
</dt>
<dd class="phpdocumentor-tag-list__definition">
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Child-Wordfence.html#method_download_htaccess"><abbr title="\MainWP\Child\MainWP_Child_Wordfence::download_htaccess()">MainWP_Child_Wordfence::download_htaccess()</abbr></a></span>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">mixed</span>
&mdash;
<section class="phpdocumentor-description"><p>If verified return 1 or 2, if not return false.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-private
-static "
>
<h4 class="phpdocumentor-element__name" id="method_check_media_file_existed">
check_media_file_existed()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_check_media_file_existed" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">409</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.409" class="phpdocumentor-element-found-in__source" data-line="409" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method check_media_file_existed()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">private</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">check_media_file_existed</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$upload_dir</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$filename</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">resource&nbsp;</span><span class="phpdocumentor-signature__argument__name">$temporary_file</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__reference-operator">&amp;</span><span class="phpdocumentor-signature__argument__name">$local_img_path</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$local_img_url</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Check if the media file already exists.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$upload_dir</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains upload directory path.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$filename</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains image (file) name.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$temporary_file</span>
: <span class="phpdocumentor-signature__argument__return-type">resource</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Temporary file.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$local_img_path</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Local media file path.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$local_img_url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Local media file URL.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>Media file ID and URL.</p>
</section>
</section>
</article>
<article
class="phpdocumentor-element
-method
-private
-static "
>
<h4 class="phpdocumentor-element__name" id="method_insert_attachment_media">
insert_attachment_media()
<a href="classes/MainWP-Child-MainWP-Utility.html#method_insert_attachment_media" class="headerlink"><i class="fas fa-link"></i></a>
</h4>
<aside class="phpdocumentor-element-found-in">
<abbr class="phpdocumentor-element-found-in__file" title="class/class-mainwp-utility.php"><a href="files/class-class-mainwp-utility.html"><abbr title="class/class-mainwp-utility.php">class-mainwp-utility.php</abbr></a></abbr>
:
<span class="phpdocumentor-element-found-in__line">469</span>
<a href="classes/MainWP-Child-MainWP-Utility.html#source-view.469" class="phpdocumentor-element-found-in__source" data-line="469" data-modal="source-view" data-src="files/class/class-mainwp-utility.php.txt"></a>
</aside>
<p class="phpdocumentor-summary">Method insert_attachment_media()</p>
<code class="phpdocumentor-code phpdocumentor-signature ">
<span class="phpdocumentor-signature__visibility">private</span>
<span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">insert_attachment_media</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$img_data</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$img_url</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$parent_id</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$local_img_path</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string&nbsp;</span><span class="phpdocumentor-signature__argument__name">$local_img_url</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
<div class="phpdocumentor-label-line">
</div>
<section class="phpdocumentor-description"><p>Insterd attachment media.</p>
</section>
<h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
<dl class="phpdocumentor-argument-list">
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$img_data</span>
: <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, mixed&gt;</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Array containing image data.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$img_url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the media file URL.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$parent_id</span>
: <span class="phpdocumentor-signature__argument__return-type">int</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Attachment parent post ID.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$local_img_path</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the local media file path.</p>
</section>
</dd>
<dt class="phpdocumentor-argument-list__entry">
<span class="phpdocumentor-signature__argument__name">$local_img_url</span>
: <span class="phpdocumentor-signature__argument__return-type">string</span>
</dt>
<dd class="phpdocumentor-argument-list__definition">
<section class="phpdocumentor-description"><p>Contains the local media file URL.</p>
</section>
</dd>
</dl>
<section>
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
<span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
&mdash;
<section class="phpdocumentor-description"><p>Media file ID and URL.</p>
</section>
</section>
</article>
</section>
<div class="phpdocumentor-modal" id="source-view">
<div class="phpdocumentor-modal-bg" data-exit-button></div>
<div class="phpdocumentor-modal-container">
<div class="phpdocumentor-modal-content">
<pre style="max-height: 500px; overflow-y: scroll" data-src="files/class/class-mainwp-utility.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
</div>
<button data-exit-button class="phpdocumentor-modal__close">&times;</button>
</div>
</div>
<script type="text/javascript">
(function () {
function loadExternalCodeSnippet(el, url, line) {
Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
const language = 'php';
const code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
pre.setAttribute('data-line', line)
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) {
return;
}
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
return;
}
if (xhr.status === 404) {
code.textContent = '✖ Error: File could not be found';
return;
}
if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
return;
}
code.textContent = '✖ Error: An unknown error occurred';
};
xhr.send(null);
});
}
const modalButtons = document.querySelectorAll("[data-modal]");
const openedAsLocalFile = window.location.protocol === 'file:';
if (modalButtons.length > 0 && openedAsLocalFile) {
console.warn(
'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
'browsers block XHR requests when a page is opened this way'
);
}
modalButtons.forEach(function (trigger) {
if (openedAsLocalFile) {
trigger.setAttribute("hidden", "hidden");
}
trigger.addEventListener("click", function (event) {
event.preventDefault();
const modal = document.getElementById(trigger.dataset.modal);
if (!modal) {
console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
return;
}
modal.classList.add("phpdocumentor-modal__open");
loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
const exits = modal.querySelectorAll("[data-exit-button]");
exits.forEach(function (exit) {
exit.addEventListener("click", function (event) {
event.preventDefault();
modal.classList.remove("phpdocumentor-modal__open");
});
});
});
});
})();
</script>
</article>
</section>
<section class="phpdocumentor-on-this-page__sidebar">
<section class="phpdocumentor-on-this-page__content">
<strong class="phpdocumentor-on-this-page__title">On this page</strong>
<ul class="phpdocumentor-list -clean">
<li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
<li>
<ul class="phpdocumentor-list -clean">
<li><a href="classes/MainWP-Child-MainWP-Utility.html#toc-properties">Properties</a></li>
<li><a href="classes/MainWP-Child-MainWP-Utility.html#toc-methods">Methods</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Properties</li>
<li>
<ul class="phpdocumentor-list -clean">
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#property_instance">$instance</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#property_mail_from">$mail_from</a></li>
</ul>
</li>
<li class="phpdocumentor-on-this-page-section__title">Methods</li>
<li>
<ul class="phpdocumentor-list -clean">
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_check_image_file_name">check_image_file_name()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_close_connection">close_connection()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_action">create_nonce_action()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_create_nonce_without_session">create_nonce_without_session()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_cron_active">cron_active()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_encrypt_decrypt">encrypt_decrypt()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_esc_content">esc_content()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_execute_snippet">execute_snippet()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_fetch_url">fetch_url()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_fix_for_custom_themes">fix_for_custom_themes()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_get_class_name">get_class_name()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_get_lasttime_backup">get_lasttime_backup()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_get_maybe_existed_attached_id">get_maybe_existed_attached_id()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_get_roles">get_roles()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_fatal_error">handle_fatal_error()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_handle_shutdown">handle_shutdown()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_create_nonce_action">hook_create_nonce_action()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_get_ping_nonce">hook_get_ping_nonce()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_verify_authed_action_nonce">hook_verify_authed_action_nonce()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_hook_wp_mail_from">hook_wp_mail_from()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_instance">instance()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_m_fetch_url">m_fetch_url()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_maybe_base64_decode">maybe_base64_decode()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_readfile_chunked">readfile_chunked()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_remove_filters_by_hook_name">remove_filters_by_hook_name()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_right_array_merge">right_array_merge()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_run_saved_snippets">run_saved_snippets()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_send_maintenance_alert">send_maintenance_alert()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_send_support_mail">send_support_mail()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_send_wp_mail">send_wp_mail()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_update_lasttime_backup">update_lasttime_backup()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file">upload_file()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_file_backup">upload_file_backup()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_upload_image">upload_image()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_validate_mainwp_dir">validate_mainwp_dir()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_action_nonce">verify_action_nonce()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_authed_nonce">verify_authed_nonce()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_verify_nonce_without_session">verify_nonce_without_session()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_check_media_file_existed">check_media_file_existed()</a></li>
<li class=""><a href="classes/MainWP-Child-MainWP-Utility.html#method_insert_attachment_media">insert_attachment_media()</a></li>
</ul>
</li>
</ul>
</section>
</section>
</div>
<section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
<section class="phpdocumentor-search-results__dialog">
<header class="phpdocumentor-search-results__header">
<h2 class="phpdocumentor-search-results__title">Search results</h2>
<button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
</header>
<section class="phpdocumentor-search-results__body">
<ul class="phpdocumentor-search-results__entries"></ul>
</section>
</section>
</section>
</div>
<a href="classes/MainWP-Child-MainWP-Utility.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
</main>
<script>
cssVars({});
</script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
</body>
</html>