Version Description
- Daily Schedule Option Added
- Email notification on automatic optimization, default email is admin email address. You can change this in settings
Download this release
Release Info
Developer | ruhanirabin |
Plugin | WP-Optimize |
Version | 1.8.9.8 |
Comparing to | |
See all releases |
Code changes from version 1.8.9.7 to 1.8.9.8
- languages/wp-optimize.pot +178 -150
- readme.txt +24 -18
- wp-optimize-common.php +96 -15
- wp-optimize-credits.php +0 -9
- wp-optimize-main.php +537 -531
- wp-optimize-settings.php +39 -3
- wp-optimize.php +52 -58
languages/wp-optimize.pot
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the same license as the WP-Optimize package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WP-Optimize 1.8.9.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-optimize\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
@@ -32,155 +32,175 @@ msgstr ""
|
|
32 |
msgid "Tables"
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: wp-optimize-common.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
msgid "GB"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: wp-optimize-common.php:
|
40 |
msgid "MB"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: wp-optimize-common.php:
|
44 |
msgid "KB"
|
45 |
msgstr ""
|
46 |
|
47 |
-
#: wp-optimize-common.php:
|
48 |
msgid "bytes"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: wp-optimize-common.php:
|
52 |
msgid "transient options deleted"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: wp-optimize-common.php:
|
56 |
msgid "post revisions deleted"
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: wp-optimize-common.php:
|
60 |
msgid "auto drafts deleted"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: wp-optimize-common.php:
|
64 |
msgid "items removed from Trash"
|
65 |
msgstr ""
|
66 |
|
67 |
-
#: wp-optimize-common.php:
|
68 |
msgid "spam comments deleted"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: wp-optimize-common.php:
|
72 |
msgid "comments removed from Trash"
|
73 |
msgstr ""
|
74 |
|
75 |
-
#: wp-optimize-common.php:
|
76 |
msgid "unused comment metadata items removed"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: wp-optimize-common.php:
|
80 |
msgid "unused akismet comment metadata items removed"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: wp-optimize-common.php:
|
84 |
msgid "unapproved comments deleted"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: wp-optimize-common.php:
|
88 |
msgid "pingbacks deleted"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: wp-optimize-common.php:
|
92 |
msgid "trackbacks deleted"
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: wp-optimize-common.php:
|
96 |
msgid "Enabled weekly processing"
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: wp-optimize-common.php:
|
100 |
msgid "Disabled weekly processing"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: wp-optimize-common.php:
|
104 |
msgid "NO Actions Taken"
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: wp-optimize-common.php:
|
108 |
msgid "transient options in your database"
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: wp-optimize-common.php:
|
112 |
msgid "No transient options found"
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: wp-optimize-common.php:
|
116 |
msgid "orphaned postmeta in your database"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: wp-optimize-common.php:
|
120 |
msgid "No orphaned postmeta in your database"
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: wp-optimize-common.php:
|
124 |
msgid "unused tags in your database"
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: wp-optimize-common.php:
|
128 |
msgid "No unused tags found"
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: wp-optimize-common.php:
|
132 |
msgid "post revisions in your database"
|
133 |
msgstr ""
|
134 |
|
135 |
-
#: wp-optimize-common.php:
|
136 |
msgid "No post revisions found"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: wp-optimize-common.php:
|
140 |
msgid "auto draft post(s) in your database"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: wp-optimize-common.php:
|
144 |
msgid "No auto draft posts found"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: wp-optimize-common.php:
|
148 |
msgid "spam comments found"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: wp-optimize-common.php:
|
152 |
msgid "Review"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: wp-optimize-common.php:
|
156 |
msgid "No spam comments found"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: wp-optimize-common.php:
|
160 |
msgid "unapproved comments found"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: wp-optimize-common.php:
|
164 |
msgid "No unapproved comments found"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: wp-optimize-common.php:
|
168 |
msgid "Pingbacks found"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: wp-optimize-common.php:
|
172 |
msgid "No pingbacks found"
|
173 |
msgstr ""
|
174 |
|
175 |
-
#: wp-optimize-common.php:
|
176 |
msgid "Trackbacks found"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: wp-optimize-common.php:
|
180 |
msgid "No trackbacks found"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: wp-optimize-common.php:
|
184 |
msgid "nothing"
|
185 |
msgstr ""
|
186 |
|
@@ -192,413 +212,421 @@ msgstr ""
|
|
192 |
msgid "WP-Optimize started as a utility for my own projects. I have realized soon, that this plugin might help a lot of people out there. I am personally thanking all of the users who use this plugin as a daily basis. Also thank you all of the translators and the generous people who have donated for this project."
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: wp-optimize-credits.php:
|
196 |
-
msgid "Share this plugin on Facebook"
|
197 |
-
msgstr ""
|
198 |
-
|
199 |
-
#: wp-optimize-credits.php:38
|
200 |
msgid "Contributing Developers"
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: wp-optimize-credits.php:
|
204 |
msgid "Help me make this plugin better"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: wp-optimize-credits.php:
|
208 |
msgid "I am looking for contributing developers."
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: wp-optimize-credits.php:
|
212 |
msgid "Your name and website will be credited here in the plugin"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: wp-optimize-credits.php:
|
216 |
msgid "Translators"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: wp-optimize-credits.php:
|
220 |
msgid "http://(Translator Website)"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: wp-optimize-credits.php:
|
224 |
msgid "(Translator name)"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: wp-optimize-credits.php:
|
228 |
msgid "Read Translation Instructions"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: wp-optimize-credits.php:
|
232 |
msgid "Plugin Resources"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: wp-optimize-credits.php:
|
236 |
msgid "Get a Translator Account"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: wp-optimize-credits.php:
|
240 |
msgid "Plugin Translation Portal (needs translator account)"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: wp-optimize-credits.php:
|
244 |
msgid "Request New Language"
|
245 |
msgstr ""
|
246 |
|
247 |
-
#: wp-optimize-credits.php:
|
248 |
msgid "Plugin Homepage"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: wp-optimize-credits.php:
|
252 |
msgid "Support (GitHub)"
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: wp-optimize-credits.php:
|
256 |
msgid "Support E-mail"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: wp-optimize-credits.php:
|
260 |
msgid "Change Log"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: wp-optimize-credits.php:
|
264 |
msgid "FAQ"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: wp-optimize-credits.php:
|
268 |
msgid "GitHub Development Log"
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: wp-optimize-credits.php:
|
272 |
msgid "No items"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: wp-optimize-main.php:
|
276 |
msgid "Database Optimized!"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: wp-optimize-main.php:
|
280 |
msgid "Clean-up options"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: wp-optimize-main.php:
|
284 |
msgid "Clean post revisions which are older than "
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: wp-optimize-main.php:
|
288 |
-
#: wp-optimize-main.php:
|
289 |
msgid "weeks"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: wp-optimize-main.php:
|
293 |
msgid "Clean all post revisions"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: wp-optimize-main.php:
|
297 |
msgid "Clean auto draft posts which are older than "
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: wp-optimize-main.php:
|
301 |
msgid "Clean all auto draft posts and posts in trash"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: wp-optimize-main.php:
|
305 |
msgid "Remove spam comments which are older than "
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: wp-optimize-main.php:
|
309 |
msgid "Remove spam comments and comments in trash"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: wp-optimize-main.php:
|
313 |
msgid "Remove unapproved comments which are older than "
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: wp-optimize-main.php:
|
317 |
msgid "Remove unapproved comments"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: wp-optimize-main.php:
|
321 |
msgid "Remove transient options"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: wp-optimize-main.php:
|
325 |
msgid "Remove pingbacks"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: wp-optimize-main.php:
|
329 |
msgid "Remove trackbacks"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: wp-optimize-main.php:
|
333 |
msgid "Do not select RED marked items unless you really need to use them"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: wp-optimize-main.php:
|
337 |
msgid "Optimize your YouTube embedding in WordPress with this plugin"
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: wp-optimize-main.php:
|
341 |
msgid "Actions"
|
342 |
msgstr ""
|
343 |
|
344 |
-
#: wp-optimize-main.php:
|
345 |
msgid "Optimize database tables"
|
346 |
msgstr ""
|
347 |
|
348 |
-
#: wp-optimize-main.php:
|
349 |
msgid "Note:"
|
350 |
msgstr ""
|
351 |
|
352 |
-
#: wp-optimize-main.php:
|
353 |
msgid "InnoDB tables will not be optimized"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: wp-optimize-main.php:
|
357 |
msgid "Select safe options"
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: wp-optimize-main.php:
|
361 |
msgid "Warning:"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: wp-optimize-main.php:
|
365 |
msgid "Always make a backup of your DB when you upgrade to major versions"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: wp-optimize-main.php:
|
369 |
msgid "PROCESS"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: wp-optimize-main.php:
|
373 |
msgid "Please donate! It really helps me keep improvising"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: wp-optimize-main.php:
|
377 |
msgid "Donate!"
|
378 |
msgstr ""
|
379 |
|
380 |
-
#: wp-optimize-main.php:
|
381 |
msgid "Please give a proper rating:)"
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: wp-optimize-main.php:
|
385 |
msgid "Rating"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: wp-optimize-main.php:
|
389 |
msgid "Status log: "
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: wp-optimize-main.php:
|
393 |
msgid "Last automatic optimization was at"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: wp-optimize-main.php:
|
397 |
msgid "There was no automatic optimization"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: wp-optimize-main.php:
|
401 |
msgid "Scheduled cleaning enabled"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: wp-optimize-main.php:
|
405 |
msgid "Next schedule"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: wp-optimize-main.php:
|
409 |
msgid "Refresh"
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: wp-optimize-main.php:
|
413 |
msgid "Scheduled cleaning disabled"
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: wp-optimize-main.php:
|
417 |
msgid "Check settings"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: wp-optimize-main.php:
|
421 |
msgid "Keeping last "
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: wp-optimize-main.php:
|
425 |
msgid "weeks data"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: wp-optimize-main.php:
|
429 |
msgid "Not keeping recent data"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: wp-optimize-main.php:
|
433 |
msgid "Current database size : "
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: wp-optimize-main.php:
|
437 |
msgid "You have saved"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: wp-optimize-main.php:
|
441 |
msgid "Current database size"
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: wp-optimize-main.php:
|
445 |
msgid "You can save almost"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: wp-optimize-main.php:
|
449 |
msgid "Total clean up overall"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: wp-optimize-main.php:
|
453 |
msgid "Sponsor"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: wp-optimize-settings.php:
|
457 |
msgid "Trackbacks disabled on all current and previously published posts"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: wp-optimize-settings.php:
|
461 |
msgid "Trackbacks enabled on all current and previously published posts"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: wp-optimize-settings.php:
|
465 |
msgid "Comments disabled on all current and previously published posts"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: wp-optimize-settings.php:
|
469 |
msgid "Comments enabled on all current and previously published posts"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: wp-optimize-settings.php:
|
473 |
msgid "Settings updated"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: wp-optimize-settings.php:
|
477 |
msgid "General Settings"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: wp-optimize-settings.php:
|
481 |
msgid "Keep last "
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: wp-optimize-settings.php:
|
485 |
msgid "This option will retain the last selected weeks data and remove any garbage data before that period. This will also affect Auto Clean-up process"
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: wp-optimize-settings.php:
|
489 |
msgid "Enable admin bar link "
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: wp-optimize-settings.php:
|
493 |
msgid "(Click here to refresh)"
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: wp-optimize-settings.php:
|
497 |
msgid "This option will put WP-Optimize link on the top admin bar (default is off). Requires page refresh."
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: wp-optimize-settings.php:
|
501 |
msgid "Trackback/Comments Actions"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: wp-optimize-settings.php:
|
505 |
msgid "Disable/Enable Trackbacks"
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: wp-optimize-settings.php:
|
509 |
msgid "SELECT"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: wp-optimize-settings.php:
|
513 |
msgid "Disable"
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: wp-optimize-settings.php:
|
517 |
msgid "Enable"
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: wp-optimize-settings.php:
|
521 |
msgid "This will disable/enable Trackbacks on all your current and previously published posts"
|
522 |
msgstr ""
|
523 |
|
524 |
-
#: wp-optimize-settings.php:
|
525 |
msgid "Disable/Enable Comments"
|
526 |
msgstr ""
|
527 |
|
528 |
-
#: wp-optimize-settings.php:
|
529 |
msgid "This will disable/enable Comments on all your current and previously published posts"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: wp-optimize-settings.php:
|
533 |
msgid "SAVE SETTINGS"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: wp-optimize-settings.php:
|
537 |
msgid "Auto Clean-up Settings"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: wp-optimize-settings.php:
|
541 |
msgid "Enable scheduled clean-up and optimization (Beta feature!)"
|
542 |
msgstr ""
|
543 |
|
544 |
-
#: wp-optimize-settings.php:
|
545 |
msgid "Select schedule type (default is Weekly)"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: wp-optimize-settings.php:
|
549 |
-
|
|
|
|
|
|
|
|
|
550 |
msgid "Every week"
|
551 |
msgstr ""
|
552 |
|
553 |
-
#: wp-optimize-settings.php:
|
554 |
msgid "Every other week (every 14 days)"
|
555 |
msgstr ""
|
556 |
|
557 |
-
#: wp-optimize-settings.php:
|
558 |
msgid "Every month (every 31 days)"
|
559 |
msgstr ""
|
560 |
|
561 |
-
#: wp-optimize-settings.php:
|
562 |
msgid "Automatic cleanup will perform the following:"
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: wp-optimize-settings.php:
|
566 |
msgid "Remove revisions, auto drafts, posts/comments in trash, transient options. After that it will optimize the db."
|
567 |
msgstr ""
|
568 |
|
569 |
-
#: wp-optimize-settings.php:
|
570 |
msgid "These options will only work if the automatic clean-up schedule has been enabled"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: wp-optimize-settings.php:
|
574 |
msgid "Remove auto revisions"
|
575 |
msgstr ""
|
576 |
|
577 |
-
#: wp-optimize-settings.php:
|
578 |
msgid "Remove auto drafts"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: wp-optimize-settings.php:
|
582 |
msgid "Remove spam comments"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: wp-optimize-settings.php:
|
586 |
msgid "Remove orphaned post meta"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: wp-optimize-settings.php:
|
590 |
msgid "Remove unused tags"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: wp-optimize-settings.php:
|
594 |
msgid "Optimize database"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: wp-optimize-settings.php:
|
598 |
msgid "If you have InnoDB tables. They will not be optimized!"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: wp-optimize-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
msgid "SAVE AUTO CLEAN-UP SETTINGS"
|
603 |
msgstr ""
|
604 |
|
@@ -674,7 +702,7 @@ msgid "WP-Optimize"
|
|
674 |
msgstr ""
|
675 |
|
676 |
#. Plugin URI of the plugin/theme
|
677 |
-
msgid "http://
|
678 |
msgstr ""
|
679 |
|
680 |
#. Description of the plugin/theme
|
1 |
+
# Copyright (C) 2015 WP-Optimize
|
2 |
# This file is distributed under the same license as the WP-Optimize package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WP-Optimize 1.8.9.8\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-optimize\n"
|
7 |
+
"POT-Creation-Date: 2015-03-02 15:32:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
32 |
msgid "Tables"
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: wp-optimize-common.php:72
|
36 |
+
msgid "Automatic Operation Completed"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: wp-optimize-common.php:74
|
40 |
+
msgid "Scheduled optimization was executed at"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: wp-optimize-common.php:76
|
44 |
+
msgid "You can safely delete this email."
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: wp-optimize-common.php:78
|
48 |
+
msgid "Regards,"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: wp-optimize-common.php:79
|
52 |
+
msgid "WP-Optimize Plugin"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: wp-optimize-common.php:539
|
56 |
msgid "GB"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: wp-optimize-common.php:541
|
60 |
msgid "MB"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: wp-optimize-common.php:543
|
64 |
msgid "KB"
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: wp-optimize-common.php:545
|
68 |
msgid "bytes"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: wp-optimize-common.php:635
|
72 |
msgid "transient options deleted"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: wp-optimize-common.php:662
|
76 |
msgid "post revisions deleted"
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: wp-optimize-common.php:673
|
80 |
msgid "auto drafts deleted"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: wp-optimize-common.php:683
|
84 |
msgid "items removed from Trash"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: wp-optimize-common.php:695
|
88 |
msgid "spam comments deleted"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: wp-optimize-common.php:704
|
92 |
msgid "comments removed from Trash"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: wp-optimize-common.php:710
|
96 |
msgid "unused comment metadata items removed"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: wp-optimize-common.php:716
|
100 |
msgid "unused akismet comment metadata items removed"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: wp-optimize-common.php:726
|
104 |
msgid "unapproved comments deleted"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: wp-optimize-common.php:732
|
108 |
msgid "pingbacks deleted"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: wp-optimize-common.php:738
|
112 |
msgid "trackbacks deleted"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: wp-optimize-common.php:745
|
116 |
msgid "Enabled weekly processing"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: wp-optimize-common.php:751
|
120 |
msgid "Disabled weekly processing"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: wp-optimize-common.php:760
|
124 |
msgid "NO Actions Taken"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: wp-optimize-common.php:787
|
128 |
msgid "transient options in your database"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: wp-optimize-common.php:789
|
132 |
msgid "No transient options found"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: wp-optimize-common.php:798
|
136 |
msgid "orphaned postmeta in your database"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: wp-optimize-common.php:800
|
140 |
msgid "No orphaned postmeta in your database"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: wp-optimize-common.php:809
|
144 |
msgid "unused tags in your database"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: wp-optimize-common.php:811
|
148 |
msgid "No unused tags found"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: wp-optimize-common.php:824
|
152 |
msgid "post revisions in your database"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: wp-optimize-common.php:826
|
156 |
msgid "No post revisions found"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: wp-optimize-common.php:839
|
160 |
msgid "auto draft post(s) in your database"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: wp-optimize-common.php:841
|
164 |
msgid "No auto draft posts found"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: wp-optimize-common.php:853
|
168 |
msgid "spam comments found"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: wp-optimize-common.php:853 wp-optimize-common.php:884
|
172 |
msgid "Review"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: wp-optimize-common.php:855
|
176 |
msgid "No spam comments found"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: wp-optimize-common.php:884
|
180 |
msgid "unapproved comments found"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: wp-optimize-common.php:886
|
184 |
msgid "No unapproved comments found"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: wp-optimize-common.php:894
|
188 |
msgid "Pingbacks found"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: wp-optimize-common.php:896
|
192 |
msgid "No pingbacks found"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: wp-optimize-common.php:904
|
196 |
msgid "Trackbacks found"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: wp-optimize-common.php:906
|
200 |
msgid "No trackbacks found"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: wp-optimize-common.php:912
|
204 |
msgid "nothing"
|
205 |
msgstr ""
|
206 |
|
212 |
msgid "WP-Optimize started as a utility for my own projects. I have realized soon, that this plugin might help a lot of people out there. I am personally thanking all of the users who use this plugin as a daily basis. Also thank you all of the translators and the generous people who have donated for this project."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: wp-optimize-credits.php:29
|
|
|
|
|
|
|
|
|
216 |
msgid "Contributing Developers"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: wp-optimize-credits.php:30
|
220 |
msgid "Help me make this plugin better"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: wp-optimize-credits.php:30
|
224 |
msgid "I am looking for contributing developers."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: wp-optimize-credits.php:31
|
228 |
msgid "Your name and website will be credited here in the plugin"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: wp-optimize-credits.php:40
|
232 |
msgid "Translators"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: wp-optimize-credits.php:41
|
236 |
msgid "http://(Translator Website)"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: wp-optimize-credits.php:41
|
240 |
msgid "(Translator name)"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: wp-optimize-credits.php:43
|
244 |
msgid "Read Translation Instructions"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: wp-optimize-credits.php:49
|
248 |
msgid "Plugin Resources"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: wp-optimize-credits.php:51
|
252 |
msgid "Get a Translator Account"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: wp-optimize-credits.php:52
|
256 |
msgid "Plugin Translation Portal (needs translator account)"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: wp-optimize-credits.php:53
|
260 |
msgid "Request New Language"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: wp-optimize-credits.php:54
|
264 |
msgid "Plugin Homepage"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: wp-optimize-credits.php:55
|
268 |
msgid "Support (GitHub)"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: wp-optimize-credits.php:56
|
272 |
msgid "Support E-mail"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: wp-optimize-credits.php:57
|
276 |
msgid "Change Log"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: wp-optimize-credits.php:58
|
280 |
msgid "FAQ"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: wp-optimize-credits.php:67
|
284 |
msgid "GitHub Development Log"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: wp-optimize-credits.php:87
|
288 |
msgid "No items"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: wp-optimize-main.php:76
|
292 |
msgid "Database Optimized!"
|
293 |
msgstr ""
|
294 |
|
295 |
+
#: wp-optimize-main.php:154 wp-optimize-main.php:156
|
296 |
msgid "Clean-up options"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: wp-optimize-main.php:165
|
300 |
msgid "Clean post revisions which are older than "
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: wp-optimize-main.php:168 wp-optimize-main.php:186 wp-optimize-main.php:206
|
304 |
+
#: wp-optimize-main.php:225
|
305 |
msgid "weeks"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: wp-optimize-main.php:170
|
309 |
msgid "Clean all post revisions"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: wp-optimize-main.php:183
|
313 |
msgid "Clean auto draft posts which are older than "
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: wp-optimize-main.php:188
|
317 |
msgid "Clean all auto draft posts and posts in trash"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: wp-optimize-main.php:203
|
321 |
msgid "Remove spam comments which are older than "
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: wp-optimize-main.php:208
|
325 |
msgid "Remove spam comments and comments in trash"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: wp-optimize-main.php:222
|
329 |
msgid "Remove unapproved comments which are older than "
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: wp-optimize-main.php:227 wp-optimize-settings.php:288
|
333 |
msgid "Remove unapproved comments"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: wp-optimize-main.php:240 wp-optimize-settings.php:293
|
337 |
msgid "Remove transient options"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: wp-optimize-main.php:251
|
341 |
msgid "Remove pingbacks"
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: wp-optimize-main.php:262
|
345 |
msgid "Remove trackbacks"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: wp-optimize-main.php:272
|
349 |
msgid "Do not select RED marked items unless you really need to use them"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: wp-optimize-main.php:278 wp-optimize-settings.php:207
|
353 |
msgid "Optimize your YouTube embedding in WordPress with this plugin"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: wp-optimize-main.php:288
|
357 |
msgid "Actions"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: wp-optimize-main.php:297
|
361 |
msgid "Optimize database tables"
|
362 |
msgstr ""
|
363 |
|
364 |
+
#: wp-optimize-main.php:305
|
365 |
msgid "Note:"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: wp-optimize-main.php:308
|
369 |
msgid "InnoDB tables will not be optimized"
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: wp-optimize-main.php:314
|
373 |
msgid "Select safe options"
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: wp-optimize-main.php:315
|
377 |
msgid "Warning:"
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: wp-optimize-main.php:316
|
381 |
msgid "Always make a backup of your DB when you upgrade to major versions"
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: wp-optimize-main.php:321
|
385 |
msgid "PROCESS"
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: wp-optimize-main.php:327
|
389 |
msgid "Please donate! It really helps me keep improvising"
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: wp-optimize-main.php:327
|
393 |
msgid "Donate!"
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: wp-optimize-main.php:328
|
397 |
msgid "Please give a proper rating:)"
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: wp-optimize-main.php:329
|
401 |
msgid "Rating"
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: wp-optimize-main.php:334
|
405 |
msgid "Status log: "
|
406 |
msgstr ""
|
407 |
|
408 |
+
#: wp-optimize-main.php:349
|
409 |
msgid "Last automatic optimization was at"
|
410 |
msgstr ""
|
411 |
|
412 |
+
#: wp-optimize-main.php:361
|
413 |
msgid "There was no automatic optimization"
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: wp-optimize-main.php:376
|
417 |
msgid "Scheduled cleaning enabled"
|
418 |
msgstr ""
|
419 |
|
420 |
+
#: wp-optimize-main.php:388
|
421 |
msgid "Next schedule"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: wp-optimize-main.php:399
|
425 |
msgid "Refresh"
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: wp-optimize-main.php:408
|
429 |
msgid "Scheduled cleaning disabled"
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: wp-optimize-main.php:411 wp-optimize-main.php:436
|
433 |
msgid "Check settings"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: wp-optimize-main.php:422
|
437 |
msgid "Keeping last "
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: wp-optimize-main.php:425 wp-optimize-settings.php:148
|
441 |
msgid "weeks data"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: wp-optimize-main.php:433
|
445 |
msgid "Not keeping recent data"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: wp-optimize-main.php:450
|
449 |
msgid "Current database size : "
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: wp-optimize-main.php:455
|
453 |
msgid "You have saved"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: wp-optimize-main.php:462
|
457 |
msgid "Current database size"
|
458 |
msgstr ""
|
459 |
|
460 |
+
#: wp-optimize-main.php:470
|
461 |
msgid "You can save almost"
|
462 |
msgstr ""
|
463 |
|
464 |
+
#: wp-optimize-main.php:487
|
465 |
msgid "Total clean up overall"
|
466 |
msgstr ""
|
467 |
|
468 |
+
#: wp-optimize-main.php:508
|
469 |
msgid "Sponsor"
|
470 |
msgstr ""
|
471 |
|
472 |
+
#: wp-optimize-settings.php:88
|
473 |
msgid "Trackbacks disabled on all current and previously published posts"
|
474 |
msgstr ""
|
475 |
|
476 |
+
#: wp-optimize-settings.php:94
|
477 |
msgid "Trackbacks enabled on all current and previously published posts"
|
478 |
msgstr ""
|
479 |
|
480 |
+
#: wp-optimize-settings.php:103
|
481 |
msgid "Comments disabled on all current and previously published posts"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: wp-optimize-settings.php:109
|
485 |
msgid "Comments enabled on all current and previously published posts"
|
486 |
msgstr ""
|
487 |
|
488 |
+
#: wp-optimize-settings.php:115
|
489 |
msgid "Settings updated"
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: wp-optimize-settings.php:132
|
493 |
msgid "General Settings"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: wp-optimize-settings.php:137
|
497 |
msgid "Keep last "
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: wp-optimize-settings.php:153
|
501 |
msgid "This option will retain the last selected weeks data and remove any garbage data before that period. This will also affect Auto Clean-up process"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: wp-optimize-settings.php:162
|
505 |
msgid "Enable admin bar link "
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: wp-optimize-settings.php:164
|
509 |
msgid "(Click here to refresh)"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: wp-optimize-settings.php:170
|
513 |
msgid "This option will put WP-Optimize link on the top admin bar (default is off). Requires page refresh."
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: wp-optimize-settings.php:174
|
517 |
msgid "Trackback/Comments Actions"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: wp-optimize-settings.php:176
|
521 |
msgid "Disable/Enable Trackbacks"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: wp-optimize-settings.php:178 wp-optimize-settings.php:193
|
525 |
msgid "SELECT"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: wp-optimize-settings.php:179 wp-optimize-settings.php:194
|
529 |
msgid "Disable"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: wp-optimize-settings.php:180 wp-optimize-settings.php:195
|
533 |
msgid "Enable"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: wp-optimize-settings.php:185
|
537 |
msgid "This will disable/enable Trackbacks on all your current and previously published posts"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: wp-optimize-settings.php:191
|
541 |
msgid "Disable/Enable Comments"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: wp-optimize-settings.php:200
|
545 |
msgid "This will disable/enable Comments on all your current and previously published posts"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: wp-optimize-settings.php:211
|
549 |
msgid "SAVE SETTINGS"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: wp-optimize-settings.php:221
|
553 |
msgid "Auto Clean-up Settings"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: wp-optimize-settings.php:224
|
557 |
msgid "Enable scheduled clean-up and optimization (Beta feature!)"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: wp-optimize-settings.php:226
|
561 |
msgid "Select schedule type (default is Weekly)"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: wp-optimize-settings.php:233 wp-optimize-settings.php:255
|
565 |
+
msgid "Everyday"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: wp-optimize-settings.php:237 wp-optimize-settings.php:249
|
569 |
+
#: wp-optimize-settings.php:256
|
570 |
msgid "Every week"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: wp-optimize-settings.php:241 wp-optimize-settings.php:257
|
574 |
msgid "Every other week (every 14 days)"
|
575 |
msgstr ""
|
576 |
|
577 |
+
#: wp-optimize-settings.php:245 wp-optimize-settings.php:258
|
578 |
msgid "Every month (every 31 days)"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: wp-optimize-settings.php:262
|
582 |
msgid "Automatic cleanup will perform the following:"
|
583 |
msgstr ""
|
584 |
|
585 |
+
#: wp-optimize-settings.php:264
|
586 |
msgid "Remove revisions, auto drafts, posts/comments in trash, transient options. After that it will optimize the db."
|
587 |
msgstr ""
|
588 |
|
589 |
+
#: wp-optimize-settings.php:271
|
590 |
msgid "These options will only work if the automatic clean-up schedule has been enabled"
|
591 |
msgstr ""
|
592 |
|
593 |
+
#: wp-optimize-settings.php:276
|
594 |
msgid "Remove auto revisions"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: wp-optimize-settings.php:280
|
598 |
msgid "Remove auto drafts"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: wp-optimize-settings.php:284
|
602 |
msgid "Remove spam comments"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: wp-optimize-settings.php:297
|
606 |
msgid "Remove orphaned post meta"
|
607 |
msgstr ""
|
608 |
|
609 |
+
#: wp-optimize-settings.php:301
|
610 |
msgid "Remove unused tags"
|
611 |
msgstr ""
|
612 |
|
613 |
+
#: wp-optimize-settings.php:307
|
614 |
msgid "Optimize database"
|
615 |
msgstr ""
|
616 |
|
617 |
+
#: wp-optimize-settings.php:313
|
618 |
msgid "If you have InnoDB tables. They will not be optimized!"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: wp-optimize-settings.php:322
|
622 |
+
msgid "Enable email notification"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: wp-optimize-settings.php:329
|
626 |
+
msgid "Send email to"
|
627 |
+
msgstr ""
|
628 |
+
|
629 |
+
#: wp-optimize-settings.php:335
|
630 |
msgid "SAVE AUTO CLEAN-UP SETTINGS"
|
631 |
msgstr ""
|
632 |
|
702 |
msgstr ""
|
703 |
|
704 |
#. Plugin URI of the plugin/theme
|
705 |
+
msgid "http://wp-optimize.ruhanirabin.com/"
|
706 |
msgstr ""
|
707 |
|
708 |
#. Description of the plugin/theme
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: ruhanirabin
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LTCMF6JDX94QS
|
4 |
Tags: comments, spam, optimize, database, revisions, users, posts, trash, schedule, automatic, clean, phpmyadmin, meta, postmeta, responsive, mobile
|
5 |
-
Requires at least:
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.8.9.
|
8 |
License: GPLv2+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -16,15 +16,15 @@ WP-Optimize is an extensive WordPress database cleanup and optimization tool. It
|
|
16 |
|
17 |
Please show your support for this plugin by giving it [a rating](http://wordpress.org/support/view/plugin-reviews/wp-optimize?rate=5#postform) :)
|
18 |
|
19 |
-
Now hosted at [GitHub](https://github.com/ruhanirabin/WP-Optimize).
|
20 |
-
|
21 |
**I do not monitor wp forums, so use plugins(at)ruhanirabin.com for support questions.**
|
22 |
|
23 |
Please join GitHub and collaborate.
|
24 |
|
25 |
**MAJOR FEATURES:**
|
26 |
|
27 |
-
* Enable/Disable trackbacks for all published post
|
28 |
* Enable/Disable comments for all published post
|
29 |
* Removal of stale post revisions
|
30 |
* Removal of stale unapproved and spam comments
|
@@ -43,6 +43,8 @@ Please join GitHub and collaborate.
|
|
43 |
* Apply native WordPress MySql optimize commands on your database tables without phpMyAdmin or any manual query.
|
44 |
* Display Database table statistics. Shows how much space can be optimized and how much space has been cleared.
|
45 |
* Enabled for Administrators only.
|
|
|
|
|
46 |
|
47 |
**All the potentially dangerous clean up options are marked RED.**
|
48 |
|
@@ -77,14 +79,14 @@ Once you get your account password in your email [Log in here to edit language](
|
|
77 |
|
78 |
* Language de_DE: Rene Wolf - http://www.fluchtsportler.de
|
79 |
* Language fr_FR: Stéphane Benoit. - http://www.gnosticisme.com
|
80 |
-
* Language sl_SI: Tomi Sambrailo - http://www.refuzed.it/
|
81 |
* Language ka_GE: Givi Tabatadze - http://tagiweb.com
|
82 |
-
* Language zh_CN: Maie - http://maie.name
|
83 |
-
* Language es_ES: Navone Juan - http://navonej.com.ar/
|
84 |
-
* Language sk_SK: Martin Šturcel- http://sturcel.sk/martin
|
85 |
-
* Language nl_NL: Mathias Bosman - http://www.mathiasbosman.be
|
86 |
-
* Language hu_HU: László Viktor - http://hunstart.hu/
|
87 |
-
* Language lt_LT: Bronisav Ciuzelis - http://internetiniusvetainiukurimas.com/
|
88 |
|
89 |
** Some languages are removed from the above list, because translators did not update the languages for current version **
|
90 |
[See a list of currently editable available languages at](http://wp-managed.com/projects/wp-optimize)
|
@@ -150,15 +152,19 @@ Please check your database for corrupted tables. That can happen, usually your w
|
|
150 |
5. Mobile View Bottom (Actual screen from Galaxy Note 3)
|
151 |
|
152 |
== Changelog ==
|
153 |
-
|
|
|
|
|
|
|
|
|
154 |
= 1.8.9.7 =
|
155 |
* BUGFIX for Settings screen
|
156 |
-
* Enable/Disable trackbacks / comments buttons removal and use select box instead. Extra button caused the Auto Scheduler to get into reset mode.
|
157 |
-
|
158 |
= 1.8.9.6 =
|
159 |
* There were few number formatting problem and detection of InnoDB table format. Charles Dee Rice solved the problems that I missed out. Thank you!
|
160 |
-
* Duplicate msg fixed
|
161 |
-
* Enable/Disable trackbacks for all published post
|
162 |
* Enable/Disable comments for all published post
|
163 |
|
164 |
= 1.8.9 =
|
2 |
Contributors: ruhanirabin
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LTCMF6JDX94QS
|
4 |
Tags: comments, spam, optimize, database, revisions, users, posts, trash, schedule, automatic, clean, phpmyadmin, meta, postmeta, responsive, mobile
|
5 |
+
Requires at least: 4
|
6 |
+
Tested up to: 4.2
|
7 |
+
Stable tag: 1.8.9.8
|
8 |
License: GPLv2+
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
16 |
|
17 |
Please show your support for this plugin by giving it [a rating](http://wordpress.org/support/view/plugin-reviews/wp-optimize?rate=5#postform) :)
|
18 |
|
19 |
+
Now hosted at [GitHub](https://github.com/ruhanirabin/WP-Optimize).
|
20 |
+
|
21 |
**I do not monitor wp forums, so use plugins(at)ruhanirabin.com for support questions.**
|
22 |
|
23 |
Please join GitHub and collaborate.
|
24 |
|
25 |
**MAJOR FEATURES:**
|
26 |
|
27 |
+
* Enable/Disable trackbacks for all published post
|
28 |
* Enable/Disable comments for all published post
|
29 |
* Removal of stale post revisions
|
30 |
* Removal of stale unapproved and spam comments
|
43 |
* Apply native WordPress MySql optimize commands on your database tables without phpMyAdmin or any manual query.
|
44 |
* Display Database table statistics. Shows how much space can be optimized and how much space has been cleared.
|
45 |
* Enabled for Administrators only.
|
46 |
+
* E-mail notifications on automatic cleanup
|
47 |
+
|
48 |
|
49 |
**All the potentially dangerous clean up options are marked RED.**
|
50 |
|
79 |
|
80 |
* Language de_DE: Rene Wolf - http://www.fluchtsportler.de
|
81 |
* Language fr_FR: Stéphane Benoit. - http://www.gnosticisme.com
|
82 |
+
* Language sl_SI: Tomi Sambrailo - http://www.refuzed.it/
|
83 |
* Language ka_GE: Givi Tabatadze - http://tagiweb.com
|
84 |
+
* Language zh_CN: Maie - http://maie.name
|
85 |
+
* Language es_ES: Navone Juan - http://navonej.com.ar/
|
86 |
+
* Language sk_SK: Martin Šturcel- http://sturcel.sk/martin
|
87 |
+
* Language nl_NL: Mathias Bosman - http://www.mathiasbosman.be
|
88 |
+
* Language hu_HU: László Viktor - http://hunstart.hu/
|
89 |
+
* Language lt_LT: Bronisav Ciuzelis - http://internetiniusvetainiukurimas.com/
|
90 |
|
91 |
** Some languages are removed from the above list, because translators did not update the languages for current version **
|
92 |
[See a list of currently editable available languages at](http://wp-managed.com/projects/wp-optimize)
|
152 |
5. Mobile View Bottom (Actual screen from Galaxy Note 3)
|
153 |
|
154 |
== Changelog ==
|
155 |
+
|
156 |
+
= 1.8.9.8 =
|
157 |
+
* Daily Schedule Option Added
|
158 |
+
* Email notification on automatic optimization, default email is admin email address. You can change this in settings
|
159 |
+
|
160 |
= 1.8.9.7 =
|
161 |
* BUGFIX for Settings screen
|
162 |
+
* Enable/Disable trackbacks / comments buttons removal and use select box instead. Extra button caused the Auto Scheduler to get into reset mode.
|
163 |
+
|
164 |
= 1.8.9.6 =
|
165 |
* There were few number formatting problem and detection of InnoDB table format. Charles Dee Rice solved the problems that I missed out. Thank you!
|
166 |
+
* Duplicate msg fixed
|
167 |
+
* Enable/Disable trackbacks for all published post
|
168 |
* Enable/Disable comments for all published post
|
169 |
|
170 |
= 1.8.9 =
|
wp-optimize-common.php
CHANGED
@@ -35,7 +35,61 @@ if (! defined('OPTION_NAME_ENABLE_ADMIN_MENU'))
|
|
35 |
if (! defined('OPTION_NAME_TOTAL_CLEANED'))
|
36 |
define('OPTION_NAME_TOTAL_CLEANED', 'wp-optimize-total-cleaned');
|
37 |
|
|
|
|
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
function wpo_readFeed($rss_url, $number_of_itmes){
|
40 |
|
41 |
include_once( ABSPATH . WPINC . '/feed.php' );
|
@@ -117,12 +171,12 @@ function wpo_disableLinkbacks($type) {
|
|
117 |
global $wpdb;
|
118 |
switch ($type) {
|
119 |
case "trackbacks":
|
120 |
-
|
121 |
$thissql = "UPDATE `$wpdb->posts` SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post'";
|
122 |
$thissql .= ';';
|
123 |
$trackbacks = $wpdb->query( $thissql );
|
124 |
break;
|
125 |
-
|
126 |
case "comments":
|
127 |
$thissql = "UPDATE `$wpdb->posts` SET comment_status='closed' WHERE post_status = 'publish' AND post_type = 'post'";
|
128 |
$thissql .= ';';
|
@@ -134,7 +188,7 @@ global $wpdb;
|
|
134 |
//;
|
135 |
break;
|
136 |
}
|
137 |
-
|
138 |
}
|
139 |
|
140 |
/*
|
@@ -150,12 +204,12 @@ function wpo_enableLinkbacks($type) {
|
|
150 |
global $wpdb;
|
151 |
switch ($type) {
|
152 |
case "trackbacks":
|
153 |
-
|
154 |
$thissql = "UPDATE `$wpdb->posts` SET ping_status='open' WHERE post_status = 'publish' AND post_type = 'post'";
|
155 |
$thissql .= ';';
|
156 |
$trackbacks = $wpdb->query( $thissql );
|
157 |
break;
|
158 |
-
|
159 |
case "comments":
|
160 |
$thissql = "UPDATE `$wpdb->posts` SET comment_status='open' WHERE post_status = 'publish' AND post_type = 'post'";
|
161 |
$thissql .= ';';
|
@@ -167,7 +221,7 @@ global $wpdb;
|
|
167 |
//;
|
168 |
break;
|
169 |
}
|
170 |
-
|
171 |
}
|
172 |
|
173 |
|
@@ -203,7 +257,7 @@ function wpo_headerImage(){
|
|
203 |
|
204 |
$text = '<img src="'.WPO_PLUGIN_URL.'/wp-optimize.png" border="0" alt="WP-Optimize" title="WP-Optimize" width="310px" height="auto"/><br />';
|
205 |
|
206 |
-
|
207 |
echo $text;
|
208 |
|
209 |
}
|
@@ -227,6 +281,9 @@ function wpo_removeOptions(){
|
|
227 |
delete_option( OPTION_NAME_ENABLE_ADMIN_MENU );
|
228 |
delete_option( OPTION_NAME_SCHEDULE_TYPE );
|
229 |
delete_option( OPTION_NAME_TOTAL_CLEANED );
|
|
|
|
|
|
|
230 |
|
231 |
delete_option( 'wp-optimize-auto' );
|
232 |
delete_option( 'wp-optimize-settings' );
|
@@ -344,18 +401,27 @@ function wpo_cron_action() {
|
|
344 |
wpo_debugLog('optimizing .... '.$t[0]);
|
345 |
}
|
346 |
|
347 |
-
//$dateformat = __('l jS \of F Y h:i:s A');
|
348 |
-
//$dateformat = 'l jS \of F Y h:i:s A';
|
349 |
-
//$thisdate = date($dateformat);
|
350 |
-
//$thisdate = gmdate(get_option('date_format') . ' ' . get_option('time_format'), $time() + (get_option('gmt_offset')));
|
351 |
-
list($part1, $part2) = wpo_getCurrentDBSize();
|
352 |
|
|
|
|
|
|
|
353 |
$thistime = current_time( "timestamp", 0 );
|
354 |
$thedate = gmdate(get_option('date_format') . ' ' . get_option('time_format'), $thistime );
|
355 |
update_option( OPTION_NAME_LAST_OPT, $thedate );
|
356 |
wpo_updateTotalCleaned(strval($part2));
|
357 |
-
wpo_debugLog('Updating options with value +'.$part2);
|
358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
} // endif $this_options['optimize']
|
360 |
} // end if ( get_option(OPTION_NAME_SCHEDULE) == 'true')
|
361 |
}
|
@@ -397,8 +463,22 @@ function wpo_PluginOptionsSetDefaults() {
|
|
397 |
}
|
398 |
else{
|
399 |
add_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false', $deprecated, $autoload );
|
|
|
|
|
|
|
|
|
400 |
}
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
if ( get_option( OPTION_NAME_TOTAL_CLEANED ) !== false ) {
|
403 |
//
|
404 |
}
|
@@ -525,6 +605,7 @@ function wpo_updateTotalCleaned($current){
|
|
525 |
$total_now = strval($total_now);
|
526 |
|
527 |
update_option(OPTION_NAME_TOTAL_CLEANED, $total_now);
|
|
|
528 |
|
529 |
return $total_now;
|
530 |
|
@@ -849,4 +930,4 @@ function showStatus($text){
|
|
849 |
}
|
850 |
|
851 |
// end of file
|
852 |
-
?>
|
35 |
if (! defined('OPTION_NAME_TOTAL_CLEANED'))
|
36 |
define('OPTION_NAME_TOTAL_CLEANED', 'wp-optimize-total-cleaned');
|
37 |
|
38 |
+
if (! defined('OPTION_NAME_CURRENT_CLEANED'))
|
39 |
+
define('OPTION_NAME_CURRENT_CLEANED', 'wp-optimize-current-cleaned');
|
40 |
|
41 |
+
if (! defined('OPTION_NAME_ENABLE_EMAIL_ADDRESS'))
|
42 |
+
define('OPTION_NAME_ENABLE_EMAIL_ADDRESS', 'wp-optimize-email-address');
|
43 |
+
|
44 |
+
if (! defined('OPTION_NAME_ENABLE_EMAIL'))
|
45 |
+
define('OPTION_NAME_ENABLE_EMAIL', 'wp-optimize-email');
|
46 |
+
/**
|
47 |
+
* wpo_sendemail($sendto, $msg)
|
48 |
+
* @return success
|
49 |
+
* @param $sentdo - eg. who to send it to, abc@def.com
|
50 |
+
* @param $msg - the msg in text
|
51 |
+
*/
|
52 |
+
function wpo_sendEmail($date, $cleanedup){
|
53 |
+
//
|
54 |
+
ob_start();
|
55 |
+
// #TODO this need to work on - currently not using the parameter values
|
56 |
+
$myTime = current_time( "timestamp", 0 );
|
57 |
+
$myDate = gmdate(get_option('date_format') . ' ' . get_option('time_format'), $myTime );
|
58 |
+
|
59 |
+
//$formattedCleanedup = wpo_format_size($cleanedup);
|
60 |
+
|
61 |
+
|
62 |
+
if ( get_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS ) !== '' ) {
|
63 |
+
//
|
64 |
+
$sendto = OPTION_NAME_ENABLE_EMAIL_ADDRESS;
|
65 |
+
}
|
66 |
+
else{
|
67 |
+
$sendto = get_bloginfo ( 'admin_email' );
|
68 |
+
}
|
69 |
+
|
70 |
+
//$thiscleanup = wpo_format_size($cleanedup);
|
71 |
+
|
72 |
+
$subject = get_bloginfo ( 'name' ).": ".__("Automatic Operation Completed","wp-optimize")." ".$myDate;
|
73 |
+
|
74 |
+
$msg = __("Scheduled optimization was executed at","wp-optimize")." ".$myDate."\r\n"."\r\n";
|
75 |
+
//$msg .= __("Recovered space","wp-optimize").": ".$thiscleanup."\r\n";
|
76 |
+
$msg .= __("You can safely delete this email.","wp-optimize")."\r\n";
|
77 |
+
$msg .= "\r\n";
|
78 |
+
$msg .= __("Regards,","wp-optimize")."\r\n";
|
79 |
+
$msg .= __("WP-Optimize Plugin","wp-optimize");
|
80 |
+
|
81 |
+
wp_mail( $sendto, $subject, $msg );
|
82 |
+
|
83 |
+
ob_end_flush();
|
84 |
+
}
|
85 |
+
|
86 |
+
|
87 |
+
/**
|
88 |
+
* wpo_readFeed($rss_url, $number_of_itmes)
|
89 |
+
* @return RSS items
|
90 |
+
* @param $rss_url - url of RSS feed
|
91 |
+
* @param number of items - number of items to return
|
92 |
+
*/
|
93 |
function wpo_readFeed($rss_url, $number_of_itmes){
|
94 |
|
95 |
include_once( ABSPATH . WPINC . '/feed.php' );
|
171 |
global $wpdb;
|
172 |
switch ($type) {
|
173 |
case "trackbacks":
|
174 |
+
|
175 |
$thissql = "UPDATE `$wpdb->posts` SET ping_status='closed' WHERE post_status = 'publish' AND post_type = 'post'";
|
176 |
$thissql .= ';';
|
177 |
$trackbacks = $wpdb->query( $thissql );
|
178 |
break;
|
179 |
+
|
180 |
case "comments":
|
181 |
$thissql = "UPDATE `$wpdb->posts` SET comment_status='closed' WHERE post_status = 'publish' AND post_type = 'post'";
|
182 |
$thissql .= ';';
|
188 |
//;
|
189 |
break;
|
190 |
}
|
191 |
+
|
192 |
}
|
193 |
|
194 |
/*
|
204 |
global $wpdb;
|
205 |
switch ($type) {
|
206 |
case "trackbacks":
|
207 |
+
|
208 |
$thissql = "UPDATE `$wpdb->posts` SET ping_status='open' WHERE post_status = 'publish' AND post_type = 'post'";
|
209 |
$thissql .= ';';
|
210 |
$trackbacks = $wpdb->query( $thissql );
|
211 |
break;
|
212 |
+
|
213 |
case "comments":
|
214 |
$thissql = "UPDATE `$wpdb->posts` SET comment_status='open' WHERE post_status = 'publish' AND post_type = 'post'";
|
215 |
$thissql .= ';';
|
221 |
//;
|
222 |
break;
|
223 |
}
|
224 |
+
|
225 |
}
|
226 |
|
227 |
|
257 |
|
258 |
$text = '<img src="'.WPO_PLUGIN_URL.'/wp-optimize.png" border="0" alt="WP-Optimize" title="WP-Optimize" width="310px" height="auto"/><br />';
|
259 |
|
260 |
+
//$text .='<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.ruhanirabin.com%2Fwp-optimize%2F&width=310&height=46&colorscheme=light&layout=standard&action=like&show_faces=false&send=true&" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:310px; height:46px;" allowTransparency="true"></iframe>';
|
261 |
echo $text;
|
262 |
|
263 |
}
|
281 |
delete_option( OPTION_NAME_ENABLE_ADMIN_MENU );
|
282 |
delete_option( OPTION_NAME_SCHEDULE_TYPE );
|
283 |
delete_option( OPTION_NAME_TOTAL_CLEANED );
|
284 |
+
delete_option( OPTION_NAME_CURRENT_CLEANED );
|
285 |
+
delete_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS );
|
286 |
+
delete_option( OPTION_NAME_ENABLE_EMAIL );
|
287 |
|
288 |
delete_option( 'wp-optimize-auto' );
|
289 |
delete_option( 'wp-optimize-settings' );
|
401 |
wpo_debugLog('optimizing .... '.$t[0]);
|
402 |
}
|
403 |
|
|
|
|
|
|
|
|
|
|
|
404 |
|
405 |
+
|
406 |
+
ob_start();
|
407 |
+
list($part1, $part2) = wpo_getCurrentDBSize();
|
408 |
$thistime = current_time( "timestamp", 0 );
|
409 |
$thedate = gmdate(get_option('date_format') . ' ' . get_option('time_format'), $thistime );
|
410 |
update_option( OPTION_NAME_LAST_OPT, $thedate );
|
411 |
wpo_updateTotalCleaned(strval($part2));
|
|
|
412 |
|
413 |
+
// Sending notification email
|
414 |
+
if ( get_option( OPTION_NAME_ENABLE_EMAIL ) !== false ) {
|
415 |
+
//#TODO need to fix the problem with variable value not passing through
|
416 |
+
if ( get_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS ) !== '' ) {
|
417 |
+
wpo_sendEmail($thedate, $part2);
|
418 |
+
}
|
419 |
+
|
420 |
+
}
|
421 |
+
else{
|
422 |
+
//
|
423 |
+
}
|
424 |
+
ob_end_flush();
|
425 |
} // endif $this_options['optimize']
|
426 |
} // end if ( get_option(OPTION_NAME_SCHEDULE) == 'true')
|
427 |
}
|
463 |
}
|
464 |
else{
|
465 |
add_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false', $deprecated, $autoload );
|
466 |
+
}
|
467 |
+
// ---------
|
468 |
+
if ( get_option( OPTION_NAME_ENABLE_EMAIL ) !== false ) {
|
469 |
+
//
|
470 |
}
|
471 |
+
else{
|
472 |
+
add_option( OPTION_NAME_ENABLE_EMAIL, 'true', $deprecated, $autoload );
|
473 |
+
}
|
474 |
+
// ---------
|
475 |
+
if ( get_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS ) !== '' ) {
|
476 |
+
//
|
477 |
+
}
|
478 |
+
else{
|
479 |
+
add_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS, get_bloginfo ( 'admin_email' ), $deprecated, $autoload );
|
480 |
+
}
|
481 |
+
|
482 |
if ( get_option( OPTION_NAME_TOTAL_CLEANED ) !== false ) {
|
483 |
//
|
484 |
}
|
605 |
$total_now = strval($total_now);
|
606 |
|
607 |
update_option(OPTION_NAME_TOTAL_CLEANED, $total_now);
|
608 |
+
update_option(OPTION_NAME_CURRENT_CLEANED, $current);
|
609 |
|
610 |
return $total_now;
|
611 |
|
930 |
}
|
931 |
|
932 |
// end of file
|
933 |
+
?>
|
wp-optimize-credits.php
CHANGED
@@ -15,15 +15,6 @@ if ( ! defined( 'WPINC' ) ) {
|
|
15 |
<p><?php _e('WP-Optimize started as a utility for my own projects. I have realized soon, that this plugin might help a lot of people out there. I am personally thanking all of the users who use this plugin as a daily basis. Also thank you all of the translators and the generous people who have donated for this project.','wp-optimize'); ?><br />
|
16 |
<br />
|
17 |
- Ruhani Rabin </p>
|
18 |
-
<a href="#"
|
19 |
-
onclick="
|
20 |
-
window.open(
|
21 |
-
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent('http://www.ruhanirabin.com/wp-optimize/'),
|
22 |
-
'facebook-share-dialog',
|
23 |
-
'width=626,height=436');
|
24 |
-
return false;">
|
25 |
-
<?php _e('Share this plugin on Facebook','wp-optimize');?>
|
26 |
-
</a>
|
27 |
|
28 |
<br /><br />
|
29 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
15 |
<p><?php _e('WP-Optimize started as a utility for my own projects. I have realized soon, that this plugin might help a lot of people out there. I am personally thanking all of the users who use this plugin as a daily basis. Also thank you all of the translators and the generous people who have donated for this project.','wp-optimize'); ?><br />
|
16 |
<br />
|
17 |
- Ruhani Rabin </p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
<br /><br />
|
20 |
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
wp-optimize-main.php
CHANGED
@@ -1,531 +1,537 @@
|
|
1 |
-
<?php
|
2 |
-
# --------------------------------------- #
|
3 |
-
# prevent file from being accessed directly
|
4 |
-
# --------------------------------------- #
|
5 |
-
if ( ! defined( 'WPINC' ) ) {
|
6 |
-
die;
|
7 |
-
}
|
8 |
-
|
9 |
-
$text = '';
|
10 |
-
|
11 |
-
if (isset($_POST["clean-revisions"])) {
|
12 |
-
$text .= wpo_cleanUpSystem('revisions');
|
13 |
-
}
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
$user_options["user-drafts"] =
|
33 |
-
}
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
$
|
41 |
-
|
42 |
-
$user_options["user-spams"] =
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
$
|
52 |
-
|
53 |
-
$user_options["user-unapproved"] =
|
54 |
-
}
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
$
|
106 |
-
$
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
<
|
156 |
-
<
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
<
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
</
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
</small></p>
|
313 |
-
<p>
|
314 |
-
|
315 |
-
<
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
<p>
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
<
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
echo
|
349 |
-
|
350 |
-
echo '
|
351 |
-
echo '</i>';
|
352 |
-
|
353 |
-
|
354 |
-
echo
|
355 |
-
|
356 |
-
echo '
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
echo '
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
echo '
|
374 |
-
echo '
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
echo
|
388 |
-
|
389 |
-
echo '
|
390 |
-
echo '<
|
391 |
-
echo '
|
392 |
-
echo '
|
393 |
-
|
394 |
-
echo '</
|
395 |
-
echo '</
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
echo '
|
407 |
-
echo '
|
408 |
-
|
409 |
-
|
410 |
-
echo '<
|
411 |
-
|
412 |
-
|
413 |
-
echo '
|
414 |
-
echo '
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
echo '
|
421 |
-
echo '
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
echo '
|
427 |
-
|
428 |
-
echo '
|
429 |
-
|
430 |
-
|
431 |
-
echo '
|
432 |
-
echo '
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
echo '
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
# --------------------------------------- #
|
3 |
+
# prevent file from being accessed directly
|
4 |
+
# --------------------------------------- #
|
5 |
+
if ( ! defined( 'WPINC' ) ) {
|
6 |
+
die;
|
7 |
+
}
|
8 |
+
error_reporting( error_reporting() & ~E_NOTICE );
|
9 |
+
$text = '';
|
10 |
+
|
11 |
+
if (isset($_POST["clean-revisions"])) {
|
12 |
+
$text .= wpo_cleanUpSystem('revisions');
|
13 |
+
}
|
14 |
+
|
15 |
+
if ( isset( $_POST["clean-revisions"] ) ) {
|
16 |
+
$user_options["user-revisions"] = TRUE;
|
17 |
+
} else {
|
18 |
+
$user_options["user-revisions"] = FALSE;
|
19 |
+
}
|
20 |
+
|
21 |
+
|
22 |
+
if (isset($_POST["clean-autodraft"])) {
|
23 |
+
$text .= wpo_cleanUpSystem('autodraft');
|
24 |
+
|
25 |
+
|
26 |
+
//$user_options["user-drafts"] = $user_options["user-drafts"] ? 'true' : 'false';
|
27 |
+
}
|
28 |
+
|
29 |
+
if ( isset( $_POST["clean-autodraft"] ) ) {
|
30 |
+
$user_options["user-drafts"] = TRUE;
|
31 |
+
} else {
|
32 |
+
$user_options["user-drafts"] = FALSE;
|
33 |
+
}
|
34 |
+
|
35 |
+
if (isset($_POST["clean-comments"])) {
|
36 |
+
$text .= wpo_cleanUpSystem('spam');
|
37 |
+
}
|
38 |
+
|
39 |
+
if ( isset( $_POST["clean-comments"] ) ) {
|
40 |
+
$user_options["user-spams"] = TRUE;
|
41 |
+
} else {
|
42 |
+
$user_options["user-spams"] = FALSE;
|
43 |
+
}
|
44 |
+
|
45 |
+
|
46 |
+
if (isset($_POST["unapproved-comments"])) {
|
47 |
+
$text .= wpo_cleanUpSystem('unapproved');
|
48 |
+
}
|
49 |
+
|
50 |
+
if ( isset( $_POST["unapproved-comments"] ) ) {
|
51 |
+
$user_options["user-unapproved"] = TRUE;
|
52 |
+
} else {
|
53 |
+
$user_options["user-unapproved"] = FALSE;
|
54 |
+
}
|
55 |
+
|
56 |
+
if (isset($_POST["clean-pingbacks"])) {
|
57 |
+
$text .= wpo_cleanUpSystem('pingbacks');
|
58 |
+
}
|
59 |
+
if (isset($_POST["clean-trackbacks"])) {
|
60 |
+
$text .= wpo_cleanUpSystem('trackbacks');
|
61 |
+
}
|
62 |
+
|
63 |
+
if (isset($_POST["clean-transient"])) {
|
64 |
+
$text .= wpo_cleanUpSystem('transient_options');
|
65 |
+
}
|
66 |
+
|
67 |
+
if (isset($_POST["clean-postmeta"])) {
|
68 |
+
$text .= wpo_cleanUpSystem('postmeta');
|
69 |
+
}
|
70 |
+
|
71 |
+
if (isset($_POST["clean-tags"])) {
|
72 |
+
$text .= wpo_cleanUpSystem('tags');
|
73 |
+
}
|
74 |
+
|
75 |
+
if (isset($_POST["optimize-db"])) {
|
76 |
+
$text .= DB_NAME.' '.__('Database Optimized!', 'wp-optimize').'<br>';
|
77 |
+
}
|
78 |
+
if ( isset( $_POST["optimize-db"] ) ) {
|
79 |
+
$user_options["user-optimize"] = TRUE;
|
80 |
+
} else {
|
81 |
+
$user_options["user-optimize"] = FALSE;
|
82 |
+
}
|
83 |
+
|
84 |
+
if (isset($_POST["wp-optimize"])) {
|
85 |
+
update_option( 'wp-optimize-settings', $user_options );
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
if ($text !==''){
|
90 |
+
echo '<div id="message" class="updated">';
|
91 |
+
echo '<strong>'.$text.'</strong></div>';
|
92 |
+
}
|
93 |
+
|
94 |
+
?>
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
<?php
|
99 |
+
Function optimizeTablesQuick($Optimize){
|
100 |
+
global $wpdb;
|
101 |
+
$total_gain = 0;
|
102 |
+
$row_usage = 0;
|
103 |
+
$data_usage = 0;
|
104 |
+
$index_usage = 0;
|
105 |
+
$overhead_usage = 0;
|
106 |
+
$tablesstatus = $wpdb->get_results("SHOW TABLE STATUS");
|
107 |
+
|
108 |
+
foreach($tablesstatus as $tablestatus) {
|
109 |
+
|
110 |
+
$row_usage += $tablestatus->Rows;
|
111 |
+
$data_usage += $tablestatus->Data_length;
|
112 |
+
$index_usage += $tablestatus->Index_length;
|
113 |
+
if ($tablestatus->Engine != 'InnoDB'){
|
114 |
+
$overhead_usage += $tablestatus->Data_free;
|
115 |
+
$total_gain += $tablestatus->Data_free;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
if ($Optimize == "yes" ){
|
120 |
+
//if ($tablestatus->Engine != 'InnoDB'){
|
121 |
+
$tables = $wpdb->get_col("SHOW TABLES");
|
122 |
+
foreach($tables as $table_name) {
|
123 |
+
$local_query = 'OPTIMIZE TABLE `'.$table_name.'`';
|
124 |
+
wpo_debugLog('optimizing .... '.$table_name);
|
125 |
+
$result_query = $wpdb->query($local_query);
|
126 |
+
} //end for
|
127 |
+
|
128 |
+
wpo_updateTotalCleaned(strval($total_gain));
|
129 |
+
|
130 |
+
// #TODO for testing only
|
131 |
+
// $thistime = current_time( "timestamp", 0 );
|
132 |
+
// $thedate = gmdate(get_option('date_format') . ' ' . get_option('time_format'), $thistime );
|
133 |
+
// list($part3, $part4) = wpo_getCurrentDBSize();
|
134 |
+
// wpo_sendEmail($thedate, strval($part4)); //TODO TEMPORARY - send email to admin
|
135 |
+
|
136 |
+
// wpo_debugLog('Invoked+ Updating options with value +'.$part4);
|
137 |
+
|
138 |
+
wpo_debugLog('Total Gain .... '.strval($total_gain));
|
139 |
+
} //end if
|
140 |
+
//
|
141 |
+
// clear up total gain values
|
142 |
+
$total_gain = 0;
|
143 |
+
|
144 |
+
} // end of function
|
145 |
+
|
146 |
+
?>
|
147 |
+
|
148 |
+
|
149 |
+
|
150 |
+
<div class="wpo_section wpo_group">
|
151 |
+
<form action="#" method="post" enctype="multipart/form-data" name="optimize_form" id="optimize_form">
|
152 |
+
<div class="wpo_col wpo_span_1_of_3">
|
153 |
+
<div class="postbox">
|
154 |
+
<!-- <h3 class="hndle"><?php _e('Clean-up options', 'wp-optimize'); ?></h3> -->
|
155 |
+
<div class="inside">
|
156 |
+
<h3><?php _e('Clean-up options', 'wp-optimize');
|
157 |
+
$wpo_user_selection = get_option( 'wp-optimize-settings' );
|
158 |
+
//var_dump($wpo_user_selection);
|
159 |
+
?></h3>
|
160 |
+
<p>
|
161 |
+
<label>
|
162 |
+
<input name="clean-revisions" id="clean-revisions" type="checkbox" value="true" <?php echo $wpo_user_selection['user-revisions'] == 'true' ? 'checked="checked"':''; ?> />
|
163 |
+
<?php
|
164 |
+
if ( get_option( OPTION_NAME_RETENTION_ENABLED, 'false' ) == 'true' ) {
|
165 |
+
_e('Clean post revisions which are older than ', 'wp-optimize');
|
166 |
+
echo get_option( OPTION_NAME_RETENTION_PERIOD, '2' );
|
167 |
+
echo ' ';
|
168 |
+
_e('weeks', 'wp-optimize');
|
169 |
+
} else {
|
170 |
+
_e('Clean all post revisions', 'wp-optimize');
|
171 |
+
}
|
172 |
+
?>
|
173 |
+
</label>
|
174 |
+
<br />
|
175 |
+
<small> <?php _e(wpo_getInfo('revisions'), 'wp-optimize'); ?></small>
|
176 |
+
</p>
|
177 |
+
|
178 |
+
<p>
|
179 |
+
<label>
|
180 |
+
<input name="clean-autodraft" id="clean-autodraft" type="checkbox" value="true" <?php echo $wpo_user_selection['user-drafts'] == 'true' ? 'checked="checked"':''; ?> />
|
181 |
+
<?php
|
182 |
+
if ( get_option( OPTION_NAME_RETENTION_ENABLED, 'false' ) == 'true' ) {
|
183 |
+
_e('Clean auto draft posts which are older than ', 'wp-optimize');
|
184 |
+
echo get_option( OPTION_NAME_RETENTION_PERIOD, '2' );
|
185 |
+
echo ' ';
|
186 |
+
_e('weeks', 'wp-optimize');
|
187 |
+
} else {
|
188 |
+
_e('Clean all auto draft posts and posts in trash', 'wp-optimize');
|
189 |
+
}
|
190 |
+
?>
|
191 |
+
</label>
|
192 |
+
|
193 |
+
<br />
|
194 |
+
<small> <?php _e(wpo_getInfo('autodraft'), 'wp-optimize'); ?></small>
|
195 |
+
</p>
|
196 |
+
|
197 |
+
|
198 |
+
<p>
|
199 |
+
<label>
|
200 |
+
<input name="clean-comments" id="clean-comments" type="checkbox" value="true" <?php echo $wpo_user_selection['user-spams'] == 'true' ? 'checked="checked"':''; ?> />
|
201 |
+
<?php
|
202 |
+
if ( get_option( OPTION_NAME_RETENTION_ENABLED, 'false' ) == 'true' ) {
|
203 |
+
_e('Remove spam comments which are older than ', 'wp-optimize');
|
204 |
+
echo get_option( OPTION_NAME_RETENTION_PERIOD, '2' );
|
205 |
+
echo ' ';
|
206 |
+
_e('weeks', 'wp-optimize');
|
207 |
+
} else {
|
208 |
+
_e('Remove spam comments and comments in trash', 'wp-optimize');
|
209 |
+
}
|
210 |
+
|
211 |
+
?>
|
212 |
+
</label>
|
213 |
+
<br />
|
214 |
+
<small> <?php _e(wpo_getInfo('spam'), 'wp-optimize'); ?></small>
|
215 |
+
</p>
|
216 |
+
|
217 |
+
<p>
|
218 |
+
<label>
|
219 |
+
<input name="unapproved-comments" id="unapproved-comments" type="checkbox" value="true" <?php echo $wpo_user_selection['user-unapproved'] == 'true' ? 'checked="checked"':''; ?> />
|
220 |
+
<?php
|
221 |
+
if ( get_option( OPTION_NAME_RETENTION_ENABLED, 'false' ) == 'true' ) {
|
222 |
+
_e('Remove unapproved comments which are older than ', 'wp-optimize');
|
223 |
+
echo get_option( OPTION_NAME_RETENTION_PERIOD, '2' );
|
224 |
+
echo ' ';
|
225 |
+
_e('weeks', 'wp-optimize');
|
226 |
+
} else {
|
227 |
+
_e('Remove unapproved comments', 'wp-optimize');
|
228 |
+
}
|
229 |
+
|
230 |
+
?>
|
231 |
+
</label>
|
232 |
+
<br />
|
233 |
+
<small> <?php _e(wpo_getInfo('unapproved'), 'wp-optimize'); ?></small>
|
234 |
+
</p>
|
235 |
+
|
236 |
+
<p>
|
237 |
+
<label>
|
238 |
+
<input name="clean-transient" id="clean-transient" type="checkbox" value="" />
|
239 |
+
<span style="color: red;">
|
240 |
+
<?php _e('Remove transient options', 'wp-optimize'); ?>
|
241 |
+
</span>
|
242 |
+
</label>
|
243 |
+
<br />
|
244 |
+
<small> <?php _e(wpo_getInfo('transient_options'), 'wp-optimize'); ?></small>
|
245 |
+
</p>
|
246 |
+
|
247 |
+
<p>
|
248 |
+
<label>
|
249 |
+
<input name="clean-pingbacks" id="clean-pingbacks" type="checkbox" value="" />
|
250 |
+
<span style="color: red;">
|
251 |
+
<?php _e('Remove pingbacks', 'wp-optimize'); ?>
|
252 |
+
</span>
|
253 |
+
</label>
|
254 |
+
<br />
|
255 |
+
<small> <?php _e(wpo_getInfo('pingbacks'), 'wp-optimize'); ?></small>
|
256 |
+
</p>
|
257 |
+
|
258 |
+
<p>
|
259 |
+
<label>
|
260 |
+
<input name="clean-trackbacks" id="clean-trackbacks" type="checkbox" value="" />
|
261 |
+
<span style="color: red;">
|
262 |
+
<?php _e('Remove trackbacks', 'wp-optimize'); ?>
|
263 |
+
</span>
|
264 |
+
</label>
|
265 |
+
<br />
|
266 |
+
<small> <?php _e(wpo_getInfo('trackbacks'), 'wp-optimize'); ?></small>
|
267 |
+
</p>
|
268 |
+
|
269 |
+
<p>
|
270 |
+
<?php
|
271 |
+
echo '<small>';
|
272 |
+
_e('Do not select RED marked items unless you really need to use them', 'wp-optimize');
|
273 |
+
echo '</small>';
|
274 |
+
?>
|
275 |
+
</p>
|
276 |
+
<p>
|
277 |
+
<a href="http://bit.ly/youtube-wordpress" target="_blank">
|
278 |
+
<img src="<?php echo WPO_PLUGIN_URL ;?>embedplus.png" style="float: left;margin-right: 7px;"> <?php _e('Optimize your YouTube embedding in WordPress with this plugin', 'wp-optimize'); ?> »</a>
|
279 |
+
</p>
|
280 |
+
</div>
|
281 |
+
</div>
|
282 |
+
</div>
|
283 |
+
|
284 |
+
<div class="wpo_col wpo_span_1_of_3">
|
285 |
+
<div class="postbox">
|
286 |
+
<!-- <h3 class="hndle"><span>Actions</span></h3> -->
|
287 |
+
<div class="inside">
|
288 |
+
<h3><?php _e('Actions', 'wp-optimize'); ?></h3>
|
289 |
+
<p>
|
290 |
+
<label>
|
291 |
+
|
292 |
+
<?php
|
293 |
+
echo '<input name="optimize-db" id="optimize-db" type="checkbox" value="true" ';
|
294 |
+
echo $wpo_user_selection['user-optimize'] == 'true' ? 'checked="checked"':'';
|
295 |
+
echo ' />';
|
296 |
+
echo '<b> ';
|
297 |
+
_e('Optimize database tables', 'wp-optimize');
|
298 |
+
echo '</b>';
|
299 |
+
|
300 |
+
?>
|
301 |
+
</label>
|
302 |
+
</p>
|
303 |
+
|
304 |
+
<p><small>
|
305 |
+
<b><?php _e('Note:', 'wp-optimize'); ?></b>
|
306 |
+
<?php
|
307 |
+
|
308 |
+
_e('InnoDB tables will not be optimized', 'wp-optimize');
|
309 |
+
|
310 |
+
?>
|
311 |
+
|
312 |
+
</small></p>
|
313 |
+
<p><small>
|
314 |
+
<!-- <span style="text-align:center;"><a href="#" onClick="javascript:SetDefaults();"><?php _e('Select safe options', 'wp-optimize'); ?></a></span> -->
|
315 |
+
<b><?php _e('Warning:', 'wp-optimize'); ?></b><br />
|
316 |
+
<?php _e('Always make a backup of your DB when you upgrade to major versions', 'wp-optimize'); ?>
|
317 |
+
|
318 |
+
</small></p>
|
319 |
+
<p>
|
320 |
+
|
321 |
+
<input class="wpo_primary_big" type="submit" id="wp-optimize" name="wp-optimize" value="<?php _e('PROCESS', 'wp-optimize'); ?>" />
|
322 |
+
|
323 |
+
</p>
|
324 |
+
|
325 |
+
<p>
|
326 |
+
|
327 |
+
<a class="button-primary" href="<?php echo WPO_PAYPAL ; ?>" title="<?php _e('Please donate! It really helps me keep improvising', 'wp-optimize'); ?>" target="_blank"><?php _e('Donate!', 'wp-optimize'); ?></a>
|
328 |
+
<a class="button-primary" href="http://wordpress.org/support/view/plugin-reviews/wp-optimize?rate=5#postform" target="_blank" title="<?php _e('Please give a proper rating:)', 'wp-optimize'); ?>">
|
329 |
+
<?php _e('Rating', 'wp-optimize'); ?>
|
330 |
+
</a>
|
331 |
+
|
332 |
+
</p>
|
333 |
+
|
334 |
+
<h3><?php _e('Status log: ', 'wp-optimize'); ?></h3>
|
335 |
+
|
336 |
+
<?php
|
337 |
+
$news_items = wpo_readFeed('http://ruhanirabin.github.io/WP-Optimize/feed.xml', 1);
|
338 |
+
|
339 |
+
foreach ( $news_items as $item ) : ?>
|
340 |
+
<p>
|
341 |
+
<b> <a href="<?php echo $item->get_link(); ?>" title="<?php echo $item->get_title(); ?>" target="_blank"><?php echo $item->get_title(); ?></a> </b>
|
342 |
+
</p>
|
343 |
+
<?php endforeach; ?>
|
344 |
+
|
345 |
+
<?php
|
346 |
+
$lastopt = get_option(OPTION_NAME_LAST_OPT, 'Never');
|
347 |
+
if ($lastopt !== 'Never'){
|
348 |
+
echo '<i>';
|
349 |
+
_e('Last automatic optimization was at', 'wp-optimize');
|
350 |
+
echo ' ';
|
351 |
+
echo '</i>';
|
352 |
+
echo '<b>';
|
353 |
+
echo '<font color="green">';
|
354 |
+
echo $lastopt;
|
355 |
+
echo '</font>';
|
356 |
+
echo '</b>';
|
357 |
+
echo '</i>';
|
358 |
+
|
359 |
+
} else {
|
360 |
+
echo '<i>';
|
361 |
+
_e('There was no automatic optimization', 'wp-optimize');
|
362 |
+
echo ' - ';
|
363 |
+
//echo '<a href="?page=WP-Optimize&tab=wp_optimize_settings">';
|
364 |
+
//_e('Check settings', 'wp-optimize');
|
365 |
+
//echo '</a>';
|
366 |
+
echo '</i>';
|
367 |
+
}
|
368 |
+
?>
|
369 |
+
<br />
|
370 |
+
|
371 |
+
<?php
|
372 |
+
if ( get_option( OPTION_NAME_SCHEDULE, 'false' ) == 'true' ) {
|
373 |
+
echo '<b>';
|
374 |
+
echo '<i>';
|
375 |
+
echo '<font color="green">';
|
376 |
+
_e('Scheduled cleaning enabled', 'wp-optimize');
|
377 |
+
echo ', ';
|
378 |
+
echo '</font>';
|
379 |
+
echo '</i>';
|
380 |
+
echo '</b>';
|
381 |
+
if (wp_next_scheduled('wpo_cron_event2')) {
|
382 |
+
//$timestamp = wp_next_scheduled( 'wpo_cron_event2' );
|
383 |
+
wpo_cron_activate();
|
384 |
+
|
385 |
+
$timestamp = wp_next_scheduled( 'wpo_cron_event2' );
|
386 |
+
$date = new DateTime("@$timestamp");
|
387 |
+
echo '<i>';
|
388 |
+
_e('Next schedule', 'wp-optimize');
|
389 |
+
echo ' : ';
|
390 |
+
echo '<font color="green">';
|
391 |
+
//echo $date->format('l jS \of F Y') . "\n";
|
392 |
+
//echo gmdate(get_option('date_format') . ' ' . get_option('time_format'), $timestamp + (get_option('gmt_offset')));
|
393 |
+
echo gmdate(get_option('date_format') . ' ' . get_option('time_format'), $timestamp );
|
394 |
+
echo '</i>';
|
395 |
+
echo '</font>';
|
396 |
+
echo '<i>';
|
397 |
+
echo ' - ';
|
398 |
+
echo '<a href="?page=WP-Optimize">';
|
399 |
+
_e('Refresh', 'wp-optimize');
|
400 |
+
echo '</a>';
|
401 |
+
echo '</i>';
|
402 |
+
//echo $timestamp;
|
403 |
+
|
404 |
+
}
|
405 |
+
} else {
|
406 |
+
echo '<b>';
|
407 |
+
echo '<i>';
|
408 |
+
_e('Scheduled cleaning disabled', 'wp-optimize');
|
409 |
+
echo ' - ';
|
410 |
+
echo '<a href="?page=WP-Optimize&tab=wp_optimize_settings">';
|
411 |
+
_e('Check settings', 'wp-optimize');
|
412 |
+
echo '</a>';
|
413 |
+
echo '</i>';
|
414 |
+
echo '</b>';
|
415 |
+
}
|
416 |
+
echo '<br />';
|
417 |
+
|
418 |
+
if ( get_option( OPTION_NAME_RETENTION_ENABLED, 'false' ) == 'true' ) {
|
419 |
+
echo '<i>';
|
420 |
+
echo '<b>';
|
421 |
+
echo '<font color="blue">';
|
422 |
+
_e('Keeping last ', 'wp-optimize');
|
423 |
+
echo get_option( OPTION_NAME_RETENTION_PERIOD, '2' );
|
424 |
+
echo ' ';
|
425 |
+
_e('weeks data', 'wp-optimize');
|
426 |
+
echo '</font>';
|
427 |
+
echo '</i>';
|
428 |
+
echo '</b>';
|
429 |
+
|
430 |
+
} else {
|
431 |
+
echo '<i>';
|
432 |
+
echo '<b>';
|
433 |
+
_e('Not keeping recent data', 'wp-optimize');
|
434 |
+
echo ' - ';
|
435 |
+
echo '<a href="?page=WP-Optimize&tab=wp_optimize_settings">';
|
436 |
+
_e('Check settings', 'wp-optimize');
|
437 |
+
echo '</a>';
|
438 |
+
echo '</i>';
|
439 |
+
echo '</b>';
|
440 |
+
}
|
441 |
+
|
442 |
+
?>
|
443 |
+
<br />
|
444 |
+
|
445 |
+
<h4>
|
446 |
+
<?php
|
447 |
+
|
448 |
+
if (isset($_POST["optimize-db"])) {
|
449 |
+
list ($part1, $part2) = wpo_getCurrentDBSize();
|
450 |
+
_e('Current database size : ', 'wp-optimize');
|
451 |
+
echo '<font color="blue">';
|
452 |
+
echo $part1.'</font> ';
|
453 |
+
|
454 |
+
echo ' <br />';
|
455 |
+
_e('You have saved', 'wp-optimize');
|
456 |
+
echo ' : ';
|
457 |
+
echo '<font color="blue">';
|
458 |
+
echo $part2.'</font> ';
|
459 |
+
}
|
460 |
+
else {
|
461 |
+
list ($part1, $part2) = wpo_getCurrentDBSize();
|
462 |
+
_e('Current database size', 'wp-optimize');
|
463 |
+
echo ' : ';
|
464 |
+
echo '<font color="blue">';
|
465 |
+
echo $part1.'</font> ';
|
466 |
+
$this_value = $part2;
|
467 |
+
|
468 |
+
if ($this_value > 0){
|
469 |
+
echo ' <br />';
|
470 |
+
_e('You can save almost', 'wp-optimize');
|
471 |
+
echo ' : ';
|
472 |
+
echo '<font color="red">';
|
473 |
+
echo $part2.'</font> ';
|
474 |
+
}
|
475 |
+
}
|
476 |
+
|
477 |
+
?>
|
478 |
+
</h4>
|
479 |
+
<?php
|
480 |
+
|
481 |
+
|
482 |
+
$total_cleaned = get_option(OPTION_NAME_TOTAL_CLEANED);
|
483 |
+
$total_cleaned_num = floatval($total_cleaned);
|
484 |
+
|
485 |
+
if ($total_cleaned_num > 0){
|
486 |
+
echo '<h5>';
|
487 |
+
_e('Total clean up overall','wp-optimize');
|
488 |
+
echo ': ';
|
489 |
+
echo '<font color="green">';
|
490 |
+
echo wpo_format_size($total_cleaned);
|
491 |
+
echo '</font>';
|
492 |
+
echo '</h5>';
|
493 |
+
|
494 |
+
|
495 |
+
}
|
496 |
+
?>
|
497 |
+
|
498 |
+
</div>
|
499 |
+
</div>
|
500 |
+
</div>
|
501 |
+
<div class="wpo_col wpo_span_1_of_3">
|
502 |
+
|
503 |
+
<p>
|
504 |
+
<?php wpo_headerImage(); ?>
|
505 |
+
</p>
|
506 |
+
|
507 |
+
<p>
|
508 |
+
<?php _e('Sponsor','wp-optimize')?></small><br><a href="http://j.mp/1ePlbvc" target="_blank"><img style="border:0px" src="<?php echo WPO_PLUGIN_URL ;?>elegantthemes_sm.png" width="310" height="auto" alt=""></a>
|
509 |
+
</p>
|
510 |
+
|
511 |
+
</div>
|
512 |
+
</div>
|
513 |
+
|
514 |
+
<!-- TODO: Need to make this checkbox selection thing persistent -->
|
515 |
+
|
516 |
+
<script type="text/javascript">
|
517 |
+
function SetDefaults() {
|
518 |
+
document.getElementById("clean-revisions").checked = true;
|
519 |
+
document.getElementById("clean-comments").checked = true;
|
520 |
+
document.getElementById("clean-autodraft").checked = true;
|
521 |
+
document.getElementById("optimize-db").checked = true;
|
522 |
+
|
523 |
+
return false;
|
524 |
+
}
|
525 |
+
</script>
|
526 |
+
|
527 |
+
|
528 |
+
<!--<script>
|
529 |
+
SetDefaults();
|
530 |
+
</script>-->
|
531 |
+
|
532 |
+
<?php
|
533 |
+
if (isset($_POST["optimize-db"])) {
|
534 |
+
optimizeTablesQuick("yes");
|
535 |
+
}
|
536 |
+
else optimizeTablesQuick("no");
|
537 |
+
?>
|
wp-optimize-settings.php
CHANGED
@@ -7,6 +7,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
7 |
}
|
8 |
|
9 |
$GLOBALS['wpo_auto_options'] = get_option('wp-optimize-auto');
|
|
|
10 |
error_reporting( error_reporting() & ~E_NOTICE );
|
11 |
|
12 |
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
@@ -54,7 +55,18 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
54 |
} else {
|
55 |
update_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false' );
|
56 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
|
|
58 |
if( isset($_POST['wp-optimize-settings']) ) {
|
59 |
$new_options = $_POST['wp-optimize-auto'];
|
60 |
$bool_opts = array( 'revisions', 'drafts', 'spams', 'unapproved', 'transient', 'postmeta', 'tags', 'optimize' );
|
@@ -190,6 +202,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
190 |
</small>
|
191 |
</p>
|
192 |
|
|
|
|
|
|
|
|
|
|
|
193 |
<p>
|
194 |
<input class="button-primary" type="submit" name="wp-optimize-settings1" value="<?php _e('SAVE SETTINGS', 'wp-optimize'); ?>" />
|
195 |
</p>
|
@@ -212,6 +229,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
212 |
<?php
|
213 |
$last_schedule = get_option(OPTION_NAME_SCHEDULE_TYPE,'wpo_weekly');
|
214 |
switch ($last_schedule) {
|
|
|
|
|
|
|
|
|
215 |
case "wpo_weekly":
|
216 |
_e('Every week', 'wp-optimize');
|
217 |
break;
|
@@ -231,6 +252,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
231 |
?>
|
232 |
|
233 |
</option>
|
|
|
234 |
<option value="wpo_weekly"><?php _e('Every week', 'wp-optimize'); ?></option>
|
235 |
<option value="wpo_otherweekly"><?php _e('Every other week (every 14 days)', 'wp-optimize'); ?></option>
|
236 |
<option value="wpo_monthly"><?php _e('Every month (every 31 days)', 'wp-optimize'); ?></option>
|
@@ -293,8 +315,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
293 |
// }
|
294 |
?>
|
295 |
|
296 |
-
|
297 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
<input class="button-primary" type="submit" name="wp-optimize-settings" value="<?php _e('SAVE AUTO CLEAN-UP SETTINGS', 'wp-optimize'); ?>" />
|
299 |
</p>
|
300 |
|
@@ -306,4 +343,3 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
306 |
<input type="hidden" name="action" value="save_redirect" />
|
307 |
|
308 |
</form>
|
309 |
-
|
7 |
}
|
8 |
|
9 |
$GLOBALS['wpo_auto_options'] = get_option('wp-optimize-auto');
|
10 |
+
|
11 |
error_reporting( error_reporting() & ~E_NOTICE );
|
12 |
|
13 |
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
55 |
} else {
|
56 |
update_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false' );
|
57 |
}
|
58 |
+
if (isset($_POST["enable-email"])) {
|
59 |
+
update_option( OPTION_NAME_ENABLE_EMAIL, 'true' );
|
60 |
+
} else {
|
61 |
+
update_option( OPTION_NAME_ENABLE_EMAIL, 'false' );
|
62 |
+
}
|
63 |
+
if (isset($_POST["enable-email-address"])) {
|
64 |
+
update_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS, $_POST["enable-email-address"] );
|
65 |
+
} else {
|
66 |
+
update_option( OPTION_NAME_ENABLE_EMAIL_ADDRESS, get_bloginfo ( 'admin_email' ) );
|
67 |
+
}
|
68 |
|
69 |
+
|
70 |
if( isset($_POST['wp-optimize-settings']) ) {
|
71 |
$new_options = $_POST['wp-optimize-auto'];
|
72 |
$bool_opts = array( 'revisions', 'drafts', 'spams', 'unapproved', 'transient', 'postmeta', 'tags', 'optimize' );
|
202 |
</small>
|
203 |
</p>
|
204 |
|
205 |
+
<p>
|
206 |
+
<a href="http://bit.ly/youtube-wordpress" target="_blank">
|
207 |
+
<img src="<?php echo WPO_PLUGIN_URL ;?>embedplus.png" style="float: left;margin-right: 7px;"> <?php _e('Optimize your YouTube embedding in WordPress with this plugin', 'wp-optimize'); ?> »</a>
|
208 |
+
</p>
|
209 |
+
|
210 |
<p>
|
211 |
<input class="button-primary" type="submit" name="wp-optimize-settings1" value="<?php _e('SAVE SETTINGS', 'wp-optimize'); ?>" />
|
212 |
</p>
|
229 |
<?php
|
230 |
$last_schedule = get_option(OPTION_NAME_SCHEDULE_TYPE,'wpo_weekly');
|
231 |
switch ($last_schedule) {
|
232 |
+
case "wpo_daily":
|
233 |
+
_e('Everyday', 'wp-optimize');
|
234 |
+
break;
|
235 |
+
|
236 |
case "wpo_weekly":
|
237 |
_e('Every week', 'wp-optimize');
|
238 |
break;
|
252 |
?>
|
253 |
|
254 |
</option>
|
255 |
+
<option value="wpo_daily"><?php _e('Everyday', 'wp-optimize'); ?></option>
|
256 |
<option value="wpo_weekly"><?php _e('Every week', 'wp-optimize'); ?></option>
|
257 |
<option value="wpo_otherweekly"><?php _e('Every other week (every 14 days)', 'wp-optimize'); ?></option>
|
258 |
<option value="wpo_monthly"><?php _e('Every month (every 31 days)', 'wp-optimize'); ?></option>
|
315 |
// }
|
316 |
?>
|
317 |
|
318 |
+
<p>
|
319 |
+
<label>
|
320 |
+
<input name="enable-email" id="enable-email" type="checkbox" value ="true" <?php echo get_option(OPTION_NAME_ENABLE_EMAIL, 'false') == 'true' ? 'checked="checked"':''; ?> />
|
321 |
+
<?php
|
322 |
+
_e('Enable email notification', 'wp-optimize');
|
323 |
+
?>
|
324 |
+
</label>
|
325 |
+
</p>
|
326 |
+
<p>
|
327 |
+
<label for="enable-email-address">
|
328 |
+
<?php
|
329 |
+
_e('Send email to', 'wp-optimize');
|
330 |
+
?>
|
331 |
+
<input name="enable-email-address" id="enable-email-address" type="text" value ="<?php echo get_option(OPTION_NAME_ENABLE_EMAIL_ADDRESS, get_bloginfo ( 'admin_email' )); ?>" />
|
332 |
+
</label>
|
333 |
+
</p>
|
334 |
+
<p>
|
335 |
<input class="button-primary" type="submit" name="wp-optimize-settings" value="<?php _e('SAVE AUTO CLEAN-UP SETTINGS', 'wp-optimize'); ?>" />
|
336 |
</p>
|
337 |
|
343 |
<input type="hidden" name="action" value="save_redirect" />
|
344 |
|
345 |
</form>
|
|
wp-optimize.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Optimize
|
4 |
-
Plugin URI: http://
|
5 |
Description: This plugin helps you to keep your database clean by removing post revisions and spams in a blaze. Additionally it allows you to run optimize command on your WordPress core tables (use with caution).
|
6 |
-
Version: 1.8.9.
|
7 |
Author: Ruhani Rabin
|
8 |
Author URI: https://github.com/ruhanirabin/WP-Optimize
|
9 |
Text Domain: wp-optimize
|
@@ -11,7 +11,7 @@ Domain Path: /languages
|
|
11 |
Git URI: https://github.com/ruhanirabin/wp-optimize
|
12 |
GitHub Plugin URI: https://github.com/ruhanirabin/wp-optimize
|
13 |
GitHub Branch: master
|
14 |
-
Copyright 2009-2014 Ruhani Rabin (email :
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
@@ -37,7 +37,7 @@ GitHub Branch: master
|
|
37 |
# prevent file from being accessed directly
|
38 |
# --------------------------------------- #
|
39 |
if ( ! defined( 'WPINC' ) ) {
|
40 |
-
|
41 |
}
|
42 |
|
43 |
global $current_user;
|
@@ -45,20 +45,20 @@ global $current_user;
|
|
45 |
error_reporting( error_reporting() & ~E_NOTICE );
|
46 |
|
47 |
if (! defined('WPO_VERSION'))
|
48 |
-
define('WPO_VERSION', '1.8.9.
|
49 |
|
50 |
if (! defined('WPO_PLUGIN_MAIN_PATH'))
|
51 |
-
|
52 |
|
53 |
if (! defined('WPO_PAYPAL'))
|
54 |
-
|
55 |
|
56 |
-
|
57 |
require_once (WPO_PLUGIN_MAIN_PATH . 'wp-optimize-common.php');
|
58 |
|
59 |
} else {
|
60 |
-
|
61 |
-
|
62 |
|
63 |
|
64 |
register_activation_hook(__FILE__,'wpo_admin_actions');
|
@@ -68,23 +68,23 @@ register_deactivation_hook(__FILE__,'wpo_admin_actions_remove');
|
|
68 |
add_action('init', 'wp_optimize_textdomain');
|
69 |
function wp_optimize_textdomain() {
|
70 |
if (function_exists('load_plugin_textdomain')) {
|
71 |
-
|
72 |
}
|
73 |
}
|
74 |
|
75 |
function wp_optimize_menu(){
|
76 |
-
|
77 |
}
|
78 |
|
79 |
function wpo_admin_bar() {
|
80 |
-
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
}
|
90 |
|
@@ -106,34 +106,39 @@ add_filter("plugin_action_links_$plugin", 'wpo_plugin_settings_link' );
|
|
106 |
// plugin activation actions
|
107 |
function wpo_admin_actions()
|
108 |
{
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
if (get_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false' ) == 'true' ){
|
116 |
-
|
117 |
}
|
118 |
|
119 |
-
|
120 |
wpo_PluginOptionsSetDefaults();
|
121 |
-
|
122 |
-
|
123 |
}
|
124 |
|
125 |
// TODO: Need to find out why the schedule time is not refreshing
|
126 |
function wpo_cron_activate() {
|
127 |
-
|
128 |
$gmtoffset = (int) (3600 * ((double) get_option('gmt_offset')));
|
129 |
|
130 |
if ( get_option( OPTION_NAME_SCHEDULE ) !== false ) {
|
131 |
-
|
132 |
-
|
133 |
|
134 |
-
|
135 |
|
136 |
switch ($schedule_type) {
|
|
|
|
|
|
|
|
|
|
|
137 |
case "wpo_weekly":
|
138 |
//
|
139 |
$this_time = 60*60*24*7;
|
@@ -154,54 +159,43 @@ function wpo_cron_activate() {
|
|
154 |
break;
|
155 |
|
156 |
}
|
157 |
-
//$this_time = time() + $gmtoffset;
|
158 |
add_action('wpo_cron_event2', 'wpo_cron_action');
|
159 |
-
//wp_schedule_event(current_time( "timestamp", 0 ) + $this_time + $gmtoffset, $schedule_type, 'wpo_cron_event2');
|
160 |
wp_schedule_event(current_time( "timestamp", 0 ) + $this_time , $schedule_type, 'wpo_cron_event2');
|
161 |
wpo_debugLog('running wp_schedule_event()');
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
}
|
166 |
-
}
|
167 |
-
} else wpo_PluginOptionsSetDefaults();
|
168 |
}
|
169 |
|
170 |
function wpo_cron_deactivate() {
|
171 |
-
|
172 |
-
|
173 |
wp_clear_scheduled_hook('wpo_cron_event2');
|
174 |
}
|
175 |
|
176 |
add_action('wpo_cron_event2', 'wpo_cron_action');
|
177 |
add_filter('cron_schedules', 'wpo_cron_update_sched');
|
178 |
|
|
|
179 |
// scheduler functions to update schedulers
|
180 |
-
// possible problem found at support request
|
181 |
-
// http://wordpress.org/support/topic/bug-found-in-scheduler-code
|
182 |
|
183 |
function wpo_cron_update_sched( $schedules ) {
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
|
|
188 |
}
|
189 |
|
190 |
|
191 |
// plugin deactivation actions
|
192 |
function wpo_admin_actions_remove()
|
193 |
{
|
194 |
-
|
195 |
-
|
196 |
}
|
197 |
add_action('admin_menu', 'wpo_admin_actions');
|
198 |
|
199 |
-
/* function wpo_admin_styles() {
|
200 |
-
wp_register_style( 'wpo_admin_stylesheet', plugins_url( '/css/wpo_admin.css', __FILE__ ) );
|
201 |
-
wp_enqueue_style( 'wpo_admin_stylesheet' );
|
202 |
-
}
|
203 |
-
add_action( 'admin_enqueue_scripts', 'wpo_admin_styles' ); */
|
204 |
-
|
205 |
|
206 |
function wpo_admin_register_head() {
|
207 |
$style_url = plugins_url( '/css/wpo_admin.css', __FILE__ ) ;
|
@@ -209,4 +203,4 @@ function wpo_admin_register_head() {
|
|
209 |
}
|
210 |
add_action('admin_head', 'wpo_admin_register_head');
|
211 |
|
212 |
-
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP-Optimize
|
4 |
+
Plugin URI: http://wp-optimize.ruhanirabin.com/
|
5 |
Description: This plugin helps you to keep your database clean by removing post revisions and spams in a blaze. Additionally it allows you to run optimize command on your WordPress core tables (use with caution).
|
6 |
+
Version: 1.8.9.8
|
7 |
Author: Ruhani Rabin
|
8 |
Author URI: https://github.com/ruhanirabin/WP-Optimize
|
9 |
Text Domain: wp-optimize
|
11 |
Git URI: https://github.com/ruhanirabin/wp-optimize
|
12 |
GitHub Plugin URI: https://github.com/ruhanirabin/wp-optimize
|
13 |
GitHub Branch: master
|
14 |
+
Copyright 2009-2014 Ruhani Rabin (email : plugins@ruhanirabin.com)
|
15 |
|
16 |
This program is free software; you can redistribute it and/or modify
|
17 |
it under the terms of the GNU General Public License as published by
|
37 |
# prevent file from being accessed directly
|
38 |
# --------------------------------------- #
|
39 |
if ( ! defined( 'WPINC' ) ) {
|
40 |
+
die;
|
41 |
}
|
42 |
|
43 |
global $current_user;
|
45 |
error_reporting( error_reporting() & ~E_NOTICE );
|
46 |
|
47 |
if (! defined('WPO_VERSION'))
|
48 |
+
define('WPO_VERSION', '1.8.9.8');
|
49 |
|
50 |
if (! defined('WPO_PLUGIN_MAIN_PATH'))
|
51 |
+
define('WPO_PLUGIN_MAIN_PATH', plugin_dir_path( __FILE__ ));
|
52 |
|
53 |
if (! defined('WPO_PAYPAL'))
|
54 |
+
define('WPO_PAYPAL', 'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LTCMF6JDX94QS');
|
55 |
|
56 |
+
if ( file_exists(WPO_PLUGIN_MAIN_PATH . 'wp-optimize-common.php')) {
|
57 |
require_once (WPO_PLUGIN_MAIN_PATH . 'wp-optimize-common.php');
|
58 |
|
59 |
} else {
|
60 |
+
die ('Functions File is missing!');
|
61 |
+
}
|
62 |
|
63 |
|
64 |
register_activation_hook(__FILE__,'wpo_admin_actions');
|
68 |
add_action('init', 'wp_optimize_textdomain');
|
69 |
function wp_optimize_textdomain() {
|
70 |
if (function_exists('load_plugin_textdomain')) {
|
71 |
+
load_plugin_textdomain('wp-optimize', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
|
72 |
}
|
73 |
}
|
74 |
|
75 |
function wp_optimize_menu(){
|
76 |
+
include_once( 'wp-optimize-admin.php' );
|
77 |
}
|
78 |
|
79 |
function wpo_admin_bar() {
|
80 |
+
global $wp_admin_bar;
|
81 |
|
82 |
+
//Add a link called at the top admin bar
|
83 |
+
$wp_admin_bar->add_node(array(
|
84 |
+
'id' => 'wp-optimize',
|
85 |
+
'title' => 'WP-Optimize',
|
86 |
+
'href' => admin_url( 'admin.php?page=WP-Optimize', 'http' )
|
87 |
+
));
|
88 |
|
89 |
}
|
90 |
|
106 |
// plugin activation actions
|
107 |
function wpo_admin_actions()
|
108 |
{
|
109 |
+
if ( current_user_can('manage_options') ) {
|
110 |
+
if (function_exists('add_meta_box')) {
|
111 |
+
add_menu_page("WP-Optimize", "WP-Optimize", "manage_options", "WP-Optimize", "wp_optimize_menu", plugin_dir_url( __FILE__ ).'wpo.png');
|
112 |
+
} else {
|
113 |
+
add_submenu_page("index.php", "WP-Optimize", "WP-Optimize", "manage_options", "WP-Optimize", "wp_optimize_menu", plugin_dir_url( __FILE__ ).'wpo.png');
|
114 |
+
} // end if addmeta box
|
115 |
if (get_option( OPTION_NAME_ENABLE_ADMIN_MENU, 'false' ) == 'true' ){
|
116 |
+
add_action( 'wp_before_admin_bar_render', 'wpo_admin_bar' );
|
117 |
}
|
118 |
|
119 |
+
//wpo_detectDBType();
|
120 |
wpo_PluginOptionsSetDefaults();
|
121 |
+
wpo_cron_activate();
|
122 |
+
}
|
123 |
}
|
124 |
|
125 |
// TODO: Need to find out why the schedule time is not refreshing
|
126 |
function wpo_cron_activate() {
|
127 |
+
//wpo_debugLog('running wpo_cron_activate()');
|
128 |
$gmtoffset = (int) (3600 * ((double) get_option('gmt_offset')));
|
129 |
|
130 |
if ( get_option( OPTION_NAME_SCHEDULE ) !== false ) {
|
131 |
+
if ( get_option(OPTION_NAME_SCHEDULE) == 'true') {
|
132 |
+
if (!wp_next_scheduled('wpo_cron_event2')) {
|
133 |
|
134 |
+
$schedule_type = get_option(OPTION_NAME_SCHEDULE_TYPE, 'wpo_weekly');
|
135 |
|
136 |
switch ($schedule_type) {
|
137 |
+
case "wpo_daily":
|
138 |
+
//
|
139 |
+
$this_time = 60*60*24;
|
140 |
+
break;
|
141 |
+
|
142 |
case "wpo_weekly":
|
143 |
//
|
144 |
$this_time = 60*60*24*7;
|
159 |
break;
|
160 |
|
161 |
}
|
|
|
162 |
add_action('wpo_cron_event2', 'wpo_cron_action');
|
|
|
163 |
wp_schedule_event(current_time( "timestamp", 0 ) + $this_time , $schedule_type, 'wpo_cron_event2');
|
164 |
wpo_debugLog('running wp_schedule_event()');
|
165 |
+
}
|
166 |
+
}
|
167 |
+
} else wpo_PluginOptionsSetDefaults();
|
|
|
|
|
|
|
168 |
}
|
169 |
|
170 |
function wpo_cron_deactivate() {
|
171 |
+
//wp_clear_scheduled_hook('wpo_cron_event');
|
172 |
+
wpo_debugLog('running wpo_cron_deactivate()');
|
173 |
wp_clear_scheduled_hook('wpo_cron_event2');
|
174 |
}
|
175 |
|
176 |
add_action('wpo_cron_event2', 'wpo_cron_action');
|
177 |
add_filter('cron_schedules', 'wpo_cron_update_sched');
|
178 |
|
179 |
+
|
180 |
// scheduler functions to update schedulers
|
|
|
|
|
181 |
|
182 |
function wpo_cron_update_sched( $schedules ) {
|
183 |
+
$schedules['wpo_daily'] = array('interval' => 60*60*24, 'display' => 'Once Daily');
|
184 |
+
$schedules['wpo_weekly'] = array('interval' => 60*60*24*7, 'display' => 'Once Weekly');
|
185 |
+
$schedules['wpo_otherweekly'] = array('interval' => 60*60*24*14, 'display' => 'Once Every Other Week');
|
186 |
+
$schedules['wpo_monthly'] = array('interval' => 60*60*24*31, 'display' => 'Once Every Month');
|
187 |
+
return $schedules;
|
188 |
}
|
189 |
|
190 |
|
191 |
// plugin deactivation actions
|
192 |
function wpo_admin_actions_remove()
|
193 |
{
|
194 |
+
wpo_cron_deactivate();
|
195 |
+
wpo_removeOptions();
|
196 |
}
|
197 |
add_action('admin_menu', 'wpo_admin_actions');
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
function wpo_admin_register_head() {
|
201 |
$style_url = plugins_url( '/css/wpo_admin.css', __FILE__ ) ;
|
203 |
}
|
204 |
add_action('admin_head', 'wpo_admin_register_head');
|
205 |
|
206 |
+
?>
|