| @@ -69,16 +69,8 @@ | ||
| 69 | 69 | #ao_show_adv:before { |
| 70 | 70 | content: "\f108 \f140"; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | -/* animate "show adv" button */ | |
| 74 | -#ao_show_adv { animation: watchmenow 3s linear 5s 10; } | |
| 75 | -#ao_show_adv:hover { animation: none; } | |
| 76 | -@keyframes watchmenow { | |
| 77 | - 0% { box-shadow: unset; } | |
| 78 | - 100% { box-shadow: 0px 0px 20px yellow; } | |
| 79 | -} | |
| 80 | - | |
| 81 | 73 | /* form */ |
| 82 | 74 | .itemDetail { |
| 83 | 75 | background: #fff; |
| 84 | 76 | border: 1px solid #ccc; |
| @@ -158,9 +150,9 @@ | ||
| 158 | 150 | |
| 159 | 151 | <div class="wrap"> |
| 160 | 152 | |
| 161 | 153 | <?php if (version_compare(PHP_VERSION, '5.3.0') < 0) { ?> |
| 162 | -<div class="notice-error notice"><?php echo '<p>' . sprintf( __('<strong>You are using a very old version of PHP</strong> (5.2.x or older) which has <a href=%s>serious security and performance issues</a>. Support for PHP 5.5 and below will be removed in one of the next AO released, please ask your hoster to provide you with an upgrade path to 7.x.','autoptimize'), '"http://blog.futtta.be/2016/03/15/why-would-you-still-be-on-php-5-2/" target="_blank"') . '</p>'; ?></div> | |
| 154 | +<div class="notice-error notice"><?php _e('<p><strong>You are using a very old version of PHP</strong> (5.2.x or older) which has <a href="http://blog.futtta.be/2016/03/15/why-would-you-still-be-on-php-5-2/" target="_blank">serious security and performance issues</a>. Please ask your hoster to provide you with an upgrade path to 5.6 or 7.0</p>','autoptimize'); ?></div> | |
| 163 | 155 | <?php } ?> |
| 164 | 156 | |
| 165 | 157 | <div id="autoptimize_main"> |
| 166 | 158 | <div id="ao_title_and_button"> |
| @@ -217,13 +209,13 @@ | ||
| 217 | 209 | </tr> |
| 218 | 210 | <tr valign="top" class="<?php echo $hiddenClass;?>js_sub ao_adv"> |
| 219 | 211 | <th scope="row"><?php _e('Force JavaScript in <head>?','autoptimize'); ?></th> |
| 220 | 212 | <td><label class="cb_label"><input type="checkbox" name="autoptimize_js_forcehead" <?php echo get_option('autoptimize_js_forcehead')?'checked="checked" ':''; ?>/> |
| 221 | -<?php _e('Load JavaScript early, this can potentially fix some JS-errors, but makes the JS render blocking.','autoptimize'); ?></label></td> | |
| 213 | +<?php _e('Load JavaScript early, reducing the chance of JS-errors but making it render blocking. You can disable this if you\'re not aggregating inline JS and you want JS to be deferred.','autoptimize'); ?></label></td> | |
| 222 | 214 | </tr> |
| 223 | 215 | <?php if (get_option('autoptimize_js_justhead')) { ?> |
| 224 | 216 | <tr valign="top" class="<?php echo $hiddenClass;?>js_sub ao_adv"> |
| 225 | -<th scope="row"><?php _e('Look for scripts only in <head>?','autoptimize'); echo ' <i>'. __('(deprecated)','autoptimize') . '</i>'; ?></th> | |
| 217 | +<th scope="row"><?php _e('Look for scripts only in <head>?','autoptimize'); _e(' <i>(deprecated)</i>','autoptimize'); ?></th> | |
| 226 | 218 | <td><label class="cb_label"><input type="checkbox" name="autoptimize_js_justhead" <?php echo get_option('autoptimize_js_justhead')?'checked="checked" ':''; ?>/> |
| 227 | 219 | <?php _e('Mostly useful in combination with previous option when using jQuery-based templates, but might help keeping cache size under control.','autoptimize'); ?></label></td> |
| 228 | 220 | </tr> |
| 229 | 221 | <?php } ?> |
| @@ -229,9 +221,9 @@ | ||
| 229 | 221 | <?php } ?> |
| 230 | 222 | <tr valign="top" class="<?php echo $hiddenClass;?>js_sub ao_adv"> |
| 231 | 223 | <th scope="row"><?php _e('Also aggregate inline JS?','autoptimize'); ?></th> |
| 232 | 224 | <td><label class="cb_label"><input type="checkbox" name="autoptimize_js_include_inline" <?php echo get_option('autoptimize_js_include_inline')?'checked="checked" ':''; ?>/> |
| 233 | -<?php _e('Let Autoptimize also extract JS from the HTML. <strong>Warning</strong>: this can make Autoptimize\'s cache size grow quickly, so only enable this if you know what you\'re doing.','autoptimize'); ?></label></td> | |
| 225 | +<?php _e('Check this option for Autoptimize to also aggregate JS in the HTML. If this option is not enabled, you might have to "force JavaScript in head".','autoptimize'); ?></label></td> | |
| 234 | 226 | </tr> |
| 235 | 227 | <tr valign="top" class="<?php echo $hiddenClass;?>js_sub ao_adv"> |
| 236 | 228 | <th scope="row"><?php _e('Exclude scripts from Autoptimize:','autoptimize'); ?></th> |
| 237 | 229 | <td><label><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo get_option('autoptimize_js_exclude',"seal.js, js/jquery/jquery.js"); ?>"/><br /> |
| @@ -263,9 +255,9 @@ | ||
| 263 | 255 | <?php _e('Check this if you don\'t need or want Google Fonts being loaded.','autoptimize'); ?></label></td> |
| 264 | 256 | </tr> |
| 265 | 257 | <?php if (get_option('autoptimize_css_justhead')) { ?> |
| 266 | 258 | <tr valign="top" class="<?php echo $hiddenClass;?>css_sub ao_adv"> |
| 267 | -<th scope="row"><?php _e('Look for styles only in <head>?','autoptimize'); echo ' <i>'. __('(deprecated)','autoptimize') . '</i>'; ?></th> | |
| 259 | +<th scope="row"><?php _e('Look for styles only in <head>?','autoptimize'); _e(' <i>(deprecated)</i>','autoptimize'); ?></th> | |
| 268 | 260 | <td><label class="cb_label"><input type="checkbox" name="autoptimize_css_justhead" <?php echo get_option('autoptimize_css_justhead')?'checked="checked" ':''; ?>/> |
| 269 | 261 | <?php _e('Don\'t autoptimize CSS outside the head-section. If the cache gets big, you might want to enable this.','autoptimize'); ?></label></td> |
| 270 | 262 | </tr> |
| 271 | 263 | <?php } ?> |
| @@ -301,9 +293,9 @@ | ||
| 301 | 293 | <table class="form-table"> |
| 302 | 294 | <tr valign="top"> |
| 303 | 295 | <th scope="row"><?php _e('CDN Base URL','autoptimize'); ?></th> |
| 304 | 296 | <td><label><input id="cdn_url" type="text" name="autoptimize_cdn_url" pattern="^(https?:)?\/\/([\da-z\.-]+)\.([\da-z\.]{2,6})([\/\w \.-]*)*(:\d{2,5})?\/?$" style="width:100%" value="<?php echo esc_url(get_option('autoptimize_cdn_url',''),array("http","https")); ?>" /><br /> |
| 305 | -<?php _e('Enter your CDN root URL to enable CDN for Autoptimized files. The URL can be http, https or protocol-relative (e.g. <code>//cdn.example.com/</code>). This is not needed for Cloudflare.','autoptimize'); ?></label></td> | |
| 297 | +<?php _e('Enter your CDN root URL to enable CDN for Autoptimized files. The URL can be http, https or protocol-relative (e.g. <code>//cdn.example.com/</code>).','autoptimize'); ?></label></td> | |
| 306 | 298 | </tr> |
| 307 | 299 | </table> |
| 308 | 300 | </li> |
| 309 | 301 | |
| @@ -322,44 +314,19 @@ | ||
| 322 | 314 | <th scope="row"><?php _e('Cached styles and scripts','autoptimize'); ?></th> |
| 323 | 315 | <td><?php |
| 324 | 316 | $AOstatArr=autoptimizeCache::stats(); |
| 325 | 317 | $AOcacheSize=round($AOstatArr[1]/1024); |
| 326 | - printf( __( '%1$s files, totalling %2$s Kbytes (calculated at %3$s)', 'autoptimize'), $AOstatArr[0], $AOcacheSize, date("H:i e", $AOstatArr[2]) ); | |
| 318 | + echo $AOstatArr[0].__(' files, totalling ','autoptimize').$AOcacheSize.__(' Kbytes (calculated at ','autoptimize').date("H:i e", $AOstatArr[2]).')'; | |
| 327 | 319 | ?></td> |
| 328 | 320 | </tr> |
| 321 | +<tr valign="top" class="<?php echo $hiddenClass;?>ao_adv"> | |
| 322 | +<th scope="row"><?php _e('Save aggregated script/css as static files?','autoptimize'); ?></th> | |
| 323 | +<td><label class="cb_label"><input type="checkbox" name="autoptimize_cache_nogzip" <?php echo get_option('autoptimize_cache_nogzip','1')?'checked="checked" ':''; ?>/> | |
| 324 | +<?php _e('By default files saved are static css/js, uncheck this option if your webserver doesn\'t properly handle the compression and expiry.','autoptimize'); ?></label></td> | |
| 325 | +</tr> | |
| 329 | 326 | </table> |
| 330 | 327 | </li> |
| 331 | 328 | |
| 332 | -<li class="<?php echo $hiddenClass;?>itemDetail ao_adv"> | |
| 333 | -<h2 class="itemTitle"><?php _e('Misc Options','autoptimize'); ?></h2> | |
| 334 | -<table class="form-table"> | |
| 335 | - <tr valign="top" class="<?php echo $hiddenClass;?>ao_adv"> | |
| 336 | - <th scope="row"><?php _e('Save aggregated script/css as static files?','autoptimize'); ?></th> | |
| 337 | - <td><label class="cb_label"><input type="checkbox" name="autoptimize_cache_nogzip" <?php echo get_option('autoptimize_cache_nogzip','1')?'checked="checked" ':''; ?>/> | |
| 338 | - <?php _e('By default files saved are static css/js, uncheck this option if your webserver doesn\'t properly handle the compression and expiry.','autoptimize'); ?></label> | |
| 339 | - </td> | |
| 340 | - </tr> | |
| 341 | - <tr valign="top" class="<?php echo $hiddenClass;?>ao_adv"> | |
| 342 | - <th scope="row"><?php _e('Also optimize for logged in users?','autoptimize'); ?></th> | |
| 343 | - <td><label class="cb_label"><input type="checkbox" name="autoptimize_optimize_logged" <?php echo get_option('autoptimize_optimize_logged','1')?'checked="checked" ':''; ?>/> | |
| 344 | - <?php _e('By default Autoptimize is also active for logged on users, uncheck not to optimize when logged in e.g. to use a pagebuilder.','autoptimize'); ?></label> | |
| 345 | - </td> | |
| 346 | - </tr> | |
| 347 | - <?php | |
| 348 | - if ( function_exists("is_checkout") || function_exists("is_cart") || function_exists("edd_is_checkout") || function_exists("wpsc_is_cart") || function_exists("wpsc_is_checkout") ) { | |
| 349 | - ?> | |
| 350 | - <tr valign="top" class="<?php echo $hiddenClass;?>ao_adv"> | |
| 351 | - <th scope="row"><?php _e('Also optimize shop cart/ checkout?','autoptimize'); ?></th> | |
| 352 | - <td><label class="cb_label"><input type="checkbox" name="autoptimize_optimize_checkout" <?php echo get_option('autoptimize_optimize_checkout','1')?'checked="checked" ':''; ?>/> | |
| 353 | - <?php _e('By default Autoptimize is also active on your shop\'s cart/ checkout, uncheck not to optimize those.','autoptimize'); ?></label> | |
| 354 | - </td> | |
| 355 | - </tr> | |
| 356 | - <?php | |
| 357 | - } | |
| 358 | - ?> | |
| 359 | -</table> | |
| 360 | -</li> | |
| 361 | - | |
| 362 | 329 | </ul> |
| 363 | 330 | |
| 364 | 331 | <input type="hidden" id="autoptimize_show_adv" name="autoptimize_show_adv" value="<?php echo get_option('autoptimize_show_adv','0'); ?>"> |
| 365 | 332 | |
| @@ -387,9 +354,9 @@ | ||
| 387 | 354 | } |
| 388 | 355 | echo $AO_banner; |
| 389 | 356 | } |
| 390 | 357 | ?> |
| 391 | - <li><?php _e("Need help? <a href='https://wordpress.org/plugins/autoptimize/faq/'>Check out the FAQ here</a>.","autoptimize"); ?></li> | |
| 358 | + <li><?php _e("Need help? <a href='https://wordpress.org/plugins/autoptimize/faq/'>Check out the FAQ</a> or post your question on <a href='http://wordpress.org/support/plugin/autoptimize'>the support-forum</a>.","autoptimize"); ?></li> | |
| 392 | 359 | <li><?php _e("Happy with Autoptimize?","autoptimize"); ?><br /><a href="<?php echo network_admin_url(); ?>plugin-install.php?tab=search&type=author&s=optimizingmatters"><?php _e("Try my other plugins!","autoptimize"); ?></a></li> |
| 393 | 360 | </ul> |
| 394 | 361 | </div> |
| 395 | 362 | <div style="margin-left:10px;margin-top:-5px;"> |
| @@ -412,9 +379,9 @@ | ||
| 412 | 379 | <?php $this->getFutttaFeeds("http://feeds.feedburner.com/futtta_webtech"); ?> |
| 413 | 380 | </div> |
| 414 | 381 | </div> |
| 415 | 382 | </div> |
| 416 | - <div style="float:right;margin:50px 15px;"><a href="http://blog.futtta.be/2013/10/21/do-not-donate-to-me/" target="_blank"><img width="100px" height="85px" src="<?php echo plugins_url().'/'.plugin_basename(dirname(__FILE__)).'/external/do_not_donate_smallest.png'; ?>" title="<?php _e("Do not donate for this plugin!","autoptimize"); ?>"></a></div> | |
| 383 | + <div style="float:right;margin:50px 15px;"><a href="http://blog.futtta.be/2013/10/21/do-not-donate-to-me/" target="_blank"><img width="100px" height="85px" src="<?php echo plugins_url().'/'.plugin_basename(dirname(__FILE__)).'/external/do_not_donate_smallest.png'; ?>" title="<?php _e("Do not donate for this plugin!"); ?>"></a></div> | |
| 417 | 384 | </div> |
| 418 | 385 | |
| 419 | 386 | <script type="text/javascript"> |
| 420 | 387 | var feed = new Array; |
| @@ -588,10 +555,8 @@ | ||
| 588 | 555 | register_setting('autoptimize','autoptimize_cdn_url'); |
| 589 | 556 | register_setting('autoptimize','autoptimize_cache_clean'); |
| 590 | 557 | register_setting('autoptimize','autoptimize_cache_nogzip'); |
| 591 | 558 | register_setting('autoptimize','autoptimize_show_adv'); |
| 592 | - register_setting('autoptimize','autoptimize_optimize_logged'); | |
| 593 | - register_setting('autoptimize','autoptimize_optimize_checkout'); | |
| 594 | 559 | } |
| 595 | 560 | |
| 596 | 561 | public function setmeta($links,$file=null) { |
| 597 | 562 | //Inspired on http://wpengineer.com/meta-links-for-wordpress-plugins/ |
| @@ -637,11 +602,9 @@ | ||
| 637 | 602 | 'autoptimize_css_datauris' => 0, |
| 638 | 603 | 'autoptimize_css_nogooglefont' => 0, |
| 639 | 604 | 'autoptimize_cdn_url' => "", |
| 640 | 605 | 'autoptimize_cache_nogzip' => 1, |
| 641 | - 'autoptimize_show_adv' => 0, | |
| 642 | - 'autoptimize_optimize_logged' => 1, | |
| 643 | - 'autoptimize_optimize_checkout' => 1 | |
| 606 | + 'autoptimize_show_adv' => 0 | |
| 644 | 607 | ); |
| 645 | 608 | |
| 646 | 609 | //Override with user settings |
| 647 | 610 | foreach(array_keys($config) as $name) { |