mirror of
https://gh.wpcy.net/https://github.com/mainwp/mainwp.dev.git
synced 2026-07-16 17:53:07 +08:00
3538 lines
194 KiB
HTML
3538 lines
194 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_Backup
|
|
|
|
|
|
<div class="phpdocumentor-element__package">
|
|
in package
|
|
<ul class="phpdocumentor-breadcrumbs">
|
|
<li class="phpdocumentor-breadcrumb"><a href="packages/MainWP.html">MainWP</a></li>
|
|
<li class="phpdocumentor-breadcrumb"><a href="packages/MainWP-Child.html">Child</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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">19</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.19" class="phpdocumentor-element-found-in__source" data-line="19" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Class MainWP_Backup</p>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Handle all Child Site backup functions.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="toc">
|
|
Table of Contents
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 id="toc-properties">
|
|
Properties
|
|
<a href="classes/MainWP-Child-MainWP-Backup.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 -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_archiver">$archiver</a>
|
|
<span>
|
|
: object </span>
|
|
</dt>
|
|
<dd>Backup process archiver.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_excludeZip">$excludeZip</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Whether to exclude zip archives.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_file_descriptors">$file_descriptors</a>
|
|
<span>
|
|
: int </span>
|
|
</dt>
|
|
<dd>Backup file descriptors.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_gcCnt">$gcCnt</a>
|
|
<span>
|
|
: int </span>
|
|
</dt>
|
|
<dd>Garbage collection count.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_instance">$instance</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Protected static variable to hold the single instance of the class.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_lastRun">$lastRun</a>
|
|
<span>
|
|
: string </span>
|
|
</dt>
|
|
<dd>Last time a backup has been run.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_loadFilesBeforeZip">$loadFilesBeforeZip</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Whether to load file before zip.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_testContent">$testContent</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Archive test content.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_timeout">$timeout</a>
|
|
<span>
|
|
: int </span>
|
|
</dt>
|
|
<dd>Hold the current timeout length.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_zip">$zip</a>
|
|
<span>
|
|
: resource </span>
|
|
</dt>
|
|
<dd>Container for zip file.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileCount">$zipArchiveFileCount</a>
|
|
<span>
|
|
: int </span>
|
|
</dt>
|
|
<dd>Backup files count.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileName">$zipArchiveFileName</a>
|
|
<span>
|
|
: string </span>
|
|
</dt>
|
|
<dd>Backup archive file name.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -property -protected">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveSizeCount">$zipArchiveSizeCount</a>
|
|
<span>
|
|
: float </span>
|
|
</dt>
|
|
<dd>Backup archive file size.</dd>
|
|
|
|
</dl>
|
|
|
|
<h4 id="toc-methods">
|
|
Methods
|
|
<a href="classes/MainWP-Child-MainWP-Backup.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-Backup.html#method_add_config">add_config()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Add config file to backup.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_pcl_zip">add_file_from_string_to_pcl_zip()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Add file from a string to pclzip file.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_zip">add_file_from_string_to_zip()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Add file from a string to zip file.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_to_zipp">add_file_to_zipp()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Add file to zip.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_backup">backup()</a>
|
|
<span>
|
|
: array<string|int, mixed> </span>
|
|
</dt>
|
|
<dd>Perform a backup.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_backup_checkpid">backup_checkpid()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Check if backup already exists or is in the process of backing up.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_backup_db">backup_db()</a>
|
|
<span>
|
|
: array<string|int, mixed>|bool </span>
|
|
</dt>
|
|
<dd>Backup site database.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_backup_full">backup_full()</a>
|
|
<span>
|
|
: array<string|int, mixed>|bool </span>
|
|
</dt>
|
|
<dd>Perform a full backup.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_backup_poll">backup_poll()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Check whether the file is an archive or not & create a json_encoded, serialized, base64_encoded string.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_console">check_zip_console()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Check if we could run zip on console</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_support">check_zip_support()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Check for default PHP zip support.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_copy_dir">copy_dir()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Copy directory.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_create_backup_db">create_backup_db()</a>
|
|
<span>
|
|
: array<string|int, mixed>|array<string|int, string> </span>
|
|
</dt>
|
|
<dd>Create DB backup.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_create_full_backup">create_full_backup()</a>
|
|
<span>
|
|
: array<string|int, mixed>|bool </span>
|
|
</dt>
|
|
<dd>Create full backup.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_console_full_backup">create_zip_console_full_backup()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Create full backup via console.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_full_backup">create_zip_full_backup()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Create full backup using default PHP zip library.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_pcl_full_backup2">create_zip_pcl_full_backup2()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Create PCL zip full backup 2.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_get">get()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Create a public static instance.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file">m_zip_file()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Create m_zip_file.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_console">m_zip_file_console()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Method m_zip_file_console().</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_pcl">m_zip_file_pcl()</a>
|
|
<span>
|
|
: array<string|int, mixed> </span>
|
|
</dt>
|
|
<dd>Use pclzip to add files to the zip archive.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_zip_add_dir">zip_add_dir()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Recursively add directory to default PHP zip library.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -public">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_zip_file">zip_file()</a>
|
|
<span>
|
|
: bool </span>
|
|
</dt>
|
|
<dd>Create the ZIP file.</dd>
|
|
|
|
<dt class="phpdocumentor-table-of-contents__entry -method -private">
|
|
<a class="" href="classes/MainWP-Child-MainWP-Backup.html#method_include_core_files">include_core_files()</a>
|
|
<span>
|
|
: mixed </span>
|
|
</dt>
|
|
<dd>Exclude certain core files from the backup.</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section class="phpdocumentor-properties">
|
|
<h3 class="phpdocumentor-elements__header" id="properties">
|
|
Properties
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#properties" class="headerlink"><i class="fas fa-link"></i></a>
|
|
|
|
</h3>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_archiver">
|
|
$archiver
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_archiver" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">103</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.103" class="phpdocumentor-element-found-in__source" data-line="103" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup process archiver.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">object</span>
|
|
<span class="phpdocumentor-signature__name">$archiver</span>
|
|
= <span class="phpdocumentor-signature__default-value">null</span></code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Backup process archiver.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_excludeZip">
|
|
$excludeZip
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_excludeZip" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">26</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.26" class="phpdocumentor-element-found-in__source" data-line="26" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Whether to exclude zip archives.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">bool</span>
|
|
<span class="phpdocumentor-signature__name">$excludeZip</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>true|false</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_file_descriptors">
|
|
$file_descriptors
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_file_descriptors" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">61</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.61" class="phpdocumentor-element-found-in__source" data-line="61" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup file descriptors.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">int</span>
|
|
<span class="phpdocumentor-signature__name">$file_descriptors</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>File descriptors.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_gcCnt">
|
|
$gcCnt
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_gcCnt" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">89</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.89" class="phpdocumentor-element-found-in__source" data-line="89" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Garbage collection count.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">int</span>
|
|
<span class="phpdocumentor-signature__name">$gcCnt</span>
|
|
= <span class="phpdocumentor-signature__default-value">0</span></code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Garbage collection count.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
-static "
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_instance">
|
|
$instance
|
|
<a href="classes/MainWP-Child-MainWP-Backup.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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">110</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.110" class="phpdocumentor-element-found-in__source" data-line="110" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Protected static variable to hold the single instance of the class.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</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
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_lastRun">
|
|
$lastRun
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_lastRun" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">82</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.82" class="phpdocumentor-element-found-in__source" data-line="82" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Last time a backup has been run.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">string</span>
|
|
<span class="phpdocumentor-signature__name">$lastRun</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Last backup run.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_loadFilesBeforeZip">
|
|
$loadFilesBeforeZip
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_loadFilesBeforeZip" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">68</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.68" class="phpdocumentor-element-found-in__source" data-line="68" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Whether to load file before zip.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">bool</span>
|
|
<span class="phpdocumentor-signature__name">$loadFilesBeforeZip</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>true|false</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_testContent">
|
|
$testContent
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_testContent" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">96</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.96" class="phpdocumentor-element-found-in__source" data-line="96" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Archive test content.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">bool</span>
|
|
<span class="phpdocumentor-signature__name">$testContent</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Test backup content.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_timeout">
|
|
$timeout
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_timeout" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">75</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.75" class="phpdocumentor-element-found-in__source" data-line="75" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Hold the current timeout length.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">int</span>
|
|
<span class="phpdocumentor-signature__name">$timeout</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Timeout length.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_zip">
|
|
$zip
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_zip" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">33</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.33" class="phpdocumentor-element-found-in__source" data-line="33" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Container for zip file.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">resource</span>
|
|
<span class="phpdocumentor-signature__name">$zip</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>ZIP file</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_zipArchiveFileCount">
|
|
$zipArchiveFileCount
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileCount" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">40</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.40" class="phpdocumentor-element-found-in__source" data-line="40" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup files count.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">int</span>
|
|
<span class="phpdocumentor-signature__name">$zipArchiveFileCount</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>Files count.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_zipArchiveFileName">
|
|
$zipArchiveFileName
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileName" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">54</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.54" class="phpdocumentor-element-found-in__source" data-line="54" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup archive file name.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">string</span>
|
|
<span class="phpdocumentor-signature__name">$zipArchiveFileName</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>File name.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="
|
|
phpdocumentor-element
|
|
-property
|
|
-protected
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="property_zipArchiveSizeCount">
|
|
$zipArchiveSizeCount
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveSizeCount" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">47</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.47" class="phpdocumentor-element-found-in__source" data-line="47" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup archive file size.</p>
|
|
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">protected</span>
|
|
<span class="phpdocumentor-signature__type">float</span>
|
|
<span class="phpdocumentor-signature__name">$zipArchiveSizeCount</span>
|
|
</code>
|
|
|
|
|
|
<section class="phpdocumentor-description"><p>File size.</p>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
</section>
|
|
|
|
<section class="phpdocumentor-methods">
|
|
<h3 class="phpdocumentor-elements__header" id="methods">
|
|
Methods
|
|
<a href="classes/MainWP-Child-MainWP-Backup.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_add_config">
|
|
add_config()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_config" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">853</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.853" class="phpdocumentor-element-found-in__source" data-line="853" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Add config file to backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">add_config</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_config#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"><abbr title="\MainWP\Child\wp_json_encode()">wp_json_encode()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Encode a variable into JSON, with some sanity checks.</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"><abbr title="\MainWP\Child\get_option()">get_option()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Get option by name.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/functions/wp_json_encode/">https://developer.wordpress.org/reference/functions/wp_json_encode/</a></span>
|
|
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/functions/get_option/">https://developer.wordpress.org/reference/functions/get_option/</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-Backup.html#method_create_zip_full_backup"><abbr title="\MainWP\Child\MainWP_Backup::create_zip_full_backup()">MainWP_Backup::create_zip_full_backup()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Add config file to backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_add_file_from_string_to_pcl_zip">
|
|
add_file_from_string_to_pcl_zip()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_pcl_zip" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1124</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1124" class="phpdocumentor-element-found-in__source" data-line="1124" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Add file from a string to pclzip file.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">add_file_from_string_to_pcl_zip</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">resource </span><span class="phpdocumentor-signature__argument__name">$file</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$str</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$filepath</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$file</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">resource</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>File to add to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<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 to add.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$filepath</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Path to file.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_pcl_zip#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-Backup.html#method_create_zip_pcl_full_backup2"><abbr title="\MainWP\Child\MainWP_Backup::create_zip_pcl_full_backup2()">MainWP_Backup::create_zip_pcl_full_backup2()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Add file from a string to pclzip file.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>true|false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_add_file_from_string_to_zip">
|
|
add_file_from_string_to_zip()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_zip" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1111</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1111" class="phpdocumentor-element-found-in__source" data-line="1111" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Add file from a string to zip file.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">add_file_from_string_to_zip</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">resource </span><span class="phpdocumentor-signature__argument__name">$file</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$str</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$file</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">resource</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>File to add to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<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 to add.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>true|false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_add_file_to_zipp">
|
|
add_file_to_zipp()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_to_zipp" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1156</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1156" class="phpdocumentor-element-found-in__source" data-line="1156" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Add file to zip.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">add_file_to_zipp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$path</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$zipEntryName</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$path</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Path to zip file.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$zipEntryName</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>File to add to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_to_zipp#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_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>True|false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_backup">
|
|
backup()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">396</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.396" class="phpdocumentor-element-found-in__source" data-line="396" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Perform a backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$write</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">array<string|int, mixed></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">$write</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>Whether or not to execute MainWP_Helper::write(), Default: true.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_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_set_limit"><abbr title="\MainWP\Child\MainWP_Helper::set_limit()">MainWP_Helper::set_limit()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Set PHP Memory Limit and PHP Max Execution time values.</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_end_session"><abbr title="\MainWP\Child\MainWP_Helper::end_session()">MainWP_Helper::end_session()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>End session and flush the output buffer.</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>
|
|
|
|
<section class="phpdocumentor-description"><p>Get the WordPress filesystem.</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_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 ends with the String 2.</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_write"><abbr title="\MainWP\Child\MainWP_Helper::write()">MainWP_Helper::write()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Write response data to be sent to the MainWP Dashboard.</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-Backup.html#method_backup_full"><abbr title="\MainWP\Child\MainWP_Backup::backup_full()">MainWP_Backup::backup_full()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Perform a full backup.</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_set_limit"><abbr title="\MainWP\Child\MainWP_Helper::set_limit()">MainWP_Helper::set_limit()</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_end_session"><abbr title="\MainWP\Child\MainWP_Helper::end_session()">MainWP_Helper::end_session()</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_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_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</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_write"><abbr title="\MainWP\Child\MainWP_Helper::write()">MainWP_Helper::write()</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_backup"><abbr title="\MainWP\Child\MainWP_Child_Callable::backup()">MainWP_Child_Callable::backup()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Array of information on the backup containing the type of backup performed, full, or DB & whether or not it was successful.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_backup_checkpid">
|
|
backup_checkpid()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_checkpid" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">322</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.322" class="phpdocumentor-element-found-in__source" data-line="322" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Check if backup already exists or is in the process of backing up.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">backup_checkpid</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_checkpid#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_write"><abbr title="\MainWP\Child\MainWP_Helper::write()">MainWP_Helper::write()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Write response data to be sent to the MainWP Dashboard.</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_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Get the MainWP directory.</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>
|
|
|
|
<section class="phpdocumentor-description"><p>Get the WordPress filesystem.</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"><abbr title="\MainWP\Child\WP_Filesystem_Base::is_file()">WP_Filesystem_Base::is_file()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Checks if resource is a file.</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"><abbr title="\MainWP\Child\WP_Filesystem_Base::mtime()">WP_Filesystem_Base::mtime()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Gets the file modification time.</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"><abbr title="\MainWP\Child\WP_Filesystem_Base::get_contents()">WP_Filesystem_Base::get_contents()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Reads entire file into a string.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/classes/wp_filesystem_base/is_file/">https://developer.wordpress.org/reference/classes/wp_filesystem_base/is_file/</a></span>
|
|
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/classes/wp_filesystem_base/mtime/">https://developer.wordpress.org/reference/classes/wp_filesystem_base/mtime/</a></span>
|
|
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/classes/wp_filesystem_base/get_contents/">https://developer.wordpress.org/reference/classes/wp_filesystem_base/get_contents/</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_backup_checkpid"><abbr title="\MainWP\Child\MainWP_Child_Callable::backup_checkpid()">MainWP_Child_Callable::backup_checkpid()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_backup_db">
|
|
backup_db()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_db" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">574</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.574" class="phpdocumentor-element-found-in__source" data-line="574" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Backup site database.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">backup_db</span><span>(</span><span class="phpdocumentor-signature__argument"><span>[</span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$fileName</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$ext</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">'zip'</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</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">$fileName</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup arhive file name.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$ext</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">'zip'</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup achive extension.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_db#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_update_option"><abbr title="\MainWP\Child\MainWP_Helper::update_option()">MainWP_Helper::update_option()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Update database option by option name.</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_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Get the MainWP directory.</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-Backup.html#method_create_backup_db"><abbr title="\MainWP\Child\MainWP_Backup::create_backup_db()">MainWP_Backup::create_backup_db()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create database backup.</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-Callable.html#method_backup_db"><abbr title="\MainWP\Child\MainWP_Child_Callable::backup_db()">MainWP_Child_Callable::backup_db()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>$success Returns an array containing the Backup location & file size. Return FALSE on failure.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_backup_full">
|
|
backup_full()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_full" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">474</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.474" class="phpdocumentor-element-found-in__source" data-line="474" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Perform a full backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">backup_full</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$fileName</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</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">$fileName</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup archive file name.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_full#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-Backup.html#method_create_full_backup"><abbr title="\MainWP\Child\MainWP_Backup::create_full_backup()">MainWP_Backup::create_full_backup()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create full backup.</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_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">used-by</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup"><abbr title="\MainWP\Child\MainWP_Backup::backup()">MainWP_Backup::backup()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Perform a full backup.</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-Callable.html#method_backup_full"><abbr title="\MainWP\Child\MainWP_Child_Callable::backup_full()">MainWP_Child_Callable::backup_full()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Returns an array containing the Backup location & file size. Return FALSE on failure.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_backup_poll">
|
|
backup_poll()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_poll" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">253</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.253" class="phpdocumentor-element-found-in__source" data-line="253" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Check whether the file is an archive or not & create a json_encoded, serialized, base64_encoded string.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">backup_poll</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_poll#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_write"><abbr title="\MainWP\Child\MainWP_Helper::write()">MainWP_Helper::write()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Write response data to be sent to the MainWP Dashboard.</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_mainwp_dir"><abbr title="\MainWP\Child\MainWP_Helper::get_mainwp_dir()">MainWP_Helper::get_mainwp_dir()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Get the MainWP directory.</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-Clone.html#method_is_archive"><abbr title="\MainWP\Child\MainWP_Clone::is_archive()">MainWP_Clone::is_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-Callable.html#method_backup_poll"><abbr title="\MainWP\Child\MainWP_Child_Callable::backup_poll()">MainWP_Child_Callable::backup_poll()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_check_zip_console">
|
|
check_zip_console()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_console" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">715</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.715" class="phpdocumentor-element-found-in__source" data-line="715" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Check if we could run zip on console</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">check_zip_console</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_check_zip_support">
|
|
check_zip_support()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_support" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">706</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.706" class="phpdocumentor-element-found-in__source" data-line="706" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Check for default PHP zip support.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">check_zip_support</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Returns true if class_name is a defined class, false otherwise.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_copy_dir">
|
|
copy_dir()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_copy_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">915</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.915" class="phpdocumentor-element-found-in__source" data-line="915" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Copy directory.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">copy_dir</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$nodes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$excludes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$backupfolder</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$excludenonwp</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</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">$nodes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Default nodes.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files & directories to exclude.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$backupfolder</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup folder.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludenonwp</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Whether or not to exclude any wp core files.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_copy_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_starts_with"><abbr title="\MainWP\Child\MainWP_Helper::starts_with()">MainWP_Helper::starts_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 starts with the String 2.</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_in_excludes"><abbr title="\MainWP\Child\MainWP_Helper::in_excludes()">MainWP_Helper::in_excludes()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the value is in the excludes list.</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_ends_with"><abbr title="\MainWP\Child\MainWP_Helper::ends_with()">MainWP_Helper::ends_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 ends with the String 2.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_create_backup_db">
|
|
create_backup_db()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_backup_db" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1246</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1246" class="phpdocumentor-element-found-in__source" data-line="1246" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create DB backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">create_backup_db</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$filepath_prefix</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$archiveExt</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">object </span><span class="phpdocumentor-signature__argument__reference-operator">&</span><span class="phpdocumentor-signature__argument__name">$archiver</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">array<string|int, mixed>|array<string|int, 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">$filepath_prefix</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>File path prefix.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$archiveExt</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>Archive extension.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$archiver</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">object</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">null</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Archiver.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_backup_db#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_sanitize_filename"><abbr title="\MainWP\Child\MainWP_Helper::sanitize_filename()">MainWP_Helper::sanitize_filename()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Sanitize filename.</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_set_limit"><abbr title="\MainWP\Child\MainWP_Helper::set_limit()">MainWP_Helper::set_limit()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Set PHP memory limit.</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-DB.html#method_to_query"><abbr title="\MainWP\Child\MainWP_Child_DB::to_query()">MainWP_Child_DB::to_query()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Run a mysqli query & get a result.</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-DB.html#method_fetch_array"><abbr title="\MainWP\Child\MainWP_Child_DB::fetch_array()">MainWP_Child_DB::fetch_array()</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-Child-DB.html#method_real_escape_string"><abbr title="\MainWP\Child\MainWP_Child_DB::real_escape_string()">MainWP_Child_DB::real_escape_string()</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"><abbr title="\MainWP\Child\Tar_Archiver()">Tar_Archiver()</abbr></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"><abbr title="\MainWP\Child\wpdb::get_results()">wpdb::get_results()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Retrieve an entire SQL result set from the database (i.e., many rows).</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"><abbr title="\MainWP\Child\wpdb::get_row()">wpdb::get_row()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Retrieve one row from the database.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/classes/wpdb/get_results/">https://developer.wordpress.org/reference/classes/wpdb/get_results/</a></span>
|
|
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/classes/wpdb/get_row/">https://developer.wordpress.org/reference/classes/wpdb/get_row/</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-Backup.html#method_backup_db"><abbr title="\MainWP\Child\MainWP_Backup::backup_db()">MainWP_Backup::backup_db()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create database backup.</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-Backup.html#method_create_zip_pcl_full_backup2"><abbr title="\MainWP\Child\MainWP_Backup::create_zip_pcl_full_backup2()">MainWP_Backup::create_zip_pcl_full_backup2()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create database backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed>|array<string|int, string></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Action response.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_create_full_backup">
|
|
create_full_backup()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_full_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">149</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.149" class="phpdocumentor-element-found-in__source" data-line="149" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create full backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">create_full_backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$excludes</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$filePrefix</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">''</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$addConfig</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">bool </span><span class="phpdocumentor-signature__argument__name">$includeCoreFiles</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 </span><span class="phpdocumentor-signature__argument__name">$file_descriptors</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">0</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$fileSuffix</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">bool </span><span class="phpdocumentor-signature__argument__name">$excludezip</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">bool </span><span class="phpdocumentor-signature__argument__name">$excludenonwp</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">bool </span><span class="phpdocumentor-signature__argument__name">$loadFilesBeforeZip</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">true</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$ext</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">'zip'</span><span> ]</span></span><span class="phpdocumentor-signature__argument"><span>[</span><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$pid</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">bool </span><span class="phpdocumentor-signature__argument__name">$append</span><span> = </span><span class="phpdocumentor-signature__argument__default-value">false</span><span> ]</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</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">$excludes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files to exclude from the backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$filePrefix</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">''</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup archive file prefix.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$addConfig</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>Add config file to backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$includeCoreFiles</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>Include WordPress core files.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$file_descriptors</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>Number of backup archive file descriptors.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$fileSuffix</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>Backup archive file suffix.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludezip</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>Exclude zip files from the backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludenonwp</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>Exclude non-WordPress directories in site root.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$loadFilesBeforeZip</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>Load files before zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$ext</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
= <span class="phpdocumentor-signature__argument__default-value">'zip'</span> </dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Backup file extension.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$pid</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>PID true|false.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$append</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>Append to backup file name.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_full_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">
|
|
|
|
<section class="phpdocumentor-description"><p>MainWP_Backup::backup_full()</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-Backup.html#method_backup_full"><abbr title="\MainWP\Child\MainWP_Backup::backup_full()">MainWP_Backup::backup_full()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create full backup.</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_create_clone_backup"><abbr title="\MainWP\Child\MainWP_Clone::create_clone_backup()">MainWP_Clone::create_clone_backup()</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"><abbr title="\MainWP\Child\Tar_Archiver()">Tar_Archiver()</abbr></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_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">
|
|
|
|
<section class="phpdocumentor-description"><p>\MainWP\Child\MainWP_Helper::instance()->error()</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_set_limit"><abbr title="\MainWP\Child\MainWP_Helper::set_limit()">MainWP_Helper::set_limit()</abbr></a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed>|bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Action results on success, false on failure.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_create_zip_console_full_backup">
|
|
create_zip_console_full_backup()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_console_full_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1220</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1220" class="phpdocumentor-element-found-in__source" data-line="1220" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create full backup via console.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">create_zip_console_full_backup</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_create_zip_full_backup">
|
|
create_zip_full_backup()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_full_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">736</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.736" class="phpdocumentor-element-found-in__source" data-line="736" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create full backup using default PHP zip library.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">create_zip_full_backup</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$filepath</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$excludes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$addConfig</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$includeCoreFiles</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$excludezip</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$excludenonwp</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$filepath</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>File path to create.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files to exclude from the backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$addConfig</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Add config file to backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$includeCoreFiles</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Include WordPress core files.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludezip</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Exclude zip files from the backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludenonwp</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Exclude non-WordPress directories in site root.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_full_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_starts_with"><abbr title="\MainWP\Child\MainWP_Helper::starts_with()">MainWP_Helper::starts_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 starts with the String 2.</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_in_excludes"><abbr title="\MainWP\Child\MainWP_Helper::in_excludes()">MainWP_Helper::in_excludes()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the value is in the excludes list.</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-Backup.html#method_include_core_files"><abbr title="\MainWP\Child\MainWP_Backup::include_core_files()">MainWP_Backup::include_core_files()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Include core files in backup.</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-Backup.html#method_add_config"><abbr title="\MainWP\Child\MainWP_Backup::add_config()">MainWP_Backup::add_config()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Add config file to backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<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_create_zip_pcl_full_backup2">
|
|
create_zip_pcl_full_backup2()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_pcl_full_backup2" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">970</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.970" class="phpdocumentor-element-found-in__source" data-line="970" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create PCL zip full backup 2.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">create_zip_pcl_full_backup2</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$filepath</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$excludes</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$addConfig</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$includeCoreFiles</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$excludezip</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">bool </span><span class="phpdocumentor-signature__argument__name">$excludenonwp</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$filepath</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Path to file.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files & directories to exclude.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$addConfig</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Add config file to backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$includeCoreFiles</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Whether to include core files.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludezip</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Whether to exclude zip archives.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludenonwp</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">bool</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Whether or not to exclude any wp core files.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_pcl_full_backup2#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_delete_dir"><abbr title="\MainWP\Child\MainWP_Helper::delete_dir()">MainWP_Helper::delete_dir()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Delete wanted directory.</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_starts_with"><abbr title="\MainWP\Child\MainWP_Helper::starts_with()">MainWP_Helper::starts_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 starts with the String 2.</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-Backup.html#method_create_backup_db"><abbr title="\MainWP\Child\MainWP_Backup::create_backup_db()">MainWP_Backup::create_backup_db()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Create database backup.</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-Backup.html#method_add_file_from_string_to_pcl_zip"><abbr title="\MainWP\Child\MainWP_Backup::add_file_from_string_to_pcl_zip()">MainWP_Backup::add_file_from_string_to_pcl_zip()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Add file from a string to pclzip file.</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"><abbr title="\MainWP\Child\wp_json_encode()">wp_json_encode()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Encode a variable into JSON, with some sanity checks.</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"><abbr title="\MainWP\Child\get_option()">get_option()</abbr></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Get option by name.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/functions/wp_json_encode/">https://developer.wordpress.org/reference/functions/wp_json_encode/</a></span>
|
|
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-tag-list__entry">
|
|
<span class="phpdocumentor-tag__name">see</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-tag-list__definition">
|
|
<span class="phpdocumentor-tag-link"><a href="https://developer.wordpress.org/reference/functions/get_option/">https://developer.wordpress.org/reference/functions/get_option/</a></span>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return true on success.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
-static "
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_get">
|
|
get()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_get" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">117</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.117" class="phpdocumentor-element-found-in__source" data-line="117" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create a public static 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">get</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">mixed</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Class instance.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_m_zip_file">
|
|
m_zip_file()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">651</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.651" class="phpdocumentor-element-found-in__source" data-line="651" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create m_zip_file.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">m_zip_file</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$files</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$archive</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$files</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$archive</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Type of archive to create.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return false on failure.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_m_zip_file_console">
|
|
m_zip_file_console()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_console" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">673</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.673" class="phpdocumentor-element-found-in__source" data-line="673" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Method m_zip_file_console().</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">m_zip_file_console</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
|
|
|
|
<div class="phpdocumentor-label-line">
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return false.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_m_zip_file_pcl">
|
|
m_zip_file_pcl()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_pcl" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">685</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.685" class="phpdocumentor-element-found-in__source" data-line="685" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Use pclzip to add files to the zip archive.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">m_zip_file_pcl</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$files</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$archive</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array<string|int, mixed></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">$files</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$archive</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Type of archive to create.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">array<string|int, mixed></span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>$rslt Return array of results.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_zip_add_dir">
|
|
zip_add_dir()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_add_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">1068</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.1068" class="phpdocumentor-element-found-in__source" data-line="1068" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Recursively add directory to default PHP zip library.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">zip_add_dir</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$path</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$excludes</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</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">$path</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Path to directory.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$excludes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files or directories to exclude.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_add_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_in_excludes"><abbr title="\MainWP\Child\MainWP_Helper::in_excludes()">MainWP_Helper::in_excludes()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the value is in the excludes list.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-public
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_zip_file">
|
|
zip_file()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">621</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.621" class="phpdocumentor-element-found-in__source" data-line="621" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Create the ZIP file.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">public</span>
|
|
<span class="phpdocumentor-signature__name">zip_file</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__name">$files</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">string </span><span class="phpdocumentor-signature__argument__name">$archive</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</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">$files</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Files to zip.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
<dt class="phpdocumentor-argument-list__entry">
|
|
<span class="phpdocumentor-signature__argument__name">$archive</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">string</span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Type of archive to create.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_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_set_limit"><abbr title="\MainWP\Child\MainWP_Helper::set_limit()">MainWP_Helper::set_limit()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Set PHP memory limit.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<section>
|
|
<h5 class="phpdocumentor-return-value__heading">Return values</h5>
|
|
<span class="phpdocumentor-signature__response_type">bool</span>
|
|
—
|
|
<section class="phpdocumentor-description"><p>Return FALSE on failure, TRUE on success.</p>
|
|
</section>
|
|
|
|
</section>
|
|
|
|
</article>
|
|
<article
|
|
class="phpdocumentor-element
|
|
-method
|
|
-private
|
|
"
|
|
>
|
|
<h4 class="phpdocumentor-element__name" id="method_include_core_files">
|
|
include_core_files()
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_include_core_files" 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-backup.php"><a href="files/class-class-mainwp-backup.html"><abbr title="class/class-mainwp-backup.php">class-mainwp-backup.php</abbr></a></abbr>
|
|
:
|
|
<span class="phpdocumentor-element-found-in__line">804</span>
|
|
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#source-view.804" class="phpdocumentor-element-found-in__source" data-line="804" data-modal="source-view" data-src="files/class/class-mainwp-backup.php.txt"></a>
|
|
</aside>
|
|
|
|
<p class="phpdocumentor-summary">Exclude certain core files from the backup.</p>
|
|
|
|
<code class="phpdocumentor-code phpdocumentor-signature ">
|
|
<span class="phpdocumentor-signature__visibility">private</span>
|
|
<span class="phpdocumentor-signature__name">include_core_files</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed> </span><span class="phpdocumentor-signature__argument__reference-operator">&</span><span class="phpdocumentor-signature__argument__name">$nodes</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">mixed</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">$nodes</span>
|
|
: <span class="phpdocumentor-signature__argument__return-type">array<string|int, mixed></span>
|
|
</dt>
|
|
<dd class="phpdocumentor-argument-list__definition">
|
|
<section class="phpdocumentor-description"><p>Default nodes.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<h5 class="phpdocumentor-tag-list__heading" id="tags">
|
|
Tags
|
|
<a href="classes/MainWP-Child-MainWP-Backup.html#method_include_core_files#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_starts_with"><abbr title="\MainWP\Child\MainWP_Helper::starts_with()">MainWP_Helper::starts_with()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Check if the String 1 starts with the String 2.</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-Backup.html#method_create_zip_full_backup"><abbr title="\MainWP\Child\MainWP_Backup::create_zip_full_backup()">MainWP_Backup::create_zip_full_backup()</abbr></a></span>
|
|
|
|
<section class="phpdocumentor-description"><p>Include core files in backup.</p>
|
|
</section>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
</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-backup.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
|
|
</div>
|
|
<button data-exit-button class="phpdocumentor-modal__close">×</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-Backup.html#toc-properties">Properties</a></li>
|
|
<li><a href="classes/MainWP-Child-MainWP-Backup.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-Backup.html#property_archiver">$archiver</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_excludeZip">$excludeZip</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_file_descriptors">$file_descriptors</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_gcCnt">$gcCnt</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_instance">$instance</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_lastRun">$lastRun</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_loadFilesBeforeZip">$loadFilesBeforeZip</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_testContent">$testContent</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_timeout">$timeout</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_zip">$zip</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileCount">$zipArchiveFileCount</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveFileName">$zipArchiveFileName</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#property_zipArchiveSizeCount">$zipArchiveSizeCount</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-Backup.html#method_add_config">add_config()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_pcl_zip">add_file_from_string_to_pcl_zip()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_from_string_to_zip">add_file_from_string_to_zip()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_add_file_to_zipp">add_file_to_zipp()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup">backup()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_checkpid">backup_checkpid()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_db">backup_db()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_full">backup_full()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_backup_poll">backup_poll()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_console">check_zip_console()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_check_zip_support">check_zip_support()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_copy_dir">copy_dir()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_create_backup_db">create_backup_db()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_create_full_backup">create_full_backup()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_console_full_backup">create_zip_console_full_backup()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_full_backup">create_zip_full_backup()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_create_zip_pcl_full_backup2">create_zip_pcl_full_backup2()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_get">get()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file">m_zip_file()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_console">m_zip_file_console()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_m_zip_file_pcl">m_zip_file_pcl()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_add_dir">zip_add_dir()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_zip_file">zip_file()</a></li>
|
|
<li class=""><a href="classes/MainWP-Child-MainWP-Backup.html#method_include_core_files">include_core_files()</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-Backup.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>
|