WP Staging – DB & File Duplicator & Migration - Version 1.0.0

Version Description

  • Fix: Do not follow symlinks during file copy process
  • Fix: css error
  • Fix: Show "not-compatible" notice only when blog version is higher than plugin tested version.
  • Fix: undefined var $size
  • Fix: Check if $path is null before writing to remaining_files.json
  • Fix: $db_helper undefined message
  • Fix: Skip non utf8 encoded files during copying process
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 WP Staging – DB & File Duplicator & Migration
Version 1.0.0
Comparing to
See all releases

Version 1.0.0

Files changed (81) hide show
  1. CONTRIBUTING.md +38 -0
  2. LICENSE +340 -0
  3. README.md +29 -0
  4. assets/css/wpstg-admin.css +611 -0
  5. assets/css/wpstg-admin.min.css +1 -0
  6. assets/images/admin_dashboard.png +0 -0
  7. assets/images/loading.gif +0 -0
  8. assets/images/loading.svg +1 -0
  9. assets/images/logo_clean_small_212_25.png +0 -0
  10. assets/js/wpstg-admin.js +800 -0
  11. assets/js/wpstg-admin.min.js +1 -0
  12. assets/js/wpstg.js +0 -0
  13. assets/js/wpstg.min.js +0 -0
  14. includes/WPSTG_SL_Plugin_Updater.php +377 -0
  15. includes/admin/add-ons.php +59 -0
  16. includes/admin/admin-actions.php +31 -0
  17. includes/admin/admin-footer.php +41 -0
  18. includes/admin/admin-notices.php +258 -0
  19. includes/admin/admin-pages.php +56 -0
  20. includes/admin/plugins.php +62 -0
  21. includes/admin/settings/contextual-help.php +50 -0
  22. includes/admin/settings/display-settings.php +181 -0
  23. includes/admin/settings/register-settings.php +839 -0
  24. includes/admin/tools.php +460 -0
  25. includes/admin/upload-functions.php +190 -0
  26. includes/admin/welcome.php +73 -0
  27. includes/class-wpstg-html-elements.php +219 -0
  28. includes/class-wpstg-license-handler.php +368 -0
  29. includes/debug/browsers/WPChromePHP.class.php +25 -0
  30. includes/debug/browsers/WPFirePHP.class.php +28 -0
  31. includes/debug/browsers/api/chromephp/ChromePhp.php +440 -0
  32. includes/debug/browsers/api/chromephp/README +16 -0
  33. includes/debug/browsers/api/firephp/CHANGELOG.md +167 -0
  34. includes/debug/browsers/api/firephp/README.md +75 -0
  35. includes/debug/browsers/api/firephp/examples/oo.php +82 -0
  36. includes/debug/browsers/api/firephp/examples/oo.php4 +72 -0
  37. includes/debug/browsers/api/firephp/examples/procedural.php +79 -0
  38. includes/debug/browsers/api/firephp/examples/procedural.php4 +69 -0
  39. includes/debug/browsers/api/firephp/lib/FirePHPCore/FirePHP.class.php +1828 -0
  40. includes/debug/browsers/api/firephp/lib/FirePHPCore/FirePHP.class.php4 +1327 -0
  41. includes/debug/browsers/api/firephp/lib/FirePHPCore/fb.php +275 -0
  42. includes/debug/browsers/api/firephp/lib/FirePHPCore/fb.php4 +245 -0
  43. includes/debug/browsers/api/firephp/package.json +42 -0
  44. includes/debug/browsers/api/firephp/program.json +5 -0
  45. includes/debug/browsers/api/firephp/tests/API/newlines.php +12 -0
  46. includes/debug/browsers/api/firephp/tests/FirePHPCore/FirePHPTest.php +181 -0
  47. includes/debug/browsers/api/firephp/tests/TestHelper.php +55 -0
  48. includes/debug/browsers/api/firephp/tests/phpunit.xml +2 -0
  49. includes/debug/browsers/api/firephp/workspace/README.md +19 -0
  50. includes/debug/browsers/api/firephp/workspace/lib/project.js +5 -0
  51. includes/debug/browsers/api/firephp/workspace/package.json +28 -0
  52. includes/debug/browsers/api/firephp/workspace/program.json +78 -0
  53. includes/debug/browsers/api/firephp/workspace/scripts/build.js +164 -0
  54. includes/debug/browsers/api/firephp/workspace/scripts/publish.js +65 -0
  55. includes/debug/browsers/api/firephp/workspace/tpl/license.tpl.md +21 -0
  56. includes/debug/browsers/api/firephp/workspace/tpl/pear.package.tpl.xml +61 -0
  57. includes/debug/browsers/api/firephp/workspace/tpl/readme.tpl.md +17 -0
  58. includes/debug/classes/wpstgDebug.class.php +277 -0
  59. includes/debug/classes/wpstgDebug.interface.php +11 -0
  60. includes/install.php +160 -0
  61. includes/libraries/RolingCurlX.php +218 -0
  62. includes/libraries/browser.php +1082 -0
  63. includes/logger.php +128 -0
  64. includes/scripts.php +79 -0
  65. includes/staging-functions.php +114 -0
  66. includes/template-functions.php +1722 -0
  67. includes/wpstg-sanitize.php +158 -0
  68. languages/Gruntfile.js +105 -0
  69. languages/README.md +18 -0
  70. languages/index.php +6 -0
  71. languages/readme.txt +16 -0
  72. languages/wpstg-en_EN.mo +0 -0
  73. languages/wpstg-en_EN.po +648 -0
  74. languages/wpstg.mo +0 -0
  75. languages/wpstg.po +648 -0
  76. license.txt +281 -0
  77. optimizer/wp-staging-optimizer.php +147 -0
  78. readme.txt +203 -0
  79. templates/wpstg.min.css +0 -0
  80. uninstall.php +35 -0
  81. wp-staging.php +248 -0
