Version Description
- Major bug that % got hashed fixed
- Other basic bug fixes (e.g. backups and migrations didnt work on new domains)
- Texts in plugin updated, broken links removed
Download this release
Release Info
Developer | nick843 |
Plugin | WP Clone by WP Academy |
Version | 2.2.5 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.2.5
- lib/css/style.css +111 -1
- lib/functions.php +201 -5
- lib/img/banner_bg.jpg +0 -0
- lib/img/banner_bg_fold.jpg +0 -0
- lib/img/banner_bg_fold_2.jpg +0 -0
- lib/img/banner_close_icon.png +0 -0
- lib/img/banner_success_rating_bg.jpg +0 -0
- lib/js/ZeroClipboard.swf +0 -0
- lib/js/backupmanager.js +72 -0
- lib/js/clipboard.min.js +7 -0
- lib/js/zeroclipboard.min.js +0 -8
- lib/view.php +64 -53
- readme.txt +131 -131
- wpclone.php +340 -4
lib/css/style.css
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
#wrapper {
|
2 |
|
3 |
}
|
@@ -58,6 +59,7 @@
|
|
58 |
div.info {
|
59 |
padding: 15px;
|
60 |
margin: 30px 0;
|
|
|
61 |
background: #e1e1ea;
|
62 |
border-radius: 5px;
|
63 |
-moz-box-shadow: 5px 5px 15px #aaa;
|
@@ -186,4 +188,112 @@ input.Url {
|
|
186 |
padding: 5px;
|
187 |
margin: 25px 0 0 0;
|
188 |
border-radius: 5px;
|
189 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap');
|
2 |
#wrapper {
|
3 |
|
4 |
}
|
59 |
div.info {
|
60 |
padding: 15px;
|
61 |
margin: 30px 0;
|
62 |
+
margin-right: 25px;
|
63 |
background: #e1e1ea;
|
64 |
border-radius: 5px;
|
65 |
-moz-box-shadow: 5px 5px 15px #aaa;
|
188 |
padding: 5px;
|
189 |
margin: 25px 0 0 0;
|
190 |
border-radius: 5px;
|
191 |
+
}
|
192 |
+
|
193 |
+
.plugin-large-notice{
|
194 |
+
overflow: hidden;;
|
195 |
+
}
|
196 |
+
|
197 |
+
/** Banner CSS **/
|
198 |
+
.banner-1{
|
199 |
+
min-height: 744px;
|
200 |
+
width: auto;
|
201 |
+
background-size: cover;
|
202 |
+
padding-top: 48px;
|
203 |
+
padding-left: 61px;
|
204 |
+
padding-right: 85px;
|
205 |
+
font-family: 'Montserrat', sans-serif;
|
206 |
+
margin-right: 30px;
|
207 |
+
margin-top: 20px;
|
208 |
+
}
|
209 |
+
|
210 |
+
.banner-1 .heading{
|
211 |
+
color: #0f9087;
|
212 |
+
font-size: 26px;
|
213 |
+
}
|
214 |
+
|
215 |
+
.banner-1 .nutshell-list{
|
216 |
+
color: #3A3A3A;
|
217 |
+
font-size: 18px;
|
218 |
+
line-height: 22px;
|
219 |
+
}
|
220 |
+
|
221 |
+
|
222 |
+
.banner-1 .banner-footer{
|
223 |
+
margin-top: 62px;
|
224 |
+
font-size: 18px;
|
225 |
+
line-height: 29px;
|
226 |
+
}
|
227 |
+
|
228 |
+
.banner-1 .button1{
|
229 |
+
/*-webkit-font-smoothing: antialiased;
|
230 |
+
background-color: #0f9087;
|
231 |
+
border: none;
|
232 |
+
color: #fff;
|
233 |
+
display: inline-block;
|
234 |
+
text-decoration: none;
|
235 |
+
user-select: none;
|
236 |
+
letter-spacing: 1px;
|
237 |
+
padding: 15px 35px;
|
238 |
+
text-transform: uppercase;
|
239 |
+
transition: all 0.1s ease-out;
|
240 |
+
border-radius: 15px;*/
|
241 |
+
|
242 |
+
}
|
243 |
+
.banner-1 .button2{
|
244 |
+
-webkit-font-smoothing: antialiased;
|
245 |
+
background-color: #0f9087;
|
246 |
+
border: none;
|
247 |
+
color: #fff;
|
248 |
+
display: inline-block;
|
249 |
+
text-decoration: none;
|
250 |
+
user-select: none;
|
251 |
+
letter-spacing: 1px;
|
252 |
+
padding: 15px 35px;
|
253 |
+
text-transform: uppercase;
|
254 |
+
transition: all 0.1s ease-out;
|
255 |
+
border-radius: 15px;
|
256 |
+
}
|
257 |
+
|
258 |
+
.banner-1 .close-icon {
|
259 |
+
float: right;
|
260 |
+
margin-top: -30px;
|
261 |
+
margin-right: -65px;
|
262 |
+
cursor: pointer;
|
263 |
+
}
|
264 |
+
|
265 |
+
.plugin-large-notice .banner-1-collapsed{
|
266 |
+
min-height: 63px;
|
267 |
+
width: auto;
|
268 |
+
/*padding-top: 48px;
|
269 |
+
padding-left: 61px;
|
270 |
+
padding-right: 85px;*/
|
271 |
+
font-family: 'Montserrat', sans-serif;
|
272 |
+
margin-right: 30px;
|
273 |
+
margin-top: 20px;
|
274 |
+
}
|
275 |
+
|
276 |
+
.plugin-large-notice .banner-1-collapsed p.left-text {
|
277 |
+
font-size: 20px;
|
278 |
+
line-height: 25px;
|
279 |
+
color: #ffffff;
|
280 |
+
font-family: 'Montserrat', sans-serif;
|
281 |
+
padding-left: 15px;
|
282 |
+
float: left;
|
283 |
+
}
|
284 |
+
|
285 |
+
.plugin-large-notice .banner-1-collapsed p.left-text a {
|
286 |
+
font-size: 15px;
|
287 |
+
color: white;
|
288 |
+
text-decoration: underline;
|
289 |
+
}
|
290 |
+
|
291 |
+
.plugin-large-notice .banner-1-collapsed p.remove-for-good {
|
292 |
+
float: right;
|
293 |
+
font-size: 16px;
|
294 |
+
color: #ffffff;
|
295 |
+
margin-right: 30px;
|
296 |
+
line-height: 35px;
|
297 |
+
cursor: pointer;
|
298 |
+
}
|
299 |
+
|
lib/functions.php
CHANGED
@@ -1,5 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function wpCloneSafePathMode($path) {
|
4 |
return str_replace("\\", "/", $path);
|
5 |
}
|
@@ -141,7 +147,7 @@ function wpa_db_backup_direct($destination)
|
|
141 |
$return.= 'INSERT INTO '.$table.' VALUES(';
|
142 |
for($j=0; $j<$num_fields; $j++)
|
143 |
{
|
144 |
-
$row[$j] = $
|
145 |
if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
|
146 |
if ($j<($num_fields-1)) { $return.= ', '; } // Add extra space to match wpdb backup method
|
147 |
}
|
@@ -431,14 +437,60 @@ function processRestoringBackup($url, $zipmode) {
|
|
431 |
|
432 |
wpa_wpc_log( 'restore finished' );
|
433 |
|
434 |
-
echo '<div class="
|
435 |
printf( 'Visit your restored site [ <a href="%s" target=blank>here</a> ]<br><br>', $site_url );
|
436 |
printf( '<strong>You may need to re-save your permalink structure <a href="%s" target=blank>Here</a></strong>', $permalink_url );
|
437 |
printf( '</br><a href="%s">log</a>', convertPathIntoUrl( WPCLONE_DIR_BACKUP . $GLOBALS['wpclone']['logfile'] ) );
|
|
|
|
|
438 |
unset( $GLOBALS['wpclone'] );
|
439 |
echo wpa_wpc_search_n_replace_report( $report );
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
}
|
443 |
|
444 |
function wpa_wpc_search_n_replace_report( $report ) {
|
@@ -770,6 +822,150 @@ function wpa_wpconfig_path () {
|
|
770 |
|
771 |
}
|
772 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
773 |
function wpa_fetch_file($path){
|
774 |
$z = pathinfo($path);
|
775 |
global $wp_filesystem;
|
@@ -779,7 +975,8 @@ function wpa_fetch_file($path){
|
|
779 |
}
|
780 |
else {
|
781 |
wpa_wpc_log( 'file download started' );
|
782 |
-
$url =
|
|
|
783 |
if ( is_wp_error($url) ) {
|
784 |
wpa_backup_error( 'url', $url->get_error_message(), true );
|
785 |
}
|
@@ -1190,7 +1387,6 @@ function wpa_wpc_unzip( $zipfile, $temp_dir ) {
|
|
1190 |
}
|
1191 |
|
1192 |
function wpa_wpc_get_db( $zipfile, $zipmode ) {
|
1193 |
-
|
1194 |
$ret = array();
|
1195 |
if( $zipmode || ( ! in_array( 'ZipArchive', get_declared_classes() ) || ! class_exists( 'ZipArchive' ) ) ) {
|
1196 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* wp-clone-by-wp-academy Wordpress plugin to backup and migrate Wordpress website.
|
4 |
+
*
|
5 |
+
* @URI https://wordpress.org/plugins/wp-clone-by-wp-academy
|
6 |
+
*
|
7 |
+
* @developed by Shaharia Azam <mail@shaharia.com>
|
8 |
+
*/
|
9 |
function wpCloneSafePathMode($path) {
|
10 |
return str_replace("\\", "/", $path);
|
11 |
}
|
147 |
$return.= 'INSERT INTO '.$table.' VALUES(';
|
148 |
for($j=0; $j<$num_fields; $j++)
|
149 |
{
|
150 |
+
$row[$j] = $wpdb->escape( $row[$j] );
|
151 |
if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; }
|
152 |
if ($j<($num_fields-1)) { $return.= ', '; } // Add extra space to match wpdb backup method
|
153 |
}
|
437 |
|
438 |
wpa_wpc_log( 'restore finished' );
|
439 |
|
440 |
+
echo '<div class=""><h1>Restore Successful!</h1>';
|
441 |
printf( 'Visit your restored site [ <a href="%s" target=blank>here</a> ]<br><br>', $site_url );
|
442 |
printf( '<strong>You may need to re-save your permalink structure <a href="%s" target=blank>Here</a></strong>', $permalink_url );
|
443 |
printf( '</br><a href="%s">log</a>', convertPathIntoUrl( WPCLONE_DIR_BACKUP . $GLOBALS['wpclone']['logfile'] ) );
|
444 |
+
?>
|
445 |
+
<?php
|
446 |
unset( $GLOBALS['wpclone'] );
|
447 |
echo wpa_wpc_search_n_replace_report( $report );
|
448 |
|
449 |
+
?>
|
450 |
+
|
451 |
+
<style rel="stylesheet">
|
452 |
+
.banner-2-after-restore {
|
453 |
+
min-height: 280px;
|
454 |
+
width: auto;
|
455 |
+
background-size: cover;
|
456 |
+
padding-top: 24px;
|
457 |
+
padding-left: 25px;
|
458 |
+
padding-right: 25px;
|
459 |
+
font-family: 'Montserrat', sans-serif;
|
460 |
+
margin-right: 30px;
|
461 |
+
margin-top: 20px;
|
462 |
+
padding-bottom: 20px;
|
463 |
+
}
|
464 |
+
.banner-2-after-restore p{
|
465 |
+
font-size: 18px;
|
466 |
+
}
|
467 |
|
468 |
+
.banner-2-after-restore p a{
|
469 |
+
color: #3eb9b4;
|
470 |
+
text-decoration: none;
|
471 |
+
}
|
472 |
+
</style>
|
473 |
+
<div class="plugin-large-notice-restore-success">
|
474 |
+
<div class="banner-2-after-restore" style="background-image: url('<?php echo plugins_url( 'lib/img/banner_success_rating_bg.jpg', WPCLONE_ROOT_FILE_PATH )?>')">
|
475 |
+
<div style="float: right;" id="banner-2-restore-close-icon"><img src='<?php echo plugins_url( 'lib/img/banner_close_icon.png', WPCLONE_ROOT_FILE_PATH )?>'> </div>
|
476 |
+
<p>
|
477 |
+
Could you please do us a <strong>BIG favor</strong> and give us a 5-star rating <a href="https://wordpress.org/support/plugin/wp-clone-by-wp-academy/reviews/?rate=5#new-post" target="_blank">here</a>? <br> <br>
|
478 |
+
|
479 |
+
<span style="text-decoration: underline">Background:</span> This plugin didn’t get maintained for a long time,
|
480 |
+
and therefore got negative reviews. <br> Now we aim to revive it,
|
481 |
+
and we’re putting <span style="text-decoration: underline;">a lot</span> of effort into making it <br>
|
482 |
+
a great plugin again. If your experience was positive,
|
483 |
+
could you please give <br> us a good review? That would motivate us a lot to keep investing into it. Thank you!
|
484 |
+
<br><br>
|
485 |
+
|
486 |
+
<a href="http://bit.ly/33tUEC7" target="_blank">=> Give positive rating</a>
|
487 |
+
<br><br>
|
488 |
+
If something doesn’t work as it should, please <a href="https://wordpress.org/support/plugin/wp-clone-by-wp-academy/" target="_blank">ask us in the forum</a> . We’ll try to respond quickly!
|
489 |
+
</p>
|
490 |
+
</div>
|
491 |
+
</div>
|
492 |
+
|
493 |
+
<?php
|
494 |
}
|
495 |
|
496 |
function wpa_wpc_search_n_replace_report( $report ) {
|
822 |
|
823 |
}
|
824 |
|
825 |
+
function wcbwa_download_url_alternate( $url, $timeout = 300, $signature_verification = false ){
|
826 |
+
//WARNING: The file is not automatically deleted, The script must unlink() the file.
|
827 |
+
if ( ! $url ) {
|
828 |
+
return new WP_Error( 'http_no_url', __( 'Invalid URL Provided.' ) );
|
829 |
+
}
|
830 |
+
|
831 |
+
$url_filename = basename( parse_url( $url, PHP_URL_PATH ) );
|
832 |
+
|
833 |
+
$tmpfname = wp_tempnam( $url_filename );
|
834 |
+
if ( ! $tmpfname ) {
|
835 |
+
return new WP_Error( 'http_no_file', __( 'Could not create Temporary file.' ) );
|
836 |
+
}
|
837 |
+
|
838 |
+
$response = wp_remote_get(
|
839 |
+
$url,
|
840 |
+
array(
|
841 |
+
'timeout' => $timeout,
|
842 |
+
'stream' => true,
|
843 |
+
'filename' => $tmpfname,
|
844 |
+
)
|
845 |
+
);
|
846 |
+
|
847 |
+
if ( is_wp_error( $response ) ) {
|
848 |
+
unlink( $tmpfname );
|
849 |
+
return $response;
|
850 |
+
}
|
851 |
+
|
852 |
+
$response_code = wp_remote_retrieve_response_code( $response );
|
853 |
+
|
854 |
+
if ( 200 != $response_code ) {
|
855 |
+
$data = array(
|
856 |
+
'code' => $response_code,
|
857 |
+
);
|
858 |
+
|
859 |
+
// Retrieve a sample of the response body for debugging purposes.
|
860 |
+
$tmpf = fopen( $tmpfname, 'rb' );
|
861 |
+
if ( $tmpf ) {
|
862 |
+
/**
|
863 |
+
* Filters the maximum error response body size in `download_url()`.
|
864 |
+
*
|
865 |
+
* @since 5.1.0
|
866 |
+
*
|
867 |
+
* @see download_url()
|
868 |
+
*
|
869 |
+
* @param int $size The maximum error response body size. Default 1 KB.
|
870 |
+
*/
|
871 |
+
$response_size = apply_filters( 'download_url_error_max_body_size', KB_IN_BYTES );
|
872 |
+
$data['body'] = fread( $tmpf, $response_size );
|
873 |
+
fclose( $tmpf );
|
874 |
+
}
|
875 |
+
|
876 |
+
unlink( $tmpfname );
|
877 |
+
return new WP_Error( 'http_404', trim( wp_remote_retrieve_response_message( $response ) ), $data );
|
878 |
+
}
|
879 |
+
|
880 |
+
$content_md5 = wp_remote_retrieve_header( $response, 'content-md5' );
|
881 |
+
if ( $content_md5 ) {
|
882 |
+
$md5_check = verify_file_md5( $tmpfname, $content_md5 );
|
883 |
+
if ( is_wp_error( $md5_check ) ) {
|
884 |
+
unlink( $tmpfname );
|
885 |
+
return $md5_check;
|
886 |
+
}
|
887 |
+
}
|
888 |
+
|
889 |
+
// If the caller expects signature verification to occur, check to see if this URL supports it.
|
890 |
+
if ( $signature_verification ) {
|
891 |
+
/**
|
892 |
+
* Filters the list of hosts which should have Signature Verification attempteds on.
|
893 |
+
*
|
894 |
+
* @since 5.2.0
|
895 |
+
*
|
896 |
+
* @param array List of hostnames.
|
897 |
+
*/
|
898 |
+
$signed_hostnames = apply_filters( 'wp_signature_hosts', array( 'wordpress.org', 'downloads.wordpress.org', 's.w.org' ) );
|
899 |
+
$signature_verification = in_array( parse_url( $url, PHP_URL_HOST ), $signed_hostnames, true );
|
900 |
+
}
|
901 |
+
|
902 |
+
// Perform signature valiation if supported.
|
903 |
+
if ( $signature_verification ) {
|
904 |
+
$signature = wp_remote_retrieve_header( $response, 'x-content-signature' );
|
905 |
+
if ( ! $signature ) {
|
906 |
+
// Retrieve signatures from a file if the header wasn't included.
|
907 |
+
// WordPress.org stores signatures at $package_url.sig
|
908 |
+
|
909 |
+
$signature_url = false;
|
910 |
+
$url_path = parse_url( $url, PHP_URL_PATH );
|
911 |
+
if ( substr( $url_path, -4 ) == '.zip' || substr( $url_path, -7 ) == '.tar.gz' ) {
|
912 |
+
$signature_url = str_replace( $url_path, $url_path . '.sig', $url );
|
913 |
+
}
|
914 |
+
|
915 |
+
/**
|
916 |
+
* Filter the URL where the signature for a file is located.
|
917 |
+
*
|
918 |
+
* @since 5.2.0
|
919 |
+
*
|
920 |
+
* @param false|string $signature_url The URL where signatures can be found for a file, or false if none are known.
|
921 |
+
* @param string $url The URL being verified.
|
922 |
+
*/
|
923 |
+
$signature_url = apply_filters( 'wp_signature_url', $signature_url, $url );
|
924 |
+
|
925 |
+
if ( $signature_url ) {
|
926 |
+
$signature_request = wp_safe_remote_get(
|
927 |
+
$signature_url,
|
928 |
+
array(
|
929 |
+
'limit_response_size' => 10 * 1024, // 10KB should be large enough for quite a few signatures.
|
930 |
+
)
|
931 |
+
);
|
932 |
+
|
933 |
+
if ( ! is_wp_error( $signature_request ) && 200 === wp_remote_retrieve_response_code( $signature_request ) ) {
|
934 |
+
$signature = explode( "\n", wp_remote_retrieve_body( $signature_request ) );
|
935 |
+
}
|
936 |
+
}
|
937 |
+
}
|
938 |
+
|
939 |
+
// Perform the checks.
|
940 |
+
$signature_verification = verify_file_signature( $tmpfname, $signature, basename( parse_url( $url, PHP_URL_PATH ) ) );
|
941 |
+
}
|
942 |
+
|
943 |
+
if ( is_wp_error( $signature_verification ) ) {
|
944 |
+
if (
|
945 |
+
/**
|
946 |
+
* Filters whether Signature Verification failures should be allowed to soft fail.
|
947 |
+
*
|
948 |
+
* WARNING: This may be removed from a future release.
|
949 |
+
*
|
950 |
+
* @since 5.2.0
|
951 |
+
*
|
952 |
+
* @param bool $signature_softfail If a softfail is allowed.
|
953 |
+
* @param string $url The url being accessed.
|
954 |
+
*/
|
955 |
+
apply_filters( 'wp_signature_softfail', true, $url )
|
956 |
+
) {
|
957 |
+
$signature_verification->add_data( $tmpfname, 'softfail-filename' );
|
958 |
+
} else {
|
959 |
+
// Hard-fail.
|
960 |
+
unlink( $tmpfname );
|
961 |
+
}
|
962 |
+
|
963 |
+
return $signature_verification;
|
964 |
+
}
|
965 |
+
|
966 |
+
return $tmpfname;
|
967 |
+
}
|
968 |
+
|
969 |
function wpa_fetch_file($path){
|
970 |
$z = pathinfo($path);
|
971 |
global $wp_filesystem;
|
975 |
}
|
976 |
else {
|
977 |
wpa_wpc_log( 'file download started' );
|
978 |
+
$url = wcbwa_download_url_alternate($path, ini_get("max_execution_time"));
|
979 |
+
//$url = download_url($path);
|
980 |
if ( is_wp_error($url) ) {
|
981 |
wpa_backup_error( 'url', $url->get_error_message(), true );
|
982 |
}
|
1387 |
}
|
1388 |
|
1389 |
function wpa_wpc_get_db( $zipfile, $zipmode ) {
|
|
|
1390 |
$ret = array();
|
1391 |
if( $zipmode || ( ! in_array( 'ZipArchive', get_declared_classes() ) || ! class_exists( 'ZipArchive' ) ) ) {
|
1392 |
|
lib/img/banner_bg.jpg
ADDED
Binary file
|
lib/img/banner_bg_fold.jpg
ADDED
Binary file
|
lib/img/banner_bg_fold_2.jpg
ADDED
Binary file
|
lib/img/banner_close_icon.png
ADDED
Binary file
|
lib/img/banner_success_rating_bg.jpg
ADDED
Binary file
|
lib/js/ZeroClipboard.swf
DELETED
Binary file
|
lib/js/backupmanager.js
CHANGED
@@ -278,5 +278,77 @@ jQuery(function($) {
|
|
278 |
|
279 |
}
|
280 |
|
|
|
|
|
|
|
281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
282 |
});
|
278 |
|
279 |
}
|
280 |
|
281 |
+
$("#banner-2-restore-close-icon").on("click", function (e) {
|
282 |
+
$(".plugin-large-notice-restore-success").hide();
|
283 |
+
})
|
284 |
|
285 |
+
//Banner notice
|
286 |
+
$(".banner-1 .close-icon").on("click", function (e) {
|
287 |
+
$(".banner-1-collapsed").show(100);
|
288 |
+
$(".banner-1").hide(100);
|
289 |
+
|
290 |
+
$.ajax({
|
291 |
+
url: ajaxurl,
|
292 |
+
type: 'get',
|
293 |
+
data: {
|
294 |
+
'action': 'wpclone-ajax-banner1-close'
|
295 |
+
},
|
296 |
+
success: function(data){
|
297 |
+
console.log(data);
|
298 |
+
},
|
299 |
+
error: function(e){
|
300 |
+
}
|
301 |
+
});
|
302 |
+
})
|
303 |
+
|
304 |
+
$(".banner-1-collapsed .remove-for-good").on("click", function (e) {
|
305 |
+
$(".banner-1-collapsed").hide();
|
306 |
+
|
307 |
+
$.ajax({
|
308 |
+
url: ajaxurl,
|
309 |
+
type: 'get',
|
310 |
+
data: {
|
311 |
+
'action': 'wpclone-ajax-banner1-removed'
|
312 |
+
},
|
313 |
+
success: function(data){
|
314 |
+
console.log(data);
|
315 |
+
},
|
316 |
+
error: function(e){
|
317 |
+
}
|
318 |
+
});
|
319 |
+
})
|
320 |
+
$(".banner-1 .close-icon").on("click", function (e) {
|
321 |
+
$(".banner-1-collapsed").show(100);
|
322 |
+
$(".banner-1").hide(100);
|
323 |
+
|
324 |
+
$.ajax({
|
325 |
+
url: ajaxurl,
|
326 |
+
type: 'get',
|
327 |
+
data: {
|
328 |
+
'action': 'wpclone-ajax-banner1-close'
|
329 |
+
},
|
330 |
+
success: function(data){
|
331 |
+
console.log(data);
|
332 |
+
},
|
333 |
+
error: function(e){
|
334 |
+
}
|
335 |
+
});
|
336 |
+
})
|
337 |
+
|
338 |
+
$(".banner-1-collapsed .remove-for-good").on("click", function (e) {
|
339 |
+
$(".banner-1-collapsed").hide();
|
340 |
+
|
341 |
+
$.ajax({
|
342 |
+
url: ajaxurl,
|
343 |
+
type: 'get',
|
344 |
+
data: {
|
345 |
+
'action': 'wpclone-ajax-banner1-removed'
|
346 |
+
},
|
347 |
+
success: function(data){
|
348 |
+
console.log(data);
|
349 |
+
},
|
350 |
+
error: function(e){
|
351 |
+
}
|
352 |
+
});
|
353 |
+
})
|
354 |
});
|
lib/js/clipboard.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* clipboard.js v2.0.4
|
3 |
+
* https://zenorocha.github.io/clipboard.js
|
4 |
+
*
|
5 |
+
* Licensed MIT © Zeno Rocha
|
6 |
+
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=o(n(1)),c=o(n(3)),u=o(n(4));function o(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.resolveOptions(e),n.listenClick(t),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,c.default),i(o,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===r(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,u.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return s("action",t)}},{key:"defaultTarget",value:function(t){var e=s("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return s("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),o}();function s(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}t.exports=l},function(t,e,n){"use strict";var o,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}}(),a=n(2),c=(o=a)&&o.__esModule?o:{default:o};var u=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return i(e,[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,c.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,c.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),e}();t.exports=u},function(t,e){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments)}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var d=n(5),h=n(6);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!d.string(e))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(t))return s=e,f=n,(l=t).addEventListener(s,f),{destroy:function(){l.removeEventListener(s,f)}};if(d.nodeList(t))return a=t,c=e,u=n,Array.prototype.forEach.call(a,function(t){t.addEventListener(c,u)}),{destroy:function(){Array.prototype.forEach.call(a,function(t){t.removeEventListener(c,u)})}};if(d.string(t))return o=t,r=e,i=n,h(document.body,o,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,a,c,u,l,s,f}},function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e,n){var a=n(7);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=a(t.target,n),t.delegateTarget&&o.call(e,t)}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r)}}}t.exports=function(t,e,n,o,r){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))}},function(t,e){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}}])});
|
lib/js/zeroclipboard.min.js
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* zeroclipboard
|
3 |
-
* The Zero Clipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie, and a JavaScript interface.
|
4 |
-
* Copyright 2012 Jon Rohan, James M. Greene, .
|
5 |
-
* Released under the MIT license
|
6 |
-
* http://jonrohan.github.com/ZeroClipboard/
|
7 |
-
* v1.1.7
|
8 |
-
*/(function(){"use strict";var a=function(a,b){var c=a.style[b];a.currentStyle?c=a.currentStyle[b]:window.getComputedStyle&&(c=document.defaultView.getComputedStyle(a,null).getPropertyValue(b));if(c=="auto"&&b=="cursor"){var d=["a"];for(var e=0;e<d.length;e++)if(a.tagName.toLowerCase()==d[e])return"pointer"}return c},b=function(a){if(!l.prototype._singleton)return;a||(a=window.event);var b;this!==window?b=this:a.target?b=a.target:a.srcElement&&(b=a.srcElement),l.prototype._singleton.setCurrent(b)},c=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent&&a.attachEvent("on"+b,c)},d=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},e=function(a,b){if(a.addClass)return a.addClass(b),a;if(b&&typeof b=="string"){var c=(b||"").split(/\s+/);if(a.nodeType===1)if(!a.className)a.className=b;else{var d=" "+a.className+" ",e=a.className;for(var f=0,g=c.length;f<g;f++)d.indexOf(" "+c[f]+" ")<0&&(e+=" "+c[f]);a.className=e.replace(/^\s+|\s+$/g,"")}}return a},f=function(a,b){if(a.removeClass)return a.removeClass(b),a;if(b&&typeof b=="string"||b===undefined){var c=(b||"").split(/\s+/);if(a.nodeType===1&&a.className)if(b){var d=(" "+a.className+" ").replace(/[\n\t]/g," ");for(var e=0,f=c.length;e<f;e++)d=d.replace(" "+c[e]+" "," ");a.className=d.replace(/^\s+|\s+$/g,"")}else a.className=""}return a},g=function(b){var c={left:0,top:0,width:b.width||b.offsetWidth||0,height:b.height||b.offsetHeight||0,zIndex:9999},d=a(b,"zIndex");d&&d!="auto"&&(c.zIndex=parseInt(d,10));while(b){var e=parseInt(a(b,"borderLeftWidth"),10),f=parseInt(a(b,"borderTopWidth"),10);c.left+=isNaN(b.offsetLeft)?0:b.offsetLeft,c.left+=isNaN(e)?0:e,c.top+=isNaN(b.offsetTop)?0:b.offsetTop,c.top+=isNaN(f)?0:f,b=b.offsetParent}return c},h=function(a){return(a.indexOf("?")>=0?"&":"?")+"nocache="+(new Date).getTime()},i=function(a){var b=[];return a.trustedDomains&&(typeof a.trustedDomains=="string"?b.push("trustedDomain="+a.trustedDomains):b.push("trustedDomain="+a.trustedDomains.join(","))),b.join("&")},j=function(a,b){if(b.indexOf)return b.indexOf(a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},k=function(a){if(typeof a=="string")throw new TypeError("ZeroClipboard doesn't accept query strings.");return a.length?a:[a]},l=function(a,b){a&&(l.prototype._singleton||this).glue(a);if(l.prototype._singleton)return l.prototype._singleton;l.prototype._singleton=this,this.options={};for(var c in o)this.options[c]=o[c];for(var d in b)this.options[d]=b[d];this.handlers={},l.detectFlashSupport()&&p()},m,n=[];l.prototype.setCurrent=function(b){m=b,this.reposition(),b.getAttribute("title")&&this.setTitle(b.getAttribute("title")),this.setHandCursor(a(b,"cursor")=="pointer")},l.prototype.setText=function(a){a&&a!==""&&(this.options.text=a,this.ready()&&this.flashBridge.setText(a))},l.prototype.setTitle=function(a){a&&a!==""&&this.htmlBridge.setAttribute("title",a)},l.prototype.setSize=function(a,b){this.ready()&&this.flashBridge.setSize(a,b)},l.prototype.setHandCursor=function(a){this.ready()&&this.flashBridge.setHandCursor(a)},l.version="1.1.7";var o={moviePath:"ZeroClipboard.swf",trustedDomains:null,text:null,hoverClass:"zeroclipboard-is-hover",activeClass:"zeroclipboard-is-active",allowScriptAccess:"sameDomain"};l.setDefaults=function(a){for(var b in a)o[b]=a[b]},l.destroy=function(){l.prototype._singleton.unglue(n);var a=l.prototype._singleton.htmlBridge;a.parentNode.removeChild(a),delete l.prototype._singleton},l.detectFlashSupport=function(){var a=!1;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash")&&(a=!0)}catch(b){navigator.mimeTypes["application/x-shockwave-flash"]&&(a=!0)}return a};var p=function(){var a=l.prototype._singleton,b=document.getElementById("global-zeroclipboard-html-bridge");if(!b){var c=' <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" id="global-zeroclipboard-flash-bridge" width="100%" height="100%"> <param name="movie" value="'+a.options.moviePath+h(a.options.moviePath)+'"/> <param name="allowScriptAccess" value="'+a.options.allowScriptAccess+'"/> <param name="scale" value="exactfit"/> <param name="loop" value="false"/> <param name="menu" value="false"/> <param name="quality" value="best" /> <param name="bgcolor" value="#ffffff"/> <param name="wmode" value="transparent"/> <param name="flashvars" value="'+i(a.options)+'"/> <embed src="'+a.options.moviePath+h(a.options.moviePath)+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="100%" height="100%" name="global-zeroclipboard-flash-bridge" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+i(a.options)+'" scale="exactfit"> </embed> </object>';b=document.createElement("div"),b.id="global-zeroclipboard-html-bridge",b.setAttribute("class","global-zeroclipboard-container"),b.setAttribute("data-clipboard-ready",!1),b.style.position="absolute",b.style.left="-9999px",b.style.top="-9999px",b.style.width="15px",b.style.height="15px",b.style.zIndex="9999",b.innerHTML=c,document.body.appendChild(b)}a.htmlBridge=b,a.flashBridge=document["global-zeroclipboard-flash-bridge"]||b.children[0].lastElementChild};l.prototype.resetBridge=function(){this.htmlBridge.style.left="-9999px",this.htmlBridge.style.top="-9999px",this.htmlBridge.removeAttribute("title"),this.htmlBridge.removeAttribute("data-clipboard-text"),f(m,this.options.activeClass),m=null,this.options.text=null},l.prototype.ready=function(){var a=this.htmlBridge.getAttribute("data-clipboard-ready");return a==="true"||a===!0},l.prototype.reposition=function(){if(!m)return!1;var a=g(m);this.htmlBridge.style.top=a.top+"px",this.htmlBridge.style.left=a.left+"px",this.htmlBridge.style.width=a.width+"px",this.htmlBridge.style.height=a.height+"px",this.htmlBridge.style.zIndex=a.zIndex+1,this.setSize(a.width,a.height)},l.dispatch=function(a,b){l.prototype._singleton.receiveEvent(a,b)},l.prototype.on=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++)a=c[d].toLowerCase().replace(/^on/,""),this.handlers[a]||(this.handlers[a]=b);this.handlers.noflash&&!l.detectFlashSupport()&&this.receiveEvent("onNoFlash",null)},l.prototype.addEventListener=l.prototype.on,l.prototype.off=function(a,b){var c=a.toString().split(/\s/g);for(var d=0;d<c.length;d++){a=c[d].toLowerCase().replace(/^on/,"");for(var e in this.handlers)e===a&&this.handlers[e]===b&&delete this.handlers[e]}},l.prototype.removeEventListener=l.prototype.off,l.prototype.receiveEvent=function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");var c=m;switch(a){case"load":if(b&&parseFloat(b.flashVersion.replace(",",".").replace(/[^0-9\.]/gi,""))<10){this.receiveEvent("onWrongFlash",{flashVersion:b.flashVersion});return}this.htmlBridge.setAttribute("data-clipboard-ready",!0);break;case"mouseover":e(c,this.options.hoverClass);break;case"mouseout":f(c,this.options.hoverClass),this.resetBridge();break;case"mousedown":e(c,this.options.activeClass);break;case"mouseup":f(c,this.options.activeClass);break;case"datarequested":var d=c.getAttribute("data-clipboard-target"),g=d?document.getElementById(d):null;if(g){var h=g.value||g.textContent||g.innerText;h&&this.setText(h)}else{var i=c.getAttribute("data-clipboard-text");i&&this.setText(i)}break;case"complete":this.options.text=null}if(this.handlers[a]){var j=this.handlers[a];typeof j=="function"?j.call(c,this,b):typeof j=="string"&&window[j].call(c,this,b)}},l.prototype.glue=function(a){a=k(a);for(var d=0;d<a.length;d++)j(a[d],n)==-1&&(n.push(a[d]),c(a[d],"mouseover",b))},l.prototype.unglue=function(a){a=k(a);for(var c=0;c<a.length;c++){d(a[c],"mouseover",b);var e=j(a[c],n);e!=-1&&n.splice(e,1)}},typeof module!="undefined"?module.exports=l:typeof define=="function"&&define.amd?define(function(){return l}):window.ZeroClipboard=l})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/view.php
CHANGED
@@ -1,36 +1,11 @@
|
|
1 |
<script type="text/javascript">
|
2 |
jQuery ( function($) {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
https://bugzilla.mozilla.org/show_bug.cgi?id=829557
|
8 |
-
https://github.com/jonrohan/ZeroClipboard/issues/73
|
9 |
-
*/
|
10 |
-
var enableZC = true;
|
11 |
-
var is_firefox18 = navigator.userAgent.toLowerCase().indexOf('firefox/18') > -1;
|
12 |
-
var is_firefox19 = navigator.userAgent.toLowerCase().indexOf('firefox/19') > -1;
|
13 |
-
if (is_firefox18 || is_firefox19) enableZC = false;
|
14 |
-
|
15 |
-
if ( $( ".restore-backup-options" ).length ) {
|
16 |
-
$( ".restore-backup-options" ).each( function() {
|
17 |
-
var clip = new ZeroClipboard( $( "a.copy-button",this ) );
|
18 |
-
/** FF 18/19 users won't see an alert box. */
|
19 |
-
if (enableZC) {
|
20 |
-
clip.on( 'complete', function (client, args) {
|
21 |
-
alert( "Copied to clipboard:\n" + args.text );
|
22 |
-
});
|
23 |
-
}
|
24 |
-
});
|
25 |
-
} else {
|
26 |
-
var clip = new ZeroClipboard( $( "a.copy-button" ) );
|
27 |
-
/** FF 18/19 users won't see an alert box. */
|
28 |
-
if (enableZC) {
|
29 |
-
clip.on( 'complete', function (client, args) {
|
30 |
-
alert( "Copied to clipboard:\n" + args.text );
|
31 |
-
});
|
32 |
}
|
33 |
-
}
|
34 |
});
|
35 |
|
36 |
</script>
|
@@ -53,19 +28,70 @@ $backups = get_option( 'wpclone_backups' );
|
|
53 |
</form>
|
54 |
<div id="search-n-replace-info"></div>
|
55 |
</div>
|
|
|
56 |
<div id="wrapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
<div id="MainView">
|
58 |
|
59 |
-
<h2>Welcome to WP Clone
|
60 |
|
61 |
<p>You can use this tool to create a backup of this site and (optionally) restore it to another server, or another WordPress installation on the same server.</p>
|
62 |
|
63 |
<p><strong>Here is how it works:</strong> the "Backup" function will give you a URL that you can then copy and paste
|
64 |
into the "Restore" dialog of a new WordPress site, which will clone the original site to the new site. You must
|
65 |
install the plugin on the new site and then run the WP Clone > Restore function.</p>
|
66 |
-
<p><b>Attention:</b> The restore process will fail on approximately 10% of installations
|
67 |
-
Please carefully read <a href="http://members.wpacademy.com/wpclone-faq/">No Support and Disclaimer</a>.
|
68 |
-
We do offer <a href="http://members.wpacademy.com/services/">Paid Site Transfer Services</a> using more reliable backup methods.</p>
|
69 |
|
70 |
<p><strong>Choose your selection below:</strong> either create a backup of this site, or choose which backup you
|
71 |
would like to restore.</p>
|
@@ -207,30 +233,15 @@ $backups = get_option( 'wpclone_backups' );
|
|
207 |
<div id="sidebar">
|
208 |
|
209 |
<ul>
|
210 |
-
<h2>
|
211 |
-
<p>
|
212 |
-
<iframe src="//player.vimeo.com/video/187757407?title=0&byline=0&portrait=0" width="300" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
213 |
-
<p>Get true <a href="http://wpacademy.com/hosting">Managed WordPress Hosting</a> for just $12/mth (20% discount)
|
214 |
-
<a href ="https://wpwebsitenow.com/billing/cart.php?a=add&pid=9">here</a>.
|
215 |
-
Enter coupon <b>FREE6</b> at checkout for additional 6 months free. Unlimited sites!</p>
|
216 |
-
|
217 |
-
</ul>
|
218 |
-
|
219 |
-
<ul>
|
220 |
-
<h2>Site Transfer Service from $10!</h2>
|
221 |
-
<a href="http://members.wpacademy.com/services/"><img src="//d28zm3zq58hlat.cloudfront.net/img/wordpress-site-clone-backup-buddy.jpg" /></a>
|
222 |
-
<p>Save time and avoid headaches: hire us to transfer your site.
|
223 |
-
The <a href="http://members.wpacademy.com/product/clone-backupbuddy/">upgrade option</a> even includes a lifetime license and configuration of
|
224 |
-
<b>Backup Buddy</b>, the best WordPress backup plugin!</p>
|
225 |
|
226 |
</ul>
|
227 |
-
|
228 |
|
229 |
<ul>
|
230 |
<h2>Help & Support</h2>
|
231 |
-
|
232 |
-
|
233 |
-
<li><a href="http://members.wpacademy.com/services/">Paid Site Transfer Service</a></li>
|
234 |
</ul>
|
235 |
|
236 |
</div>
|
1 |
<script type="text/javascript">
|
2 |
jQuery ( function($) {
|
3 |
+
var clipboard = new ClipboardJS('.copy-button');
|
4 |
+
clipboard.on('success', function(e) {
|
5 |
+
if(e.text.length > 0){
|
6 |
+
alert("URL has been copied successfully!");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
}
|
8 |
+
});
|
9 |
});
|
10 |
|
11 |
</script>
|
28 |
</form>
|
29 |
<div id="search-n-replace-info"></div>
|
30 |
</div>
|
31 |
+
|
32 |
<div id="wrapper">
|
33 |
+
<!--<div class="plugin-large-notice">
|
34 |
+
<div class="banner-1-collapsed" style="display:none; background-image: url('<?php /*echo plugins_url( 'lib/img/banner_bg_fold.jpg', __FILE__ )*/?>')">
|
35 |
+
<p class="left-text"><strong>BIG NEWS:</strong> We want WP Clone to arise from the dead. <a href="#">Read more</a></p>
|
36 |
+
<p class="remove-for-good">Remove for good (please first read it!)</p>
|
37 |
+
</div>
|
38 |
+
<div class="banner-1" style="background-image: url('<?php /*echo plugins_url( 'lib/img/banner_bg.jpg', __FILE__ )*/?>')">
|
39 |
+
<div class="close-icon"><img src='<?php /*echo plugins_url( 'lib/img/banner_close_icon.png', __FILE__ )*/?>'> </div>
|
40 |
+
<div class="heading">BIG NEWS: <strong>We want WP Clone to arise from the dead.</strong> Please help us!</div>
|
41 |
+
<div style="margin-top: 27px; font-size: 20px; color: #3a3a3a">The key points in a nutshell:</div>
|
42 |
+
<div class="nutshell-list">
|
43 |
+
<ul>
|
44 |
+
<li>1. New contributors have been added to the plugin, and with it comes new motivation to make it a kick-ass product!</li>
|
45 |
+
<li>2. Some fixes have been applied, the plugin now works in 90% of cases (and a further 9% if you follow the process as
|
46 |
+
outlined on the plugin page)</li>
|
47 |
+
<li>
|
48 |
+
3. We want to revive the plugin, make it work in 100% of cases, and add many more features. As we’re short on cash,
|
49 |
+
we’re crowdfunding it, and need your help:
|
50 |
+
<ul style="margin-left: 30px;margin-top: 15px;">
|
51 |
+
<li>
|
52 |
+
a. <span style="text-decoration: underline;">Contribution of 5 or 10 USD:</span> You get the warm fuzzy feeling from giving a sincere “Thank you” for a plugin which <br>
|
53 |
+
probably saved your butt a few times in the past, and helping to further develop it!
|
54 |
+
</li>
|
55 |
+
<li>
|
56 |
+
b. <span style="text-decoration: underline;">Contributions of 15 USD+:</span> As in a), plus you will be rewarded with a <strong>free plugin license</strong> <br>
|
57 |
+
(for the premium product which we will create)
|
58 |
+
</li>
|
59 |
+
<li>
|
60 |
+
c. <span style="text-decoration: underline;">Contributions of 50 USD+:</span> As in a), plus an <strong>unlimited websites premium license.</strong> <br>
|
61 |
+
This a fantastic, one-time deal. The plugin will provide many more features <br>
|
62 |
+
- such as backup scheduling, backup to external servers etc.<br>
|
63 |
+
while still being super-easy to use!
|
64 |
+
</li>
|
65 |
+
</ul>
|
66 |
+
</li>
|
67 |
+
</ul>
|
68 |
+
</div>
|
69 |
+
<div class="banner-footer">
|
70 |
+
The crowdfunding target is USD 3,000. If we don’t reach it you’ll be refunded*. <br>
|
71 |
+
Thank you for your support - we really depend on it!
|
72 |
+
</div>
|
73 |
+
<div style="margin-top: 33px;">
|
74 |
+
<a href="#" class="button1">Contribute</a>
|
75 |
+
<a href="#" class="button1"> Contribute & ger free license(s)</a>
|
76 |
+
</div>
|
77 |
+
<p style="margin-top: 33px;">
|
78 |
+
Also check out the updated plugin description.
|
79 |
+
</p>
|
80 |
+
<p style="margin-top: 33px; color: #0f9087">
|
81 |
+
*With the exception of the 5 or 10 USD amounts. We want you to have that warm fuzzy feeling forever ;)
|
82 |
+
</p>
|
83 |
+
</div>
|
84 |
+
</div>-->
|
85 |
<div id="MainView">
|
86 |
|
87 |
+
<h2>Welcome to WP Clone bys <a href="http://wpacademy.com">WP Academy</a></h2>
|
88 |
|
89 |
<p>You can use this tool to create a backup of this site and (optionally) restore it to another server, or another WordPress installation on the same server.</p>
|
90 |
|
91 |
<p><strong>Here is how it works:</strong> the "Backup" function will give you a URL that you can then copy and paste
|
92 |
into the "Restore" dialog of a new WordPress site, which will clone the original site to the new site. You must
|
93 |
install the plugin on the new site and then run the WP Clone > Restore function.</p>
|
94 |
+
<p><b>Attention:</b> The restore process will fail on approximately 10% of installations. PLEASE read the <a href="https://wordpress.org/plugins/wp-clone-by-wp-academy/" target="_blank">plugin page</a> for more information. Only restore on a clean slate site.</p>
|
|
|
|
|
95 |
|
96 |
<p><strong>Choose your selection below:</strong> either create a backup of this site, or choose which backup you
|
97 |
would like to restore.</p>
|
233 |
<div id="sidebar">
|
234 |
|
235 |
<ul>
|
236 |
+
<h2>Use WP Academy’s Transfer Service!</h2>
|
237 |
+
<p>Save time and avoid headaches with WP Academy’s <a target="_blank" href="https://sellcodes.com/74ouxrYP">Premium Transfer Service.</a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
238 |
|
239 |
</ul>
|
|
|
240 |
|
241 |
<ul>
|
242 |
<h2>Help & Support</h2>
|
243 |
+
<p>If you face any issues, we’re very happy to answer your questions in the <a href="http://wordpress.org/support/plugin/wp-clone-by-wp-academy" target="_blank" title="Support Forum">Support Forum</a>. <br><br>
|
244 |
+
We still have to catch up on the old support threads, however we’ll treat new questions with a high priority! :)</p>
|
|
|
245 |
</ul>
|
246 |
|
247 |
</div>
|
readme.txt
CHANGED
@@ -1,166 +1,166 @@
|
|
1 |
=== WP Clone by WP Academy ===
|
2 |
-
Contributors: wpacademy
|
3 |
-
Donate link:
|
4 |
-
Tags:
|
5 |
Author URI: http://wpacademy.com
|
6 |
-
|
7 |
-
Requires at least: 3.
|
8 |
-
Tested up to:
|
9 |
-
Stable tag: 2.2.
|
10 |
-
License:
|
11 |
-
License URI:
|
12 |
|
13 |
-
|
|
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
WP Clone is
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
* It does not backup or restore the WordPress system files (just the user content and database) – reducing upload time and improving security of your site
|
23 |
-
* It fetches the site backup via your host's direct http connection, which saves you from needing to upload large files through your internet connection
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
You also may use our <a href="http://members.wpacademy.com/services/">Paid Site Transfer Service</a>.
|
30 |
-
</blockquote>
|
31 |
|
32 |
-
|
33 |
-
[youtube http://www.youtube.com/watch?v=xN5Ffhyn4Ao]
|
34 |
|
35 |
-
=
|
36 |
-
As mentioned above, WP Clone fails in 10-20% of installations. As such it is NOT intended as a regular backup method, its strength consists in migrating WordPress installations. The failures appear to be related to the multiplicity of WordPress hosting platforms and the size of the installation rather than the WordPress version (so please don't feedback "WP Clone does not work for my version of WordPress", this is most probably false). Do however, leave negative reviews and open a discussion on the support forum if you get a failure, providing as much detail as possible, including your hosting system and the size of your site. We will likely not be able to respond, but the information will be useful in helping to isolate the problems with the different hosting systems. Thank you.
|
37 |
|
38 |
-
|
39 |
-
* NEVER overwrite an installation for which you do not have an alternate backup source (i.e. a cPanel backup). Normally you would restore onto a fresh WP installation on another host or on a subdomain. If the restore fails your destination site might become unusable, so be prepared to enter cPanel and then destroy / recreate the new installation if necessary.
|
40 |
-
* There is never an issue in damaging the source installation. So backup sites at your pleasure. If your backup succeeds it is probable that your restore will also succeed. But don't take any chances.
|
41 |
-
* Large sites (>2GB) might take as long as an hour to backup. Sites of 250 MB or less should take no more than a minute or two, depending on your server.
|
42 |
-
* We recommend you deactivate and delete page caching, security and maybe redirection plugins and re-install them on the new site, if necessary. In general, delete all unnecessary plugins and data from your site before you backup. You can also use the "Exclude directories" option if you have large media files, which you can then copy back to the new site with FTP.
|
43 |
-
* An alternate method that should work in 99% of installations is to do a "Database Only" backup (use "Advanced Settings"), transfer the wp-content directory over with FTP, and then restore new site.
|
44 |
-
* Note also that WP Clone should NOT be used on WP Engine or any hosting system with proprietary operating system. Instead, use their built-in tools.
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
If you are able to support our efforts, use the [Donations Page](http://members.wpacademy.com/wpclone-faq/).
|
52 |
|
53 |
-
|
54 |
-
Additional documentation, including supported hosts, at the [WP Clone FAQ Page](http://members.wpacademy.com/wpclone-faq "WP Clone FAQ")
|
55 |
|
56 |
-
|
57 |
-
WP Clone uses functions from the "Safe Search and Replace on Database with Serialized Data" script first written by David Coveney of Interconnect IT Ltd (UK) http://www.davidcoveney.com or http://www.interconnectit.com and
|
58 |
-
released under the WTFPL http://sam.zoy.org/wtfpl/. Partial script with full changelog is placed inside 'lib/files' directory.
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
2. Search for "WP Clone"
|
66 |
-
3. Install and activate the plugin
|
67 |
-
4. Follow remaining instructions in the help video
|
68 |
|
69 |
-
|
70 |
-
Review FAQ's and Help Video at the [WP Clone FAQ Page](http://members.wpacademy.com/wpclone-faq "WP Clone FAQ")
|
71 |
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
*
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
* Added: A search and replace tool into the plugin dashboard.
|
92 |
-
* Changed: A .htaccess file will be placed in the temporary directories to prevent external access to the files.
|
93 |
-
* Changed: Files are no longer copied to a temporary location during backup.
|
94 |
-
* Changed: Database import is done before the rest of the files are extracted.
|
95 |
-
* Changed: siteurl option is updated during the database import.
|
96 |
-
* Changed: search and replace will not run when the URLs are similar.
|
97 |
-
* Changed: Increased the default values for memory_limit and max_execution_time from 512MB/300 to 1024MB/600.
|
98 |
-
* Removed: The use of wordpress' unzip_file (ziparchive will be used when available with pclzip as fallback)
|
99 |
-
|
100 |
-
= 2.2 - 2015-11-16 =
|
101 |
-
* Fixed: Missing backups that some users encountered after upgrading to 2.1.9
|
102 |
-
* Added: An option to refresh the backup list.
|
103 |
-
* Added: An option to remove the database entry and delete all the backup files.
|
104 |
-
* Added: A section that shows the uncompressed database size and the uncompressed size and the number of files that will be archived during a full backup.
|
105 |
-
* Added: Notes in the advanced settings section regarding the Maximum memory limit and the Script execution time fields.
|
106 |
-
* Added: The report returned from the search and replace process into the restore successful page.
|
107 |
-
* Changed: Moved the backup list location from the custom table to the wp_options table. (previous backups will be imported and the custom table will be removed on existing installations)
|
108 |
-
* Changed: Moved the system information block from the advanced settings section into the "normal" dashboard page.
|
109 |
-
* Changed: Only the tables with the wordpress table prefix will be altered during a restore.
|
110 |
-
* Changed: Only the tables with the wordpress table prefix will be saved during a backup.
|
111 |
-
* Changed: Backup deletion is now handled using AJAX.
|
112 |
|
113 |
-
|
114 |
-
*
|
115 |
-
*
|
116 |
|
117 |
-
=
|
118 |
-
* Updated: Readme description.
|
119 |
|
120 |
-
|
121 |
-
*
|
|
|
|
|
|
|
122 |
|
123 |
-
=
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
|
|
128 |
|
129 |
-
=
|
130 |
-
|
131 |
-
* Changed: UI Sidebar link attributes.
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
* Changed: The temporary directory location during the restore process from '/wp-content/' to '/wp-content/wpclone-temp/'.
|
136 |
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
= 2.1.
|
146 |
-
*
|
|
|
|
|
147 |
|
148 |
-
= 2.1.
|
149 |
-
* Fixed:
|
150 |
-
*
|
151 |
|
152 |
-
= 2.1
|
153 |
-
* Added:
|
|
|
|
|
|
|
154 |
|
155 |
-
= 2.0.
|
156 |
-
*
|
157 |
-
* Added: Alternate zip method for better compatibility with hosts that haven't enabled PHP's zip extension
|
158 |
|
159 |
-
= 2.0.5 - 2012-06-25 =
|
160 |
-
* Fixed: A secondary search and replace that was corrupting serialized entries
|
161 |
|
162 |
-
|
163 |
-
|
164 |
|
165 |
-
|
166 |
-
|
|
1 |
=== WP Clone by WP Academy ===
|
2 |
+
Contributors: wpacademy, migrate, nick843
|
3 |
+
Donate link: https://sellcodes.com/q1OGuSox
|
4 |
+
Tags: migrate, clone, backup, migration, backups, copy, restore, recover, restoration, recovery
|
5 |
Author URI: http://wpacademy.com
|
6 |
+
Requires PHP: 5.5
|
7 |
+
Requires at least: 3.3
|
8 |
+
Tested up to: 5.2.4
|
9 |
+
Stable tag: 2.2.5
|
10 |
+
License: GPLv3
|
11 |
+
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
12 |
|
13 |
+
|
14 |
+
100% FREE backup creation and migration to restore from backup
|
15 |
|
16 |
== Description ==
|
17 |
|
18 |
+
= WP Clone is back! =
|
19 |
|
20 |
+
Or, to be precise: we **want** it to come back!
|
21 |
|
22 |
+
After 3 years of neglection we believe it's time for a revival. New contributors got added to the plugin, and with it comes new motivation to make it the best backup solution on the market!
|
|
|
|
|
23 |
|
24 |
+
By that, we mean:
|
25 |
+
- Finally make it work in all cases
|
26 |
+
- Add more features, but **keep the simplicity**
|
27 |
+
- Get user trust back by delivering a top service!
|
|
|
|
|
28 |
|
29 |
+
But to achieve that…
|
|
|
30 |
|
31 |
+
= We need your help! =
|
|
|
32 |
|
33 |
+
Good development takes time & money, and we need your support.
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
We decided to [crowdfund it](https://sellcodes.com/q1OGuSox), meaning:
|
36 |
|
37 |
+
- **Contributions of 5-10 USD**: Feel great by giving a sincere "Thank you" and helping us to develop the plugin further. If the plugin made your life easier in the past, it's a great opportunity to show some appreciation :)
|
38 |
+
- **Contributions of 15 USD**: As in 1.), plus you'll get a free premium license (for the premium plugin which we will create*). A contribution of 30 USD gets you 2 licenses.
|
39 |
+
- **Contributions of 50 USD** (or more): As in 1), plus you'll get an unlimited websites premium license. This a fantastic, one-time deal. The plugin will provide many more features - such as backup scheduling, backup to external servers etc. - while still being super-easy to use!
|
|
|
40 |
|
41 |
+
All licenses are lifetime licenses and valid on both commercial and non-commercial websites.
|
|
|
42 |
|
43 |
+
*We will create the premium plugin only if we reach our (quite modest) crowdfunding goal of 3,000 USD. If we don't hit it, you'll get your contributions refunded (except the 5 and 10 USD amounts - those are basically for the past :).
|
|
|
|
|
44 |
|
45 |
+
Please help us out, and see the status quo of our crowdfunding effort, on the [WP clone crowdfunding page](https://sellcodes.com/q1OGuSox)!
|
46 |
|
47 |
+
= Where do we stand today? =
|
48 |
|
49 |
+
But first, let’s back up ;) - where does the (free) plugin stand now?
|
|
|
|
|
|
|
50 |
|
51 |
+
WP Clone is still the easiest, fastest, cheapest and most secure way to backup, migrate or clone a WordPress site to another domain or hosting server.
|
|
|
52 |
|
53 |
+
You can also use it to backup, migrate or clone your site to/from local server hosting, to create backup of your site for development or testing purposes, and to install pre-configured backups of WordPress.
|
54 |
+
|
55 |
+
WP Clone is a superior to other backup & migrate plugins for the following reasons:
|
56 |
+
|
57 |
+
* It does not require FTP access to backup files you migrate or clone, neither the source or destination site; just install a new WordPress on the destination site, install our backup plugin, and follow the prompts to migrate or clone your site.
|
58 |
+
* It does not backup or restore the WordPress system files (it just creates user content and database backups); reducing upload time for migration and improving security of your site
|
59 |
+
* It fetches the site backup via your host's direct http connection, which saves you from having to upload large backup files, making it easier to migrate.
|
60 |
+
|
61 |
+
= What are today's limitations? =
|
62 |
+
|
63 |
+
Today:
|
64 |
+
- 90% of cases: Backups & migrations work flawlessly (we fixed some key bugs in the most recent version)
|
65 |
+
- 9% of cases: Backups or migrations fail due to your hoster's configurations (most likely limits in up- and downloads) which is typically the case when you backup or migrate very large sites. However, there's a workaround: simply do a “Database Only” backup (use “Advanced Settings”), transfer the wp-content directory over with FTP, and then restore new site. Then backup and migration also works.
|
66 |
+
- 1% of cases: Your site/hosting is abnormal (pardon our French) and backup or migration doesn't work. However: that's what we'll now be working on, so that eventually backups and migrations will work in all cases.
|
67 |
+
|
68 |
+
The 1% case means:
|
69 |
+
- Basic rule: DO NOT use it as your only backup solution! Only use it for migrations (so that if something fails, you still have the files on your old site as backup).
|
70 |
+
- If you want to use it as backup, test it by restoring the backup file on a new site. If that works fine you should be safe.
|
71 |
+
- In any case, we cannot take any responsibility if backup or migration fails.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
+
Note:
|
74 |
+
* There is never an issue in damaging the source installation (i.e. on the site where you create the backup). So backup sites at your pleasure. If your backup succeeds then chances are good that the migration (i.e. restore on another site) will also succeed. But don't take any chances.
|
75 |
+
* If backup or migration (restore) fails, just try it again. Often it works on second attempt.
|
76 |
|
77 |
+
= Other tips how to backup and migrate =
|
|
|
78 |
|
79 |
+
* NEVER overwrite an installation for which you do not have an alternate backup source (e.g. a cPanel backup). Normally you would restore the backup onto a fresh WP installation on another host or on a subdomain. If the restore fails your destination site might become unusable, so be prepared to enter cPanel and then destroy / recreate the new installation if necessary.
|
80 |
+
* DO NOT use our backup plugin on WP Engine or any hosting system with proprietary operating system. Instead, use their built-in backup tools.
|
81 |
+
* Large sites (>2GB) might take as long as an hour to backup and migrate. Sites of 250 MB or less should take no more than a minute or two to backup, depending on your server.
|
82 |
+
* We recommend you deactivate and delete page caching, security and maybe redirection plugins before you migrate, and re-install them on the new site, if necessary. In general, delete all unnecessary plugins and data from your site before you backup. You can also use the "Exclude directories" option if you have large media files, which you can then copy back to the new site with FTP.
|
83 |
+
* How to copy from local server to your hosted website: Create a backup of the local site in the usual way, then save the backup file (right-click > Save) to your local disk. Upload this file to the root directory of your destination website and then use this url in the “Restore” dialog of the new site: http://yourdomain.com/<name of the backup file.zip>.
|
84 |
|
85 |
+
= Help Video =
|
86 |
+
|
87 |
+
|
88 |
+
(Old video, but may still be helpful; we’ll replace it with an updated one soon)
|
89 |
+
|
90 |
+
[youtube http://www.youtube.com/watch?v=xN5Ffhyn4Ao]
|
91 |
|
92 |
+
= Credits =
|
93 |
+
WP Backup uses functions from the "Safe Search and Replace on Database with Serialized Data" script first written by David Coveney of Interconnect IT Ltd (UK) http://www.davidcoveney.com or http://www.interconnectit.com and released under the WTFPL http://sam.zoy.org/wtfpl/. Partial script with full changelog is placed inside 'lib/files' directory.
|
|
|
94 |
|
95 |
+
Thank you for reading this far. Please don’t forget to [contribute to create a kick-ass plugin](https://sellcodes.com/q1OGuSox). Thank you!
|
96 |
+
== Installation ==
|
|
|
97 |
|
98 |
+
1. Navigate to Plugins > Add New
|
99 |
+
2. Search for "WP Clone by WP Academy"
|
100 |
+
3. Install and activate the backup and migration plugin
|
101 |
+
4. Follow remaining instructions in the help video
|
102 |
+
|
103 |
+
== Frequently Asked Questions ==
|
104 |
+
Backup and migration FAQ are under construction
|
105 |
+
|
106 |
+
== Changelog ==
|
107 |
+
|
108 |
+
= 2.2.5 =
|
109 |
+
* Major bug that % got hashed fixed
|
110 |
+
* Other basic bug fixes (e.g. backups and migrations didn’t work on new domains)
|
111 |
+
* Texts in plugin updated, broken links removed
|
112 |
+
|
113 |
+
= 2.2.4 =
|
114 |
+
* Updated: `Tested up to` tag for backup and migration
|
115 |
+
|
116 |
+
= 2.2.3 =
|
117 |
+
* Added: PHP7 support of backup and migration
|
118 |
+
* Added: a multisite check during restore (not required at time of backup)
|
119 |
+
* Fixed: failed backups due to unreadable files
|
120 |
+
|
121 |
+
= 2.2.1 =
|
122 |
+
* Fixed: Backup names will use the time zone selected in general settings
|
123 |
+
* Added: basic backup and migration logs
|
124 |
+
* Added: An option to exclude files in backup and migration based on size (files larger than 25MB will be excluded by default for backups and migration)
|
125 |
+
* Added: An option to ignore the wordpress table prefix during backup and migration
|
126 |
+
* Added: An option to check the mysql connection during migration (restore)
|
127 |
+
* Changed: Files are no longer copied to a temporary location during backup
|
128 |
+
* Changed: siteurl option is updated during the database import
|
129 |
+
|
130 |
+
= 2.2 =
|
131 |
+
* Fixed: Missing backups that some users encountered after upgrading to 2.1.9
|
132 |
+
* Added: An option to refresh the backup list
|
133 |
+
* Added: An option to remove the database entry and delete all the backup files
|
134 |
+
* Added: A section that shows the uncompressed database size and the uncompressed size and the number of files that will be archived during a full backup
|
135 |
+
* Added: Notes in the advanced settings section regarding the Maximum memory limit and the Script backup execution time fields.
|
136 |
+
* Added: The report returned from the search and replace process into the restore successful page
|
137 |
+
* Changed: Moved the backup list location from the custom table to the wp_options table. (previous backups will be imported and the custom table will be removed on existing installations)
|
138 |
+
* Changed: Only the tables with the wordpress table prefix will be altered during a restore
|
139 |
+
* Changed: Only the tables with the wordpress table prefix will be saved during a backup
|
140 |
+
* Changed: Backup deletion is now handled using AJAX
|
141 |
|
142 |
+
= 2.1.6 =
|
143 |
+
* Added: An option to exclude specific directories during backup
|
144 |
+
* Added: An option to only backup the database
|
145 |
+
* Changed: File operations during backup are now handled directly instead of using the WP filesystem abstraction class
|
146 |
|
147 |
+
= 2.1.4 =
|
148 |
+
* Fixed: When javascript is disabled,submit button shows "Create Backup" but the plugin attempts to do a restore
|
149 |
+
* Changed: The temporary directory location during the backup restore process from '/wp-content/' to '/wp-content/wpclone-temp/'
|
150 |
|
151 |
+
= 2.1.3 =
|
152 |
+
* Added: An option to backup the database using WordPress' WPDB class
|
153 |
+
* Removed: The need to keep the original backup names intact
|
154 |
+
* Changed: The backup name structure
|
155 |
+
* Changed: Backup file downloads are now handled using WP core functions
|
156 |
|
157 |
+
= 2.0.2 =
|
158 |
+
* Initial release
|
|
|
159 |
|
|
|
|
|
160 |
|
161 |
+
== Screenshots ==
|
162 |
+
1. Configuration Page
|
163 |
|
164 |
+
== Upgrade Notice ==
|
165 |
+
= 2.2.5 =
|
166 |
+
* Please upgrade - major bug fixed!
|
wpclone.php
CHANGED
@@ -4,10 +4,17 @@ Plugin name: WP Clone by WP Academy
|
|
4 |
Plugin URI: http://wpacademy.com/software/
|
5 |
Description: Move or copy a WordPress site to another server or to another domain name, move to/from local server hosting, and backup sites.
|
6 |
Author: WP Academy
|
7 |
-
Version: 2.2.
|
8 |
Author URI: http://wpacademy.com/
|
9 |
*/
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
include_once 'lib/functions.php';
|
12 |
include_once 'lib/class.wpc-wpdb.php';
|
13 |
|
@@ -22,18 +29,27 @@ define('WPCLONE_URL_PLUGIN', plugin_dir_url(__FILE__));
|
|
22 |
define('WPCLONE_DIR_BACKUP', WPCLONE_DIR_UPLOADS . '/' . WPCLONE_BACKUP_FOLDER . '/');
|
23 |
define('WPCLONE_INSTALLER_PATH', WPCLONE_DIR_PLUGIN);
|
24 |
define('WPCLONE_WP_CONTENT' , str_replace('\\', '/', WP_CONTENT_DIR));
|
|
|
25 |
|
26 |
|
27 |
/* Init options & tables during activation & deregister init option */
|
28 |
|
29 |
register_activation_hook((__FILE__), 'wpa_wpclone_activate');
|
30 |
register_deactivation_hook(__FILE__ , 'wpa_wpclone_deactivate');
|
|
|
31 |
add_action('admin_menu', 'wpclone_plugin_menu');
|
32 |
add_action( 'wp_ajax_wpclone-ajax-size', 'wpa_wpc_ajax_size' );
|
33 |
add_action( 'wp_ajax_wpclone-ajax-dir', 'wpa_wpc_ajax_dir' );
|
34 |
add_action( 'wp_ajax_wpclone-ajax-delete', 'wpa_wpc_ajax_delete' );
|
35 |
add_action( 'wp_ajax_wpclone-ajax-uninstall', 'wpa_wpc_ajax_uninstall' );
|
36 |
add_action( 'wp_ajax_wpclone-search-n-replace', 'wpa_wpc_ajax_search_n_replace' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
function wpclone_plugin_menu() {
|
39 |
add_menu_page (
|
@@ -130,11 +146,11 @@ function wpclone_plugin_options() {
|
|
130 |
}
|
131 |
|
132 |
function wpa_enqueue_scripts(){
|
133 |
-
wp_register_script('
|
134 |
wp_register_script('wpclone', plugin_dir_url(__FILE__) . '/lib/js/backupmanager.js', array('jquery'));
|
135 |
wp_register_style('wpclone', plugin_dir_url(__FILE__) . '/lib/css/style.css');
|
136 |
wp_localize_script('wpclone', 'wpclone', array( 'nonce' => wp_create_nonce( 'wpclone-ajax-submit' ), 'spinner' => esc_url( admin_url( 'images/spinner.gif' ) ) ) );
|
137 |
-
wp_enqueue_script('
|
138 |
wp_enqueue_script('wpclone');
|
139 |
wp_enqueue_style('wpclone');
|
140 |
wp_deregister_script('heartbeat');
|
@@ -143,11 +159,18 @@ function wpa_enqueue_scripts(){
|
|
143 |
if( isset($_GET['page']) && 'wp-clone' == $_GET['page'] ) add_action('admin_enqueue_scripts', 'wpa_enqueue_scripts');
|
144 |
|
145 |
function wpa_wpclone_activate() {
|
146 |
-
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
|
149 |
function wpa_wpclone_deactivate() {
|
150 |
|
|
|
|
|
|
|
151 |
if( file_exists( WPCLONE_DIR_BACKUP ) ) {
|
152 |
$data = "<Files>\r\n\tOrder allow,deny\r\n\tDeny from all\r\n\tSatisfy all\r\n</Files>";
|
153 |
$file = WPCLONE_DIR_BACKUP . '.htaccess';
|
@@ -156,6 +179,13 @@ function wpa_wpclone_deactivate() {
|
|
156 |
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
function wpa_wpc_remove_table() {
|
160 |
global $wpdb;
|
161 |
$wp_backup = $wpdb->prefix . 'wpclone';
|
@@ -233,4 +263,310 @@ function wpa_wpc_phpnotice() {
|
|
233 |
|
234 |
if( version_compare( phpversion(), '5.3', '<' ) ){
|
235 |
add_action( 'admin_notices', 'wpa_wpc_phpnotice');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
}
|
4 |
Plugin URI: http://wpacademy.com/software/
|
5 |
Description: Move or copy a WordPress site to another server or to another domain name, move to/from local server hosting, and backup sites.
|
6 |
Author: WP Academy
|
7 |
+
Version: 2.2.5
|
8 |
Author URI: http://wpacademy.com/
|
9 |
*/
|
10 |
|
11 |
+
/**
|
12 |
+
*
|
13 |
+
* @URI https://wordpress.org/plugins/wp-clone-by-wp-academy
|
14 |
+
*
|
15 |
+
* @developed by Shaharia Azam <mail@shaharia.com>
|
16 |
+
*/
|
17 |
+
|
18 |
include_once 'lib/functions.php';
|
19 |
include_once 'lib/class.wpc-wpdb.php';
|
20 |
|
29 |
define('WPCLONE_DIR_BACKUP', WPCLONE_DIR_UPLOADS . '/' . WPCLONE_BACKUP_FOLDER . '/');
|
30 |
define('WPCLONE_INSTALLER_PATH', WPCLONE_DIR_PLUGIN);
|
31 |
define('WPCLONE_WP_CONTENT' , str_replace('\\', '/', WP_CONTENT_DIR));
|
32 |
+
define('WPCLONE_ROOT_FILE_PATH' , __FILE__);
|
33 |
|
34 |
|
35 |
/* Init options & tables during activation & deregister init option */
|
36 |
|
37 |
register_activation_hook((__FILE__), 'wpa_wpclone_activate');
|
38 |
register_deactivation_hook(__FILE__ , 'wpa_wpclone_deactivate');
|
39 |
+
register_uninstall_hook(__FILE__ , 'wpa_wpclone_uninstall');
|
40 |
add_action('admin_menu', 'wpclone_plugin_menu');
|
41 |
add_action( 'wp_ajax_wpclone-ajax-size', 'wpa_wpc_ajax_size' );
|
42 |
add_action( 'wp_ajax_wpclone-ajax-dir', 'wpa_wpc_ajax_dir' );
|
43 |
add_action( 'wp_ajax_wpclone-ajax-delete', 'wpa_wpc_ajax_delete' );
|
44 |
add_action( 'wp_ajax_wpclone-ajax-uninstall', 'wpa_wpc_ajax_uninstall' );
|
45 |
add_action( 'wp_ajax_wpclone-search-n-replace', 'wpa_wpc_ajax_search_n_replace' );
|
46 |
+
add_action( 'wp_ajax_wpclone-ajax-banner1-close', 'wpclone_ajax_banner1_close' );
|
47 |
+
add_action( 'wp_ajax_wpclone-ajax-banner1-removed', 'wpclone_ajax_banner1_removed' );
|
48 |
+
add_action( 'wp_ajax_wpclone-ajax-banner1-getstatus', 'wpclone_ajax_banner1_getstatus' );
|
49 |
+
add_action('admin_init', 'wpa_wpc_plugin_redirect');
|
50 |
+
add_action('admin_head', 'wpclone_admin_head_scripts');
|
51 |
+
add_action('admin_footer', 'wpclone_admin_footer_scripts');
|
52 |
+
add_action( 'admin_notices', 'wpclone_admin_notice__success' );
|
53 |
|
54 |
function wpclone_plugin_menu() {
|
55 |
add_menu_page (
|
146 |
}
|
147 |
|
148 |
function wpa_enqueue_scripts(){
|
149 |
+
wp_register_script('clipboard', plugin_dir_url(__FILE__) . '/lib/js/clipboard.min.js', array('jquery'));
|
150 |
wp_register_script('wpclone', plugin_dir_url(__FILE__) . '/lib/js/backupmanager.js', array('jquery'));
|
151 |
wp_register_style('wpclone', plugin_dir_url(__FILE__) . '/lib/css/style.css');
|
152 |
wp_localize_script('wpclone', 'wpclone', array( 'nonce' => wp_create_nonce( 'wpclone-ajax-submit' ), 'spinner' => esc_url( admin_url( 'images/spinner.gif' ) ) ) );
|
153 |
+
wp_enqueue_script('clipboard');
|
154 |
wp_enqueue_script('wpclone');
|
155 |
wp_enqueue_style('wpclone');
|
156 |
wp_deregister_script('heartbeat');
|
159 |
if( isset($_GET['page']) && 'wp-clone' == $_GET['page'] ) add_action('admin_enqueue_scripts', 'wpa_enqueue_scripts');
|
160 |
|
161 |
function wpa_wpclone_activate() {
|
162 |
+
|
163 |
+
//Control after activating redirect to settings page
|
164 |
+
add_option('wpa_wpc_plugin_do_activation_redirect', true);
|
165 |
+
|
166 |
+
wpa_create_directory();
|
167 |
}
|
168 |
|
169 |
function wpa_wpclone_deactivate() {
|
170 |
|
171 |
+
//Control after activating redirect to settings page
|
172 |
+
delete_option("wpa_activation_redirect_required");
|
173 |
+
|
174 |
if( file_exists( WPCLONE_DIR_BACKUP ) ) {
|
175 |
$data = "<Files>\r\n\tOrder allow,deny\r\n\tDeny from all\r\n\tSatisfy all\r\n</Files>";
|
176 |
$file = WPCLONE_DIR_BACKUP . '.htaccess';
|
179 |
|
180 |
}
|
181 |
|
182 |
+
function wpa_wpclone_uninstall() {
|
183 |
+
//Control after activating redirect to settings page
|
184 |
+
delete_option("wpa_activation_redirect_required");
|
185 |
+
delete_option("wpclone_ajax_banner1_close");
|
186 |
+
delete_option("wpclone_ajax_banner1_removed");
|
187 |
+
}
|
188 |
+
|
189 |
function wpa_wpc_remove_table() {
|
190 |
global $wpdb;
|
191 |
$wp_backup = $wpdb->prefix . 'wpclone';
|
263 |
|
264 |
if( version_compare( phpversion(), '5.3', '<' ) ){
|
265 |
add_action( 'admin_notices', 'wpa_wpc_phpnotice');
|
266 |
+
}
|
267 |
+
|
268 |
+
function wpa_wpc_plugin_redirect()
|
269 |
+
|
270 |
+
{
|
271 |
+
|
272 |
+
//Control after activating redirect to settings page
|
273 |
+
if (get_option('wpa_wpc_plugin_do_activation_redirect', false)) {
|
274 |
+
|
275 |
+
delete_option('wpa_wpc_plugin_do_activation_redirect');
|
276 |
+
|
277 |
+
wp_redirect(admin_url('admin.php?page=wp-clone'));
|
278 |
+
}
|
279 |
+
}
|
280 |
+
|
281 |
+
|
282 |
+
//Banner functionality
|
283 |
+
function wpclone_ajax_banner1_close(){
|
284 |
+
update_option("wpclone_ajax_banner1_close", true);
|
285 |
+
update_option("wpclone_ajax_banner1_removed", false);
|
286 |
+
wp_send_json_success(["success" => true]);
|
287 |
+
exit();
|
288 |
+
}
|
289 |
+
|
290 |
+
function wpclone_ajax_banner1_removed(){
|
291 |
+
update_option("wpclone_ajax_banner1_close", true);
|
292 |
+
update_option("wpclone_ajax_banner1_removed", true);
|
293 |
+
wp_send_json_success(["success" => true]);
|
294 |
+
exit();
|
295 |
+
}
|
296 |
+
|
297 |
+
function wpclone_ajax_banner1_getstatus(){
|
298 |
+
wp_send_json_success([
|
299 |
+
'wpclone_ajax_banner1_close' => get_option("wpclone_ajax_banner1_close", "0"),
|
300 |
+
'wpclone_ajax_banner1_removed' => get_option("wpclone_ajax_banner1_removed", "0")
|
301 |
+
]);
|
302 |
+
exit();
|
303 |
+
}
|
304 |
+
|
305 |
+
function wpclone_admin_head_scripts(){
|
306 |
+
echo '<style rel="stylesheet">
|
307 |
+
/** Banner CSS **/
|
308 |
+
.banner-1{
|
309 |
+
min-height: 744px;
|
310 |
+
width: auto;
|
311 |
+
background-size: cover;
|
312 |
+
padding-top: 48px;
|
313 |
+
padding-left: 61px;
|
314 |
+
padding-right: 85px;
|
315 |
+
font-family: \'Montserrat\', sans-serif;
|
316 |
+
margin-right: 30px;
|
317 |
+
margin-top: 20px;
|
318 |
+
}
|
319 |
+
|
320 |
+
.banner-1 .heading{
|
321 |
+
color: #0f9087;
|
322 |
+
font-size: 26px;
|
323 |
+
}
|
324 |
+
|
325 |
+
.banner-1 .nutshell-list{
|
326 |
+
color: #3A3A3A;
|
327 |
+
font-size: 18px;
|
328 |
+
line-height: 22px;
|
329 |
+
}
|
330 |
+
|
331 |
+
.banner-1 .nutshell-list li{
|
332 |
+
list-style-position: inside;
|
333 |
+
text-indent: -1em;
|
334 |
+
padding-left: 20px;
|
335 |
+
}
|
336 |
+
|
337 |
+
|
338 |
+
.banner-1 .banner-footer {
|
339 |
+
margin-top: 25px;
|
340 |
+
font-size: 18px;
|
341 |
+
line-height: 29px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.button1 span.sc-button {
|
345 |
+
-webkit-font-smoothing: antialiased;
|
346 |
+
background-color: #0f9087;
|
347 |
+
border: none;
|
348 |
+
color: #fff;
|
349 |
+
display: inline-block;
|
350 |
+
text-decoration: none;
|
351 |
+
user-select: none;
|
352 |
+
letter-spacing: 1px;
|
353 |
+
padding-left: 25px;
|
354 |
+
padding-right: 25px;
|
355 |
+
padding-top: 12px;
|
356 |
+
padding-bottom: 12px;
|
357 |
+
transition: all 0.1s ease-out;
|
358 |
+
border-radius: 15px;
|
359 |
+
}
|
360 |
+
|
361 |
+
.banner-1 .button1{
|
362 |
+
|
363 |
+
|
364 |
+
}
|
365 |
+
.banner-1 .button2{
|
366 |
+
-webkit-font-smoothing: antialiased;
|
367 |
+
background-color: #0f9087;
|
368 |
+
border: none;
|
369 |
+
color: #fff;
|
370 |
+
display: inline-block;
|
371 |
+
text-decoration: none;
|
372 |
+
user-select: none;
|
373 |
+
letter-spacing: 1px;
|
374 |
+
padding: 12px 35px;
|
375 |
+
text-transform: uppercase;
|
376 |
+
transition: all 0.1s ease-out;
|
377 |
+
border-radius: 10px;
|
378 |
+
}
|
379 |
+
|
380 |
+
.banner-1 .close-icon {
|
381 |
+
float: right;
|
382 |
+
margin-top: -30px;
|
383 |
+
margin-right: -65px;
|
384 |
+
cursor: pointer;
|
385 |
+
}
|
386 |
+
|
387 |
+
.plugin-large-notice .banner-1-collapsed{
|
388 |
+
min-height: 63px;
|
389 |
+
width: auto;
|
390 |
+
/*padding-top: 48px;
|
391 |
+
padding-left: 61px;
|
392 |
+
padding-right: 85px;*/
|
393 |
+
font-family: \'Montserrat\', sans-serif;
|
394 |
+
margin-right: 30px;
|
395 |
+
margin-top: 20px;
|
396 |
+
}
|
397 |
+
|
398 |
+
.plugin-large-notice .banner-1-collapsed p.left-text {
|
399 |
+
font-size: 20px;
|
400 |
+
line-height: 25px;
|
401 |
+
color: #0f9087;
|
402 |
+
font-family: \'Montserrat\', sans-serif;
|
403 |
+
padding-left: 15px;
|
404 |
+
float: left;
|
405 |
+
}
|
406 |
+
|
407 |
+
.plugin-large-notice .banner-1-collapsed p.left-text a {
|
408 |
+
font-size: 15px;
|
409 |
+
color: #0f9087;
|
410 |
+
text-decoration: underline;
|
411 |
+
}
|
412 |
+
|
413 |
+
.plugin-large-notice .banner-1-collapsed p.remove-for-good {
|
414 |
+
float: right;
|
415 |
+
font-size: 16px;
|
416 |
+
color: #0f9087;
|
417 |
+
margin-right: 30px;
|
418 |
+
line-height: 35px;
|
419 |
+
cursor: pointer;
|
420 |
+
}
|
421 |
+
.nutshell-list a {
|
422 |
+
color: #0f9087;
|
423 |
+
text-decoration: underline;
|
424 |
+
}
|
425 |
+
</style>';
|
426 |
+
}
|
427 |
+
|
428 |
+
function wpclone_admin_footer_scripts(){
|
429 |
+
echo '<script>
|
430 |
+
jQuery(function($) {
|
431 |
+
//Banner notice
|
432 |
+
$("document").ready(function (e) {
|
433 |
+
console.log("I am ready");
|
434 |
+
|
435 |
+
$.ajax({
|
436 |
+
url: ajaxurl,
|
437 |
+
type: \'get\',
|
438 |
+
data: {
|
439 |
+
\'action\': \'wpclone-ajax-banner1-getstatus\'
|
440 |
+
},
|
441 |
+
success: function(data){
|
442 |
+
var urlParams = new URLSearchParams(window.location.search);
|
443 |
+
var currentPage = urlParams.get("page");
|
444 |
+
|
445 |
+
if(data.data.wpclone_ajax_banner1_close === "1" && data.data.wpclone_ajax_banner1_removed === "1"){
|
446 |
+
$(".banner-1-collapsed").hide().remove();
|
447 |
+
$(".banner-1").hide().remove();
|
448 |
+
}else if(data.data.wpclone_ajax_banner1_close === "1" && data.data.wpclone_ajax_banner1_removed != "1"){
|
449 |
+
if(currentPage === "wp-clone"){
|
450 |
+
$(".banner-1-collapsed").show();
|
451 |
+
$(".banner-1").hide();
|
452 |
+
}else{
|
453 |
+
$(".banner-1-collapsed").show();
|
454 |
+
$(".banner-1").hide();
|
455 |
+
}
|
456 |
+
}else if(data.data.wpclone_ajax_banner1_close === "0" && data.data.wpclone_ajax_banner1_removed === "0"){
|
457 |
+
if(currentPage === "wp-clone"){
|
458 |
+
$(".banner-1-collapsed").hide();
|
459 |
+
$(".banner-1").show();
|
460 |
+
}else{
|
461 |
+
$(".banner-1-collapsed").show();
|
462 |
+
$(".banner-1").hide();
|
463 |
+
}
|
464 |
+
}
|
465 |
+
},
|
466 |
+
error: function(e){
|
467 |
+
}
|
468 |
+
});
|
469 |
+
});
|
470 |
+
$("a#show-large-banner-1").on("click", function(){
|
471 |
+
$(".banner-1-collapsed").hide();
|
472 |
+
$(".banner-1").show(100);
|
473 |
+
});
|
474 |
+
$("#please-first-read-it").on("click", function(){
|
475 |
+
$(".banner-1-collapsed").hide();
|
476 |
+
$(".banner-1").show(100);
|
477 |
+
});
|
478 |
+
$(".banner-1 .close-icon").on("click", function (e) {
|
479 |
+
$(".banner-1-collapsed").show(100);
|
480 |
+
$(".banner-1").hide(100);
|
481 |
+
|
482 |
+
$.ajax({
|
483 |
+
url: ajaxurl,
|
484 |
+
type: \'get\',
|
485 |
+
data: {
|
486 |
+
\'action\': \'wpclone-ajax-banner1-close\'
|
487 |
+
},
|
488 |
+
success: function(data){
|
489 |
+
console.log(data);
|
490 |
+
},
|
491 |
+
error: function(e){
|
492 |
+
}
|
493 |
+
});
|
494 |
+
})
|
495 |
+
|
496 |
+
$(".banner-1-collapsed #remove-for-good-text").on("click", function (e) {
|
497 |
+
$(".banner-1-collapsed").hide();
|
498 |
+
|
499 |
+
$.ajax({
|
500 |
+
url: ajaxurl,
|
501 |
+
type: \'get\',
|
502 |
+
data: {
|
503 |
+
\'action\': \'wpclone-ajax-banner1-removed\'
|
504 |
+
},
|
505 |
+
success: function(data){
|
506 |
+
console.log(data);
|
507 |
+
},
|
508 |
+
error: function(e){
|
509 |
+
}
|
510 |
+
});
|
511 |
+
})
|
512 |
+
});
|
513 |
+
</script>';
|
514 |
+
}
|
515 |
+
|
516 |
+
function wpclone_admin_notice__success() {
|
517 |
+
?>
|
518 |
+
<script type="text/javascript" src="https://sellcodes.com/quick_purchase/q1OGuSox/embed.js" async="async"></script>
|
519 |
+
<div style="clear: both; margin-top: 2px;"></div>
|
520 |
+
<div class="plugin-large-notice">
|
521 |
+
<div class="banner-1-collapsed" style="display:none; background-image: url('<?php echo plugins_url( 'lib/img/banner_bg_fold_2.jpg', __FILE__ )?>')">
|
522 |
+
<p class="left-text"><strong>BIG NEWS:</strong> We want WP Clone to arise from the dead. <a href="#" id="show-large-banner-1">Read more</a></p>
|
523 |
+
<p class="remove-for-good"><span id="remove-for-good-text" style="text-decoration: underline">Remove for good</span> <span style="font-size: 14px; cursor: pointer;">(please first <span id="please-first-read-it" style="text-decoration: underline">read it</span>!)</span></p>
|
524 |
+
</div>
|
525 |
+
<div class="banner-1" style="display:none;background-image: url('<?php echo plugins_url( 'lib/img/banner_bg.jpg', __FILE__ )?>')">
|
526 |
+
<div class="close-icon"><img src='<?php echo plugins_url( 'lib/img/banner_close_icon.png', __FILE__ )?>'> </div>
|
527 |
+
<div class="heading">BIG NEWS: <strong>We want WP Clone to arise from the dead.</strong> Please help us!</div>
|
528 |
+
<div style="margin-top: 27px; font-size: 20px; color: #3a3a3a">The key points in a nutshell:</div>
|
529 |
+
<div class="nutshell-list">
|
530 |
+
<ul>
|
531 |
+
<li>1. New contributors have been added to the plugin, and with it comes new motivation to make it a kick-ass product!</li>
|
532 |
+
<li>2. Some fixes have been applied, the plugin now works in 90% of cases (and a further 9% if you follow the process as
|
533 |
+
outlined on the <a href="https://wordpress.org/plugins/wp-clone-by-wp-academy/" target="_blank">plugin page</a>)</li>
|
534 |
+
<li>
|
535 |
+
3. We want to revive the plugin, make it work in 100% of cases, and add many more features. As we’re short on cash,
|
536 |
+
we’re crowdfunding it, and need your help:
|
537 |
+
<ul style="margin-left: 30px;margin-top: 15px;">
|
538 |
+
<li>
|
539 |
+
a. <span class="sellcodes-quick-purchase" style="float: none;"><span style="text-decoration: underline; font-family: 'Montserrat', sans-serif;" class="sc-button" data-product-id="q1OGuSox" data-option-id="FgUPGiaV">Contribution of 5 or 10 USD:</span></span> You get the warm fuzzy feeling from giving a sincere “Thank you” for a plugin which <br>
|
540 |
+
probably made your life easier in the past, and helping to further develop it!
|
541 |
+
</li>
|
542 |
+
<li>
|
543 |
+
b. <span class="sellcodes-quick-purchase" style="float: none;"><span style="text-decoration: underline; font-family: 'Montserrat', sans-serif;" class="sc-button" data-product-id="q1OGuSox" data-option-id="HtNSwPAK">Contribution of 15 USD:</span></span> As in a), plus you will be rewarded with a <strong>free plugin license</strong> <br>
|
544 |
+
(for the premium product which we will create). A contribution of 30 USD gets you 2 licenses.
|
545 |
+
</li>
|
546 |
+
<li>
|
547 |
+
c. <span class="sellcodes-quick-purchase" style="float: none;"><span style="text-decoration: underline; font-family: 'Montserrat', sans-serif;" class="sc-button" data-product-id="q1OGuSox" data-option-id="3DV66HIl">Contribution of 50 USD:</span></span> As in a), plus an <strong>unlimited websites premium license.</strong> <br>
|
548 |
+
This a fantastic, one-time deal. The plugin will provide many more features <br>
|
549 |
+
- such as backup scheduling, backup to external servers etc. - while still <br>being super-easy to use! It will be the best on the market – <strong style="text-decoration: underline">guaranteed</strong>.
|
550 |
+
</li>
|
551 |
+
</ul>
|
552 |
+
</li>
|
553 |
+
</ul>
|
554 |
+
</div>
|
555 |
+
<div class="banner-footer">
|
556 |
+
<span>All licenses are <strong>lifetime licenses</strong> and valid on both commercial and non-commercial <br>websites. The crowdfunding target is USD 3,000. If we don’t reach it you’ll be refunded*.</span> <br> <br>
|
557 |
+
Thank you for your support - we <span style="text-decoration: underline;">really</span> depend on it!
|
558 |
+
</div>
|
559 |
+
<div style="margin-top: 33px;">
|
560 |
+
<a href="#" class="button1"><span class="sellcodes-quick-purchase" style="float: none;"><span style="letter-spacing: 1.2px; color: #ffffff; text-decoration: none; font-family: 'Montserrat', sans-serif;" class="sc-button" data-product-id="q1OGuSox" data-option-id="FgUPGiaV">Contribute</span></span></a>
|
561 |
+
<a href="#" class="button1"><span class="sellcodes-quick-purchase" style="float: none;"><span style="letter-spacing: 1.2px; color: #ffffff; text-decoration: none; font-family: 'Montserrat', sans-serif;" class="sc-button" data-product-id="q1OGuSox" data-option-id="3DV66HIl">Contribute & get free license(s)</span></span></a>
|
562 |
+
</div>
|
563 |
+
<p style="margin-top: 33px;">
|
564 |
+
Also check out the <a href="https://wordpress.org/plugins/wp-clone-by-wp-academy/" target="_blank" style="color: #0f9087">updated plugin description.</a> To follow our funding progress please go <a href="https://sellcodes.com/q1OGuSox" target="_blank" style="color: #0f9087">here</a>.
|
565 |
+
</p>
|
566 |
+
<p style="margin-top: 33px; color: #0f9087">
|
567 |
+
*With the exception of the 5 or 10 USD amounts. We want you to have that warm fuzzy feeling forever ;)
|
568 |
+
</p>
|
569 |
+
</div>
|
570 |
+
</div>
|
571 |
+
<?php
|
572 |
}
|