CONTRIBUTING.md ADDED
@@ -0,0 +1,38 @@
1
+ #Contribute To Quick Adsense Reloaded
2
+
3
+ Community made patches, localisations, bug reports and contributions are always welcome.
4
+
5
+ When contributing please ensure you follow the guidelines below so that we can keep on top of things.
6
+
7
+ __Please Note:__ GitHub is for bug reports and contributions only.
8
+
9
+ ## Getting Started
10
+
11
+ * Submit a ticket for your issue, assuming one does not already exist.
12
+ * Raise it on our [Issue Tracker](https://github.com/rene-hermenau/quick-adsense-reloaded/issues)
13
+ * Clearly describe the issue including steps to reproduce the bug.
14
+ * Make sure you fill in the earliest version that you know has the issue as well as the version of WordPress you're using.
15
+
16
+ ## Making Changes
17
+
18
+ * Fork the repository on GitHub
19
+ * Make the changes to your forked repository
20
+ * Ensure you stick to the [WordPress Coding Standards](https://codex.wordpress.org/WordPress_Coding_Standards)
21
+ * When committing, reference your issue (if present) and include a note about the fix
22
+ * (coming soon) If possible, and if applicable, please also add/update unit tests for your changes
23
+ * Push the changes to your fork and submit a pull request to the 'master' branch of the Quick Adsense Reloaded repository
24
+
25
+ ## Code Documentation
26
+
27
+ * We ensure that every Quick Adsense Reloaded function is documented well and follows the standards set by phpDoc
28
+ * An example function can be found [here](https://gist.github.com/rene-hermenau/8d3d7ee0633ee2f64b4b)
29
+ * Please make sure that every function is documented so that when we update our API Documentation it will complete
30
+ * If you're adding/editing a function in a class, make sure to add `@access {private|public|protected}`
31
+ * Finally, please use tabs and not spaces. The tab indent size should be 4 for all Quick Adsense Reloaded code.
32
+
33
+ At this point you're waiting on us to merge your pull request. We'll review all pull requests, and make suggestions and changes if necessary.
34
+
35
+ # Additional Resources
36
+ * [General GitHub Documentation](http://help.github.com/)
37
+ * [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
38
+ * [PHPUnit Tests Guide](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
LICENSE ADDED
@@ -0,0 +1,340 @@
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ {description}
294
+ Copyright (C) {year} {fullname}
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
340
+
README.md ADDED
@@ -0,0 +1,29 @@
1
+ ### Welcome to the WP-Staging repository
2
+
3
+ ## Note ##
4
+
5
+ This is the latest developer version of WP-Staging for WordPress.
6
+
7
+ ## Installation ##
8
+
9
+ 1. You can clone the GitHub repository: `https://github.com/rene-hermenau/wp-staging.git`
10
+ 2. Or download it directly as a ZIP file: `https://github.com/rene-hermenau/wp-staging/archive/master.zip`
11
+ 3. Upload it via WordPress->Plugin->AddNew
12
+
13
+ This will download the latest developer copy of WP-Staging.
14
+
15
+ ## Bugs ##
16
+ If you find an issue, let us know [here](https://github.com/rene-hermenau/wp-staging/issues?state=open)!
17
+
18
+ ## Support ##
19
+ This is a developer's portal for WP-Staging
20
+
21
+ ## Contributions ##
22
+ Anyone is welcome to contribute to WP-Staging. Please read the [guidelines for contributing](https://github.com/rene-hermenau/wp-staging/blob/master/CONTRIBUTING.md) to this repository.
23
+
24
+ There are various ways you can contribute:
25
+
26
+ 1. Raise an [Issue](https://github.com/rene-hermenau/wp-staging/issues) on GitHub
27
+ 2. Send us a Pull Request with your bug fixes and/or new features
28
+ 3. Translate WP-Staging into different languages
29
+ 4. Provide feedback and suggestions on [enhancements](https://github.com/rene-hermenau/wp-staging/issues?direction=desc&labels=Enhancement&page=1&sort=created&state=open)
assets/css/wpstg-admin.css ADDED
@@ -0,0 +1,611 @@
1
+ /**
2
+ * WPSTG Admin CSS
3
+ *
4
+ * @package WPSTG
5
+ * @subpackage Admin CSS
6
+ * @copyright Copyright (c) 2015, René Hermenau
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ */
9
+
10
+
11
+ /* CSS for Tabs */
12
+
13
+ #tab_container ul {
14
+ /*height: 200px;*/
15
+ list-style: none;
16
+ margin: 0;
17
+ padding: 0;
18
+ background: #f1f1f1;
19
+ float: left;
20
+ padding-top: 0px;
21
+ /*list-style-type: square;*/
22
+ }
23
+
24
+ #tab_container ul li:first-child.selected-tab {
25
+ border-top: none;
26
+ }
27
+
28
+ #tab_container ul li a.selected-tab {
29
+ font-weight: bold;
30
+ text-decoration: none;
31
+ }
32
+
33
+
34
+
35
+ #tab_container .row{
36
+ padding-top:10px;
37
+ padding-bottom:12px;
38
+ }
39
+
40
+
41
+ #tab_container .row label strong, #tab_container .row strong {
42
+ font-weight: bold;
43
+ }
44
+
45
+ .wpstg-tabs a {
46
+ padding:5px;
47
+ }
48
+
49
+ #tab_container > ul > li.wpstg-tabs.active {
50
+ background-color:white;
51
+ }
52
+
53
+
54
+
55
+ #wpstg_settingsgeneral_header .row:nth-child(3), #wpstg_settingsgeneral_header .row:nth-child(4){
56
+ display:none;
57
+ }
58
+
59
+ /* Layout of admin table and rows
60
+ */
61
+
62
+ #tab_container .panel-container {
63
+ background: #FFF;
64
+ padding:20px;
65
+ padding-top:0px;
66
+ overflow:auto;
67
+ }
68
+
69
+ #tab_container .form-table th {
70
+ vertical-align: top;
71
+ text-align: left;
72
+ padding: 20px 10px 20px 0;
73
+ width: 200px;
74
+ line-height: 1.3;
75
+ font-weight: bold;
76
+ font-size: 14px;
77
+ color:#484848;
78
+ width: 30%;
79
+ }
80
+
81
+ #tab_container .form-table tr {
82
+ border-bottom: 1px solid #E7E7E7;
83
+ }
84
+
85
+ #tab_container span.description{
86
+ display: block;
87
+ font-weight: 400;
88
+ font-style: normal;
89
+ font-size: 13px;
90
+ margin-top: 7px;
91
+ color:#484848;
92
+ }
93
+
94
+ #tab_container .col-title{
95
+ color:#484848;
96
+ }
97
+
98
+ @media only screen and (max-width:680px) {
99
+ #tab_container ul {
100
+ float:none;
101
+ }
102
+ #tab_container .form-table tr > th {
103
+ width:100%;
104
+ }
105
+ #tab_container span.description{
106
+ font-size: 14px;
107
+ }
108
+ #tab_container .form-table tr > th, #tab_container .form-table tr > td {
109
+ padding:10px;
110
+ }
111
+ }
112
+
113
+ #tab_container ul li {
114
+ margin-bottom:0px;
115
+ }
116
+
117
+ #tab_container ul li a {
118
+ display: block;
119
+ padding:10px 4px 10px 14px;
120
+ border-width: 1px 0;
121
+ border-style: solid;
122
+ border-top-color:white;
123
+ border-bottom-color:#e7e7e7;
124
+ text-decoration: none;
125
+ color: #0097DF;
126
+ font-weight: bold;
127
+ }
128
+ #tab_container ul li a:hover {
129
+ background-color: #e5e5e5;
130
+ color:#777777;
131
+ }
132
+
133
+
134
+ .wp-staginglogo{
135
+ display: block;
136
+ font-size:16px;
137
+ padding-top:20px;
138
+ width:220px;
139
+ float:left;
140
+ }
141
+
142
+ .wpstg-version{
143
+ display: block;
144
+ padding-top:29px
145
+ }
146
+
147
+
148
+ .wpstg_admin .nav-tab {
149
+ color: #3C3C3C;
150
+ }
151
+
152
+
153
+ #tab_container table tbody tr:nth-child(1) > th > div {
154
+ font-size: 20px;
155
+ }
156
+
157
+ .wpstg_hidden{
158
+ display: none;
159
+ }
160
+
161
+ /* End layout of admin table and rows
162
+ */
163
+ #mashtabcontainer > .mashtabs {
164
+ background-color: #ffffff;
165
+ }
166
+
167
+ #mashtabcontainer ul .active {
168
+ background-color: #00adef;
169
+ color: white;
170
+ border-bottom-color: #0098D2;
171
+ }
172
+
173
+ #mashtabcontainer ul .active:hover {
174
+ background-color: #00A4E2;
175
+ color: white;
176
+ border-bottom-color: #0098D2;
177
+ }
178
+
179
+ #mashtabcontainer ul li a {
180
+ padding: 10px 14px 10px 14px;
181
+ background-color: #f3f3f3
182
+
183
+ }
184
+
185
+ #mashtabcontainer .mashtab-container {
186
+ border: 0px solid #ececec;
187
+ }
188
+
189
+ /* Cloning workflow */
190
+ #wpstg-clonepage-wrapper {
191
+ margin-bottom: 20px;
192
+ width: 690px;
193
+ }
194
+
195
+ @media screen and (min-width:1090px){
196
+ #wpstg-clonepage-wrapper {
197
+ float: left;
198
+ margin-bottom: 20px;
199
+ width: 690px;
200
+ }
201
+ .wpstg-sidebar{
202
+ display: none;
203
+ margin-left: 700px;
204
+ margin-top: 138px;
205
+ }
206
+ }
207
+
208
+ .wpstg-sidebar{
209
+ display: none;
210
+ padding: 10px;
211
+ border: 1px solid #DFDFDF;
212
+ max-width: 250px;
213
+ height: 250px;
214
+ }
215
+
216
+ #wpstg-steps {
217
+ margin-top:30px;
218
+ }
219
+
220
+ #wpstg-steps li {
221
+ color: #444;
222
+ line-height: 20px;
223
+ padding-right:10px;
224
+ float:left;
225
+ }
226
+
227
+
228
+ .wpstg-step-num {
229
+ border: 1px solid #444;
230
+ border-radius: 3px;
231
+ display: inline-block;
232
+ width: 20px;
233
+ height: 20px;
234
+ text-align: center;
235
+ margin-right: 5px;
236
+ }
237
+
238
+ .wpstg-current-step {
239
+ font-weight: bold;
240
+ }
241
+
242
+ .wpstg-current-step .wpstg-step-num {
243
+ background: #444;
244
+ color: #eee;
245
+ }
246
+
247
+ .wpstg-clone {
248
+ border: 3px solid #ffffff;
249
+ margin-bottom: 5px;
250
+ padding: 5px 10px;
251
+ width: 300px;
252
+ position: relative;
253
+ overflow: hidden;
254
+ transition: border-color .2s ease-in-out;
255
+ background-color: #DDDDDD;
256
+ }
257
+
258
+ .wpstg-clone.active {
259
+ border-color: #1d94cf;;
260
+ }
261
+
262
+ .wpstg-clone-title {
263
+ display: inline-block;
264
+ font-size: 15px;
265
+ max-width: 130px;
266
+ text-decoration: none;
267
+ font-weight: bold;
268
+ color:#0285AE;
269
+ }
270
+
271
+ .wpstg-clone-action {
272
+ background: #ffffff;
273
+ border-left: 1px solid #ccc;
274
+ color: #bbb;
275
+ display: none;
276
+ padding: 0 5px;
277
+ float: right;
278
+ text-decoration: none;
279
+ position: relative;
280
+ transition: color .2s ease-in-out;
281
+ }
282
+
283
+ .wpstg-remove-clone:hover {
284
+ color: #ef6d6d;
285
+ }
286
+
287
+ .wpstg-clone-action:last-child {
288
+ border: none;
289
+ }
290
+
291
+ .wpstg-clone:hover .wpstg-clone-action {
292
+ display: inline-block;
293
+ }
294
+
295
+ #wpstg-show-error-details:focus,
296
+ #wpstg-workflow .wpstg-clone-action {
297
+ outline: none;
298
+ box-shadow: none;
299
+ }
300
+
301
+ .wpstg-link-btn {
302
+ background: #45a1c9;
303
+ color: #fff;
304
+ display: inline-block;
305
+ padding: 5px 10px;
306
+ text-decoration: none;
307
+ vertical-align: baseline;
308
+ transition: all .2s ease-in-out;
309
+ }
310
+
311
+ .wpstg-link-btn:hover,
312
+ .wpstg-link-btn:focus {
313
+ color: #fff;
314
+ outline: none;
315
+ box-shadow: none;
316
+ }
317
+
318
+ #wpstg-workflow .wpstg-link-btn:active {
319
+ vertical-align: baseline;
320
+ }
321
+
322
+ .wpstg-link-btn[disabled] {
323
+ background: #777 !important;
324
+ pointer-events: none;
325
+ }
326
+
327
+ #wpstg-cancel-cloning {
328
+ background: #ff3428;
329
+ border-color: #e72f24;
330
+ margin-top: 5px;
331
+ }
332
+
333
+ #wpstg-cancel-cloning.success {
334
+ background: #64dd58;
335
+ border-color: #54bd4a;
336
+ }
337
+
338
+ #wpstg-error-wrapper,
339
+ #wpstg-error-details {
340
+ display: none;
341
+ margin-top: 10px;
342
+ font-size: 13px;
343
+ }
344
+
345
+ #wpstg-show-error-details {
346
+ display: inline-block;
347
+ margin-left: 5px;
348
+ color: #555;
349
+ text-decoration: none;
350
+ transition: color .2s ease-in-out;
351
+ }
352
+
353
+ #wpstg-show-error-details:hover {
354
+ color: #1d94cf;
355
+ }
356
+
357
+ #wpstg-error-details {
358
+ border-left: 5px solid #ef6d6d;
359
+ padding: 10px;
360
+ width: 500px;
361
+ }
362
+
363
+ #wpstg-home-link,
364
+ #wpstg-try-again {
365
+ display: none;
366
+ }
367
+
368
+
369
+ #wpstg-loader {
370
+ content: url('../images/loading.gif');
371
+ margin-top:-5px;
372
+ }
373
+
374
+ #wpstg-workflow {
375
+ position: relative;
376
+ clear:both;
377
+ padding-top:20px;
378
+ margin-right:20px;
379
+ }
380
+
381
+ #wpstg-workflow.loading::after,
382
+ #wpstg-removing-clone.loading::after {
383
+ background: rgba(255, 255, 255, .7);
384
+ content: 'LOADING May take little bit longer for large sites... ';
385
+ display: block;
386
+ width: 100%;
387
+ height: 100%;
388
+ font-size: 20px;
389
+ padding-top: 100px;
390
+ text-align: center;
391
+ position: absolute;
392
+ top: 0;
393
+ left: 0;
394
+ z-index: 99;
395
+ }
396
+
397
+ #wpstg-removing-clone.loading::after {
398
+ content: 'REMOVING' !important;
399
+ }
400
+
401
+ #wpstg-existing-clones,
402
+ #wpstg-removing-clone {
403
+ position: relative;
404
+ }
405
+
406
+ .wpstg-progress-bar {
407
+ max-width: 900px;
408
+ height: 27px;
409
+ padding: 0px;
410
+ background-color: #d6d8d7;
411
+ }
412
+
413
+ .wpstg-progress {
414
+ background: #1d94cf;
415
+ width: 0;
416
+ height: 100%;
417
+ transition: width 1s;
418
+ color:white;
419
+ line-height:25px;
420
+ text-align:center;
421
+ }
422
+
423
+ #wpstg-new-clone-id.wpstg-error-input,
424
+ #wpstg-clone-path.wpstg-error-input {
425
+ border: 1px solid #ff4235;
426
+ box-shadow: 0 0 2px rgba(255, 66, 53, .8);
427
+ }
428
+
429
+ #wpstg-clone-path {
430
+ margin-left: 10px;
431
+ width: 350px;
432
+ }
433
+
434
+ .wpstg-error-msg {
435
+ color: #ff4235;
436
+ }
437
+
438
+ #wpstg-start-cloning + .wpstg-error-msg {
439
+ display: block;
440
+ margin-top: 5px;
441
+ }
442
+
443
+ .wpstg-size-info {
444
+ color: #999;
445
+ font-weight: normal;
446
+ position: relative;
447
+ left: 2px;
448
+ }
449
+
450
+ .wpstg-db-table .wpstg-size-info {
451
+ top: 2px;
452
+ }
453
+
454
+ #wpstg-workflow #wpstg-start-cloning {
455
+ display: inline-block;
456
+ margin-left: 5px;
457
+ font-size: 14px;
458
+ vertical-align: baseline;
459
+ }
460
+
461
+ /* Tabs */
462
+ .wpstg-tabs-wrapper {
463
+ max-width: 640px;
464
+ margin: 10px 0;
465
+ }
466
+
467
+ #wpstg-path-wrapper {
468
+ border-bottom: 2px dashed #ccc;
469
+ padding-bottom: 10px;
470
+ margin-bottom: 10px;
471
+ }
472
+
473
+ .wpstg-tabs-wrapper {
474
+ border: 1px solid #ddd;
475
+ border-right: none;
476
+ border-left: none;
477
+ }
478
+
479
+ .wpstg-tab-section {
480
+ border: 1px solid #ddd;
481
+ border-right: none;
482
+ border-left: none;
483
+ display: none;
484
+ padding: 20px;
485
+ }
486
+
487
+ .wpstg-tab-section::after {
488
+ display: block;
489
+ content: '';
490
+ clear: both;
491
+ }
492
+
493
+ .wpstg-tab-header {
494
+ border: 1px solid #ddd;
495
+ border-right: none;
496
+ border-left: none;
497
+ color: #444;
498
+ font-size: 16px;
499
+ font-weight: bolder;
500
+ display: block;
501
+ padding: 10px;;
502
+ text-decoration: none;
503
+ }
504
+
505
+ .wpstg-tab-triangle {
506
+ display: inline-block;
507
+ margin-right: 10px;
508
+ }
509
+
510
+ .wpstg-tab-header:focus {
511
+ color: #444;
512
+ outline: none;
513
+ box-shadow: none;
514
+ }
515
+
516
+ #wpstg-large-files {
517
+ display:none;
518
+ border: 1px dashed #ccc;
519
+ /*float: right;*/
520
+ padding: 10px 10px 10px;
521
+ margin-top:20px;
522
+ position: relative;
523
+ font-size:12px;
524
+ }
525
+
526
+ #wpstg-large-files h3 {
527
+ background: #fff;
528
+ margin: 0;
529
+ padding: 0 5px;
530
+ position: absolute;
531
+ top: -10px;
532
+ left: 5px;
533
+ }
534
+
535
+ /* tmp */
536
+ .wpstg-subdir {
537
+ display: none;
538
+ margin-left: 20px;
539
+ }
540
+
541
+ .wpstg-dir a.disabled {
542
+ color: #888;
543
+ cursor: default;
544
+ text-decoration: none;
545
+ }
546
+
547
+ .wpstg-check-subdirs {
548
+ display: inline-block;
549
+ margin-left: 10px;
550
+ }
551
+
552
+ .wpstg-notice-alert{
553
+ display:block;
554
+ background-color:#FFD0D0;
555
+ padding:20px;
556
+ border: 1px solid #fff;
557
+ max-width: 600px;
558
+ }
559
+
560
+ .wpstg-header{
561
+ font-weight: 400;
562
+ line-height: 1.6em;
563
+ font-size: 19px;
564
+ border-bottom: 1px solid #DFDFDF;
565
+ clear:both;
566
+ }
567
+
568
+
569
+ #wpstg-clone-label{
570
+ font-size: 14px;
571
+ font-weight: bold;
572
+ }
573
+
574
+ #wpstg-log-details{
575
+ display:none;
576
+ height: 300px;
577
+ overflow: scroll;
578
+ max-width: 500px;
579
+ font-size: 11px;
580
+ border: 1px solid #FFF;
581
+ background-color: black;
582
+ color: white;
583
+ padding:10px;
584
+ }
585
+
586
+ #wpstg-finished-result {
587
+ display:none;
588
+ }
589
+
590
+ #wpstg-remove-cloning {
591
+ background: #ff3428;
592
+ border-color: #e72f24;
593
+ margin-top: 5px;
594
+ }
595
+
596
+ #wpstg-success-notice{
597
+ padding: 10px;
598
+ background-color: white;
599
+ max-width: 900px;
600
+ border: 1px solid #ccc;
601
+ margin-top: 20px;
602
+ }
603
+
604
+ .wpstg_beta_notice {
605
+ margin-bottom:20px;
606
+ }
607
+
608
+ .wpstg-sysinfo {
609
+ width:400px;
610
+ height: 500px;
611
+ }
assets/css/wpstg-admin.min.css ADDED
@@ -0,0 +1 @@
1
+ #tab_container ul{list-style:none;margin:0;padding:0;background:#f1f1f1;float:left}#tab_container ul li:first-child.selected-tab{border-top:none}#tab_container ul li a.selected-tab{font-weight:700;text-decoration:none}#tab_container .row{padding-top:10px;padding-bottom:12px}#tab_container .row label strong,#tab_container .row strong{font-weight:700}.wpstg-tabs a{padding:5px}#tab_container>ul>li.wpstg-tabs.active{background-color:#fff}#wpstg_settingsgeneral_header .row:nth-child(3),#wpstg_settingsgeneral_header .row:nth-child(4){display:none}#tab_container .panel-container{background:#FFF;padding:0 20px 20px;overflow:auto}#tab_container .form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;line-height:1.3;font-weight:700;font-size:14px;color:#484848;width:30%}#wpstg-workflow .wpstg-link-btn:active,.wpstg-link-btn{vertical-align:baseline}#tab_container .form-table tr{border-bottom:1px solid #E7E7E7}#tab_container span.description{display:block;font-weight:400;font-style:normal;font-size:13px;margin-top:7px;color:#484848}#tab_container .col-title{color:#484848}@media only screen and (max-width:680px){#tab_container ul{float:none}#tab_container .form-table tr>th{width:100%}#tab_container span.description{font-size:14px}#tab_container .form-table tr>td,#tab_container .form-table tr>th{padding:10px}}#tab_container ul li{margin-bottom:0}#tab_container ul li a{display:block;padding:10px 4px 10px 14px;border-width:1px 0;border-style:solid;border-top-color:#fff;border-bottom-color:#e7e7e7;text-decoration:none;color:#0097DF;font-weight:700}#tab_container ul li a:hover{background-color:#e5e5e5;color:#777}.wp-staginglogo{display:block;font-size:16px;padding-top:20px;width:220px;float:left}.wpstg-version{display:block;padding-top:29px}.wpstg_admin .nav-tab{color:#3C3C3C}#tab_container table tbody tr:nth-child(1)>th>div{font-size:20px}.wpstg_hidden{display:none}#mashtabcontainer>.mashtabs{background-color:#fff}#mashtabcontainer ul .active{background-color:#00adef;color:#fff;border-bottom-color:#0098D2}#mashtabcontainer ul .active:hover{background-color:#00A4E2;color:#fff;border-bottom-color:#0098D2}#mashtabcontainer ul li a{padding:10px 14px;background-color:#f3f3f3}#mashtabcontainer .mashtab-container{border:0 solid #ececec}#wpstg-clonepage-wrapper{margin-bottom:20px;width:690px}@media screen and (min-width:1090px){#wpstg-clonepage-wrapper{float:left;margin-bottom:20px;width:690px}.wpstg-sidebar{display:none;margin-left:700px;margin-top:138px}}.wpstg-sidebar{display:none;padding:10px;border:1px solid #DFDFDF;max-width:250px;height:250px}#wpstg-steps{margin-top:30px}#wpstg-steps li{color:#444;line-height:20px;padding-right:10px;float:left}.wpstg-step-num{border:1px solid #444;border-radius:3px;display:inline-block;width:20px;height:20px;text-align:center;margin-right:5px}.wpstg-current-step{font-weight:700}.wpstg-current-step .wpstg-step-num{background:#444;color:#eee}.wpstg-clone{border:3px solid #fff;margin-bottom:5px;padding:5px 10px;width:300px;position:relative;overflow:hidden;transition:border-color .2s ease-in-out;background-color:#DDD}.wpstg-clone.active{border-color:#1d94cf}.wpstg-clone-title{display:inline-block;font-size:15px;max-width:130px;text-decoration:none;font-weight:700;color:#0285AE}.wpstg-clone-action{background:#fff;border-left:1px solid #ccc;color:#bbb;display:none;padding:0 5px;float:right;text-decoration:none;position:relative;transition:color .2s ease-in-out}.wpstg-clone:hover .wpstg-clone-action,.wpstg-link-btn{display:inline-block}.wpstg-remove-clone:hover{color:#ef6d6d}.wpstg-clone-action:last-child{border:none}#wpstg-show-error-details:focus,#wpstg-workflow .wpstg-clone-action{outline:0;box-shadow:none}.wpstg-link-btn{background:#45a1c9;color:#fff;padding:5px 10px;text-decoration:none;transition:all .2s ease-in-out}.wpstg-link-btn:focus,.wpstg-link-btn:hover{color:#fff;outline:0;box-shadow:none}.wpstg-link-btn[disabled]{background:#777!important;pointer-events:none}#wpstg-cancel-cloning{background:#ff3428;border-color:#e72f24;margin-top:5px}#wpstg-cancel-cloning.success{background:#64dd58;border-color:#54bd4a}#wpstg-error-details,#wpstg-error-wrapper{display:none;margin-top:10px;font-size:13px}#wpstg-show-error-details{display:inline-block;margin-left:5px;color:#555;text-decoration:none;transition:color .2s ease-in-out}#wpstg-show-error-details:hover{color:#1d94cf}#wpstg-error-details{border-left:5px solid #ef6d6d;padding:10px;width:500px}.wpstg-tab-header,.wpstg-tab-section,.wpstg-tabs-wrapper{border:1px solid #ddd;border-left:none}#wpstg-home-link,#wpstg-try-again{display:none}#wpstg-loader{content:url(../images/loading.gif);margin-top:-5px}#wpstg-workflow{position:relative;clear:both;padding-top:20px;margin-right:20px}#wpstg-removing-clone.loading::after,#wpstg-workflow.loading::after{background:rgba(255,255,255,.7);content:'LOADING May take little bit longer for large sites... ';display:block;width:100%;height:100%;font-size:20px;padding-top:100px;text-align:center;position:absolute;top:0;left:0;z-index:99}#wpstg-existing-clones,#wpstg-removing-clone,.wpstg-size-info{position:relative}#wpstg-removing-clone.loading::after{content:'REMOVING'!important}.wpstg-progress-bar{max-width:900px;height:27px;padding:0;background-color:#d6d8d7}.wpstg-progress{background:#1d94cf;width:0;height:100%;transition:width 1s;color:#fff;line-height:25px;text-align:center}#wpstg-clone-path.wpstg-error-input,#wpstg-new-clone-id.wpstg-error-input{border:1px solid #ff4235;box-shadow:0 0 2px rgba(255,66,53,.8)}#wpstg-clone-path{margin-left:10px;width:350px}.wpstg-error-msg{color:#ff4235}#wpstg-start-cloning+.wpstg-error-msg{display:block;margin-top:5px}.wpstg-size-info{color:#999;font-weight:400;left:2px}.wpstg-db-table .wpstg-size-info{top:2px}#wpstg-workflow #wpstg-start-cloning{display:inline-block;margin-left:5px;font-size:14px;vertical-align:baseline}.wpstg-tabs-wrapper{max-width:640px;margin:10px 0;border-right:none}#wpstg-path-wrapper{border-bottom:2px dashed #ccc;padding-bottom:10px;margin-bottom:10px}.wpstg-tab-section{border-right:none;display:none;padding:20px}.wpstg-tab-section::after{display:block;content:'';clear:both}.wpstg-tab-header{border-right:none;color:#444;font-size:16px;font-weight:bolder;display:block;padding:10px;text-decoration:none}.wpstg-tab-triangle{display:inline-block;margin-right:10px}.wpstg-tab-header:focus{color:#444;outline:0;box-shadow:none}#wpstg-large-files{display:none;border:1px dashed #ccc;padding:10px;margin-top:20px;position:relative;font-size:12px}#wpstg-large-files h3{background:#fff;margin:0;padding:0 5px;position:absolute;top:-10px;left:5px}.wpstg-subdir{display:none;margin-left:20px}.wpstg-dir a.disabled{color:#888;cursor:default;text-decoration:none}.wpstg-check-subdirs{display:inline-block;margin-left:10px}.wpstg-notice-alert{display:block;background-color:#FFD0D0;padding:20px;border:1px solid #fff;max-width:600px}.wpstg-header{font-weight:400;line-height:1.6em;font-size:19px;border-bottom:1px solid #DFDFDF;clear:both}#wpstg-clone-label{font-size:14px;font-weight:700}#wpstg-log-details{display:none;height:300px;overflow:scroll;max-width:500px;font-size:11px;border:1px solid #FFF;background-color:#000;color:#fff;padding:10px}#wpstg-finished-result{display:none}#wpstg-remove-cloning{background:#ff3428;border-color:#e72f24;margin-top:5px}#wpstg-success-notice{padding:10px;background-color:#fff;max-width:900px;border:1px solid #ccc;margin-top:20px}.wpstg_beta_notice{margin-bottom:20px}.wpstg-sysinfo{width:400px;height:500px}
assets/images/admin_dashboard.png ADDED
Binary file
assets/images/loading.gif ADDED
Binary file
assets/images/loading.svg ADDED
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="utf-8"?><svg width='32px' height='32px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-reload"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect><g><path d="M50 15A35 35 0 1 0 74.787 25.213" fill="none" stroke="#444444" stroke-width="12px"></path><path d="M50 0L50 30L66 15L50 0" fill="#444444"></path><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1.5s" repeatCount="indefinite"></animateTransform></g></svg>
assets/images/logo_clean_small_212_25.png ADDED
Binary file
assets/js/wpstg-admin.js ADDED
@@ -0,0 +1,800 @@
1
+ /*
2
+ * WP Staging
3
+ * Main functions
4
+ *
5
+ * @author René Hermenau
6
+ * @author url https://wp-staging.com
7
+ * @date 17.08.2015
8
+ *
9
+ * @scince 0.9
10
+ */
11
+
12
+ // Cloning workflow
13
+ (function ($) {
14
+ $(document).ready(function () {
15
+
16
+ // Unselect/select all db tables
17
+ var ischecked = true;
18
+ $('#wpstg-workflow').on("click", ".wpstg-button-unselect", function (e) {
19
+ e.preventDefault();
20
+ if (ischecked == false) {
21
+ $(".wpstg-db-table-checkboxes").attr("checked", "checked");
22
+ $(".wpstg-button-unselect").html("Uncheck All");
23
+ ischecked = true;
24
+ } else {
25
+ $(".wpstg-db-table-checkboxes").removeAttr("checked");
26
+ $(".wpstg-button-unselect").html("Check All");
27
+ ischecked = false;
28
+ }
29
+ });
30
+
31
+ // Ajax loading spinner
32
+ var admin_url = ajaxurl.replace('/admin-ajax.php', '');
33
+ var spinner_url = admin_url + '/images/spinner';
34
+ if (2 < window.devicePixelRatio) {
35
+ spinner_url += '-2x';
36
+ }
37
+ spinner_url += '.gif';
38
+ var ajax_spinner = '<img src="' + spinner_url + '" alt="" class="ajax-spinner general-spinner" />';
39
+
40
+ var doing_plugin_compatibility_ajax = false;
41
+
42
+ // Basic functions
43
+
44
+ /**
45
+ * Check if object is JSON valid
46
+ *
47
+ * @param {string} str
48
+ * @returns {Boolean}
49
+ */
50
+ function wpstgIsJsonObj(obj) {
51
+ if (typeof obj == 'object')
52
+ {
53
+ return true;
54
+ }
55
+ }
56
+
57
+
58
+ /**
59
+ * Check if given value is an integer
60
+ * This also casts strings as potential integers as well
61
+ *
62
+ * */
63
+ function wpstgIsInt(value) {
64
+ return !isNaN(value) &&
65
+ parseInt(Number(value)) == value &&
66
+ !isNaN(parseInt(value, 10));
67
+ }
68
+
69
+ /**
70
+ * Do some checks first for the clone name.
71
+ * Check the max length of string and if clone name already exists
72
+ */
73
+ $('#wpstg-workflow').on('keyup', '#wpstg-new-clone-id', function () {
74
+ var data = {
75
+ action: 'wpstg_check_clone',
76
+ cloneID: this.value
77
+ };
78
+ $.post(ajaxurl, data, function (resp, status, xhr) {
79
+ if (resp.status !== "fail") {
80
+ $('#wpstg-new-clone-id').removeClass('wpstg-error-input');
81
+ $('#wpstg-start-cloning').removeAttr('disabled');
82
+ $('#wpstg-clone-id-error').text(resp.message);
83
+ } else {
84
+ $('#wpstg-new-clone-id').addClass('wpstg-error-input');
85
+ $('#wpstg-start-cloning').attr('disabled', 'disabled');
86
+ $('#wpstg-clone-id-error').text(resp.message);
87
+ }
88
+ }).fail(function(xhr) { // Will be executed when $.post() fails
89
+ wpstg_show_error_die('Fatal Error: This should not happen but is often caused by other plugins. Enable first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
90
+ console.log(xhr.statusText);
91
+ });
92
+ });
93
+
94
+ /**
95
+ * Check cloning path
96
+ */
97
+ $('#wpstg-workflow').on('keyup', '#wpstg-clone-path', function () {
98
+ var path = this.value;
99
+ if (path.length < 1) {
100
+ $('#wpstg-clone-path').removeClass('wpstg-error-input');
101
+ $('#wpstg-start-cloning').removeAttr('disabled');
102
+ $('#wpstg-path-error').text('');
103
+ return true;
104
+ }
105
+
106
+ var data = {
107
+ action: 'wpstg_check_path',
108
+ path: path
109
+ };
110
+
111
+ $.post(ajaxurl, data, function (resp, status, xhr) {
112
+ if (resp) {
113
+ $('#wpstg-clone-path').removeClass('wpstg-error-input');
114
+ $('#wpstg-start-cloning').removeAttr('disabled');
115
+ $('#wpstg-path-error').text('');
116
+ } else {
117
+ $('#wpstg-clone-path').addClass('wpstg-error-input');
118
+ $('#wpstg-start-cloning').attr('disabled', 'disabled');
119
+ $('#wpstg-path-error').text('Folder does not exist or is not writable!');
120
+ }
121
+ }).fail(function(xhr) { // Will be executed when $.post() fails
122
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
123
+ console.log(xhr.statusText);
124
+ });
125
+ });
126
+
127
+ /**
128
+ * Edit profile
129
+ */
130
+ $('#wpstg-workflow').on('click', '.wpstg-edit-clone', function (e) {
131
+ e.preventDefault();
132
+
133
+ var data = {
134
+ action: 'wpstg_edit_profile',
135
+ clone: $(this).data('clone'),
136
+ nonce: wpstg.nonce
137
+ };
138
+ $('#wpstg-workflow').load(ajaxurl, data);
139
+ });
140
+
141
+ /**
142
+ * Save profile
143
+ */
144
+ $('#wpstg-workflow').on('click', '#wpstg-save-profile', function (e) {
145
+ e.preventDefault();
146
+
147
+ var data = {
148
+ action: 'wpstg_save_profile',
149
+ cloneID: $(this).data('clone'),
150
+ nonce: wpstg.nonce,
151
+ dbCredentials: {
152
+ dbname: $('#wpstgdb-name').val(),
153
+ dbuser: $('#wpstgdb-user').val(),
154
+ dbpassword: $('#wpstgdb-password').val(),
155
+ dbhost: $('#wpstgdb-host').val()
156
+ }
157
+ };
158
+ wpstg_additional_data(data, false);
159
+ $.post(ajaxurl, data, function (resp, status, xhr) {
160
+ location.reload();
161
+ }).fail(function(xhr) { // Will be executed when $.post() fails
162
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
163
+ console.log(xhr.statusText);
164
+ });
165
+ });
166
+
167
+ /**
168
+ * Next step
169
+ */
170
+ $('#wpstg-workflow').on('click', '.wpstg-next-step-link', function (e) {
171
+ e.preventDefault();
172
+ if ($(this).attr('disabled'))
173
+ return false;
174
+
175
+ $('#wpstg-workflow').addClass('loading');
176
+ var data = {
177
+ action: $(this).data('action'),
178
+ nonce: wpstg.nonce
179
+ };
180
+ if (data.action == 'wpstg_cloning') {
181
+ data.cloneID = $('#wpstg-new-clone-id').val() || new Date().getTime();
182
+ wpstg_additional_data(data, false);
183
+ }
184
+
185
+ $('#wpstg-workflow').load(ajaxurl, data, function (response, status, xhr) {
186
+ if ( status == 'error') { //Unknown error
187
+ console.log(xhr.status + ' ' + xhr.statusText);
188
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this: ' + xhr.status + ' ' + xhr.statusText);
189
+ }
190
+ $('#wpstg-workflow').removeClass('loading');
191
+ $('.wpstg-current-step').removeClass('wpstg-current-step')
192
+ .next('li').addClass('wpstg-current-step');
193
+ if (data.action == 'wpstg_cloning') {
194
+ clone_db();
195
+ }
196
+ });
197
+ });
198
+
199
+ /**
200
+ * Previous step
201
+ */
202
+ $('#wpstg-workflow').on('click', '.wpstg-prev-step-link', function (e) {
203
+ e.preventDefault();
204
+ $('#wpstg-workflow').addClass('loading');
205
+ var data = {
206
+ action: 'wpstg_overview',
207
+ nonce: wpstg.nonce
208
+ };
209
+ $('#wpstg-workflow').load(ajaxurl, data, function (response, status, xhr) {
210
+ if ( status == 'error') { //Unknown error
211
+ console.log(xhr.status + ' ' + xhr.statusText);
212
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this: ' + xhr.status + ' ' + xhr.statusText);
213
+ }
214
+ $('#wpstg-workflow').removeClass('loading');
215
+ $('.wpstg-current-step').removeClass('wpstg-current-step')
216
+ .prev('li').addClass('wpstg-current-step');
217
+ });
218
+ });
219
+
220
+ var cloneID;
221
+ function wpstg_additional_data(data, isRemoving) {
222
+ data.uncheckedTables = [];
223
+ $('.wpstg-db-table input:not(:checked)').each(function () {
224
+ data.uncheckedTables.push(this.name);
225
+ });
226
+ data.excludedFolders = [];
227
+ $('.wpstg-dir input:not(:checked)').each(function () {
228
+ if (! $(this).parent('.wpstg-dir').parents('.wpstg-dir').children('.wpstg-expand-dirs').hasClass('disabled'))
229
+ data.excludedFolders.push(this.name);
230
+ });
231
+
232
+ cloneID = data.cloneID.toString();
233
+ }
234
+
235
+ /*
236
+ * Start scanning process
237
+ */
238
+ $('#wpstg-workflow').on('click', '.wpstg-execute-clone', function (e) {
239
+ e.preventDefault();
240
+ $('#wpstg-workflow').addClass('loading');
241
+ var data = {
242
+ action: 'wpstg_scanning',
243
+ clone: $(this).data('clone'),
244
+ nonce: wpstg.nonce
245
+ };
246
+
247
+ $('#wpstg-workflow').load(ajaxurl, data, function (response, status, xhr) {
248
+ if ( status == 'error') { //Unknown error
249
+ console.log(xhr.status + ' ' + xhr.statusText);
250
+ wpstg_show_error_die('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ' + xhr.status + ' ' + xhr.statusText);
251
+ }
252
+ $('#wpstg-workflow').removeClass('loading');
253
+ $('.wpstg-current-step').removeClass('wpstg-current-step')
254
+ .next('li').addClass('wpstg-current-step');
255
+ });
256
+ });
257
+
258
+ $('#wpstg-workflow').on('click', '.wpstg-remove-clone', function (e) {
259
+ e.preventDefault();
260
+ $('.wpstg-clone').removeClass('active');
261
+ $( '#wpstg-existing-clones' ).append( ajax_spinner );
262
+ var data = {
263
+ action: 'wpstg_preremove',
264
+ cloneID: $(this).data('clone')
265
+ };
266
+ $('#wpstg-removing-clone').load(ajaxurl, data, function (resp, status, xhr){
267
+ if ( status == 'error') { //Unknown error
268
+ console.log(xhr.status + ' ' + xhr.statusText);
269
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
270
+ }
271
+ if (status === 'success'){
272
+ $('#wpstg-existing-clones').children("img").remove();
273
+ }
274
+ });
275
+ });
276
+
277
+ $('#wpstg-workflow').on('click', '#wpstg-cancel-removing', function (e) {
278
+ e.preventDefault();
279
+ $('.wpstg-clone').removeClass('active');
280
+ $('#wpstg-removing-clone').html('');
281
+ });
282
+
283
+ $('#wpstg-workflow').on('click', '#wpstg-remove-clone', function (e) {
284
+ e.preventDefault();
285
+ $('#wpstg-removing-clone').addClass('loading');
286
+ var cloneID = $(this).data('clone');
287
+ var data = {
288
+ action: 'wpstg_remove_clone',
289
+ cloneID: cloneID,
290
+ nonce: wpstg.nonce
291
+ };
292
+
293
+ wpstg_additional_data(data, true);
294
+ $.post(ajaxurl, data, function (resp, status, xhr) {
295
+ console.log(xhr.status + ' ' + xhr.statusText);
296
+ if ( status == 'error') { //Unknown error
297
+ console.log(xhr.status + ' ' + xhr.statusText);
298
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
299
+ }
300
+ if (resp == 0) {
301
+ $('#wpstg-removing-clone').html('');
302
+ $('.wpstg-clone#' + cloneID).remove();
303
+ $('#wpstg-removing-clone').removeClass('loading');
304
+ var remaining_clones = $('.wpstg-clone');
305
+ if (remaining_clones.length < 1)
306
+ $('#wpstg-existing-clones h3').text('');
307
+ }
308
+ }).fail(function(xhr) { // Will be executed when $.post() fails
309
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
310
+ console.log(xhr.statusText);
311
+ });
312
+ });
313
+
314
+ /**
315
+ * Show error message and die()
316
+ * Writes error message into log file
317
+ *
318
+ * @param {string} $error notice
319
+ * @returns void
320
+ */
321
+ function wpstg_show_error_die(error) {
322
+ $('#wpstg-try-again').css('display', 'inline-block');
323
+ $('#wpstg-cancel-cloning').text('Reset');
324
+ $('#wpstg-cloning-result').text('Fail');
325
+ $('#wpstg-error-wrapper').show();
326
+ $('#wpstg-error-details').show();
327
+ $('#wpstg-error-details').html(error);
328
+ $('#wpstg-loader').hide();
329
+ isFinished = true; // die cloning process
330
+ console.log(error);
331
+ var add_error = ' Fatal Error: This should not happen! Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not fix it enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out what is causing this.';
332
+ var data = {
333
+ action: 'wpstg_error_processing',
334
+ wpstg_error_msg: error + add_error
335
+ };
336
+ $.post(ajaxurl, data);
337
+ }
338
+
339
+
340
+ /**
341
+ * Clone database
342
+ *
343
+ * @return void
344
+ */
345
+ var isCanceled = false;
346
+ function clone_db() {
347
+
348
+ setTimeout(function(){ // timeout of x sec - prevent security blocks and cpu overload
349
+ $('#wpstg-loader').show();
350
+ var data = {
351
+ action: 'wpstg_clone_db',
352
+ nonce: wpstg.nonce
353
+ };
354
+ $.post(ajaxurl, data, function (resp, status, xhr) {
355
+ if (isCanceled) {
356
+ cancelCloning();
357
+ return false;
358
+ }
359
+ if ( status == "error" ) { //Unknown error
360
+ wpstg_show_error_die('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ' . xhr.statusText);
361
+ } else if (!wpstgIsJsonObj(resp)) { //Unknown error
362
+ wpstg_show_error_die('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ' . xhr.statusText);
363
+ } else if (resp.percent < 0) { //Fail
364
+ wpstg_show_error_die('Fatal Error: This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ' . xhr.statusText);
365
+ } else if(resp.percent < 1) { //Continue cloning
366
+ var complete = Math.floor(resp.percent * 100) + '%';
367
+ $('#wpstg-db-progress').text(complete).css('width', complete);
368
+ $('#wpstg-error-wrapper').show();
369
+ if (resp.message !== '')
370
+ $('#wpstg-log-details').append(resp.message);
371
+
372
+ wpstg_logscroll_bottom();
373
+ clone_db();
374
+ } else { //Success cloning
375
+ $('#wpstg-db-progress').text('').css('width', '100%');
376
+ $('#wpstg-log-details').append(resp.message + '<br>');
377
+ wpstg_logscroll_bottom();
378
+ copy_files();
379
+ }
380
+ })
381
+ .fail(function(xhr) { // Will be executed when $.post() fails
382
+ wpstg_show_error_die(xhr.statusText);
383
+ console.log('Fatal Error: This should not happen but is often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
384
+ });
385
+ },wpstg.cpu_load); // timeout of x sec - prevent security blocks and cpu overload
386
+ }
387
+
388
+
389
+
390
+
391
+ function copy_files() {
392
+ setTimeout(function(){ // timeout of x sec - prevent security blocks and cpu overload
393
+ var data = {
394
+ action: 'wpstg_copy_files',
395
+ nonce: wpstg.nonce
396
+ };
397
+ $.post(ajaxurl, data, function(resp, status, xhr) {
398
+ if (isCanceled) {
399
+ cancelCloning();
400
+ return false;
401
+ }
402
+
403
+ if (!wpstgIsJsonObj(resp)) { //Unknown error
404
+ wpstg_show_error_die('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ');
405
+ } else if (resp.percent < 0) { //Fail
406
+ wpstg_show_error_die('Fatal Error: This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '. xhr.statusText);
407
+ } else if (resp.percent < 1) { //Continue copying
408
+ var complete = Math.floor(resp.percent * 100) + '%';
409
+ $('#wpstg-files-progress').text(complete).css('width', complete);
410
+ $('#wpstg-loader').show();
411
+ if (resp.message !== '')
412
+ $('#wpstg-log-details').append(resp.message + '<br>');
413
+ wpstg_logscroll_bottom();
414
+ copy_files();
415
+ } else { //Success copying
416
+ $('#wpstg-files-progress').text('').css('width', '100%');
417
+ wpstg_logscroll_bottom();
418
+ replace_links();
419
+ }
420
+ }).fail(function(xhr) { // Will be executed when $.post() fails
421
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
422
+ console.log(xhr.statusText);
423
+ });
424
+ },wpstg.cpu_load); // timeout of x sec - prevent security blocks and cpu overload
425
+ }
426
+
427
+ var isFinished = false;
428
+ function replace_links() {
429
+ var data = {
430
+ action: 'wpstg_replace_links',
431
+ nonce: wpstg.nonce
432
+ };
433
+ $.post(ajaxurl, data, function(resp, status, xhr) {
434
+ if (isCanceled) {
435
+ cancelCloning();
436
+ return false;
437
+ }
438
+
439
+ if (!wpstgIsJsonObj(resp)) { //Unknown error
440
+ wpstg_show_error_die('Fatal Error code: 1001. This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ');
441
+ } else if (resp.percent < 0) { //Fail
442
+ wpstg_show_error_die('Fatal Error code: 1002. This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ' . xhr.statusText);
443
+ } else if (resp.percent < 1) { //Continue replacing string
444
+ var complete = Math.floor(resp.percent * 100) + '%';
445
+ $('#wpstg-links-progress').text('').css('width', complete);
446
+ $('#wpstg-loader').show();
447
+ if (resp.message !== '')
448
+ $('#wpstg-log-details').append(resp.message + '<br>');
449
+ wpstg_logscroll_bottom();
450
+ replace_links();
451
+ } else { //Success
452
+ $('#wpstg-links-progress').text('').css('width', '100%');
453
+ $('#wpstg-loader').hide();
454
+ wpstg_logscroll_bottom();
455
+ cloneID = cloneID.replace(/[^A-Za-z0-9]/g, '');
456
+ var redirectURL = $('#wpstg-clone-url').attr('href') + '/' + cloneID + '/';
457
+ setTimeout(function () {
458
+ $('#wpstg-finished-result').show();
459
+ $('#wpstg-clone-url').text('Visit staging site <span style="font-size: 10px;">(login with your admin credentials)</span>' . cloneID).attr('href', redirectURL );
460
+ $('#wpstg_staging_name').text(cloneID);
461
+ $('#wpstg-cancel-cloning').hide();
462
+ $('#wpstg-home-link').css('display', 'inline-block');
463
+ isFinished = true;
464
+ }, 1200);
465
+ if (resp.message !== '')
466
+ $('#wpstg-log-details').append(resp.message + '<br>');
467
+ wpstg_logscroll_bottom();
468
+ }
469
+
470
+ }).fail(function(xhr) { // Will be executed when $.post() fails
471
+ wpstg_show_error_die('Fatal Error: This should not happen but is sometimes caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
472
+ console.log(xhr.statusText);
473
+ });
474
+ };
475
+
476
+ /**
477
+ * Show error log button
478
+ */
479
+ $('#wpstg-workflow').on('click', '#wpstg-show-log-button', function (e) {
480
+ e.preventDefault();
481
+ $('#wpstg-log-details').toggle();
482
+ $('html, body').animate({
483
+ scrollTop: $("#wpstg-log-details").offset().top
484
+ }, 400);
485
+ });
486
+
487
+ /**
488
+ * Scroll the log window to the bottom
489
+ *
490
+ * @return void
491
+ */
492
+ function wpstg_logscroll_bottom(){
493
+ var $mydiv = $('#wpstg-log-details');
494
+ $mydiv.scrollTop($mydiv[0].scrollHeight);
495
+ }
496
+
497
+ /**
498
+ * Cancel Cloning process button
499
+ */
500
+ $('#wpstg-workflow').on('click', '#wpstg-cancel-cloning', function (e) {
501
+ e.preventDefault();
502
+ if (! confirm('Are you sure?'))
503
+ return false;
504
+ $('#wpstg-try-again, #wpstg-home-link').hide();
505
+ $(this).attr('disabled', 'disabled');
506
+ isCanceled = true;
507
+ $('#wpstg-cloning-result').text('Please wait...this can take up to a minute');
508
+ $('#wpstg-loader').hide();
509
+ $('#wpstg-show-log-button').hide();
510
+ $( this ).parent().append( ajax_spinner );
511
+ if (isFinished)
512
+ cancelCloning();
513
+ });
514
+
515
+ /**
516
+ * Remove Clone button
517
+ */
518
+ $('#wpstg-workflow').on('click', '#wpstg-remove-cloning', function (e) {
519
+ e.preventDefault();
520
+ if (! confirm('Are you sure you want to remove the clone site ?'))
521
+ return false;
522
+ $('#wpstg-try-again, #wpstg-home-link').hide();
523
+ $(this).attr('disabled', 'disabled');
524
+ $('#wpstg-clone-url').attr('disabled', 'disabled');
525
+ isCanceled = true;
526
+ $('#wpstg-cloning-result').text('Please wait...this can take up to a minute');
527
+ $('#wpstg-loader').hide();
528
+ $('#wpstg-success-notice').hide();
529
+ $('#wpstg-show-log-button').hide();
530
+ $('#wpstg-log-details').hide();
531
+ $( this ).parent().append( ajax_spinner );
532
+ if (isFinished)
533
+ cancelCloning();
534
+ });
535
+
536
+ /**
537
+ * Try again button
538
+ */
539
+ $('#wpstg-workflow').on('click', '#wpstg-try-again', function (e) {
540
+ e.preventDefault();
541
+ console.log('test');
542
+ $('#wpstg-workflow').addClass('loading');
543
+ var data = {
544
+ action: 'wpstg_scanning',
545
+ nonce: wpstg.nonce
546
+ };
547
+ $('#wpstg-workflow').load(ajaxurl, data, function (response, status, xhr) {
548
+ if ( status == 'error') { //Unknown error
549
+ console.log(xhr.status + ' ' + xhr.statusText);
550
+ wpstg_show_error_die('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
551
+ }
552
+ $('#wpstg-workflow').removeClass('loading');
553
+ $('.wpstg-current-step').removeClass('wpstg-current-step')
554
+ .prev('li').addClass('wpstg-current-step');
555
+ });
556
+ });
557
+
558
+ /**
559
+ * Reset button
560
+ */
561
+ $('#wpstg-workflow').on('click', '#wpstg-reset-clone', function (e) {
562
+ e.preventDefault();
563
+ $(this).attr('disabled', 'disabled')
564
+ .next('.wpstg-next-step-link').hide();
565
+ $('#wpstg-loader').show();
566
+ cloneID = $(this).data('clone');
567
+ cancelCloning();
568
+ });
569
+
570
+ /**
571
+ * Cancel Cloning process
572
+ *
573
+ * @returns void
574
+ */
575
+ function cancelCloning() {
576
+ var data = {
577
+ action: 'wpstg_cancel_cloning',
578
+ nonce: wpstg.nonce,
579
+ cloneID: cloneID
580
+ };
581
+ $.post(ajaxurl, data, function (resp, status, xhr) {
582
+ if (resp == 0) {
583
+ $('#wpstg-cloning-result').text('');
584
+ $('#wpstg-cancel-cloning').text('Success').addClass('success').removeAttr('disabled');
585
+ location.reload();
586
+ }
587
+ }).fail(function(xhr) { // Will be executed when $.post() fails
588
+ wpstg_show_error_die(xhr.statusText);
589
+ console.log('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> ' + xhr.status + ' ' + xhr.statusText);
590
+ });
591
+ }
592
+
593
+ $('#wpstg-workflow').on('click', '#wpstg-home-link', function (e) {
594
+ e.preventDefault();
595
+ location.reload();
596
+ });
597
+
598
+ /**
599
+ * Tabs
600
+ */
601
+ $('#wpstg-workflow').on('click', '.wpstg-tab-header', function (e) {
602
+ e.preventDefault();
603
+ var section = $(this).data('id');
604
+ $(this).toggleClass('expand');
605
+ $(section).slideToggle();
606
+ if ($(this).hasClass('expand'))
607
+ $(this).find('.wpstg-tab-triangle').html('&#9660;');
608
+ else
609
+ $(this).find('.wpstg-tab-triangle').html('&#9658;');
610
+
611
+ });
612
+
613
+ /**
614
+ * Directory structure
615
+ */
616
+ $('#wpstg-workflow').on('click', '.wpstg-expand-dirs', function (e) {
617
+ e.preventDefault();
618
+ if (! $(this).hasClass('disabled'))
619
+ $(this).siblings('.wpstg-subdir').slideToggle();
620
+ });
621
+
622
+
623
+ $('#wpstg-workflow').on('change', '.wpstg-check-dir', function () {
624
+ var dir = $(this).parent('.wpstg-dir');
625
+ if (this.checked) {
626
+ dir.parents('.wpstg-dir').children('.wpstg-check-dir').attr('checked', 'checked');
627
+ dir.find('.wpstg-expand-dirs').removeClass('disabled');
628
+ dir.find('.wpstg-subdir .wpstg-check-dir').attr('checked', 'checked');
629
+ } else {
630
+ dir.find('.wpstg-dir .wpstg-check-dir').removeAttr('checked');
631
+ dir.find('.wpstg-expand-dirs, .wpstg-check-subdirs').addClass('disabled');
632
+ dir.find('.wpstg-check-subdirs').data('action', 'check').text('check');
633
+ dir.children('.wpstg-subdir').slideUp();
634
+ }
635
+ });
636
+
637
+ /**
638
+ * install must-use plugin
639
+ */
640
+
641
+ $( '#plugin-compatibility' ).change( function( e ) {
642
+ var install = '1';
643
+ if ( $( this ).is( ':checked' ) ) {
644
+ var answer = confirm( wpstg.mu_plugin_confirmation );
645
+
646
+ if ( !answer ) {
647
+ $( this ).prop( 'checked', false );
648
+ return;
649
+ }
650
+ } else {
651
+ install = '0';
652
+ }
653
+
654
+ $( '.plugin-compatibility-wrap' ).toggle();
655
+
656
+ $( this ).parent().append( ajax_spinner );
657
+ $( '#plugin-compatibility' ).attr( 'disabled', 'disabled' );
658
+ $( '.plugin-compatibility' ).addClass( 'disabled' );
659
+
660
+ $.ajax( {
661
+ url: ajaxurl,
662
+ type: 'POST',
663
+ dataType: 'text',
664
+ cache: false,
665
+ data: {
666
+ action: 'wpstg_muplugin_install',
667
+ install: install
668
+ },
669
+ error: function( jqXHR, textStatus, errorThrown ) {
670
+ alert( "Error: " + wpstg.plugin_compatibility_settings_problem + '\r\n\r\n' + wpstg.status + ' ' + jqXHR.status + ' ' + jqXHR.statusText + '\r\n\r\n' + wpstg.response + '\r\n' + jqXHR.responseText );
671
+ $( '.ajax-spinner' ).remove();
672
+ $( '#plugin-compatibility' ).removeAttr( 'disabled' );
673
+ $( '.plugin-compatibility' ).removeClass( 'disabled' );
674
+ },
675
+ success: function( data ) {
676
+ if ( '' !== $.trim( data ) ) {
677
+ alert( data );
678
+ } else {
679
+ $( '.plugin-compatibility' ).append( '<span class="ajax-success-msg">' + wpstg.saved + '</span>' );
680
+ $( '.ajax-success-msg' ).fadeOut( 2000, function() {
681
+ $( this ).remove();
682
+ } );
683
+ }
684
+ $( '.ajax-spinner' ).remove();
685
+ $( '#plugin-compatibility' ).removeAttr( 'disabled' );
686
+ $( '.plugin-compatibility' ).removeClass( 'disabled' );
687
+ }
688
+ } );
689
+
690
+ });
691
+
692
+ if ( $( '#plugin-compatibility' ).is( ':checked' ) ) {
693
+ $( '.plugin-compatibility-wrap' ).show();
694
+ }
695
+ $( '.plugin-compatibility-save' ).click( function() {
696
+ if ( doing_plugin_compatibility_ajax ) {
697
+ return;
698
+ }
699
+ $( this ).addClass( 'disabled' );
700
+ var select_element = $( '#selected-plugins' );
701
+ $( select_element ).attr( 'disabled', 'disabled' );
702
+ var query_limit = $( '#wpstg_settings\\[wpstg_query_limit\\]' );
703
+ var batch_size = $( '#wpstg_settings\\[wpstg_batch_size\\]' );
704
+ var disable_admin_login = $( '#wpstg_settings\\[disable_admin_login\\]' );
705
+ var uninstall_on_delete = $( '#wpstg_settings\\[uninstall_on_delete\\]' );
706
+ disable_admin_login = $( disable_admin_login ).prop('checked') ? '1' : '0';
707
+ uninstall_on_delete = $( uninstall_on_delete ).prop('checked') ? '1' : '0';
708
+
709
+ doing_plugin_compatibility_ajax = true;
710
+ $( this ).after( '<img src="' + spinner_url + '" alt="" class="plugin-compatibility-spinner general-spinner" />' );
711
+
712
+ $.ajax( {
713
+ url: ajaxurl,
714
+ type: 'POST',
715
+ dataType: 'text',
716
+ cache: false,
717
+ data: {
718
+ action: 'wpstg_disable_plugins',
719
+ blacklist_plugins: $( select_element ).val(),
720
+ query_limit: $( query_limit ).val(),
721
+ batch_size: $( batch_size ).val(),
722
+ disable_admin_login: disable_admin_login,
723
+ uninstall_on_delete: uninstall_on_delete,
724
+
725
+ },
726
+ error: function( jqXHR, textStatus, errorThrown ) {
727
+ alert( wpstg.blacklist_problem + '\r\n\r\n' + wpstg.status + ' ' + jqXHR.status + ' ' + jqXHR.statusText + '\r\n\r\n' + wpstg.response + '\r\n' + jqXHR.responseText );
728
+ $( select_element ).removeAttr( 'disabled' );
729
+ $( '.plugin-compatibility-save' ).removeClass( 'disabled' );
730
+ doing_plugin_compatibility_ajax = false;
731
+ $( '.plugin-compatibility-spinner' ).remove();
732
+ $( '.plugin-compatibility-success-msg' ).show().fadeOut( 2000 );
733
+ },
734
+ success: function( data ) {
735
+ if ( '' !== $.trim( data ) ) {
736
+ alert( data );
737
+ }
738
+ $( select_element ).removeAttr( 'disabled' );
739
+ $( '.plugin-compatibility-save' ).removeClass( 'disabled' );
740
+ doing_plugin_compatibility_ajax = false;
741
+ $( '.plugin-compatibility-spinner' ).remove();
742
+ $( '.plugin-compatibility-success-msg' ).show().fadeOut( 2000 );
743
+ }
744
+ } );
745
+ } );
746
+
747
+ // select all tables
748
+ $( '.multiselect-select-all' ).click( function() {
749
+ var multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );
750
+ $( 'option', multiselect ).attr( 'selected', 1 );
751
+ $( multiselect ).focus().trigger( 'change' );
752
+ } );
753
+
754
+ // deselect all tables
755
+ $( '.multiselect-deselect-all' ).click( function() {
756
+ var multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );
757
+ $( 'option', multiselect ).removeAttr( 'selected' );
758
+ $( multiselect ).focus().trigger( 'change' );
759
+ } );
760
+
761
+ // invert table selection
762
+ $( '.multiselect-invert-selection' ).click( function() {
763
+ var multiselect = $( this ).parents( '.select-wrap' ).children( '.multiselect' );
764
+ $( 'option', multiselect ).each( function() {
765
+ $( this ).attr( 'selected', !$( this ).attr( 'selected' ) );
766
+ } );
767
+ $( multiselect ).focus().trigger( 'change' );
768
+ } );
769
+
770
+
771
+
772
+ // Show large files
773
+ $('#wpstg-workflow').on('click', '#wpstg-show-large-files', function (e) {
774
+ e.preventDefault();
775
+ //$('#wpstg-show-large-files').on('click', ) click(function(){
776
+ $('#wpstg-large-files').toggle();
777
+ });
778
+
779
+
780
+
781
+ });
782
+ })(jQuery);
783
+
784
+ // Load twitter button async
785
+ window.twttr = (function(d, s, id) {
786
+ var js, fjs = d.getElementsByTagName(s)[0],
787
+ t = window.twttr || {};
788
+ if (d.getElementById(id)) return t;
789
+ js = d.createElement(s);
790
+ js.id = id;
791
+ js.src = "https://platform.twitter.com/widgets.js";
792
+ fjs.parentNode.insertBefore(js, fjs);
793
+
794
+ t._e = [];
795
+ t.ready = function(f) {
796
+ t._e.push(f);
797
+ };
798
+
799
+ return t;
800
+ }(document, "script", "twitter-wjs"));
assets/js/wpstg-admin.min.js ADDED
@@ -0,0 +1 @@
1
+ !function(a){a(document).ready(function(){function b(a){return"object"==typeof a?!0:void 0}function c(b){b.uncheckedTables=[],a(".wpstg-db-table input:not(:checked)").each(function(){b.uncheckedTables.push(this.name)}),b.excludedFolders=[],a(".wpstg-dir input:not(:checked)").each(function(){a(this).parent(".wpstg-dir").parents(".wpstg-dir").children(".wpstg-expand-dirs").hasClass("disabled")||b.excludedFolders.push(this.name)}),o=b.cloneID.toString()}function d(b){a("#wpstg-try-again").css("display","inline-block"),a("#wpstg-cancel-cloning").text("Reset"),a("#wpstg-cloning-result").text("Fail"),a("#wpstg-error-wrapper").show(),a("#wpstg-error-details").show(),a("#wpstg-error-details").html(b),a("#wpstg-loader").hide(),q=!0,console.log(b);var c=' Fatal Error: This should not happen! Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not fix it enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out what is causing this.',d={action:"wpstg_error_processing",wpstg_error_msg:b+c};a.post(ajaxurl,d)}function e(){setTimeout(function(){a("#wpstg-loader").show();var c={action:"wpstg_clone_db",nonce:wpstg.nonce};a.post(ajaxurl,c,function(c,g){if(p)return i(),!1;if("error"==g)d('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '.xhr.statusText);else if(b(c))if(c.percent<0)d('Fatal Error: This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '.xhr.statusText);else if(c.percent<1){var j=Math.floor(100*c.percent)+"%";a("#wpstg-db-progress").text(j).css("width",j),a("#wpstg-error-wrapper").show(),""!==c.message&&a("#wpstg-log-details").append(c.message),h(),e()}else a("#wpstg-db-progress").text("").css("width","100%"),a("#wpstg-log-details").append(c.message+"<br>"),h(),f();else d('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '.xhr.statusText)}).fail(function(a){d(a.statusText),console.log('Fatal Error: This should not happen but is often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText)})},wpstg.cpu_load)}function f(){setTimeout(function(){var c={action:"wpstg_copy_files",nonce:wpstg.nonce};a.post(ajaxurl,c,function(c){if(p)return i(),!1;if(b(c))if(c.percent<0)d('Fatal Error: This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '.xhr.statusText);else if(c.percent<1){var e=Math.floor(100*c.percent)+"%";a("#wpstg-files-progress").text(e).css("width",e),a("#wpstg-loader").show(),""!==c.message&&a("#wpstg-log-details").append(c.message+"<br>"),h(),f()}else a("#wpstg-files-progress").text("").css("width","100%"),h(),g();else d('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ')}).fail(function(a){d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText),console.log(a.statusText)})},wpstg.cpu_load)}function g(){var c={action:"wpstg_replace_links",nonce:wpstg.nonce};a.post(ajaxurl,c,function(c){if(p)return i(),!1;if(b(c))if(c.percent<0)d('Fatal Error code: 1002. This should never happen. Please try again! <br>If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '.xhr.statusText);else if(c.percent<1){var e=Math.floor(100*c.percent)+"%";a("#wpstg-links-progress").text("").css("width",e),a("#wpstg-loader").show(),""!==c.message&&a("#wpstg-log-details").append(c.message+"<br>"),h(),g()}else{a("#wpstg-links-progress").text("").css("width","100%"),a("#wpstg-loader").hide(),h(),o=o.replace(/[^A-Za-z0-9]/g,"");var f=a("#wpstg-clone-url").attr("href")+"/"+o+"/";setTimeout(function(){a("#wpstg-finished-result").show(),a("#wpstg-clone-url").text('Visit staging site <span style="font-size: 10px;">(login with your admin credentials)</span>'.cloneID).attr("href",f),a("#wpstg_staging_name").text(o),a("#wpstg-cancel-cloning").hide(),a("#wpstg-home-link").css("display","inline-block"),q=!0},1200),""!==c.message&&a("#wpstg-log-details").append(c.message+"<br>"),h()}else d('Fatal Error code: 1001. This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> ')}).fail(function(a){d('Fatal Error: This should not happen but is sometimes caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText),console.log(a.statusText)})}function h(){var b=a("#wpstg-log-details");b.scrollTop(b[0].scrollHeight)}function i(){var b={action:"wpstg_cancel_cloning",nonce:wpstg.nonce,cloneID:o};a.post(ajaxurl,b,function(b){0==b&&(a("#wpstg-cloning-result").text(""),a("#wpstg-cancel-cloning").text("Success").addClass("success").removeAttr("disabled"),location.reload())}).fail(function(a){d(a.statusText),console.log('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText)})}var j=!0;a("#wpstg-workflow").on("click",".wpstg-button-unselect",function(b){b.preventDefault(),0==j?(a(".wpstg-db-table-checkboxes").attr("checked","checked"),a(".wpstg-button-unselect").html("Uncheck All"),j=!0):(a(".wpstg-db-table-checkboxes").removeAttr("checked"),a(".wpstg-button-unselect").html("Check All"),j=!1)});var k=ajaxurl.replace("/admin-ajax.php",""),l=k+"/images/spinner";2<window.devicePixelRatio&&(l+="-2x"),l+=".gif";var m='<img src="'+l+'" alt="" class="ajax-spinner general-spinner" />',n=!1;a("#wpstg-workflow").on("keyup","#wpstg-new-clone-id",function(){var b={action:"wpstg_check_clone",cloneID:this.value};a.post(ajaxurl,b,function(b){"fail"!==b.status?(a("#wpstg-new-clone-id").removeClass("wpstg-error-input"),a("#wpstg-start-cloning").removeAttr("disabled"),a("#wpstg-clone-id-error").text(b.message)):(a("#wpstg-new-clone-id").addClass("wpstg-error-input"),a("#wpstg-start-cloning").attr("disabled","disabled"),a("#wpstg-clone-id-error").text(b.message))}).fail(function(a){d('Fatal Error: This should not happen but is often caused by other plugins. Enable first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText),console.log(a.statusText)})}),a("#wpstg-workflow").on("keyup","#wpstg-clone-path",function(){var b=this.value;if(b.length<1)return a("#wpstg-clone-path").removeClass("wpstg-error-input"),a("#wpstg-start-cloning").removeAttr("disabled"),a("#wpstg-path-error").text(""),!0;var c={action:"wpstg_check_path",path:b};a.post(ajaxurl,c,function(b){b?(a("#wpstg-clone-path").removeClass("wpstg-error-input"),a("#wpstg-start-cloning").removeAttr("disabled"),a("#wpstg-path-error").text("")):(a("#wpstg-clone-path").addClass("wpstg-error-input"),a("#wpstg-start-cloning").attr("disabled","disabled"),a("#wpstg-path-error").text("Folder does not exist or is not writable!"))}).fail(function(a){d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText),console.log(a.statusText)})}),a("#wpstg-workflow").on("click",".wpstg-edit-clone",function(b){b.preventDefault();var c={action:"wpstg_edit_profile",clone:a(this).data("clone"),nonce:wpstg.nonce};a("#wpstg-workflow").load(ajaxurl,c)}),a("#wpstg-workflow").on("click","#wpstg-save-profile",function(b){b.preventDefault();var e={action:"wpstg_save_profile",cloneID:a(this).data("clone"),nonce:wpstg.nonce,dbCredentials:{dbname:a("#wpstgdb-name").val(),dbuser:a("#wpstgdb-user").val(),dbpassword:a("#wpstgdb-password").val(),dbhost:a("#wpstgdb-host").val()}};c(e,!1),a.post(ajaxurl,e,function(){location.reload()}).fail(function(a){d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+a.status+" "+a.statusText),console.log(a.statusText)})}),a("#wpstg-workflow").on("click",".wpstg-next-step-link",function(b){if(b.preventDefault(),a(this).attr("disabled"))return!1;a("#wpstg-workflow").addClass("loading");var f={action:a(this).data("action"),nonce:wpstg.nonce};"wpstg_cloning"==f.action&&(f.cloneID=a("#wpstg-new-clone-id").val()||(new Date).getTime(),c(f,!1)),a("#wpstg-workflow").load(ajaxurl,f,function(b,c,g){"error"==c&&(console.log(g.status+" "+g.statusText),d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this: '+g.status+" "+g.statusText)),a("#wpstg-workflow").removeClass("loading"),a(".wpstg-current-step").removeClass("wpstg-current-step").next("li").addClass("wpstg-current-step"),"wpstg_cloning"==f.action&&e()})}),a("#wpstg-workflow").on("click",".wpstg-prev-step-link",function(b){b.preventDefault(),a("#wpstg-workflow").addClass("loading");var c={action:"wpstg_overview",nonce:wpstg.nonce};a("#wpstg-workflow").load(ajaxurl,c,function(b,c,e){"error"==c&&(console.log(e.status+" "+e.statusText),d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this: '+e.status+" "+e.statusText)),a("#wpstg-workflow").removeClass("loading"),a(".wpstg-current-step").removeClass("wpstg-current-step").prev("li").addClass("wpstg-current-step")})});var o;a("#wpstg-workflow").on("click",".wpstg-execute-clone",function(b){b.preventDefault(),a("#wpstg-workflow").addClass("loading");var c={action:"wpstg_scanning",clone:a(this).data("clone"),nonce:wpstg.nonce};a("#wpstg-workflow").load(ajaxurl,c,function(b,c,e){"error"==c&&(console.log(e.status+" "+e.statusText),d('Fatal Error: This should not happen. Please try again! <br> If restarting does not work <a href="https://wordpress.org/support/plugin/wp-staging" target="blank">get in contact with us</a> '+e.status+" "+e.statusText)),a("#wpstg-workflow").removeClass("loading"),a(".wpstg-current-step").removeClass("wpstg-current-step").next("li").addClass("wpstg-current-step")})}),a("#wpstg-workflow").on("click",".wpstg-remove-clone",function(b){b.preventDefault(),a(".wpstg-clone").removeClass("active"),a("#wpstg-existing-clones").append(m);var c={action:"wpstg_preremove",cloneID:a(this).data("clone")};a("#wpstg-removing-clone").load(ajaxurl,c,function(b,c,e){"error"==c&&(console.log(e.status+" "+e.statusText),d('Fatal Error: This should not happen but is most often caused by other plugins. Try first the option "Optimizer" in WP Staging->Settings and try again. If this does not help, enable <a href="https://codex.wordpress.org/Debugging_in_WordPress" target="_blank">wordpress debug mode</a> to find out which plugin is causing this:<br> '+e.status+" "+e.statusText)),"success"===c&&a("#wpstg-existing-clones").children("img").remove()})}),a("#wpstg-workflow").on("click","#wpstg-cancel-removing",function(b){b.preventDefault(),a(".wpstg-clone").removeClass("active"),a("#wpstg-removing-clone").html("")}),a("#wpstg-workflow").on("click","#wpstg-remove-clone",function(b){b.preventDefault(),a("#wpstg-removing-clone").addClass("loading");var e=a(this).data("clone"),f={action:"wpstg_remove_clone",cloneID:e,nonce:wpstg.nonce};c(f,!0),a.post(ajaxurl,f,function(b,c,f){if(console.log(f.status+" "+f.statusText),"error"==c&&(console.log(f.status+" "+f.sta