Autoptimize - Version 1.7.0

Version Description

  • New: exclude CSS
  • New: defer CSS
  • Updated minimizing components (JSMin & YUI PHP CSSMin)
  • Updated admin-page, hiding advanced configuration options
  • Updated CDN-support for added simplicity (code & UI-wise), including changing background image url in CSS
  • Updated/ new translations provided for French: wordpress-hebergement.fr, Persian: Hamed Irani, Swedish: Jonathan Sulo, German: blog-it-solutions.de and Dutch
  • Removed support for YUI
  • Flush HTML caching plugin's cache when flushing Autoptimize's one
  • fix for BOM marker in CSS-files as seen in Frontier theme, kudo's to Download Converter for reporting!
  • fix for protocol-less 3rd party scripts disappearing, thanks for reporting p33t3r!
  • fix for stylesheets without type="text/css" not being autoptimized as reported by renzo
  • tested with WordPress 3.7 beta2 (admin-bar.min.js added to automatically excluded scripts)
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 Autoptimize
Version 1.7.0
Comparing to
See all releases

Code changes from version 1.6.6 to 1.7.0

Files changed (36) hide show
  1. autoptimize.php +48 -32
  2. classes/autoptimizeBase.php +15 -3
  3. classes/autoptimizeCDN.php +0 -99
  4. classes/autoptimizeCache.php +16 -8
  5. classes/autoptimizeConfig.php +90 -93
  6. classes/autoptimizeScripts.php +23 -19
  7. classes/autoptimizeStyles.php +77 -17
  8. classes/autoptimizeYUI.php +0 -45
  9. classes/external/index.html +1 -1
  10. classes/external/js/index.html +1 -0
  11. classes/external/{jquery.cookie.js → js/jquery.cookie.js} +0 -0
  12. classes/external/{jquery.cookie.min.js → js/jquery.cookie.min.js} +0 -0
  13. classes/external/{jquery.zrssfeed.css → js/jquery.zrssfeed.css} +0 -0
  14. classes/external/{jquery.zrssfeed.min.js → js/jquery.zrssfeed.min.js} +0 -0
  15. classes/external/php/index.html +1 -0
  16. classes/{jsmin-1.1.1.php → external/php/jsmin-1.1.1.php} +0 -0
  17. classes/external/php/minify-2.1.7-html.php +257 -0
  18. classes/external/php/minify-2.1.7-jsmin.php +447 -0
  19. classes/{minify-css-compressor.php → external/php/minify-css-compressor.php} +0 -0
  20. classes/{minify-html.php → external/php/minify-html.php} +0 -0
  21. classes/external/php/yui-php-cssmin-2.4.8-1.php +758 -0
  22. localization/autoptimize-de_DE.mo +0 -0
  23. localization/autoptimize-de_DE.po +285 -0
  24. localization/autoptimize-fa_IR.mo +0 -0
  25. localization/autoptimize-fa_IR.po +199 -116
  26. localization/autoptimize-fr_FR.mo +0 -0
  27. localization/autoptimize-fr_FR.po +194 -106
  28. localization/autoptimize-nl_BE.mo +0 -0
  29. localization/autoptimize-nl_BE.po +233 -0
  30. localization/autoptimize-nl_NL.mo +0 -0
  31. localization/autoptimize-nl_NL.po +233 -0
  32. localization/autoptimize-sv_SE.mo +0 -0
  33. localization/autoptimize-sv_SE.po +266 -0
  34. localization/autoptimize.pot +141 -81
  35. readme.txt +59 -17
  36. yui/README.txt +0 -13
autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/autoptimize
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
- Version: 1.6.6
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
@@ -11,6 +11,7 @@ http://www.gnu.org/licenses/gpl.txt
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
14
  // Load config and cache class
15
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeConfig.php');
16
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeCache.php');
@@ -28,13 +29,26 @@ $conf = autoptimizeConfig::instance();
28
  /* Check if we're updating, in which case we need to flush the cache
29
  to avoid old versions of aggregated files lingering around */
30
 
31
- $autoptimize_version="1.6.6";
32
  $autoptimize_db_version=get_option('autoptimize_version','none');
33
 
34
  if ($autoptimize_db_version !== $autoptimize_version) {
35
  if ($autoptimize_db_version==="none") {
36
- add_action('admin_notices', 'config_autoptimize_notice');
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
 
38
  autoptimizeCache::clearall();
39
  update_option('autoptimize_version',$autoptimize_version);
40
  $autoptimize_db_version=$autoptimize_version;
@@ -47,11 +61,18 @@ define('AUTOPTIMIZE_CACHE_NOGZIP',(bool) $conf->get('autoptimize_cache_nogzip'))
47
  $plugin_dir = basename(dirname(__FILE__));
48
  load_plugin_textdomain('autoptimize','wp-content/plugins/'.$plugin_dir.'/localization',$plugin_dir.'/localization');
49
 
50
- function config_autoptimize_notice() {
51
  echo '<div class="updated"><p>';
52
  _e('Thank you for installing and activating Autoptimize. Please configure it under "Settings" -> "Autoptimize" to start improving your site\'s performance.', 'autoptimize' );
53
  echo '</p></div>';
54
  }
 
 
 
 
 
 
 
55
  // Set up the buffering
56
  function autoptimize_start_buffering()
57
  {
@@ -66,14 +87,23 @@ function autoptimize_start_buffering()
66
  // Load extra classes and set some vars
67
  if($conf->get('autoptimize_html'))
68
  {
69
- include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeHTML.php');
70
- @include(WP_PLUGIN_DIR.'/autoptimize/classes/minify-html.php');
 
 
 
 
 
71
  }
72
 
73
  if($conf->get('autoptimize_js'))
74
  {
75
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeScripts.php');
76
- @include(WP_PLUGIN_DIR.'/autoptimize/classes/jsmin-1.1.1.php');
 
 
 
 
77
  define('CONCATENATE_SCRIPTS',false);
78
  define('COMPRESS_SCRIPTS',false);
79
  }
@@ -81,20 +111,14 @@ function autoptimize_start_buffering()
81
  if($conf->get('autoptimize_css'))
82
  {
83
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeStyles.php');
84
- @include(WP_PLUGIN_DIR.'/autoptimize/classes/minify-css-compressor.php');
 
 
 
 
85
  define('COMPRESS_CSS',false);
86
  }
87
-
88
- if($conf->get('autoptimize_js_yui') || $conf->get('autoptimize_css_yui'))
89
- {
90
- include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeYUI.php');
91
- }
92
-
93
- if($conf->get('autoptimize_cdn_js') || $conf->get('autoptimize_cdn_css'))
94
- {
95
- include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeCDN.php');
96
- }
97
-
98
  // Now, start the real thing!
99
  ob_start('autoptimize_end_buffering');
100
  }
@@ -112,8 +136,6 @@ function autoptimize_end_buffering($content)
112
  $classes[] = 'autoptimizeScripts';
113
  if($conf->get('autoptimize_css'))
114
  $classes[] = 'autoptimizeStyles';
115
- if($conf->get('autoptimize_cdn_js') || $conf->get('autoptimize_cdn_css'))
116
- $classes[] = 'autoptimizeCDN';
117
  if($conf->get('autoptimize_html'))
118
  $classes[] = 'autoptimizeHTML';
119
 
@@ -123,21 +145,15 @@ function autoptimize_end_buffering($content)
123
  'justhead' => $conf->get('autoptimize_js_justhead'),
124
  'forcehead' => $conf->get('autoptimize_js_forcehead'),
125
  'trycatch' => $conf->get('autoptimize_js_trycatch'),
126
- 'yui' => $conf->get('autoptimize_js_yui'),
127
- 'exclude' => $conf->get('autoptimize_js_exclude')
128
  ),
129
  'autoptimizeStyles' => array(
130
  'justhead' => $conf->get('autoptimize_css_justhead'),
131
  'datauris' => $conf->get('autoptimize_css_datauris'),
132
- 'yui' => $conf->get('autoptimize_css_yui'),
133
- ),
134
- 'autoptimizeCDN' => array(
135
- 'js' => $conf->get('autoptimize_cdn_js'),
136
- 'jsurl' => $conf->get('autoptimize_cdn_js_url'),
137
- 'css' => $conf->get('autoptimize_cdn_css'),
138
- 'cssurl' => $conf->get('autoptimize_cdn_css_url'),
139
- 'img' => $conf->get('autoptimize_cdn_img'),
140
- 'imgurl' => $conf->get('autoptimize_cdn_img_url')
141
  ),
142
  'autoptimizeHTML' => array(
143
  'keepcomments' => $conf->get('autoptimize_html_keepcomments')
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/autoptimize
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
+ Version: 1.7.0
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
14
+
15
  // Load config and cache class
16
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeConfig.php');
17
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeCache.php');
29
  /* Check if we're updating, in which case we need to flush the cache
30
  to avoid old versions of aggregated files lingering around */
31
 
32
+ $autoptimize_version="1.7.0";
33
  $autoptimize_db_version=get_option('autoptimize_version','none');
34
 
35
  if ($autoptimize_db_version !== $autoptimize_version) {
36
  if ($autoptimize_db_version==="none") {
37
+ add_action('admin_notices', 'autoptimize_install_config_notice');
38
+ } else if (strpos($autoptimize_db_version,"1.6.")!==false) {
39
+ // if user was on version 1.6.x, force advanced options to be shown by default
40
+ update_option('autoptimize_show_adv','1');
41
+
42
+ // and remove old options
43
+ $delete_options=array("autoptimize_cdn_css","autoptimize_cdn_css_url","autoptimize_cdn_js","autoptimize_cdn_js_url","autoptimize_cdn_img","autoptimize_cdn_img_url","autoptimize_css_yui","autoptimize_js_yui");
44
+ foreach ($delete_options as $del_opt) {
45
+ delete_option( $del_opt );
46
+ }
47
+
48
+ // and notify user to check result
49
+ add_action('admin_notices', 'autoptimize_update_config_notice');
50
  }
51
+
52
  autoptimizeCache::clearall();
53
  update_option('autoptimize_version',$autoptimize_version);
54
  $autoptimize_db_version=$autoptimize_version;
61
  $plugin_dir = basename(dirname(__FILE__));
62
  load_plugin_textdomain('autoptimize','wp-content/plugins/'.$plugin_dir.'/localization',$plugin_dir.'/localization');
63
 
64
+ function autoptimize_install_config_notice() {
65
  echo '<div class="updated"><p>';
66
  _e('Thank you for installing and activating Autoptimize. Please configure it under "Settings" -> "Autoptimize" to start improving your site\'s performance.', 'autoptimize' );
67
  echo '</p></div>';
68
  }
69
+
70
+ function autoptimize_update_config_notice() {
71
+ echo '<div class="updated"><p>';
72
+ _e('Autoptimize has just been updated. Please <strong>test your site now</strong> and adapt Autoptimize config if needed.', 'autoptimize' );
73
+ echo '</p></div>';
74
+ }
75
+
76
  // Set up the buffering
77
  function autoptimize_start_buffering()
78
  {
87
  // Load extra classes and set some vars
88
  if($conf->get('autoptimize_html'))
89
  {
90
+ include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeHTML.php');
91
+ // BUG: new minify-html does not support keeping HTML comments, skipping for now
92
+ // if (defined('AUTOPTIMIZE_LEGACY_MINIFIERS')) {
93
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/minify-html.php');
94
+ // } else {
95
+ // @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/minify-2.1.7-html.php');
96
+ // }
97
  }
98
 
99
  if($conf->get('autoptimize_js'))
100
  {
101
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeScripts.php');
102
+ if (defined('AUTOPTIMIZE_LEGACY_MINIFIERS')) {
103
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/jsmin-1.1.1.php');
104
+ } else {
105
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/minify-2.1.7-jsmin.php');
106
+ }
107
  define('CONCATENATE_SCRIPTS',false);
108
  define('COMPRESS_SCRIPTS',false);
109
  }
111
  if($conf->get('autoptimize_css'))
112
  {
113
  include(WP_PLUGIN_DIR.'/autoptimize/classes/autoptimizeStyles.php');
114
+ if (defined('AUTOPTIMIZE_LEGACY_MINIFIERS')) {
115
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/minify-css-compressor.php');
116
+ } else {
117
+ @include(WP_PLUGIN_DIR.'/autoptimize/classes/external/php/yui-php-cssmin-2.4.8-1.php');
118
+ }
119
  define('COMPRESS_CSS',false);
120
  }
121
+
 
 
 
 
 
 
 
 
 
 
122
  // Now, start the real thing!
123
  ob_start('autoptimize_end_buffering');
124
  }
136
  $classes[] = 'autoptimizeScripts';
137
  if($conf->get('autoptimize_css'))
138
  $classes[] = 'autoptimizeStyles';
 
 
139
  if($conf->get('autoptimize_html'))
140
  $classes[] = 'autoptimizeHTML';
141
 
145
  'justhead' => $conf->get('autoptimize_js_justhead'),
146
  'forcehead' => $conf->get('autoptimize_js_forcehead'),
147
  'trycatch' => $conf->get('autoptimize_js_trycatch'),
148
+ 'js_exclude' => $conf->get('autoptimize_js_exclude'),
149
+ 'cdn_url' => $conf->get('autoptimize_cdn_url')
150
  ),
151
  'autoptimizeStyles' => array(
152
  'justhead' => $conf->get('autoptimize_css_justhead'),
153
  'datauris' => $conf->get('autoptimize_css_datauris'),
154
+ 'defer' => $conf->get('autoptimize_css_defer'),
155
+ 'css_exclude' => $conf->get('autoptimize_css_exclude'),
156
+ 'cdn_url' => $conf->get('autoptimize_cdn_url')
 
 
 
 
 
 
157
  ),
158
  'autoptimizeHTML' => array(
159
  'keepcomments' => $conf->get('autoptimize_html_keepcomments')
classes/autoptimizeBase.php CHANGED
@@ -1,13 +1,14 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
3
  abstract class autoptimizeBase
4
  {
5
  protected $content = '';
6
 
7
  public function __construct($content)
8
  {
9
- $this->content = $content;
10
- //Best place to catch errors
11
  }
12
 
13
  //Reads the page and collects tags
@@ -30,7 +31,7 @@ abstract class autoptimizeBase
30
  $url = $siteurl.$url;
31
  }
32
  $path = str_replace(WP_ROOT_URL,'',$url);
33
- if(preg_match('#^(https?|ftp)://#i',$path))
34
  {
35
  /** External script/css (adsense, etc) */
36
  return false;
@@ -77,4 +78,15 @@ abstract class autoptimizeBase
77
  }
78
  return $noptimize_out;
79
  }
 
 
 
 
 
 
 
 
 
 
 
80
  }
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
  abstract class autoptimizeBase
5
  {
6
  protected $content = '';
7
 
8
  public function __construct($content)
9
  {
10
+ $this->content = $content;
11
+ //Best place to catch errors
12
  }
13
 
14
  //Reads the page and collects tags
31
  $url = $siteurl.$url;
32
  }
33
  $path = str_replace(WP_ROOT_URL,'',$url);
34
+ if(preg_match('#^((https?|ftp):)?//#i',$path))
35
  {
36
  /** External script/css (adsense, etc) */
37
  return false;
78
  }
79
  return $noptimize_out;
80
  }
81
+
82
+ protected function url_replace_cdn($url) {
83
+ $site_url = site_url();
84
+ if (!empty($this->cdn_url)) {
85
+ // this check is too expensive, is done on admin-screen
86
+ // if (preg_match("/^(https?)?:\/\/([\da-z\.-]+)\.([\da-z\.]{2,6})([\/\w \.-]*)*\/?$/",$this->cdn_url)) {
87
+ $url=str_replace($site_url,rtrim($this->cdn_url,'/'),$url);
88
+ // }
89
+ }
90
+ return $url;
91
+ }
92
  }
classes/autoptimizeCDN.php DELETED
@@ -1,99 +0,0 @@
1
- <?php
2
-
3
- class autoptimizeCDN extends autoptimizeBase
4
- {
5
- private $js = false;
6
- private $jsurl = null;
7
- private $css = false;
8
- private $cssurl = null;
9
- private $replace = array();
10
-
11
- //Gets the tags that need replacing
12
- public function read($options)
13
- {
14
- //Remove the HTML comments?
15
- $this->js = (bool) $options['js'];
16
- $this->jsurl = $options['jsurl'];
17
- $this->css = (bool) $options['css'];
18
- $this->cssurl = $options['cssurl'];
19
- $this->img = (bool) $options['img'];
20
- $this->imgurl = $options['imgurl'];
21
- $siteurl = site_url();
22
-
23
- if($this->js)
24
- {
25
- if(preg_match_all('#<script[^>]*src[^>]*>.*</script>#Usmi',$this->content,$matches))
26
- {
27
- foreach($matches[0] as $tag)
28
- {
29
- if(preg_match('#src=("|\')(.*)("|\')#Usmi',$tag,$url))
30
- {
31
- $url = $url[2];
32
- if(strpos($url,$siteurl)!==false)
33
- {
34
- $this->replace[$tag] = str_replace($siteurl,$this->jsurl,$tag);
35
- }
36
- }
37
- }
38
- }
39
- }
40
-
41
- if($this->css)
42
- {
43
- if(preg_match_all('#<link[^>]*stylesheet[^>]*>#Usmi',$this->content,$matches))
44
- {
45
- foreach($matches[0] as $tag)
46
- {
47
- if(preg_match('#href=("|\')(.*)("|\')#Usmi',$tag,$url))
48
- {
49
- $url = $url[2];
50
- if(strpos($url,$siteurl)!==false)
51
- {
52
- $this->replace[$tag] = str_replace($siteurl,$this->cssurl,$tag);
53
- }
54
- }
55
- }
56
- }
57
- }
58
-
59
- if($this->img)
60
- {
61
- if(preg_match_all('#<img[^>]*src[^>]*>#Usmi',$this->content,$matches))
62
- {
63
- foreach($matches[0] as $tag)
64
- {
65
- if(preg_match('#src=("|\')(.*)("|\')#Usmi',$tag,$url))
66
- {
67
- $url = $url[2];
68
- if(strpos($url,$siteurl)!==false)
69
- {
70
- $this->replace[$tag] = str_replace($siteurl,$this->imgurl,$tag);
71
- }
72
- }
73
- }
74
- }
75
- }
76
- //Do we need further processing?
77
- return (count($this->replace)>0);
78
- }
79
-
80
- //Do the tag replacing
81
- public function minify()
82
- {
83
- //Replace the tags with the CDNed ones
84
- $this->content = str_replace(array_keys($this->replace),array_values($this->replace),$this->content);
85
- }
86
-
87
- //Does nothing
88
- public function cache()
89
- {
90
- //No cache for CDN
91
- return true;
92
- }
93
-
94
- //Returns the content
95
- public function getcontent()
96
- {
97
- return $this->content;
98
- }
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/autoptimizeCache.php CHANGED
@@ -84,14 +84,22 @@ class autoptimizeCache
84
  }
85
  }
86
 
87
- //Do we need to clean WP Super Cache's cache files?
88
- if(function_exists('wp_cache_clear_cache'))
89
- {
90
- //Newer WP-Super-Cache
91
- //See http://ocaoimh.ie/wp-super-cache-developers/
92
- wp_cache_clear_cache();
93
- }elseif(file_exists(WP_CONTENT_DIR.'/wp-cache-config.php') && function_exists('prune_super_cache')){
94
- //Old WP-Super-Cache
 
 
 
 
 
 
 
 
95
  global $cache_path;
96
  prune_super_cache($cache_path.'supercache/',true);
97
  prune_super_cache($cache_path,true);
84
  }
85
  }
86
 
87
+ // Do we need to clean any caching plugins cache-files?
88
+ if(function_exists('wp_cache_clear_cache')) {
89
+ wp_cache_clear_cache(); // wp super cache
90
+ } else if ( function_exists('w3tc_pgcache_flush') ) {
91
+ w3tc_pgcache_flush(); //w3 total cache
92
+ } else if ( function_exists('hyper_cache_invalidate') ) {
93
+ hyper_cache_invalidate(); // hypercache
94
+ } else if ( function_exists('wp_fast_cache_bulk_delete_all') ) {
95
+ wp_fast_cache_bulk_delete_all(); // wp fast cache
96
+ } else if (class_exists("WpFastestCache")) {
97
+ $wpfc = new WpFastestCache(); // wp fastest cache
98
+ $wpfc -> deleteCache();
99
+ } else if ( class_exists("c_ws_plugin__qcache_purging_routines") ) {
100
+ c_ws_plugin__qcache_purging_routines::purge_cache_dir(); // quick cache
101
+ } else if(file_exists(WP_CONTENT_DIR.'/wp-cache-config.php') && function_exists('prune_super_cache')){
102
+ // fallback for WP-Super-Cache
103
  global $cache_path;
104
  prune_super_cache($cache_path.'supercache/',true);
105
  prune_super_cache($cache_path,true);
classes/autoptimizeConfig.php CHANGED
@@ -49,10 +49,28 @@ class autoptimizeConfig
49
  public function show()
50
  {
51
  ?>
 
 
52
  <div class="wrap">
 
53
  <h2><?php _e('Autoptimize Settings','autoptimize'); ?></h2>
54
 
55
  <div style="float:left;width:70%;">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  <form method="post" action="options.php">
57
  <?php settings_fields('autoptimize'); ?>
58
 
@@ -65,7 +83,7 @@ class autoptimizeConfig
65
  <tr valign="top">
66
  <th scope="row"><?php _e('Keep HTML comments?','autoptimize'); ?></th>
67
  <td><label for="autoptimize_html_keepcomments"><input type="checkbox" name="autoptimize_html_keepcomments" <?php echo get_option('autoptimize_html_keepcomments')?'checked="checked" ':''; ?>/>
68
- <?php _e('Disabled by default. Enable this if you want HTML comments to remain in the page.','autoptimize'); ?></label></td>
69
  </tr>
70
  </table>
71
 
@@ -75,30 +93,25 @@ class autoptimizeConfig
75
  <th scope="row"><?php _e('Optimize JavaScript Code?','autoptimize'); ?></th>
76
  <td><input type="checkbox" name="autoptimize_js" <?php echo get_option('autoptimize_js')?'checked="checked" ':''; ?>/></td>
77
  </tr>
78
- <tr valign="top">
79
- <th scope="row"><?php _e('Exclude scripts from autoptimize:','autoptimize'); ?></th>
80
- <td><label for="autoptimize_js_exclude"><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo get_option('autoptimize_js_exclude',"s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client"); ?>"/><br />
81
- <?php _e('A comma-seperated list of scripts you want to exclude from being Autoptimized, for example \'whatever.js, another.js\' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize.','autoptimize'); ?></label></td>
82
  </tr>
83
- <tr valign="top">
84
  <th scope="row"><?php _e('Look for scripts only in &lt;head&gt;?','autoptimize'); ?></th>
85
  <td><label for="autoptimize_js_justhead"><input type="checkbox" name="autoptimize_js_justhead" <?php echo get_option('autoptimize_js_justhead')?'checked="checked" ':''; ?>/>
86
- <?php _e('Disabled by default. If the cache gets big, you might want to enable this.','autoptimize'); ?></label></td>
87
  </tr>
88
- <tr valign="top">
89
- <th scope="row"><?php _e('Force JavaScript in &lt;head&gt;?','autoptimize'); ?></th>
90
- <td><label for="autoptimize_js_forcehead"><input type="checkbox" name="autoptimize_js_forcehead" <?php echo get_option('autoptimize_js_forcehead')?'checked="checked" ':''; ?>/>
91
- <?php _e('Disabled by default. For performance reasons JavaScript is best put at the end of the HTML, but in some circumstances this breaks things. You can in that case check this option to add JavaScript to the &lt;head&gt; section.','autoptimize'); ?></label></td>
92
  </tr>
93
- <tr valign="top">
94
  <th scope="row"><?php _e('Add try-catch wrapping?','autoptimize'); ?></th>
95
  <td><label for="autoptimize_js_trycatch"><input type="checkbox" name="autoptimize_js_trycatch" <?php echo get_option('autoptimize_js_trycatch')?'checked="checked" ':''; ?>/>
96
- <?php _e('Disabled by default. If your scripts break because of an script error, you might want to try this.','autoptimize'); ?></label></td>
97
- </tr>
98
- <tr valign="top">
99
- <th scope="row"><?php _e('Use YUI compression?','autoptimize'); ?></th>
100
- <td><label for="autoptimize_js_yui"><input type="checkbox" name="autoptimize_js_yui" <?php echo get_option('autoptimize_js_yui')?'checked="checked" ':''; ?>/>
101
- <?php _e('<b>Deprecated!</b> Disabled by default. Read [autoptimize]/yui/README.txt for more information.','autoptimize'); ?></label></td>
102
  </tr>
103
  </table>
104
 
@@ -109,82 +122,61 @@ class autoptimizeConfig
109
  <td><input type="checkbox" name="autoptimize_css" <?php echo get_option('autoptimize_css')?'checked="checked" ':''; ?>/></td>
110
  </tr>
111
  <tr valign="top">
112
- <th scope="row"><?php _e('Look for styles on just &lt;head&gt;?','autoptimize'); ?></th>
113
- <td><label for="autoptimize_css_justhead"><input type="checkbox" name="autoptimize_css_justhead" <?php echo get_option('autoptimize_css_justhead')?'checked="checked" ':''; ?>/>
114
- <?php _e('Disabled by default. If the cache gets big, you might want to enable this.','autoptimize'); ?></label></td>
115
- </tr>
116
- <tr valign="top">
117
  <th scope="row"><?php _e('Generate data: URIs for images?','autoptimize'); ?></th>
118
  <td><label for="autoptimize_css_datauris"><input type="checkbox" name="autoptimize_css_datauris" <?php echo get_option('autoptimize_css_datauris')?'checked="checked" ':''; ?>/>
119
- <?php _e('Disabled by default. Enable this to include images on the CSS itself.','autoptimize'); ?></label></td>
120
  </tr>
121
- <tr valign="top">
122
- <th scope="row"><?php _e('Use YUI compression?','autoptimize'); ?></th>
123
- <td><label for="autoptimize_css_yui"><input type="checkbox" name="autoptimize_css_yui" <?php echo get_option('autoptimize_css_yui')?'checked="checked" ':''; ?>/>
124
- <?php _e('<b>Deprecated!</b> Disabled by default. Read [autoptimize]/yui/README.txt for more information.','autoptimize'); ?></label></td>
 
 
 
 
 
 
 
 
 
 
125
  </tr>
126
  </table>
127
 
128
- <h3><?php _e('CDN Options','autoptimize'); ?> (Deprecated!)</h3>
129
  <table class="form-table">
130
  <tr valign="top">
131
- <th scope="row"><?php _e('Rewrite JavaScript URLs?','autoptimize'); ?></th>
132
- <td><label for="autoptimize_cdn_js"><input type="checkbox" name="autoptimize_cdn_js" <?php echo get_option('autoptimize_cdn_js')?'checked="checked" ':''; ?>/>
133
- <?php _e('Disabled by default. Do not enable this unless you know what you are doing.','autoptimize'); ?></label></td>
134
- </tr>
135
- <tr valign="top">
136
- <th scope="row"><?php _e('JavaScript Base URL','autoptimize'); ?></th>
137
- <td><label for="autoptimize_cdn_js_url"><input type="text" name="autoptimize_cdn_js_url" value="<?php $it = get_option('autoptimize_cdn_js_url');echo htmlentities($it?$it:site_url()); ?>" />
138
- <?php _e('This is the new base URL that will be used when rewriting. It should point to the blog root directory.','autoptimize'); ?></label></td>
139
- </tr>
140
- <tr valign="top">
141
- <th scope="row"><?php _e('Rewrite CSS URLs?','autoptimize'); ?></th>
142
- <td><label for="autoptimize_cdn_css"><input type="checkbox" name="autoptimize_cdn_css" <?php echo get_option('autoptimize_cdn_css')?'checked="checked" ':''; ?>/>
143
- <?php _e('Disabled by default. Do not enable this unless you know what you are doing.','autoptimize'); ?></label></td>
144
- </tr>
145
- <tr valign="top">
146
- <th scope="row"><?php _e('CSS Base URL','autoptimize'); ?></th>
147
- <td><label for="autoptimize_cdn_css_url"><input type="text" name="autoptimize_cdn_css_url" value="<?php $it = get_option('autoptimize_cdn_css_url');echo htmlentities($it?$it:site_url()); ?>" />
148
- <?php _e('This is the new base URL that will be used when rewriting. It should point to the blog root directory.','autoptimize'); ?></label></td>
149
- </tr>
150
- <tr valign="top">
151
- <th scope="row"><?php _e('Rewrite Image URLs?','autoptimize'); ?></th>
152
- <td><label for="autoptimize_cdn_img"><input type="checkbox" name="autoptimize_cdn_img" <?php echo get_option('autoptimize_cdn_img')?'checked="checked" ':''; ?>/>
153
- <?php _e('Disabled by default. Do not enable this unless you know what you are doing.','autoptimize'); ?></label></td>
154
- </tr>
155
- <tr valign="top">
156
- <th scope="row"><?php _e('Image Base URL','autoptimize'); ?></th>
157
- <td><label for="autoptimize_cdn_img_url"><input type="text" name="autoptimize_cdn_img_url" value="<?php $it = get_option('autoptimize_cdn_img_url');echo htmlentities($it?$it:site_url()); ?>" />
158
- <?php _e('This is the new base URL that will be used when rewriting. It should point to the blog root directory.','autoptimize'); ?></label></td>
159
  </tr>
160
  </table>
161
 
162
- <h3><?php _e('Cache Info','autoptimize'); ?></h3>
163
- <table class="form-table">
164
- <tr valign="top">
165
  <th scope="row"><?php _e('Cache folder','autoptimize'); ?></th>
166
  <td><?php echo htmlentities(AUTOPTIMIZE_CACHE_DIR); ?></td>
167
  </tr>
168
- <tr valign="top">
169
  <th scope="row"><?php _e('Can we write?','autoptimize'); ?></th>
170
  <td><?php echo (autoptimizeCache::cacheavail() ? __('Yes','autoptimize') : __('No','autoptimize')); ?></td>
171
  </tr>
172
- <tr valign="top">
173
  <th scope="row"><?php _e('Cached styles and scripts','autoptimize'); ?></th>
174
  <td><?php echo autoptimizeCache::stats(); ?></td>
175
  </tr>
176
- <tr valign="top">
177
- <th scope="row"><?php _e('Do not compress cache files','autoptimize'); ?></th>
178
  <td><label for="autoptimize_cache_nogzip"><input type="checkbox" name="autoptimize_cache_nogzip" <?php echo get_option('autoptimize_cache_nogzip')?'checked="checked" ':''; ?>/>
179
- <?php _e('Disabled by default. Enable this if you want to compress the served files using your webserver.','autoptimize'); ?></label></td>
180
  </tr>
181
  </table>
182
-
183
- </table>
184
 
185
  <p class="submit">
186
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
187
- <input type="submit" name="autoptimize_cache_clean" value="<?php _e('Save Changes and Empty Cache') ?>" />
188
  </p>
189
 
190
  </form>
@@ -201,6 +193,7 @@ class autoptimizeConfig
201
  </h3>
202
  <div id="futtta_feed"></div>
203
  </div>
 
204
  </div>
205
 
206
  <script type="text/javascript">
@@ -210,14 +203,26 @@ class autoptimizeConfig
210
  feed[3]="http://feeds.feedburner.com/futtta_webtech";
211
  cookiename="autoptimize_feed";
212
 
213
- jQuery(document).ready(function() {
214
- jQuery("#feed_dropdown").change(function() { show_feed(jQuery("#feed_dropdown").val()) });
 
 
 
 
 
215
 
 
 
 
 
 
 
 
 
216
  feedid=jQuery.cookie(cookiename);
217
  if(typeof(feedid) !== "string") feedid=1;
218
-
219
  show_feed(feedid);
220
- })
221
 
222
  function show_feed(id) {
223
  jQuery('#futtta_feed').rssfeed(feed[id], {
@@ -230,8 +235,8 @@ class autoptimizeConfig
230
  jQuery.cookie(cookiename,id,{ expires: 365 });
231
  }
232
  </script>
233
-
234
  </div>
 
235
  <?php
236
  }
237
 
@@ -243,12 +248,12 @@ class autoptimizeConfig
243
  }
244
 
245
  public function autoptimize_admin_scripts() {
246
- wp_enqueue_script('jqzrssfeed', plugins_url('/external/jquery.zrssfeed.min.js', __FILE__), array('jquery'),null,true);
247
- wp_enqueue_script('jqcookie', plugins_url('/external/jquery.cookie.min.js', __FILE__), array('jquery'),null,true);
248
  }
249
 
250
  public function autoptimize_admin_styles() {
251
- wp_enqueue_style('zrssfeed', plugins_url('/external/jquery.zrssfeed.css', __FILE__));
252
  }
253
 
254
 
@@ -261,19 +266,15 @@ class autoptimizeConfig
261
  register_setting('autoptimize','autoptimize_js_trycatch');
262
  register_setting('autoptimize','autoptimize_js_justhead');
263
  register_setting('autoptimize','autoptimize_js_forcehead');
264
- register_setting('autoptimize','autoptimize_js_yui');
265
  register_setting('autoptimize','autoptimize_css');
 
266
  register_setting('autoptimize','autoptimize_css_justhead');
267
  register_setting('autoptimize','autoptimize_css_datauris');
268
- register_setting('autoptimize','autoptimize_css_yui');
269
- register_setting('autoptimize','autoptimize_cdn_js');
270
- register_setting('autoptimize','autoptimize_cdn_js_url');
271
- register_setting('autoptimize','autoptimize_cdn_css');
272
- register_setting('autoptimize','autoptimize_cdn_css_url');
273
- register_setting('autoptimize','autoptimize_cdn_img');
274
- register_setting('autoptimize','autoptimize_cdn_img_url');
275
  register_setting('autoptimize','autoptimize_cache_clean');
276
  register_setting('autoptimize','autoptimize_cache_nogzip');
 
277
  }
278
 
279
  public function setmeta($links,$file=null)
@@ -314,18 +315,14 @@ class autoptimizeConfig
314
  'autoptimize_js_trycatch' => 0,
315
  'autoptimize_js_justhead' => 0,
316
  'autoptimize_js_forcehead' => 0,
317
- 'autoptimize_js_yui' => 0,
318
  'autoptimize_css' => 0,
 
319
  'autoptimize_css_justhead' => 0,
 
320
  'autoptimize_css_datauris' => 0,
321
- 'autoptimize_css_yui' => 0,
322
- 'autoptimize_cdn_js' => 0,
323
- 'autoptimize_cdn_js_url' => site_url(),
324
- 'autoptimize_cdn_css' => 0,
325
- 'autoptimize_cdn_css_url' => site_url(),
326
- 'autoptimize_cdn_img' => 0,
327
- 'autoptimize_cdn_img_url' => site_url(),
328
  'autoptimize_cache_nogzip' => 0,
 
329
  );
330
 
331
  //Override with user settings
49
  public function show()
50
  {
51
  ?>
52
+ <style>input[type=url]:invalid {color: red; border-color:red;}</style>
53
+
54
  <div class="wrap">
55
+
56
  <h2><?php _e('Autoptimize Settings','autoptimize'); ?></h2>
57
 
58
  <div style="float:left;width:70%;">
59
+ <?php
60
+ if (get_option('autoptimize_show_adv','0')=='1') {
61
+ ?>
62
+ <a href="javascript:void(0);" id="ao_show_adv" class="button" style="display:none;"><?php _e("Show advanced settings","autoptimize") ?></a>
63
+ <a href="javascript:void(0);" id="ao_hide_adv" class="button"><?php _e("Hide advanced settings","autoptimize") ?></a>
64
+ <style>.ao_adv {display:table-row};</style>
65
+ <?php
66
+ } else {
67
+ ?>
68
+ <a href="javascript:void(0);" id="ao_show_adv" class="button"><?php _e("Show advanced settings","autoptimize") ?></a>
69
+ <a href="javascript:void(0);" id="ao_hide_adv" class="button" style="display:none;"><?php _e("Hide advanced settings","autoptimize") ?></a>
70
+ <?php
71
+ }
72
+ ?>
73
+
74
  <form method="post" action="options.php">
75
  <?php settings_fields('autoptimize'); ?>
76
 
83
  <tr valign="top">
84
  <th scope="row"><?php _e('Keep HTML comments?','autoptimize'); ?></th>
85
  <td><label for="autoptimize_html_keepcomments"><input type="checkbox" name="autoptimize_html_keepcomments" <?php echo get_option('autoptimize_html_keepcomments')?'checked="checked" ':''; ?>/>
86
+ <?php _e('Enable this if you want HTML comments to remain in the page, needed for e.g. AdSense to function properly.','autoptimize'); ?></label></td>
87
  </tr>
88
  </table>
89
 
93
  <th scope="row"><?php _e('Optimize JavaScript Code?','autoptimize'); ?></th>
94
  <td><input type="checkbox" name="autoptimize_js" <?php echo get_option('autoptimize_js')?'checked="checked" ':''; ?>/></td>
95
  </tr>
96
+ <tr valign="top" class="hidden ao_adv">
97
+ <th scope="row"><?php _e('Force JavaScript in &lt;head&gt;?','autoptimize'); ?></th>
98
+ <td><label for="autoptimize_js_forcehead"><input type="checkbox" name="autoptimize_js_forcehead" <?php echo get_option('autoptimize_js_forcehead')?'checked="checked" ':''; ?>/>
99
+ <?php _e('For performance reasons it is better to include JavaScript at the bottom of HTML, but this sometimes breaks things. Especially useful for jQuery-based themes.','autoptimize'); ?></label></td>
100
  </tr>
101
+ <tr valign="top" class="hidden ao_adv">
102
  <th scope="row"><?php _e('Look for scripts only in &lt;head&gt;?','autoptimize'); ?></th>
103
  <td><label for="autoptimize_js_justhead"><input type="checkbox" name="autoptimize_js_justhead" <?php echo get_option('autoptimize_js_justhead')?'checked="checked" ':''; ?>/>
104
+ <?php _e('Mostly usefull in combination with previous option when using jQuery-based templates, but might help keeping cache size under control.','autoptimize'); ?></label></td>
105
  </tr>
106
+ <tr valign="top" class="hidden ao_adv">
107
+ <th scope="row"><?php _e('Exclude scripts from autoptimize:','autoptimize'); ?></th>
108
+ <td><label for="autoptimize_js_exclude"><input type="text" style="width:100%;" name="autoptimize_js_exclude" value="<?php echo get_option('autoptimize_js_exclude',"s_sid,smowtion_size,sc_project,WAU_,wau_add,comment-form-quicktags,edToolbar,ch_client"); ?>"/><br />
109
+ <?php _e('A comma-seperated list of scripts you want to exclude from being Autoptimized, for example \'whatever.js, another.js\' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize.','autoptimize'); ?></label></td>
110
  </tr>
111
+ <tr valign="top" class="hidden ao_adv">
112
  <th scope="row"><?php _e('Add try-catch wrapping?','autoptimize'); ?></th>
113
  <td><label for="autoptimize_js_trycatch"><input type="checkbox" name="autoptimize_js_trycatch" <?php echo get_option('autoptimize_js_trycatch')?'checked="checked" ':''; ?>/>
114
+ <?php _e('If your scripts break because of an script error, you might want to try this.','autoptimize'); ?></label></td>
 
 
 
 
 
115
  </tr>
116
  </table>
117
 
122
  <td><input type="checkbox" name="autoptimize_css" <?php echo get_option('autoptimize_css')?'checked="checked" ':''; ?>/></td>
123
  </tr>
124
  <tr valign="top">
 
 
 
 
 
125
  <th scope="row"><?php _e('Generate data: URIs for images?','autoptimize'); ?></th>
126
  <td><label for="autoptimize_css_datauris"><input type="checkbox" name="autoptimize_css_datauris" <?php echo get_option('autoptimize_css_datauris')?'checked="checked" ':''; ?>/>
127
+ <?php _e('Enable this to include small background-images in the CSS itself instead of as seperate downloads.','autoptimize'); ?></label></td>
128
  </tr>
129
+ <tr valign="top" class="hidden ao_adv">
130
+ <th scope="row"><?php _e('Defer CSS loading?','autoptimize'); ?></th>
131
+ <td><label for="autoptimize_css_defer"><input type="checkbox" name="autoptimize_css_defer" <?php echo get_option('autoptimize_css_defer')?'checked="checked" ':''; ?>/>
132
+ <?php _e('Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for mobile performance reasons having it deferred can be better.','autoptimize'); ?></label></td>
133
+ </tr>
134
+ <tr valign="top" class="hidden ao_adv">
135
+ <th scope="row"><?php _e('Look for styles only in &lt;head&gt;?','autoptimize'); ?></th>
136
+ <td><label for="autoptimize_css_justhead"><input type="checkbox" name="autoptimize_css_justhead" <?php echo get_option('autoptimize_css_justhead')?'checked="checked" ':''; ?>/>
137
+ <?php _e('Don\'t autoptimize CSS outside the head-section. If the cache gets big, you might want to enable this.','autoptimize'); ?></label></td>
138
+ </tr>
139
+ <tr valign="top" class="hidden ao_adv">
140
+ <th scope="row"><?php _e('Exclude CSS from autoptimize:','autoptimize'); ?></th>
141
+ <td><label for="autoptimize_css_exclude"><input type="text" style="width:100%;" name="autoptimize_css_exclude" value="<?php echo get_option('autoptimize_css_exclude','admin-bar.min.css'); ?>"/><br />
142
+ <?php _e('A comma-seperated list of CSS you want to exclude from being Autoptimized.','autoptimize'); ?></label></td>
143
  </tr>
144
  </table>
145
 
146
+ <h3><?php _e('CDN Options','autoptimize'); ?></h3>
147
  <table class="form-table">
148
  <tr valign="top">
149
+ <th scope="row"><?php _e('CDN Base URL','autoptimize'); ?></th>
150
+ <td><label for="autoptimize_url"><input id="cdn_url" type="url" name="autoptimize_cdn_url" pattern="^(https?:)?\/\/([\da-z\.-]+)\.([\da-z\.]{2,6})([\/\w \.-]*)*\/?$" style="width:100%" value="<?php $it = get_option('autoptimize_cdn_url','');echo htmlentities($it); ?>" /><br />
151
+ <?php _e('Enter your CDN blog root directory URL if you want to enable CDN.','autoptimize'); ?></label></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </tr>
153
  </table>
154
 
155
+ <h3 class="hidden ao_adv"><?php _e('Cache Info','autoptimize'); ?></h3>
156
+ <table class="form-table" >
157
+ <tr valign="top" class="hidden ao_adv">
158
  <th scope="row"><?php _e('Cache folder','autoptimize'); ?></th>
159
  <td><?php echo htmlentities(AUTOPTIMIZE_CACHE_DIR); ?></td>
160
  </tr>
161
+ <tr valign="top" class="hidden ao_adv">
162
  <th scope="row"><?php _e('Can we write?','autoptimize'); ?></th>
163
  <td><?php echo (autoptimizeCache::cacheavail() ? __('Yes','autoptimize') : __('No','autoptimize')); ?></td>
164
  </tr>
165
+ <tr valign="top" class="hidden ao_adv">
166
  <th scope="row"><?php _e('Cached styles and scripts','autoptimize'); ?></th>
167
  <td><?php echo autoptimizeCache::stats(); ?></td>
168
  </tr>
169
+ <tr valign="top" class="hidden ao_adv">
170
+ <th scope="row"><?php _e('Save aggregated script/css as static files?','autoptimize'); ?></th>
171
  <td><label for="autoptimize_cache_nogzip"><input type="checkbox" name="autoptimize_cache_nogzip" <?php echo get_option('autoptimize_cache_nogzip')?'checked="checked" ':''; ?>/>
172
+ <?php _e('Enable this if your webserver can handle the compression and expiry.','autoptimize'); ?></label></td>
173
  </tr>
174
  </table>
175
+ <input type="hidden" id="autoptimize_show_adv" name="autoptimize_show_adv" value="<?php echo get_option('autoptimize_show_adv','0'); ?>">
 
176
 
177
  <p class="submit">
178
+ <input type="submit" class="button-secondary" value="<?php _e('Save Changes') ?>" />
179
+ <input type="submit" class="button-primary" name="autoptimize_cache_clean" value="<?php _e('Save Changes and Empty Cache') ?>" />
180
  </p>
181
 
182
  </form>
193
  </h3>
194
  <div id="futtta_feed"></div>
195
  </div>
196
+ <div style="float:right;margin:50px 15px;"><strong><a href="http://blog.futtta.be/2013/10/21/do-not-donate-to-me/" target="_blank"><img width="100px" height="85px" src="http://blog.futtta.be/wp-content/uploads/2013/10/do_not_donate_smallest.png" title="<?php _e("Do not donate for this plugin!"); ?>"></div>
197
  </div>
198
 
199
  <script type="text/javascript">
203
  feed[3]="http://feeds.feedburner.com/futtta_webtech";
204
  cookiename="autoptimize_feed";
205
 
206
+ jQuery(document).ready(function() {
207
+ jQuery( "#ao_show_adv" ).click(function() {
208
+ jQuery( "#ao_show_adv" ).hide();
209
+ jQuery( "#ao_hide_adv" ).show();
210
+ jQuery( ".ao_adv" ).show("slow");
211
+ jQuery( "input#autoptimize_show_adv" ).val("1");
212
+ });
213
 
214
+ jQuery( "#ao_hide_adv" ).click(function() {
215
+ jQuery( "#ao_hide_adv" ).hide();
216
+ jQuery( "#ao_show_adv" ).show();
217
+ jQuery( ".ao_adv" ).hide("slow");
218
+ jQuery( "input#autoptimize_show_adv" ).val("0");
219
+ });
220
+
221
+ jQuery("#feed_dropdown").change(function() { show_feed(jQuery("#feed_dropdown").val()) });
222
  feedid=jQuery.cookie(cookiename);
223
  if(typeof(feedid) !== "string") feedid=1;
 
224
  show_feed(feedid);
225
+ })
226
 
227
  function show_feed(id) {
228
  jQuery('#futtta_feed').rssfeed(feed[id], {
235
  jQuery.cookie(cookiename,id,{ expires: 365 });
236
  }
237
  </script>
 
238
  </div>
239
+
240
  <?php
241
  }
242
 
248
  }
249
 
250
  public function autoptimize_admin_scripts() {
251
+ wp_enqueue_script('jqzrssfeed', plugins_url('/external/js/jquery.zrssfeed.min.js', __FILE__), array('jquery'),null,true);
252
+ wp_enqueue_script('jqcookie', plugins_url('/external/js/jquery.cookie.min.js', __FILE__), array('jquery'),null,true);
253
  }
254
 
255
  public function autoptimize_admin_styles() {
256
+ wp_enqueue_style('zrssfeed', plugins_url('/external/js/jquery.zrssfeed.css', __FILE__));
257
  }
258
 
259
 
266
  register_setting('autoptimize','autoptimize_js_trycatch');
267
  register_setting('autoptimize','autoptimize_js_justhead');
268
  register_setting('autoptimize','autoptimize_js_forcehead');
 
269
  register_setting('autoptimize','autoptimize_css');
270
+ register_setting('autoptimize','autoptimize_css_exclude');
271
  register_setting('autoptimize','autoptimize_css_justhead');
272
  register_setting('autoptimize','autoptimize_css_datauris');
273
+ register_setting('autoptimize','autoptimize_css_defer');
274
+ register_setting('autoptimize','autoptimize_cdn_url');
 
 
 
 
 
275
  register_setting('autoptimize','autoptimize_cache_clean');
276
  register_setting('autoptimize','autoptimize_cache_nogzip');
277
+ register_setting('autoptimize','autoptimize_show_adv');
278
  }
279
 
280
  public function setmeta($links,$file=null)
315
  'autoptimize_js_trycatch' => 0,
316
  'autoptimize_js_justhead' => 0,
317
  'autoptimize_js_forcehead' => 0,
 
318
  'autoptimize_css' => 0,
319
+ 'autoptimize_css_exclude' => "admin-bar.min.css",
320
  'autoptimize_css_justhead' => 0,
321
+ 'autoptimize_css_defer' => 0,
322
  'autoptimize_css_datauris' => 0,
323
+ 'autoptimize_cdn_url' => "",
 
 
 
 
 
 
324
  'autoptimize_cache_nogzip' => 0,
325
+ 'autoptimize_show_adv' => 0
326
  );
327
 
328
  //Override with user settings
classes/autoptimizeScripts.php CHANGED
@@ -4,12 +4,11 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
  class autoptimizeScripts extends autoptimizeBase
5
  {
6
  private $scripts = array();
7
- private $dontmove = array('document.write','html5.js','show_ads.js','google_ad','blogcatalog.com/w','tweetmeme.com/i','mybloglog.com/','histats.com/js','ads.smowtion.com/ad.js','statcounter.com/counter/counter.js','widgets.amung.us','ws.amazon.com/widgets','media.fastclick.net','/ads/','comment-form-quicktags/quicktags.php','edToolbar','intensedebate.com','scripts.chitika.net/','_gaq.push','jotform.com/');
8
  private $domove = array('gaJsHost','load_cmc','jd.gallery.transitions.js','swfobject.embedSWF(','tiny_mce.js','tinyMCEPreInit.go');
9
  private $domovelast = array('addthis.com','/afsonline/show_afs_search.js','disqus.js','networkedblogs.com/getnetworkwidget','infolinks.com/js/','jd.gallery.js.php','jd.gallery.transitions.js','swfobject.embedSWF(','linkwithin.com/widget.js','tiny_mce.js','tinyMCEPreInit.go');
10
  private $trycatch = false;
11
  private $forcehead = false;
12
- private $yui = false;
13
  private $jscode = '';
14
  private $url = '';
15
  private $move = array('first' => array(), 'last' => array());
@@ -27,7 +26,7 @@ class autoptimizeScripts extends autoptimizeBase
27
  $this->restofcontent = $content[1];
28
  }
29
 
30
- $excludeJS = $options['exclude'];
31
  if ($excludeJS!=="") {
32
  $exclJSArr = array_filter(array_map('trim',explode(",",$excludeJS)));
33
  $this->dontmove = array_merge($exclJSArr,$this->dontmove);
@@ -40,11 +39,13 @@ class autoptimizeScripts extends autoptimizeBase
40
  // force js in head?
41
  if($options['forcehead'] == true)
42
  $this->forcehead = true;
43
- //Do we use yui?
44
- $this->yui = $options['yui'];
45
-
 
46
  // noptimize me
47
  $this->content = $this->hide_noptimize($this->content);
 
48
  //Save IE hacks
49
  $this->content = preg_replace('#(<\!--\[if.*\]>.*<\!\[endif\]-->)#Usie','\'%%IEHACK%%\'.base64_encode("$1").\'%%IEHACK%%\'',$this->content);
50
 
@@ -58,7 +59,7 @@ class autoptimizeScripts extends autoptimizeBase
58
  //External script
59
  $url = current(explode('?',$source[2],2));
60
  $path = $this->getpath($url);
61
- if($path !==false && preg_match('#\.js$#',$path))
62
  {
63
  //Inline
64
  if($this->ismergeable($tag))
@@ -151,6 +152,7 @@ class autoptimizeScripts extends autoptimizeBase
151
  if($script !== false && file_exists($script) && is_readable($script))
152
  {
153
  $script = file_get_contents($script);
 
154
  //Add try-catch?
155
  if($this->trycatch)
156
  $script = 'try{'.$script.'}catch(e){}';
@@ -172,13 +174,10 @@ class autoptimizeScripts extends autoptimizeBase
172
  unset($ccheck);
173
 
174
  //$this->jscode has all the uncompressed code now.
175
- if($this->yui == false && class_exists('JSMin'))
176
  {
177
  $this->jscode = trim(JSMin::minify($this->jscode));
178
  return true;
179
- }elseif($this->yui == true && autoptimizeYUI::available()){
180
- $this->jscode = autoptimizeYUI::compress('js',$this->jscode);
181
- return true;
182
  }else{
183
  return false;
184
  }
@@ -194,35 +193,40 @@ class autoptimizeScripts extends autoptimizeBase
194
  $cache->cache($this->jscode,'text/javascript');
195
  }
196
  $this->url = AUTOPTIMIZE_CACHE_URL.$cache->getname();
 
197
  }
198
 
199
- //Returns the content
200
  public function getcontent()
201
  {
202
- //Restore the full content
203
  if(!empty($this->restofcontent))
204
  {
205
  $this->content .= $this->restofcontent;
206
  $this->restofcontent = '';
207
  }
208
 
209
- //Add the scripts
210
  if($this->forcehead == true) {
211
  $replaceTag="</head>";
 
212
  } else {
213
  $replaceTag="</body>";
 
214
  }
215
 
216
  $bodyreplacement = implode('',$this->move['first']);
217
- $bodyreplacement .= '<script type="text/javascript" src="'.$this->url.'"></script>';
218
  $bodyreplacement .= implode('',$this->move['last']).$replaceTag;
219
  $this->content = str_replace($replaceTag,$bodyreplacement,$this->content);
220
- //Restore IE hacks
 
221
  $this->content = preg_replace('#%%IEHACK%%(.*)%%IEHACK%%#Usie','stripslashes(base64_decode("$1"))',$this->content);
222
 
223
- // restore noptimize
224
  $this->content = $this->restore_noptimize($this->content);
225
- //Return the modified HTML
 
226
  return $this->content;
227
  }
228
 
@@ -291,4 +295,4 @@ class autoptimizeScripts extends autoptimizeBase
291
  //Should be in 'first'
292
  return false;
293
  }
294
- }
4
  class autoptimizeScripts extends autoptimizeBase
5
  {
6
  private $scripts = array();
7
+ private $dontmove = array('document.write','html5.js','show_ads.js','google_ad','blogcatalog.com/w','tweetmeme.com/i','mybloglog.com/','histats.com/js','ads.smowtion.com/ad.js','statcounter.com/counter/counter.js','widgets.amung.us','ws.amazon.com/widgets','media.fastclick.net','/ads/','comment-form-quicktags/quicktags.php','edToolbar','intensedebate.com','scripts.chitika.net/','_gaq.push','jotform.com/','admin-bar.min.js');
8
  private $domove = array('gaJsHost','load_cmc','jd.gallery.transitions.js','swfobject.embedSWF(','tiny_mce.js','tinyMCEPreInit.go');
9
  private $domovelast = array('addthis.com','/afsonline/show_afs_search.js','disqus.js','networkedblogs.com/getnetworkwidget','infolinks.com/js/','jd.gallery.js.php','jd.gallery.transitions.js','swfobject.embedSWF(','linkwithin.com/widget.js','tiny_mce.js','tinyMCEPreInit.go');
10
  private $trycatch = false;
11
  private $forcehead = false;
 
12
  private $jscode = '';
13
  private $url = '';
14
  private $move = array('first' => array(), 'last' => array());
26
  $this->restofcontent = $content[1];
27
  }
28
 
29
+ $excludeJS = $options['js_exclude'];
30
  if ($excludeJS!=="") {
31
  $exclJSArr = array_filter(array_map('trim',explode(",",$excludeJS)));
32
  $this->dontmove = array_merge($exclJSArr,$this->dontmove);
39
  // force js in head?
40
  if($options['forcehead'] == true)
41
  $this->forcehead = true;
42
+
43
+ // get cdn url
44
+ $this->cdn_url = $options['cdn_url'];
45
+
46
  // noptimize me
47
  $this->content = $this->hide_noptimize($this->content);
48
+
49
  //Save IE hacks
50
  $this->content = preg_replace('#(<\!--\[if.*\]>.*<\!\[endif\]-->)#Usie','\'%%IEHACK%%\'.base64_encode("$1").\'%%IEHACK%%\'',$this->content);
51
 
59
  //External script
60
  $url = current(explode('?',$source[2],2));
61
  $path = $this->getpath($url);
62
+ if($path !== false && preg_match('#\.js$#',$path))
63
  {
64
  //Inline
65
  if($this->ismergeable($tag))
152
  if($script !== false && file_exists($script) && is_readable($script))
153
  {
154
  $script = file_get_contents($script);
155
+ $script = preg_replace('/\x{EF}\x{BB}\x{BF}/','',$script);
156
  //Add try-catch?
157
  if($this->trycatch)
158
  $script = 'try{'.$script.'}catch(e){}';
174
  unset($ccheck);
175
 
176
  //$this->jscode has all the uncompressed code now.
177
+ if(class_exists('JSMin'))
178
  {
179
  $this->jscode = trim(JSMin::minify($this->jscode));
180
  return true;
 
 
 
181
  }else{
182
  return false;
183
  }
193
  $cache->cache($this->jscode,'text/javascript');
194
  }
195
  $this->url = AUTOPTIMIZE_CACHE_URL.$cache->getname();
196
+ $this->url = $this->url_replace_cdn($this->url);
197
  }
198
 
199
+ // Returns the content
200
  public function getcontent()
201
  {
202
+ // Restore the full content
203
  if(!empty($this->restofcontent))
204
  {
205
  $this->content .= $this->restofcontent;
206
  $this->restofcontent = '';
207
  }
208
 
209
+ // Add the scripts taking forcehead/ deferred (default) into account
210
  if($this->forcehead == true) {
211
  $replaceTag="</head>";
212
+ $defer="";
213
  } else {
214
  $replaceTag="</body>";
215
+ $defer="defer ";
216
  }
217
 
218
  $bodyreplacement = implode('',$this->move['first']);
219
+ $bodyreplacement .= '<script type="text/javascript" '.$defer.'src="'.$this->url.'"></script>';
220
  $bodyreplacement .= implode('',$this->move['last']).$replaceTag;
221
  $this->content = str_replace($replaceTag,$bodyreplacement,$this->content);
222
+
223
+ // Restore IE hacks
224
  $this->content = preg_replace('#%%IEHACK%%(.*)%%IEHACK%%#Usie','stripslashes(base64_decode("$1"))',$this->content);
225
 
226
+ // Restore noptimize
227
  $this->content = $this->restore_noptimize($this->content);
228
+
229
+ // Return the modified HTML
230
  return $this->content;
231
  }
232
 
295
  //Should be in 'first'
296
  return false;
297
  }
298
+ }
classes/autoptimizeStyles.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
3
  class autoptimizeStyles extends autoptimizeBase
4
  {
5
  private $css = array();
@@ -8,7 +9,6 @@ class autoptimizeStyles extends autoptimizeBase
8
  private $restofcontent = '';
9
  private $mhtml = '';
10
  private $datauris = false;
11
- private $yui = false;
12
  private $hashmap = array();
13
 
14
  //Reads the page and collects style tags
@@ -22,23 +22,35 @@ class autoptimizeStyles extends autoptimizeBase
22
  $this->restofcontent = $content[1];
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  //Store data: URIs setting for later use
26
  $this->datauris = $options['datauris'];
27
 
28
- //Do we use yui?
29
- $this->yui = $options['yui'];
30
  // noptimize me
31
  $this->content = $this->hide_noptimize($this->content);
 
32
  //Save IE hacks
33
  $this->content = preg_replace('#(<\!--\[if.*\]>.*<\!\[endif\]-->)#Usie','\'%%IEHACK%%\'.base64_encode("$1").\'%%IEHACK%%\'',$this->content);
34
 
35
  //Get <style> and <link>
36
- if(preg_match_all('#(<style[^>]*>.*</style>)|(<link[^>]*text/css[^>]*>)#Usmi',$this->content,$matches))
37
  {
38
  foreach($matches[0] as $tag)
39
  {
40
- if (strpos($tag,"admin-bar.min.css")===false) {
41
- //Get the media
 
42
  if(strpos($tag,'media=')!==false)
43
  {
44
  preg_match('#media=(?:"|\')([^>]*)(?:"|\')#Ui',$tag,$medias);
@@ -103,6 +115,7 @@ class autoptimizeStyles extends autoptimizeBase
103
  if($css !== false && file_exists($css) && is_readable($css))
104
  {
105
  $css = $this->fixurls($css,file_get_contents($css));
 
106
  }else{
107
  //Couldn't read CSS. Maybe getpath isn't working?
108
  $css = '';
@@ -155,6 +168,7 @@ class autoptimizeStyles extends autoptimizeBase
155
  if(file_exists($path) && is_readable($path))
156
  {
157
  $code = addcslashes($this->fixurls($path,file_get_contents($path)),"\\");
 
158
  $thiscss = preg_replace('#(/\*FILESTART\*/.*)'.preg_quote($import,'#').'#Us','/*FILESTART2*/'.$code.'$1',$thiscss);
159
  }else{
160
  //getpath is not working?
@@ -190,15 +204,19 @@ class autoptimizeStyles extends autoptimizeBase
190
  }
191
  unset($ccheck);
192
 
193
- $imgreplace = array();
194
  //Do the imaging!
195
- if($this->datauris == true && function_exists('base64_encode') && preg_match_all('#(background[^;}]*url\((?!data)(.*)\)[^;}]*)(?:;|$|})#Usm',$code,$matches))
 
 
 
196
  {
197
  foreach($matches[2] as $count => $quotedurl)
198
  {
199
  $url = trim($quotedurl," \t\n\r\0\x0B\"'");
 
200
  // fgo: if querystring, remove it from url
201
  if (strpos($url,'?') !== false) { $url = reset(explode('?',$url)); }
 
202
  $path = $this->getpath($url);
203
 
204
  // fgo: jpe?j should be jpe?g I guess + 5KB seems like a lot, lower to 2.5KB
@@ -233,23 +251,34 @@ class autoptimizeStyles extends autoptimizeBase
233
  $base64data = base64_encode(file_get_contents($path));
234
 
235
  //Add it to the list for replacement
236
- $imgreplace[$matches[1][$count]] = str_replace($quotedurl,$dataurihead.$base64data,$matches[1][$count]).";\n*".str_replace($quotedurl,'mhtml:%%MHTML%%!'.$mhtmlcount,$matches[1][$count]).";\n_".$matches[1][$count].';';
237
 
238
  //Store image on the mhtml document
239
  $this->mhtml .= "--_\r\nContent-Location:{$mhtmlcount}\r\nContent-Transfer-Encoding:base64\r\n\r\n{$base64data}\r\n";
240
  $mhtmlcount++;
241
  }
242
  }
243
- //Replace the images
244
- $code = str_replace(array_keys($imgreplace),array_values($imgreplace),$code);
 
 
 
 
 
 
245
  }
246
 
 
 
 
 
247
  //Minify
248
- if($this->yui == false && class_exists('Minify_CSS_Compressor'))
249
- {
250
  $code = trim(Minify_CSS_Compressor::process($code));
251
- }elseif($this->yui == true && autoptimizeYUI::available()){
252
- $code = autoptimizeYUI::compress('css',$code);
 
253
  }
254
 
255
  $this->hashmap[md5($code)] = $hash;
@@ -313,11 +342,26 @@ class autoptimizeStyles extends autoptimizeBase
313
  $this->restofcontent = '';
314
  }
315
 
 
 
 
 
316
  //Add the new stylesheets
317
  foreach($this->url as $media => $url)
318
  {
319
- // fgo: these were added before </head> but that overrides iehack-stylesheets, so adding before <title>
320
- $this->content = str_replace('<title>','<link type="text/css" media="'.$media.'" href="'.$url.'" rel="stylesheet" /><title>',$this->content);
 
 
 
 
 
 
 
 
 
 
 
321
  }
322
 
323
  //Return the modified stylesheet
@@ -360,4 +404,20 @@ class autoptimizeStyles extends autoptimizeBase
360
 
361
  return $code;
362
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
1
  <?php
2
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
  class autoptimizeStyles extends autoptimizeBase
5
  {
6
  private $css = array();
9
  private $restofcontent = '';
10
  private $mhtml = '';
11
  private $datauris = false;
 
12
  private $hashmap = array();
13
 
14
  //Reads the page and collects style tags
22
  $this->restofcontent = $content[1];
23
  }
24
 
25
+ // what CSS shouldn't be autoptimized
26
+ $excludeCSS = $options['css_exclude'];
27
+ if ($excludeCSS!=="") {
28
+ $this->dontmove = array_filter(array_map('trim',explode(",",$excludeCSS)));
29
+ }
30
+
31
+ // should we defer css?
32
+ $this->defer = $options['defer'];
33
+
34
+ // get cdn url
35
+ $this->cdn_url = $options['cdn_url'];
36
+
37
  //Store data: URIs setting for later use
38
  $this->datauris = $options['datauris'];
39
 
 
 
40
  // noptimize me
41
  $this->content = $this->hide_noptimize($this->content);
42
+
43
  //Save IE hacks
44
  $this->content = preg_replace('#(<\!--\[if.*\]>.*<\!\[endif\]-->)#Usie','\'%%IEHACK%%\'.base64_encode("$1").\'%%IEHACK%%\'',$this->content);
45
 
46
  //Get <style> and <link>
47
+ if(preg_match_all('#(<style[^>]*>.*</style>)|(<link[^>]*stylesheet[^>]*>)#Usmi',$this->content,$matches))
48
  {
49
  foreach($matches[0] as $tag)
50
  {
51
+ if ($this->ismovable($tag)) {
52
+
53
+ // Get the media
54
  if(strpos($tag,'media=')!==false)
55
  {
56
  preg_match('#media=(?:"|\')([^>]*)(?:"|\')#Ui',$tag,$medias);
115
  if($css !== false && file_exists($css) && is_readable($css))
116
  {
117
  $css = $this->fixurls($css,file_get_contents($css));
118
+ $css = preg_replace('/\x{EF}\x{BB}\x{BF}/','',$css);
119
  }else{
120
  //Couldn't read CSS. Maybe getpath isn't working?
121
  $css = '';
168
  if(file_exists($path) && is_readable($path))
169
  {
170
  $code = addcslashes($this->fixurls($path,file_get_contents($path)),"\\");
171
+ $code = preg_replace('/\x{EF}\x{BB}\x{BF}/','',$code);
172
  $thiscss = preg_replace('#(/\*FILESTART\*/.*)'.preg_quote($import,'#').'#Us','/*FILESTART2*/'.$code.'$1',$thiscss);
173
  }else{
174
  //getpath is not working?
204
  }
205
  unset($ccheck);
206
 
 
207
  //Do the imaging!
208
+ $imgreplace = array();
209
+ preg_match_all('#(background[^;}]*url\((?!data)(.*)\)[^;}]*)(?:;|$|})#Usm',$code,$matches);
210
+
211
+ if(($this->datauris == true) && (function_exists('base64_encode')) && (is_array($matches)))
212
  {
213
  foreach($matches[2] as $count => $quotedurl)
214
  {
215
  $url = trim($quotedurl," \t\n\r\0\x0B\"'");
216
+
217
  // fgo: if querystring, remove it from url
218
  if (strpos($url,'?') !== false) { $url = reset(explode('?',$url)); }
219
+
220
  $path = $this->getpath($url);
221
 
222
  // fgo: jpe?j should be jpe?g I guess + 5KB seems like a lot, lower to 2.5KB
251
  $base64data = base64_encode(file_get_contents($path));
252
 
253
  //Add it to the list for replacement
254
+ $imgreplace[$matches[1][$count]] = str_replace($quotedurl,$dataurihead.$base64data,$matches[1][$count]).';\n*'.str_replace($quotedurl,'mhtml:%%MHTML%%!'.$mhtmlcount,$matches[1][$count]).";\n_".$matches[1][$count].';';
255
 
256
  //Store image on the mhtml document
257
  $this->mhtml .= "--_\r\nContent-Location:{$mhtmlcount}\r\nContent-Transfer-Encoding:base64\r\n\r\n{$base64data}\r\n";
258
  $mhtmlcount++;
259
  }
260
  }
261
+ } else if ((is_array($matches)) && (!empty($this->cdn_url))) {
262
+ // change background image urls to cdn-url
263
+ foreach($matches[2] as $count => $quotedurl)
264
+ {
265
+ $url = trim($quotedurl," \t\n\r\0\x0B\"'");
266
+ $cdn_url=$this->url_replace_cdn($url);
267
+ $imgreplace[$matches[1][$count]] = str_replace($quotedurl,$cdn_url,$matches[1][$count]);
268
+ }
269
  }
270
 
271
+ if(!empty($imgreplace)) {
272
+ $code = str_replace(array_keys($imgreplace),array_values($imgreplace),$code);
273
+ }
274
+
275
  //Minify
276
+ if (class_exists('Minify_CSS_Compressor')) {
277
+ // legacy
278
  $code = trim(Minify_CSS_Compressor::process($code));
279
+ } else if(class_exists('CSSmin')) {
280
+ $cssmin = new CSSmin();
281
+ $code = trim($cssmin->run($code));
282
  }
283
 
284
  $this->hashmap[md5($code)] = $hash;
342
  $this->restofcontent = '';
343
  }
344
 
345
+ if($this->defer == true) {
346
+ $deferredCssBlock = "<script>function lCss(url,media) {var d=document;var l=d.createElement('link');l.rel='stylesheet';l.type='text/css';l.href=url;l.media=media; d.getElementsByTagName('head')[0].appendChild(l);}function deferredCSS() {";
347
+ }
348
+
349
  //Add the new stylesheets
350
  foreach($this->url as $media => $url)
351
  {
352
+ $url = $this->url_replace_cdn($url);
353
+
354
+ //Add the stylesheet either deferred (import at bottom) or normal links in head
355
+ if($this->defer == true) {
356
+ $deferredCssBlock .= "lCss('".$url."','".$media."');";
357
+ } else {
358
+ $this->content = str_replace('<title>','<link type="text/css" media="'.$media.'" href="'.$url.'" rel="stylesheet" /><title>',$this->content);
359
+ }
360
+ }
361
+
362
+ if($this->defer == true) {
363
+ $deferredCssBlock .= "}if(window.addEventListener){window.addEventListener('DOMContentLoaded',deferredCSS,false);}else{window.onload = deferredCSS;}</script>";
364
+ $this->content = str_replace('</body>',$deferredCssBlock.'</body>',$this->content);
365
  }
366
 
367
  //Return the modified stylesheet
404
 
405
  return $code;
406
  }
407
+
408
+ private function ismovable($tag)
409
+ {
410
+ foreach($this->dontmove as $match)
411
+ {
412
+ if(strpos($tag,$match)!==false)
413
+ {
414
+ //Matched something
415
+ return false;
416
+ }
417
+ }
418
+
419
+ //If we're here it's safe to move
420
+ return true;
421
+ }
422
+
423
  }
classes/autoptimizeYUI.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
-
3
- class autoptimizeYUI
4
- {
5
- static function available()
6
- {
7
- //If we can run apps
8
- if(function_exists('shell_exec') && is_callable('shell_exec'))
9
- {
10
- //And if YUI is there for us
11
- if(file_exists('/usr/bin/java') && file_exists(WP_PLUGIN_DIR.'/autoptimize/yui/yuicompressor.jar'))
12
- {
13
- //And we have a dir in where to work
14
- if(is_writable(WP_PLUGIN_DIR.'/autoptimize/yui/'))
15
- {
16
- //Then we're available
17
- return true;
18
- }
19
- }
20
- }
21
- //We can't use YUI :(
22
- return false;
23
- }
24
-
25
- static function compress($type,$code)
26
- {
27
- //Check for supported types
28
- if(!in_array($type,array('js','css')))
29
- return false;
30
-
31
- //Write temp file
32
- $file = tempnam(WP_PLUGIN_DIR.'/autoptimize/yui/',$type);
33
- file_put_contents($file,$code);
34
-
35
- //Call YUI
36
- $yuipath = escapeshellarg(WP_PLUGIN_DIR.'/autoptimize/yui/yuicompressor.jar');
37
- $code = shell_exec('/usr/bin/java -jar '.$yuipath.' --type '.$type.' '.escapeshellarg($file));
38
-
39
- //Delete temp file
40
- unlink($file);
41
-
42
- //Give the code!
43
- return $code;
44
- }
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/external/index.html CHANGED
@@ -1 +1 @@
1
- <html><body><p><a href="http://wordpress.org/extend/plugins/wp-youtube-lyte/">WP-YouTube-Lyte</a> is a WordPress plugin that inserts "Lite YouTube Embeds" in your blog. These look and feel like normal embedded YouTube, but don't use Flash unless clicked on, thereby <a href="http://blog.futtta.be/2010/04/23/high-performance-youtube-embeds/" title="performance tests comparing youtube embeds with lyte embeds">reducing download size & rendering time substantially</a>. The plugin can optionally use <a href="http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html">YouTube's new experimental HTML5 embed code</a>, meaning you can have an entirely flash-less YouTube experience on your blog.</p><p>Up to date info on WP-YouTube-Lyte <a href="http://blog.futtta.be/tag/lyte/" title="more about Lyte on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/tag/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>
1
+ <html><body><p>Generated by <a href="http://wordpress.org/extend/plugins/autoptimize/">Autoptimize</a>, a WordPress plugin that speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.</p><p>Up to date info on Autoptimize <a href="http://blog.futtta.be/category/autoptimize/" title="more about atoptimize on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/category/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>
classes/external/js/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <html><body><p>Generated by <a href="http://wordpress.org/extend/plugins/autoptimize/">Autoptimize</a>, a WordPress plugin that speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.</p><p>Up to date info on Autoptimize <a href="http://blog.futtta.be/category/autoptimize/" title="more about atoptimize on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/category/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>
classes/external/{jquery.cookie.js → js/jquery.cookie.js} RENAMED
File without changes
classes/external/{jquery.cookie.min.js → js/jquery.cookie.min.js} RENAMED
File without changes
classes/external/{jquery.zrssfeed.css → js/jquery.zrssfeed.css} RENAMED
File without changes
classes/external/{jquery.zrssfeed.min.js → js/jquery.zrssfeed.min.js} RENAMED
File without changes
classes/external/php/index.html ADDED
@@ -0,0 +1 @@
 
1
+ <html><body><p>Generated by <a href="http://wordpress.org/extend/plugins/autoptimize/">Autoptimize</a>, a WordPress plugin that speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.</p><p>Up to date info on Autoptimize <a href="http://blog.futtta.be/category/autoptimize/" title="more about atoptimize on my blog">can be found on blog.futtta.be</a>, where you can also find <a href="http://blog.futtta.be/category/wordpress" title="blog.futtta.be about WordPress">posts about WordPress</a> and <a href="http://blog.futtta.be/category/internet/" title="about browsers, development and mobile web on blog.futtta.be">Web Technology in general</a>.</p></body></html>
classes/{jsmin-1.1.1.php → external/php/jsmin-1.1.1.php} RENAMED
File without changes
classes/external/php/minify-2.1.7-html.php ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class Minify_HTML
4
+ * @package Minify
5
+ */
6
+
7
+ /**
8
+ * Compress HTML
9
+ *
10
+ * This is a heavy regex-based removal of whitespace, unnecessary comments and
11
+ * tokens. IE conditional comments are preserved. There are also options to have
12
+ * STYLE and SCRIPT blocks compressed by callback functions.
13
+ *
14
+ * A test suite is available.
15
+ *
16
+ * @package Minify
17
+ * @author Stephen Clay <steve@mrclay.org>
18
+ */
19
+ class Minify_HTML {
20
+ /**
21
+ * @var boolean
22
+ */
23
+ protected $_jsCleanComments = true;
24
+
25
+ /**
26
+ * "Minify" an HTML page
27
+ *
28
+ * @param string $html
29
+ *
30
+ * @param array $options
31
+ *
32
+ * 'cssMinifier' : (optional) callback function to process content of STYLE
33
+ * elements.
34
+ *
35
+ * 'jsMinifier' : (optional) callback function to process content of SCRIPT
36
+ * elements. Note: the type attribute is ignored.
37
+ *
38
+ * 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If
39
+ * unset, minify will sniff for an XHTML doctype.
40
+ *
41
+ * @return string
42
+ */
43
+ public static function minify($html, $options = array()) {
44
+ $min = new self($html, $options);
45
+ return $min->process();
46
+ }
47
+
48
+
49
+ /**
50
+ * Create a minifier object
51
+ *
52
+ * @param string $html
53
+ *
54
+ * @param array $options
55
+ *
56
+ * 'cssMinifier' : (optional) callback function to process content of STYLE
57
+ * elements.
58
+ *
59
+ * 'jsMinifier' : (optional) callback function to process content of SCRIPT
60
+ * elements. Note: the type attribute is ignored.
61
+ *
62
+ * 'jsCleanComments' : (optional) whether to remove HTML comments beginning and end of script block
63
+ *
64
+ * 'xhtml' : (optional boolean) should content be treated as XHTML1.0? If
65
+ * unset, minify will sniff for an XHTML doctype.
66
+ *
67
+ * @return null
68
+ */
69
+ public function __construct($html, $options = array())
70
+ {
71
+ $this->_html = str_replace("\r\n", "\n", trim($html));
72
+ if (isset($options['xhtml'])) {
73
+ $this->_isXhtml = (bool)$options['xhtml'];
74
+ }
75
+ if (isset($options['cssMinifier'])) {
76
+ $this->_cssMinifier = $options['cssMinifier'];
77
+ }
78
+ if (isset($options['jsMinifier'])) {
79
+ $this->_jsMinifier = $options['jsMinifier'];
80
+ }
81
+ if (isset($options['jsCleanComments'])) {
82
+ $this->_jsCleanComments = (bool)$options['jsCleanComments'];
83
+ }
84
+ }
85
+
86
+
87
+ /**
88
+ * Minify the markeup given in the constructor
89
+ *
90
+ * @return string
91
+ */
92
+ public function process()
93
+ {
94
+ if ($this->_isXhtml === null) {
95
+ $this->_isXhtml = (false !== strpos($this->_html, '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML'));
96
+ }
97
+
98
+ $this->_replacementHash = 'MINIFYHTML' . md5($_SERVER['REQUEST_TIME']);
99
+ $this->_placeholders = array();
100
+
101
+ // replace SCRIPTs (and minify) with placeholders
102
+ $this->_html = preg_replace_callback(
103
+ '/(\\s*)<script(\\b[^>]*?>)([\\s\\S]*?)<\\/script>(\\s*)/i'
104
+ ,array($this, '_removeScriptCB')
105
+ ,$this->_html);
106
+
107
+ // replace STYLEs (and minify) with placeholders
108
+ $this->_html = preg_replace_callback(
109
+ '/\\s*<style(\\b[^>]*>)([\\s\\S]*?)<\\/style>\\s*/i'
110
+ ,array($this, '_removeStyleCB')
111
+ ,$this->_html);
112
+
113
+ // remove HTML comments (not containing IE conditional comments).
114
+ $this->_html = preg_replace_callback(
115
+ '/<!--([\\s\\S]*?)-->/'
116
+ ,array($this, '_commentCB')
117
+ ,$this->_html);
118
+
119
+ // replace PREs with placeholders
120
+ $this->_html = preg_replace_callback('/\\s*<pre(\\b[^>]*?>[\\s\\S]*?<\\/pre>)\\s*/i'
121
+ ,array($this, '_removePreCB')
122
+ ,$this->_html);
123
+
124
+ // replace TEXTAREAs with placeholders
125
+ $this->_html = preg_replace_callback(
126
+ '/\\s*<textarea(\\b[^>]*?>[\\s\\S]*?<\\/textarea>)\\s*/i'
127
+ ,array($this, '_removeTextareaCB')
128
+ ,$this->_html);
129
+
130
+ // trim each line.
131
+ // @todo take into account attribute values that span multiple lines.
132
+ $this->_html = preg_replace('/^\\s+|\\s+$/m', '', $this->_html);
133
+
134
+ // remove ws around block/undisplayed elements
135
+ $this->_html = preg_replace('/\\s+(<\\/?(?:area|base(?:font)?|blockquote|body'
136
+ .'|caption|center|cite|col(?:group)?|dd|dir|div|dl|dt|fieldset|form'
137
+ .'|frame(?:set)?|h[1-6]|head|hr|html|legend|li|link|map|menu|meta'
138
+ .'|ol|opt(?:group|ion)|p|param|t(?:able|body|head|d|h||r|foot|itle)'
139
+ .'|ul)\\b[^>]*>)/i', '$1', $this->_html);
140
+
141
+ // remove ws outside of all elements
142
+ $this->_html = preg_replace(
143
+ '/>(\\s(?:\\s*))?([^<]+)(\\s(?:\s*))?</'
144
+ ,'>$1$2$3<'
145
+ ,$this->_html);
146
+
147
+ // use newlines before 1st attribute in open tags (to limit line lengths)
148
+ $this->_html = preg_replace('/(<[a-z\\-]+)\\s+([^>]+>)/i', "$1\n$2", $this->_html);
149
+
150
+ // fill placeholders
151
+ $this->_html = str_replace(
152
+ array_keys($this->_placeholders)
153
+ ,array_values($this->_placeholders)
154
+ ,$this->_html
155
+ );
156
+ // issue 229: multi-pass to catch scripts that didn't get replaced in textareas
157
+ $this->_html = str_replace(
158
+ array_keys($this->_placeholders)
159
+ ,array_values($this->_placeholders)
160
+ ,$this->_html
161
+ );
162
+ return $this->_html;
163
+ }
164
+
165
+ protected function _commentCB($m)
166
+ {
167
+ return (0 === strpos($m[1], '[') || false !== strpos($m[1], '<!['))
168
+ ? $m[0]
169
+ : '';
170
+ }
171
+
172
+ protected function _reservePlace($content)
173
+ {
174
+ $placeholder = '%' . $this->_replacementHash . count($this->_placeholders) . '%';
175
+ $this->_placeholders[$placeholder] = $content;
176
+ return $placeholder;
177
+ }
178
+
179
+ protected $_isXhtml = null;
180
+ protected $_replacementHash = null;
181
+ protected $_placeholders = array();
182
+ protected $_cssMinifier = null;
183
+ protected $_jsMinifier = null;
184
+
185
+ protected function _removePreCB($m)
186
+ {
187
+ return $this->_reservePlace("<pre{$m[1]}");
188
+ }
189
+
190
+ protected function _removeTextareaCB($m)
191
+ {
192
+ return $this->_reservePlace("<textarea{$m[1]}");
193
+ }
194
+
195
+ protected function _removeStyleCB($m)
196
+ {
197
+ $openStyle = "<style{$m[1]}";
198
+ $css = $m[2];
199
+ // remove HTML comments
200
+ $css = preg_replace('/(?:^\\s*<!--|-->\\s*$)/', '', $css);
201
+
202
+ // remove CDATA section markers
203
+ $css = $this->_removeCdata($css);
204
+
205
+ // minify
206
+ $minifier = $this->_cssMinifier
207
+ ? $this->_cssMinifier
208
+ : 'trim';
209
+ $css = call_user_func($minifier, $css);
210
+
211
+ return $this->_reservePlace($this->_needsCdata($css)
212
+ ? "{$openStyle}/*<![CDATA[*/{$css}/*]]>*/</style>"
213
+ : "{$openStyle}{$css}</style>"
214
+ );
215
+ }
216
+
217
+ protected function _removeScriptCB($m)
218
+ {
219
+ $openScript = "<script{$m[2]}";
220
+ $js = $m[3];
221
+
222
+ // whitespace surrounding? preserve at least one space
223
+ $ws1 = ($m[1] === '') ? '' : ' ';
224
+ $ws2 = ($m[4] === '') ? '' : ' ';
225
+
226
+ // remove HTML comments (and ending "//" if present)
227
+ if ($this->_jsCleanComments) {
228
+ $js = preg_replace('/(?:^\\s*<!--\\s*|\\s*(?:\\/\\/)?\\s*-->\\s*$)/', '', $js);
229
+ }
230
+
231
+ // remove CDATA section markers
232
+ $js = $this->_removeCdata($js);
233
+
234
+ // minify
235
+ $minifier = $this->_jsMinifier
236
+ ? $this->_jsMinifier
237
+ : 'trim';
238
+ $js = call_user_func($minifier, $js);
239
+
240
+ return $this->_reservePlace($this->_needsCdata($js)
241
+ ? "{$ws1}{$openScript}/*<![CDATA[*/{$js}/*]]>*/</script>{$ws2}"
242
+ : "{$ws1}{$openScript}{$js}</script>{$ws2}"
243
+ );
244
+ }
245
+
246
+ protected function _removeCdata($str)
247
+ {
248
+ return (false !== strpos($str, '<![CDATA['))
249
+ ? str_replace(array('<![CDATA[', ']]>'), '', $str)
250
+ : $str;
251
+ }
252
+
253
+ protected function _needsCdata($str)
254
+ {
255
+ return ($this->_isXhtml && preg_match('/(?:[<&]|\\-\\-|\\]\\]>)/', $str));
256
+ }
257
+ }
classes/external/php/minify-2.1.7-jsmin.php ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * JSMin.php - modified PHP implementation of Douglas Crockford's JSMin.
4
+ *
5
+ * <code>
6
+ * $minifiedJs = JSMin::minify($js);
7
+ * </code>
8
+ *
9
+ * This is a modified port of jsmin.c. Improvements:
10
+ *
11
+ * Does not choke on some regexp literals containing quote characters. E.g. /'/
12
+ *
13
+ * Spaces are preserved after some add/sub operators, so they are not mistakenly
14
+ * converted to post-inc/dec. E.g. a + ++b -> a+ ++b
15
+ *
16
+ * Preserves multi-line comments that begin with /*!
17
+ *
18
+ * PHP 5 or higher is required.
19
+ *
20
+ * Permission is hereby granted to use this version of the library under the
21
+ * same terms as jsmin.c, which has the following license:
22
+ *
23
+ * --
24
+ * Copyright (c) 2002 Douglas Crockford (www.crockford.com)
25
+ *
26
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of
27
+ * this software and associated documentation files (the "Software"), to deal in
28
+ * the Software without restriction, including without limitation the rights to
29
+ * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
30
+ * of the Software, and to permit persons to whom the Software is furnished to do
31
+ * so, subject to the following conditions:
32
+ *
33
+ * The above copyright notice and this permission notice shall be included in all
34
+ * copies or substantial portions of the Software.
35
+ *
36
+ * The Software shall be used for Good, not Evil.
37
+ *
38
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
41
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
42
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
43
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
+ * SOFTWARE.
45
+ * --
46
+ *
47
+ * @package JSMin
48
+ * @author Ryan Grove <ryan@wonko.com> (PHP port)
49
+ * @author Steve Clay <steve@mrclay.org> (modifications + cleanup)
50
+ * @author Andrea Giammarchi <http://www.3site.eu> (spaceBeforeRegExp)
51
+ * @copyright 2002 Douglas Crockford <douglas@crockford.com> (jsmin.c)
52
+ * @copyright 2008 Ryan Grove <ryan@wonko.com> (PHP port)
53
+ * @license http://opensource.org/licenses/mit-license.php MIT License
54
+ * @link http://code.google.com/p/jsmin-php/
55
+ */
56
+
57
+ class JSMin {
58
+ const ORD_LF = 10;
59
+ const ORD_SPACE = 32;
60
+ const ACTION_KEEP_A = 1;
61
+ const ACTION_DELETE_A = 2;
62
+ const ACTION_DELETE_A_B = 3;
63
+
64
+ protected $a = "\n";
65
+ protected $b = '';
66
+ protected $input = '';
67
+ protected $inputIndex = 0;
68
+ protected $inputLength = 0;
69
+ protected $lookAhead = null;
70
+ protected $output = '';
71
+ protected $lastByteOut = '';
72
+ protected $keptComment = '';
73
+
74
+ /**
75
+ * Minify Javascript.
76
+ *
77
+ * @param string $js Javascript to be minified
78
+ *
79
+ * @return string
80
+ */
81
+ public static function minify($js)
82
+ {
83
+ $jsmin = new JSMin($js);
84
+ return $jsmin->min();
85
+ }
86
+
87
+ /**
88
+ * @param string $input
89
+ */
90
+ public function __construct($input)
91
+ {
92
+ $this->input = $input;
93
+ }
94
+
95
+ /**
96
+ * Perform minification, return result
97
+ *
98
+ * @return string
99
+ */
100
+ public function min()
101
+ {
102
+ if ($this->output !== '') { // min already run
103
+ return $this->output;
104
+ }
105
+
106
+ $mbIntEnc = null;
107
+ if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {
108
+ $mbIntEnc = mb_internal_encoding();
109
+ mb_internal_encoding('8bit');
110
+ }
111
+ $this->input = str_replace("\r\n", "\n", $this->input);
112
+ $this->inputLength = strlen($this->input);
113
+
114
+ $this->action(self::ACTION_DELETE_A_B);
115
+
116
+ while ($this->a !== null) {
117
+ // determine next command
118
+ $command = self::ACTION_KEEP_A; // default
119
+ if ($this->a === ' ') {
120
+ if (($this->lastByteOut === '+' || $this->lastByteOut === '-')
121
+ && ($this->b === $this->lastByteOut)) {
122
+ // Don't delete this space. If we do, the addition/subtraction
123
+ // could be parsed as a post-increment
124
+ } elseif (! $this->isAlphaNum($this->b)) {
125
+ $command = self::ACTION_DELETE_A;
126
+ }
127
+ } elseif ($this->a === "\n") {
128
+ if ($this->b === ' ') {
129
+ $command = self::ACTION_DELETE_A_B;
130
+
131
+ // in case of mbstring.func_overload & 2, must check for null b,
132
+ // otherwise mb_strpos will give WARNING
133
+ } elseif ($this->b === null
134
+ || (false === strpos('{[(+-!~', $this->b)
135
+ && ! $this->isAlphaNum($this->b))) {
136
+ $command = self::ACTION_DELETE_A;
137
+ }
138
+ } elseif (! $this->isAlphaNum($this->a)) {
139
+ if ($this->b === ' '
140
+ || ($this->b === "\n"
141
+ && (false === strpos('}])+-"\'', $this->a)))) {
142
+ $command = self::ACTION_DELETE_A_B;
143
+ }
144
+ }
145
+ $this->action($command);
146
+ }
147
+ $this->output = trim($this->output);
148
+
149
+ if ($mbIntEnc !== null) {
150
+ mb_internal_encoding($mbIntEnc);
151
+ }
152
+ return $this->output;
153
+ }
154
+
155
+ /**
156
+ * ACTION_KEEP_A = Output A. Copy B to A. Get the next B.
157
+ * ACTION_DELETE_A = Copy B to A. Get the next B.
158
+ * ACTION_DELETE_A_B = Get the next B.
159
+ *
160
+ * @param int $command
161
+ * @throws JSMin_UnterminatedRegExpException|JSMin_UnterminatedStringException
162
+ */
163
+ protected function action($command)
164
+ {
165
+ // make sure we don't compress "a + ++b" to "a+++b", etc.
166
+ if ($command === self::ACTION_DELETE_A_B
167
+ && $this->b === ' '
168
+ && ($this->a === '+' || $this->a === '-')) {
169
+ // Note: we're at an addition/substraction operator; the inputIndex
170
+ // will certainly be a valid index
171
+ if ($this->input[$this->inputIndex] === $this->a) {
172
+ // This is "+ +" or "- -". Don't delete the space.
173
+ $command = self::ACTION_KEEP_A;
174
+ }
175
+ }
176
+
177
+ switch ($command) {
178
+ case self::ACTION_KEEP_A: // 1
179
+ $this->output .= $this->a;
180
+
181
+ if ($this->keptComment) {
182
+ $this->output = rtrim($this->output, "\n");
183
+ $this->output .= $this->keptComment;
184
+ $this->keptComment = '';
185
+ }
186
+
187
+ $this->lastByteOut = $this->a;
188
+
189
+ // fallthrough intentional
190
+ case self::ACTION_DELETE_A: // 2
191
+ $this->a = $this->b;
192
+ if ($this->a === "'" || $this->a === '"') { // string literal
193
+ $str = $this->a; // in case needed for exception
194
+ for(;;) {
195
+ $this->output .= $this->a;
196
+ $this->lastByteOut = $this->a;
197
+
198
+ $this->a = $this->get();
199
+ if ($this->a === $this->b) { // end quote
200
+ break;
201
+ }
202
+ if ($this->isEOF($this->a)) {
203
+ throw new JSMin_UnterminatedStringException(
204
+ "JSMin: Unterminated String at byte {$this->inputIndex}: {$str}");
205
+ }
206
+ $str .= $this->a;
207
+ if ($this->a === '\\') {
208
+ $this->output .= $this->a;
209
+ $this->lastByteOut = $this->a;
210
+
211
+ $this->a = $this->get();
212
+ $str .= $this->a;
213
+ }
214
+ }
215
+ }
216
+
217
+ // fallthrough intentional
218
+ case self::ACTION_DELETE_A_B: // 3
219
+ $this->b = $this->next();
220
+ if ($this->b === '/' && $this->isRegexpLiteral()) {
221
+ $this->output .= $this->a . $this->b;
222
+ $pattern = '/'; // keep entire pattern in case we need to report it in the exception
223
+ for(;;) {
224
+ $this->a = $this->get();
225
+ $pattern .= $this->a;
226
+ if ($this->a === '[') {
227
+ for(;;) {
228
+ $this->output .= $this->a;
229
+ $this->a = $this->get();
230
+ $pattern .= $this->a;
231
+ if ($this->a === ']') {
232
+ break;
233
+ }
234
+ if ($this->a === '\\') {
235
+ $this->output .= $this->a;
236
+ $this->a = $this->get();
237
+ $pattern .= $this->a;
238
+ }
239
+ if ($this->isEOF($this->a)) {
240
+ throw new JSMin_UnterminatedRegExpException(
241
+ "JSMin: Unterminated set in RegExp at byte "
242
+ . $this->inputIndex .": {$pattern}");
243
+ }
244
+ }
245
+ }
246
+
247
+ if ($this->a === '/') { // end pattern
248
+ break; // while (true)
249
+ } elseif ($this->a === '\\') {
250
+ $this->output .= $this->a;
251
+ $this->a = $this->get();
252
+ $pattern .= $this->a;
253
+ } elseif ($this->isEOF($this->a)) {
254
+ throw new JSMin_UnterminatedRegExpException(
255
+ "JSMin: Unterminated RegExp at byte {$this->inputIndex}: {$pattern}");
256
+ }
257
+ $this->output .= $this->a;
258
+ $this->lastByteOut = $this->a;
259
+ }
260
+ $this->b = $this->next();
261
+ }
262
+ // end case ACTION_DELETE_A_B
263
+ }
264
+ }
265
+
266
+ /**
267
+ * @return bool
268
+ */
269
+ protected function isRegexpLiteral()
270
+ {
271
+ if (false !== strpos("(,=:[!&|?+-~*{;", $this->a)) {
272
+ // we obviously aren't dividing
273
+ return true;
274
+ }
275
+
276
+ // we have to check for a preceding keyword, and we don't need to pattern
277
+ // match over the whole output.
278
+ $recentOutput = substr($this->output, -10);
279
+
280
+ // check if return/typeof directly precede a pattern without a space
281
+ foreach (array('return', 'typeof') as $keyword) {
282
+ if ($this->a !== substr($keyword, -1)) {
283
+ // certainly wasn't keyword
284
+ continue;
285
+ }
286
+ if (preg_match("~(^|[\\s\\S])" . substr($keyword, 0, -1) . "$~", $recentOutput, $m)) {
287
+ if ($m[1] === '' || !$this->isAlphaNum($m[1])) {
288
+ return true;
289
+ }
290
+ }
291
+ }
292
+
293
+ // check all keywords
294
+ if ($this->a === ' ' || $this->a === "\n") {
295
+ if (preg_match('~(^|[\\s\\S])(?:case|else|in|return|typeof)$~', $recentOutput, $m)) {
296
+ if ($m[1] === '' || !$this->isAlphaNum($m[1])) {
297
+ return true;
298
+ }
299
+ }
300
+ }
301
+
302
+ return false;
303
+ }
304
+
305
+ /**
306
+ * Return the next character from stdin. Watch out for lookahead. If the character is a control character,
307
+ * translate it to a space or linefeed.
308
+ *
309
+ * @return string
310
+ */
311
+ protected function get()
312
+ {
313
+ $c = $this->lookAhead;
314
+ $this->lookAhead = null;
315
+ if ($c === null) {
316
+ // getc(stdin)
317
+ if ($this->inputIndex < $this->inputLength) {
318
+ $c = $this->input[$this->inputIndex];
319
+ $this->inputIndex += 1;
320
+ } else {
321
+ $c = null;
322
+ }
323
+ }
324
+ if (ord($c) >= self::ORD_SPACE || $c === "\n" || $c === null) {
325
+ return $c;
326
+ }
327
+ if ($c === "\r") {
328
+ return "\n";
329
+ }
330
+ return ' ';
331
+ }
332
+
333
+ /**
334
+ * Does $a indicate end of input?
335
+ *
336
+ * @param string $a
337
+ * @return bool
338
+ */
339
+ protected function isEOF($a)
340
+ {
341
+ return ord($a) <= self::ORD_LF;
342
+ }
343
+
344
+ /**
345
+ * Get next char (without getting it). If is ctrl character, translate to a space or newline.
346
+ *
347
+ * @return string
348
+ */
349
+ protected function peek()
350
+ {
351
+ $this->lookAhead = $this->get();
352
+ return $this->lookAhead;
353
+ }
354
+
355
+ /**
356
+ * Return true if the character is a letter, digit, underscore, dollar sign, or non-ASCII character.
357
+ *
358
+ * @param string $c
359
+ *
360
+ * @return bool
361
+ */
362
+ protected function isAlphaNum($c)
363
+ {
364
+ return (preg_match('/^[a-z0-9A-Z_\\$\\\\]$/', $c) || ord($c) > 126);
365
+ }
366
+
367
+ /**
368
+ * Consume a single line comment from input (possibly retaining it)
369
+ */
370
+ protected function consumeSingleLineComment()
371
+ {
372
+ $comment = '';
373
+ while (true) {
374
+ $get = $this->get();
375
+ $comment .= $get;
376
+ if (ord($get) <= self::ORD_LF) { // end of line reached
377
+ // if IE conditional comment
378
+ if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
379
+ $this->keptComment .= "/{$comment}";
380
+ }
381
+ return;
382
+ }
383
+ }
384
+ }
385
+
386
+ /**
387
+ * Consume a multiple line comment from input (possibly retaining it)
388
+ *
389
+ * @throws JSMin_UnterminatedCommentException
390
+ */
391
+ protected function consumeMultipleLineComment()
392
+ {
393
+ $this->get();
394
+ $comment = '';
395
+ for(;;) {
396
+ $get = $this->get();
397
+ if ($get === '*') {
398
+ if ($this->peek() === '/') { // end of comment reached
399
+ $this->get();
400
+ if (0 === strpos($comment, '!')) {
401
+ // preserved by YUI Compressor
402
+ if (!$this->keptComment) {
403
+ // don't prepend a newline if two comments right after one another
404
+ $this->keptComment = "\n";
405
+ }
406
+ $this->keptComment .= "/*!" . substr($comment, 1) . "*/\n";
407
+ } else if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
408
+ // IE conditional
409
+ $this->keptComment .= "/*{$comment}*/";
410
+ }
411
+ return;
412
+ }
413
+ } elseif ($get === null) {
414
+ throw new JSMin_UnterminatedCommentException(
415
+ "JSMin: Unterminated comment at byte {$this->inputIndex}: /*{$comment}");
416
+ }
417
+ $comment .= $get;
418
+ }
419
+ }
420
+
421
+ /**
422
+ * Get the next character, skipping over comments. Some comments may be preserved.
423
+ *
424
+ * @return string
425
+ */
426
+ protected function next()
427
+ {
428
+ $get = $this->get();
429
+ if ($get === '/') {
430
+ switch ($this->peek()) {
431
+ case '/':
432
+ $this->consumeSingleLineComment();
433
+ $get = "\n";
434
+ break;
435
+ case '*':
436
+ $this->consumeMultipleLineComment();
437
+ $get = ' ';
438
+ break;
439
+ }
440
+ }
441
+ return $get;
442
+ }
443
+ }
444
+
445
+ class JSMin_UnterminatedStringException extends Exception {}
446
+ class JSMin_UnterminatedCommentException extends Exception {}
447
+ class JSMin_UnterminatedRegExpException extends Exception {}
classes/{minify-css-compressor.php → external/php/minify-css-compressor.php} RENAMED
File without changes
classes/{minify-html.php → external/php/minify-html.php} RENAMED
File without changes
classes/external/php/yui-php-cssmin-2.4.8-1.php ADDED
@@ -0,0 +1,758 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*!
4
+ * cssmin.php rev ebaf67b 12/06/2013
5
+ * Author: Tubal Martin - http://tubalmartin.me/
6
+ * Repo: https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port
7
+ *
8
+ * This is a PHP port of the CSS minification tool distributed with YUICompressor,
9
+ * itself a port of the cssmin utility by Isaac Schlueter - http://foohack.com/
10
+ * Permission is hereby granted to use the PHP version under the same
11
+ * conditions as the YUICompressor.
12
+ */
13
+
14
+ /*!
15
+ * YUI Compressor
16
+ * http://developer.yahoo.com/yui/compressor/
17
+ * Author: Julien Lecomte - http://www.julienlecomte.net/
18
+ * Copyright (c) 2013 Yahoo! Inc. All rights reserved.
19
+ * The copyrights embodied in the content of this file are licensed
20
+ * by Yahoo! Inc. under the BSD (revised) open source license.
21
+ */
22
+
23
+ class CSSmin
24
+ {
25
+ const NL = '___YUICSSMIN_PRESERVED_NL___';
26
+ const TOKEN = '___YUICSSMIN_PRESERVED_TOKEN_';
27
+ const COMMENT = '___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_';
28
+ const CLASSCOLON = '___YUICSSMIN_PSEUDOCLASSCOLON___';
29
+ const QUERY_FRACTION = '___YUICSSMIN_QUERY_FRACTION___';
30
+
31
+ private $comments;
32
+ private $preserved_tokens;
33
+ private $memory_limit;
34
+ private $max_execution_time;
35
+ private $pcre_backtrack_limit;
36
+ private $pcre_recursion_limit;
37
+ private $raise_php_limits;
38
+
39
+ /**
40
+ * @param bool|int $raise_php_limits
41
+ * If true, PHP settings will be raised if needed
42
+ */
43
+ public function __construct($raise_php_limits = TRUE)
44
+ {
45
+ // Set suggested PHP limits
46
+ $this->memory_limit = 128 * 1048576; // 128MB in bytes
47
+ $this->max_execution_time = 60; // 1 min
48
+ $this->pcre_backtrack_limit = 1000 * 1000;
49
+ $this->pcre_recursion_limit = 500 * 1000;
50
+
51
+ $this->raise_php_limits = (bool) $raise_php_limits;
52
+ }
53
+
54
+ /**
55
+ * Minify a string of CSS
56
+ * @param string $css
57
+ * @param int|bool $linebreak_pos
58
+ * @return string
59
+ */
60
+ public function run($css = '', $linebreak_pos = FALSE)
61
+ {
62
+ if (empty($css)) {
63
+ return '';
64
+ }
65
+
66
+ if ($this->raise_php_limits) {
67
+ $this->do_raise_php_limits();
68
+ }
69
+
70
+ $this->comments = array();
71
+ $this->preserved_tokens = array();
72
+
73
+ $start_index = 0;
74
+ $length = strlen($css);
75
+
76
+ $css = $this->extract_data_urls($css);
77
+
78
+ // collect all comment blocks...
79
+ while (($start_index = $this->index_of($css, '/*', $start_index)) >= 0) {
80
+ $end_index = $this->index_of($css, '*/', $start_index + 2);
81
+ if ($end_index < 0) {
82
+ $end_index = $length;
83
+ }
84
+ $comment_found = $this->str_slice($css, $start_index + 2, $end_index);
85
+ $this->comments[] = $comment_found;
86
+ $comment_preserve_string = self::COMMENT . (count($this->comments) - 1) . '___';
87
+ $css = $this->str_slice($css, 0, $start_index + 2) . $comment_preserve_string . $this->str_slice($css, $end_index);
88
+ // Set correct start_index: Fixes issue #2528130
89
+ $start_index = $end_index + 2 + strlen($comment_preserve_string) - strlen($comment_found);
90
+ }
91
+
92
+ // preserve strings so their content doesn't get accidentally minified
93
+ $css = preg_replace_callback('/(?:"(?:[^\\\\"]|\\\\.|\\\\)*")|'."(?:'(?:[^\\\\']|\\\\.|\\\\)*')/S", array($this, 'replace_string'), $css);
94
+
95
+ // Let's divide css code in chunks of 25.000 chars aprox.
96
+ // Reason: PHP's PCRE functions like preg_replace have a "backtrack limit"
97
+ // of 100.000 chars by default (php < 5.3.7) so if we're dealing with really
98
+ // long strings and a (sub)pattern matches a number of chars greater than
99
+ // the backtrack limit number (i.e. /(.*)/s) PCRE functions may fail silently
100
+ // returning NULL and $css would be empty.
101
+ $charset = '';
102
+ $charset_regexp = '/(@charset)( [^;]+;)/i';
103
+ $css_chunks = array();
104
+ $css_chunk_length = 25000; // aprox size, not exact
105
+ $start_index = 0;
106
+ $i = $css_chunk_length; // save initial iterations
107
+ $l = strlen($css);
108
+
109
+
110
+ // if the number of characters is 25000 or less, do not chunk
111
+ if ($l <= $css_chunk_length) {
112
+ $css_chunks[] = $css;
113
+ } else {
114
+ // chunk css code securely
115
+ while ($i < $l) {
116
+ $i += 50; // save iterations. 500 checks for a closing curly brace }
117
+ if ($l - $start_index <= $css_chunk_length || $i >= $l) {
118
+ $css_chunks[] = $this->str_slice($css, $start_index);
119
+ break;
120
+ }
121
+ if ($css[$i - 1] === '}' && $i - $start_index > $css_chunk_length) {
122
+ // If there are two ending curly braces }} separated or not by spaces,
123
+ // join them in the same chunk (i.e. @media blocks)
124
+ $next_chunk = substr($css, $i);
125
+ if (preg_match('/^\s*\}/', $next_chunk)) {
126
+ $i = $i + $this->index_of($next_chunk, '}') + 1;
127
+ }
128
+
129
+ $css_chunks[] = $this->str_slice($css, $start_index, $i);
130
+ $start_index = $i;
131
+ }
132
+ }
133
+ }
134
+
135
+ // Minify each chunk
136
+ for ($i = 0, $n = count($css_chunks); $i < $n; $i++) {
137
+ $css_chunks[$i] = $this->minify($css_chunks[$i], $linebreak_pos);
138
+ // Keep the first @charset at-rule found
139
+ if (empty($charset) && preg_match($charset_regexp, $css_chunks[$i], $matches)) {
140
+ $charset = strtolower($matches[1]) . $matches[2];
141
+ }
142
+ // Delete all @charset at-rules
143
+ $css_chunks[$i] = preg_replace($charset_regexp, '', $css_chunks[$i]);
144
+ }
145
+
146
+ // Update the first chunk and push the charset to the top of the file.
147
+ $css_chunks[0] = $charset . $css_chunks[0];
148
+
149
+ return implode('', $css_chunks);
150
+ }
151
+
152
+ /**
153
+ * Sets the memory limit for this script
154
+ * @param int|string $limit
155
+ */
156
+ public function set_memory_limit($limit)
157
+ {
158
+ $this->memory_limit = $this->normalize_int($limit);
159
+ }
160
+
161
+ /**
162
+ * Sets the maximum execution time for this script
163
+ * @param int|string $seconds
164
+ */
165
+ public function set_max_execution_time($seconds)
166
+ {
167
+ $this->max_execution_time = (int) $seconds;
168
+ }
169
+
170
+ /**
171
+ * Sets the PCRE backtrack limit for this script
172
+ * @param int $limit
173
+ */
174
+ public function set_pcre_backtrack_limit($limit)
175
+ {
176
+ $this->pcre_backtrack_limit = (int) $limit;
177
+ }
178
+
179
+ /**
180
+ * Sets the PCRE recursion limit for this script
181
+ * @param int $limit
182
+ */
183
+ public function set_pcre_recursion_limit($limit)
184
+ {
185
+ $this->pcre_recursion_limit = (int) $limit;
186
+ }
187
+
188
+ /**
189
+ * Try to configure PHP to use at least the suggested minimum settings
190
+ */
191
+ private function do_raise_php_limits()
192
+ {
193
+ $php_limits = array(
194
+ 'memory_limit' => $this->memory_limit,
195
+ 'max_execution_time' => $this->max_execution_time,
196
+ 'pcre.backtrack_limit' => $this->pcre_backtrack_limit,
197
+ 'pcre.recursion_limit' => $this->pcre_recursion_limit
198
+ );
199
+
200
+ // If current settings are higher respect them.
201
+ foreach ($php_limits as $name => $suggested) {
202
+ $current = $this->normalize_int(ini_get($name));
203
+ // memory_limit exception: allow -1 for "no memory limit".
204
+ if ($current > -1 && ($suggested == -1 || $current < $suggested)) {
205
+ ini_set($name, $suggested);
206
+ }
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Does bulk of the minification
212
+ * @param string $css
213
+ * @param int|bool $linebreak_pos
214
+ * @return string
215
+ */
216
+ private function minify($css, $linebreak_pos)
217
+ {
218
+ // strings are safe, now wrestle the comments
219
+ for ($i = 0, $max = count($this->comments); $i < $max; $i++) {
220
+
221
+ $token = $this->comments[$i];
222
+ $placeholder = '/' . self::COMMENT . $i . '___/';
223
+
224
+ // ! in the first position of the comment means preserve
225
+ // so push to the preserved tokens keeping the !
226
+ if (substr($token, 0, 1) === '!') {
227
+ $this->preserved_tokens[] = $token;
228
+ $token_tring = self::TOKEN . (count($this->preserved_tokens) - 1) . '___';
229
+ $css = preg_replace($placeholder, $token_tring, $css, 1);
230
+ // Preserve new lines for /*! important comments
231
+ $css = preg_replace('/\s*[\n\r\f]+\s*(\/\*'. $token_tring .')/S', self::NL.'$1', $css);
232
+ $css = preg_replace('/('. $token_tring .'\*\/)\s*[\n\r\f]+\s*/', '$1'.self::NL, $css);
233
+ continue;
234
+ }
235
+
236
+ // \ in the last position looks like hack for Mac/IE5
237
+ // shorten that to /*\*/ and the next one to /**/
238
+ if (substr($token, (strlen($token) - 1), 1) === '\\') {
239
+ $this->preserved_tokens[] = '\\';
240
+ $css = preg_replace($placeholder, self::TOKEN . (count($this->preserved_tokens) - 1) . '___', $css, 1);
241
+ $i = $i + 1; // attn: advancing the loop
242
+ $this->preserved_tokens[] = '';
243
+ $css = preg_replace('/' . self::COMMENT . $i . '___/', self::TOKEN . (count($this->preserved_tokens) - 1) . '___', $css, 1);
244
+ continue;
245
+ }
246
+
247
+ // keep empty comments after child selectors (IE7 hack)
248
+ // e.g. html >/**/ body
249
+ if (strlen($token) === 0) {
250
+ $start_index = $this->index_of($css, $this->str_slice($placeholder, 1, -1));
251
+ if ($start_index > 2) {
252
+ if (substr($css, $start_index - 3, 1) === '>') {
253
+ $this->preserved_tokens[] = '';
254
+ $css = preg_replace($placeholder, self::TOKEN . (count($this->preserved_tokens) - 1) . '___', $css, 1);
255
+ }
256
+ }
257
+ }
258
+
259
+ // in all other cases kill the comment
260
+ $css = preg_replace('/\/\*' . $this->str_slice($placeholder, 1, -1) . '\*\//', '', $css, 1);
261
+ }
262
+
263
+
264
+ // Normalize all whitespace strings to single spaces. Easier to work with that way.
265
+ $css = preg_replace('/\s+/', ' ', $css);
266
+
267
+ // Shorten & preserve calculations calc(...) since spaces are important
268
+ $css = preg_replace_callback('/calc(\(((?:[^\(\)]+|(?1))*)\))/i', array($this, 'replace_calc'), $css);
269
+
270
+ // Replace positive sign from numbers preceded by : or a white-space before the leading space is removed
271
+ // +1.2em to 1.2em, +.8px to .8px, +2% to 2%
272
+ $css = preg_replace('/((?<!\\\\)\:|\s)\+(\.?\d+)/S', '$1$2', $css);
273
+
274
+ // Remove leading zeros from integer and float numbers preceded by : or a white-space
275
+ // 000.6 to .6, -0.8 to -.8, 0050 to 50, -01.05 to -1.05
276
+ $css = preg_replace('/((?<!\\\\)\:|\s)(\-?)0+(\.?\d+)/S', '$1$2$3', $css);
277
+
278
+ // Remove trailing zeros from float numbers preceded by : or a white-space
279
+ // -6.0100em to -6.01em, .0100 to .01, 1.200px to 1.2px
280
+ $css = preg_replace('/((?<!\\\\)\:|\s)(\-?)(\d?\.\d+?)0+([^\d])/S', '$1$2$3$4', $css);
281
+
282
+ // Remove trailing .0 -> -9.0 to -9
283
+ $css = preg_replace('/((?<!\\\\)\:|\s)(\-?\d+)\.0([^\d])/S', '$1$2$3', $css);
284
+
285
+ // Replace 0 length numbers with 0
286
+ $css = preg_replace('/((?<!\\\\)\:|\s)\-?\.?0+([^\d])/S', '${1}0$2', $css);
287
+
288
+ // Remove the spaces before the things that should not have spaces before them.
289
+ // But, be careful not to turn "p :link {...}" into "p:link{...}"
290
+ // Swap out any pseudo-class colons with the token, and then swap back.
291
+ $css = preg_replace_callback('/(?:^|\})(?:(?:[^\{\:])+\:)+(?:[^\{]*\{)/', array($this, 'replace_colon'), $css);
292
+
293
+ // Remove spaces before the things that should not have spaces before them.
294
+ $css = preg_replace('/\s+([\!\{\}\;\:\>\+\(\)\]\~\=,])/', '$1', $css);
295
+
296
+ // Restore spaces for !important
297
+ $css = preg_replace('/\!important/i', ' !important', $css);
298
+
299
+ // bring back the colon
300
+ $css = preg_replace('/' . self::CLASSCOLON . '/', ':', $css);
301
+
302
+ // retain space for special IE6 cases
303
+ $css = preg_replace_callback('/\:first\-(line|letter)(\{|,)/i', array($this, 'lowercase_pseudo_first'), $css);
304
+
305
+ // no space after the end of a preserved comment
306
+ $css = preg_replace('/\*\/ /', '*/', $css);
307
+
308
+ // lowercase some popular @directives
309
+ $css = preg_replace_callback('/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/i', array($this, 'lowercase_directives'), $css);
310
+
311
+ // lowercase some more common pseudo-elements
312
+ $css = preg_replace_callback('/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/i', array($this, 'lowercase_pseudo_elements'), $css);
313
+
314
+ // lowercase some more common functions
315
+ $css = preg_replace_callback('/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:moz|webkit)-)?any)\(/i', array($this, 'lowercase_common_functions'), $css);
316
+
317
+ // lower case some common function that can be values
318
+ // NOTE: rgb() isn't useful as we replace with #hex later, as well as and() is already done for us
319
+ $css = preg_replace_callback('/([:,\( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/iS', array($this, 'lowercase_common_functions_values'), $css);
320
+
321
+ // Put the space back in some cases, to support stuff like
322
+ // @media screen and (-webkit-min-device-pixel-ratio:0){
323
+ $css = preg_replace('/\band\(/i', 'and (', $css);
324
+
325
+ // Remove the spaces after the things that should not have spaces after them.
326
+ $css = preg_replace('/([\!\{\}\:;\>\+\(\[\~\=,])\s+/S', '$1', $css);
327
+
328
+ // remove unnecessary semicolons
329
+ $css = preg_replace('/;+\}/', '}', $css);
330
+
331
+ // Fix for issue: #2528146
332
+ // Restore semicolon if the last property is prefixed with a `*` (lte IE7 hack)
333
+ // to avoid issues on Symbian S60 3.x browsers.
334
+ $css = preg_replace('/(\*[a-z0-9\-]+\s*\:[^;\}]+)(\})/', '$1;$2', $css);
335
+
336
+ // Replace 0 length units 0(px,em,%) with 0.
337
+ $css = preg_replace('/(^|[^0-9])(?:0?\.)?0(?:em|ex|ch|rem|vw|vh|vm|vmin|cm|mm|in|px|pt|pc|%|deg|g?rad|m?s|k?hz)/iS', '${1}0', $css);
338
+
339
+ // Replace 0 0; or 0 0 0; or 0 0 0 0; with 0.
340
+ $css = preg_replace('/\:0(?: 0){1,3}(;|\}| \!)/', ':0$1', $css);
341
+
342
+ // Fix for issue: #2528142
343
+ // Replace text-shadow:0; with text-shadow:0 0 0;
344
+ $css = preg_replace('/(text-shadow\:0)(;|\}| \!)/i', '$1 0 0$2', $css);
345
+
346
+ // Replace background-position:0; with background-position:0 0;
347
+ // same for transform-origin
348
+ // Changing -webkit-mask-position: 0 0 to just a single 0 will result in the second parameter defaulting to 50% (center)
349
+ $css = preg_replace('/(background\-position|webkit-mask-position|(?:webkit|moz|o|ms|)\-?transform\-origin)\:0(;|\}| \!)/iS', '$1:0 0$2', $css);
350
+
351
+ // Shorten colors from rgb(51,102,153) to #336699, rgb(100%,0%,0%) to #ff0000 (sRGB color space)
352
+ // Shorten colors from hsl(0, 100%, 50%) to #ff0000 (sRGB color space)
353
+ // This makes it more likely that it'll get further compressed in the next step.
354
+ $css = preg_replace_callback('/rgb\s*\(\s*([0-9,\s\-\.\%]+)\s*\)(.{1})/i', array($this, 'rgb_to_hex'), $css);
355
+ $css = preg_replace_callback('/hsl\s*\(\s*([0-9,\s\-\.\%]+)\s*\)(.{1})/i', array($this, 'hsl_to_hex'), $css);
356
+
357
+ // Shorten colors from #AABBCC to #ABC or short color name.
358
+ $css = $this->compress_hex_colors($css);
359
+
360
+ // border: none to border:0, outline: none to outline:0
361
+ $css = preg_replace('/(border\-?(?:top|right|bottom|left|)|outline)\:none(;|\}| \!)/iS', '$1:0$2', $css);
362
+
363
+ // shorter opacity IE filter
364
+ $css = preg_replace('/progid\:DXImageTransform\.Microsoft\.Alpha\(Opacity\=/i', 'alpha(opacity=', $css);
365
+
366
+ // Find a fraction that is used for Opera's -o-device-pixel-ratio query
367
+ // Add token to add the "\" back in later
368
+ $css = preg_replace('/\(([a-z\-]+):([0-9]+)\/([0-9]+)\)/i', '($1:$2'. self::QUERY_FRACTION .'$3)', $css);
369
+
370
+ // Remove empty rules.
371
+ $css = preg_replace('/[^\};\{\/]+\{\}/S', '', $css);
372
+
373
+ // Add "/" back to fix Opera -o-device-pixel-ratio query
374
+ $css = preg_replace('/'. self::QUERY_FRACTION .'/', '/', $css);
375
+
376
+ // Some source control tools don't like it when files containing lines longer
377
+ // than, say 8000 characters, are checked in. The linebreak option is used in
378
+ // that case to split long lines after a specific column.
379
+ if ($linebreak_pos !== FALSE && (int) $linebreak_pos >= 0) {
380
+ $linebreak_pos = (int) $linebreak_pos;
381
+ $start_index = $i = 0;
382
+ while ($i < strlen($css)) {
383
+ $i++;
384
+ if ($css[$i - 1] === '}' && $i - $start_index > $linebreak_pos) {
385
+ $css = $this->str_slice($css, 0, $i) . "\n" . $this->str_slice($css, $i);
386
+ $start_index = $i;
387
+ }
388
+ }
389
+ }
390
+
391
+ // Replace multiple semi-colons in a row by a single one
392
+ // See SF bug #1980989
393
+ $css = preg_replace('/;;+/', ';', $css);
394
+
395
+ // Restore new lines for /*! important comments
396
+ $css = preg_replace('/'. self::NL .'/', "\n", $css);
397
+
398
+ // Lowercase all uppercase properties
399
+ $css = preg_replace_callback('/(\{|\;)([A-Z\-]+)(\:)/', array($this, 'lowercase_properties'), $css);
400
+
401
+ // restore preserved comments and strings
402
+ for ($i = 0, $max = count($this->preserved_tokens); $i < $max; $i++) {
403
+ $css = preg_replace('/' . self::TOKEN . $i . '___/', $this->preserved_tokens[$i], $css, 1);
404
+ }
405
+
406
+ // Trim the final string (for any leading or trailing white spaces)
407
+ return trim($css);
408
+ }
409
+
410
+ /**
411
+ * Utility method to replace all data urls with tokens before we start
412
+ * compressing, to avoid performance issues running some of the subsequent
413
+ * regexes against large strings chunks.
414
+ *
415
+ * @param string $css
416
+ * @return string
417
+ */
418
+ private function extract_data_urls($css)
419
+ {
420
+ // Leave data urls alone to increase parse performance.
421
+ $max_index = strlen($css) - 1;
422
+ $append_index = $index = $last_index = $offset = 0;
423
+ $sb = array();
424
+ $pattern = '/url\(\s*(["\']?)data\:/i';
425
+
426
+ // Since we need to account for non-base64 data urls, we need to handle
427
+ // ' and ) being part of the data string. Hence switching to indexOf,
428
+ // to determine whether or not we have matching string terminators and
429
+ // handling sb appends directly, instead of using matcher.append* methods.
430
+
431
+ while (preg_match($pattern, $css, $m, 0, $offset)) {
432
+ $index = $this->index_of($css, $m[0], $offset);
433
+ $last_index = $index + strlen($m[0]);
434
+ $start_index = $index + 4; // "url(".length()
435
+ $end_index = $last_index - 1;
436
+ $terminator = $m[1]; // ', " or empty (not quoted)
437
+ $found_terminator = FALSE;
438
+
439
+ if (strlen($terminator) === 0) {
440
+ $terminator = ')';
441
+ }
442
+
443
+ while ($found_terminator === FALSE && $end_index+1 <= $max_index) {
444
+ $end_index = $this->index_of($css, $terminator, $end_index + 1);
445
+
446
+ // endIndex == 0 doesn't really apply here
447
+ if ($end_index > 0 && substr($css, $end_index - 1, 1) !== '\\') {
448
+ $found_terminator = TRUE;
449
+ if (')' != $terminator) {
450
+ $end_index = $this->index_of($css, ')', $end_index);
451
+ }
452
+ }
453
+ }
454
+
455
+ // Enough searching, start moving stuff over to the buffer
456
+ $sb[] = $this->str_slice($css, $append_index, $index);
457
+
458
+ if ($found_terminator) {
459
+ $token = $this->str_slice($css, $start_index, $end_index);
460
+ $token = preg_replace('/\s+/', '', $token);
461
+ $this->preserved_tokens[] = $token;
462
+
463
+ $preserver = 'url(' . self::TOKEN . (count($this->preserved_tokens) - 1) . '___)';
464
+ $sb[] = $preserver;
465
+
466
+ $append_index = $end_index + 1;
467
+ } else {
468
+ // No end terminator found, re-add the whole match. Should we throw/warn here?
469
+ $sb[] = $this->str_slice($css, $index, $last_index);
470
+ $append_index = $last_index;
471
+ }
472
+
473
+ $offset = $last_index;
474
+ }
475
+
476
+ $sb[] = $this->str_slice($css, $append_index);
477
+
478
+ return implode('', $sb);
479
+ }
480
+
481
+ /**
482
+ * Utility method to compress hex color values of the form #AABBCC to #ABC or short color name.
483
+ *
484
+ * DOES NOT compress CSS ID selectors which match the above pattern (which would break things).
485
+ * e.g. #AddressForm { ... }
486
+ *
487
+ * DOES NOT compress IE filters, which have hex color values (which would break things).
488
+ * e.g. filter: chroma(color="#FFFFFF");
489
+ *
490
+ * DOES NOT compress invalid hex values.
491
+ * e.g. background-color: #aabbccdd
492
+ *
493
+ * @param string $css
494
+ * @return string
495
+ */
496
+ private function compress_hex_colors($css)
497
+ {
498
+ // Look for hex colors inside { ... } (to avoid IDs) and which don't have a =, or a " in front of them (to avoid filters)
499
+ $pattern = '/(\=\s*?["\']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/iS';
500
+ $_index = $index = $last_index = $offset = 0;
501
+ $sb = array();
502
+ // See: http://ajaxmin.codeplex.com/wikipage?title=CSS%20Colors
503
+ $short_safe = array(
504
+ '#808080' => 'gray',
505
+ '#008000' => 'green',
506
+ '#800000' => 'maroon',
507
+ '#000080' => 'navy',
508
+ '#808000' => 'olive',
509
+ '#ffa500' => 'orange',
510
+ '#800080' => 'purple',
511
+ '#c0c0c0' => 'silver',
512
+ '#008080' => 'teal',
513
+ '#f00' => 'red'
514
+ );
515
+
516
+ while (preg_match($pattern, $css, $m, 0, $offset)) {
517
+ $index = $this->index_of($css, $m[0], $offset);
518
+ $last_index = $index + strlen($m[0]);
519
+ $is_filter = $m[1] !== null && $m[1] !== '';
520
+
521
+ $sb[] = $this->str_slice($css, $_index, $index);
522
+
523
+ if ($is_filter) {
524
+ // Restore, maintain case, otherwise filter will break
525
+ $sb[] = $m[1] . '#' . $m[2] . $m[3] . $m[4] . $m[5] . $m[6] . $m[7];
526
+ } else {
527
+ if (strtolower($m[2]) == strtolower($m[3]) &&
528
+ strtolower($m[4]) == strtolower($m[5]) &&
529
+ strtolower($m[6]) == strtolower($m[7])) {
530
+ // Compress.
531
+ $hex = '#' . strtolower($m[3] . $m[5] . $m[7]);
532
+ } else {
533
+ // Non compressible color, restore but lower case.
534
+ $hex = '#' . strtolower($m[2] . $m[3] . $m[4] . $m[5] . $m[6] . $m[7]);
535
+ }
536
+ // replace Hex colors to short safe color names
537
+ $sb[] = array_key_exists($hex, $short_safe) ? $short_safe[$hex] : $hex;
538
+ }
539
+
540
+ $_index = $offset = $last_index - strlen($m[8]);
541
+ }
542
+
543
+ $sb[] = $this->str_slice($css, $_index);
544
+
545
+ return implode('', $sb);
546
+ }
547
+
548
+ /* CALLBACKS
549
+ * ---------------------------------------------------------------------------------------------
550
+ */
551
+
552
+ private function replace_string($matches)
553
+ {
554
+ $match = $matches[0];
555
+ $quote = substr($match, 0, 1);
556
+ // Must use addcslashes in PHP to avoid parsing of backslashes
557
+ $match = addcslashes($this->str_slice($match, 1, -1), '\\');
558
+
559
+ // maybe the string contains a comment-like substring?
560
+ // one, maybe more? put'em back then
561
+ if (($pos = $this->index_of($match, self::COMMENT)) >= 0) {
562
+ for ($i = 0, $max = count($this->comments); $i < $max; $i++) {
563
+ $match = preg_replace('/' . self::COMMENT . $i . '___/', $this->comments[$i], $match, 1);
564
+ }
565
+ }
566
+
567
+ // minify alpha opacity in filter strings
568
+ $match = preg_replace('/progid\:DXImageTransform\.Microsoft\.Alpha\(Opacity\=/i', 'alpha(opacity=', $match);
569
+
570
+ $this->preserved_tokens[] = $match;
571
+ return $quote . self::TOKEN . (count($this->preserved_tokens) - 1) . '___' . $quote;
572
+ }
573
+
574
+ private function replace_colon($matches)
575
+ {
576
+ return preg_replace('/\:/', self::CLASSCOLON, $matches[0]);
577
+ }
578
+
579
+ private function replace_calc($matches)
580
+ {
581
+ $this->preserved_tokens[] = trim(preg_replace('/\s*([\*\/\(\),])\s*/', '$1', $matches[2]));
582
+ return 'calc('. self::TOKEN . (count($this->preserved_tokens) - 1) . '___' . ')';
583
+ }
584
+
585
+ private function rgb_to_hex($matches)
586
+ {
587
+ // Support for percentage values rgb(100%, 0%, 45%);
588
+ if ($this->index_of($matches[1], '%') >= 0){
589
+ $rgbcolors = explode(',', str_replace('%', '', $matches[1]));
590
+ for ($i = 0; $i < count($rgbcolors); $i++) {
591
+ $rgbcolors[$i] = $this->round_number(floatval($rgbcolors[$i]) * 2.55);
592
+ }
593
+ } else {
594
+ $rgbcolors = explode(',', $matches[1]);
595
+ }
596
+
597
+ // Values outside the sRGB color space should be clipped (0-255)
598
+ for ($i = 0; $i < count($rgbcolors); $i++) {
599
+ $rgbcolors[$i] = $this->clamp_number(intval($rgbcolors[$i], 10), 0, 255);
600
+ $rgbcolors[$i] = sprintf("%02x", $rgbcolors[$i]);
601
+ }
602
+
603
+ // Fix for issue #2528093
604
+ if (!preg_match('/[\s\,\);\}]/', $matches[2])){
605
+ $matches[2] = ' ' . $matches[2];
606
+ }
607
+
608
+ return '#' . implode('', $rgbcolors) . $matches[2];
609
+ }
610
+
611
+ private function hsl_to_hex($matches)
612
+ {
613
+ $values = explode(',', str_replace('%', '', $matches[1]));
614
+ $h = floatval($values[0]);
615
+ $s = floatval($values[1]);
616
+ $l = floatval($values[2]);
617
+
618
+ // Wrap and clamp, then fraction!
619
+ $h = ((($h % 360) + 360) % 360) / 360;
620
+ $s = $this->clamp_number($s, 0, 100) / 100;
621
+ $l = $this->clamp_number($l, 0, 100) / 100;
622
+
623
+ if ($s == 0) {
624
+ $r = $g = $b = $this->round_number(255 * $l);
625
+ } else {
626
+ $v2 = $l < 0.5 ? $l * (1 + $s) : ($l + $s) - ($s * $l);
627
+ $v1 = (2 * $l) - $v2;
628
+ $r = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h + (1/3)));
629
+ $g = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h));
630
+ $b = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h - (1/3)));
631
+ }
632
+
633
+ return $this->rgb_to_hex(array('', $r.','.$g.','.$b, $matches[2]));
634
+ }
635
+
636
+ private function lowercase_pseudo_first($matches)
637
+ {
638
+ return ':first-'. strtolower($matches[1]) .' '. $matches[2];
639
+ }
640
+
641
+ private function lowercase_directives($matches)
642
+ {
643
+ return '@'. strtolower($matches[1]);
644
+ }
645
+
646
+ private function lowercase_pseudo_elements($matches)
647
+ {
648
+ return ':'. strtolower($matches[1]);
649
+ }
650
+
651
+ private function lowercase_common_functions($matches)
652
+ {
653
+ return ':'. strtolower($matches[1]) .'(';
654
+ }
655
+
656
+ private function lowercase_common_functions_values($matches)
657
+ {
658
+ return $matches[1] . strtolower($matches[2]);
659
+ }
660
+
661
+ private function lowercase_properties($matches)
662
+ {
663
+ return $matches[1].strtolower($matches[2]).$matches[3];
664
+ }
665
+
666
+ /* HELPERS
667
+ * ---------------------------------------------------------------------------------------------
668
+ */
669
+
670
+ private function hue_to_rgb($v1, $v2, $vh)
671
+ {
672
+ $vh = $vh < 0 ? $vh + 1 : ($vh > 1 ? $vh - 1 : $vh);
673
+ if ($vh * 6 < 1) return $v1 + ($v2 - $v1) * 6 * $vh;
674
+ if ($vh * 2 < 1) return $v2;
675
+ if ($vh * 3 < 2) return $v1 + ($v2 - $v1) * ((2/3) - $vh) * 6;
676
+ return $v1;
677
+ }
678
+
679
+ private function round_number($n)
680
+ {
681
+ return intval(floor(floatval($n) + 0.5), 10);
682
+ }
683
+
684
+ private function clamp_number($n, $min, $max)
685
+ {
686
+ return min(max($n, $min), $max);
687
+ }
688
+
689
+ /**
690
+ * PHP port of Javascript's "indexOf" function for strings only
691
+ * Author: Tubal Martin http://blog.margenn.com
692
+ *
693
+ * @param string $haystack
694
+ * @param string $needle
695
+ * @param int $offset index (optional)
696
+ * @return int
697
+ */
698
+ private function index_of($haystack, $needle, $offset = 0)
699
+ {
700
+ $index = strpos($haystack, $needle, $offset);
701
+
702
+ return ($index !== FALSE) ? $index : -1;
703
+ }
704
+
705
+ /**
706
+ * PHP port of Javascript's "slice" function for strings only
707
+ * Author: Tubal Martin http://blog.margenn.com
708
+ * Tests: http://margenn.com/tubal/str_slice/
709
+ *
710
+ * @param string $str
711
+ * @param int $start index
712
+ * @param int|bool $end index (optional)
713
+ * @return string
714
+ */
715
+ private function str_slice($str, $start = 0, $end = FALSE)
716
+ {
717
+ if ($end !== FALSE && ($start < 0 || $end <= 0)) {
718
+ $max = strlen($str);
719
+
720
+ if ($start < 0) {
721
+ if (($start = $max + $start) < 0) {
722
+ return '';
723
+ }
724
+ }
725
+
726
+ if ($end < 0) {
727
+ if (($end = $max + $end) < 0) {
728
+ return '';
729
+ }
730
+ }
731
+
732
+ if ($end <= $start) {
733
+ return '';
734
+ }
735
+ }
736
+
737
+ $slice = ($end === FALSE) ? substr($str, $start) : substr($str, $start, $end - $start);
738
+ return ($slice === FALSE) ? '' : $slice;
739
+ }
740
+
741
+ /**
742
+ * Convert strings like "64M" or "30" to int values
743
+ * @param mixed $size
744
+ * @return int
745
+ */
746
+ private function normalize_int($size)
747
+ {
748
+ if (is_string($size)) {
749
+ switch (substr($size, -1)) {
750
+ case 'M': case 'm': return $size * 1048576;
751
+ case 'K': case 'k': return $size * 1024;
752
+ case 'G': case 'g': return $size * 1073741824;
753
+ }
754
+ }
755
+
756
+ return (int) $size;
757
+ }
758
+ }
localization/autoptimize-de_DE.mo ADDED
Binary file
localization/autoptimize-de_DE.po ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+00:00\n"
8
+ "PO-Revision-Date: 2013-10-21 08:02-0800\n"
9
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
10
+ "Language-Team: LANGUAGE <LL@li.org>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+
16
+ #: autoptimize.php:66
17
+ msgid ""
18
+ "Thank you for installing and activating Autoptimize. Please configure it "
19
+ "under \"Settings\" -> \"Autoptimize\" to start improving your site's "
20
+ "performance."
21
+ msgstr ""
22
+ "Vielen Dank für die Installation und Aktivierung von Autoptimize. Bitte "
23
+ "konfiguriere das Plugin unter \"Einstellungen\" -> \"Autoptimize\" um die "
24
+ "Performance deiner Webseite zu verbessern."
25
+
26
+ #: autoptimize.php:72
27
+ msgid ""
28
+ "Autoptimize has just been updated. Please <strong>test your site now</"
29
+ "strong> and adapt Autoptimize config if needed."
30
+ msgstr ""
31
+ "Autoptimize wurde aktualisiert. Bitte <strong>teste nun deine Seite</strong> "
32
+ "und passe gegebenenfalls die Einstellungen von Autoptimize an."
33
+
34
+ #: classes/autoptimizeConfig.php:56
35
+ msgid "Autoptimize Settings"
36
+ msgstr "Autoptimize Einstellungen"
37
+
38
+ #: classes/autoptimizeConfig.php:62 classes/autoptimizeConfig.php:68
39
+ msgid "Show advanced settings"
40
+ msgstr "Erweiterte Einstellungen anzeigen"
41
+
42
+ #: classes/autoptimizeConfig.php:63 classes/autoptimizeConfig.php:69
43
+ msgid "Hide advanced settings"
44
+ msgstr "Erweiterte Einstellungen verstecken"
45
+
46
+ #: classes/autoptimizeConfig.php:77
47
+ msgid "HTML Options"
48
+ msgstr "HTML Optionen"
49
+
50
+ #: classes/autoptimizeConfig.php:80
51
+ msgid "Optimize HTML Code?"
52
+ msgstr "HTML Code optimieren?"
53
+
54
+ #: classes/autoptimizeConfig.php:84
55
+ msgid "Keep HTML comments?"
56
+ msgstr "HTML Kommentare beibehalten?"
57
+
58
+ #: classes/autoptimizeConfig.php:86
59
+ msgid ""
60
+ "Enable this if you want HTML comments to remain in the page, needed for e.g. "
61
+ "AdSense to function properly."
62
+ msgstr ""
63
+ "Aktiviere diese Option wenn HTML Kommentare erhalten bleiben sollen, "
64
+ "beispielsweise um AdSense einwandfrei zu kennzeichnen."
65
+
66
+ #: classes/autoptimizeConfig.php:90
67
+ msgid "JavaScript Options"
68
+ msgstr "JavaScript Optionen"
69
+
70
+ #: classes/autoptimizeConfig.php:93
71
+ msgid "Optimize JavaScript Code?"
72
+ msgstr "JavaScript Code optimieren?"
73
+
74
+ #: classes/autoptimizeConfig.php:97
75
+ msgid "Force JavaScript in &lt;head&gt;?"
76
+ msgstr "Erzwinge JavaScript in &lt;head&gt;?"
77
+
78
+ #: classes/autoptimizeConfig.php:99
79
+ msgid ""
80
+ "For performance reasons it is better to include JavaScript at the bottom of "
81
+ "HTML, but this sometimes breaks things. Especially useful for jQuery-based "
82
+ "themes."
83
+ msgstr ""
84
+ "Aus Performance-Gründen ist es besser, JavaScript am Ende des HTML-Codes "
85
+ "einzufügen. Dies kann in manchen Fällen allerdings zu Problemen führen, wenn "
86
+ "beispielsweise Themes auf jQuery basieren."
87
+
88
+ #: classes/autoptimizeConfig.php:102
89
+ msgid "Look for scripts only in &lt;head&gt;?"
90
+ msgstr "Nach Skripten nur in &lt;head&gt; suchen?"
91
+
92
+ #: classes/autoptimizeConfig.php:104
93
+ msgid ""
94
+ "Mostly usefull in combination with previous option when using jQuery-based "
95
+ "templates, but might help keeping cache size under control."
96
+ msgstr ""
97
+ "Meistens nützlich in Kombination mit den vorhergehenden Optionen, wenn "
98
+ "beispielsweise jQuery basierte Themes benutzt werden. Kann auch helfen die "
99
+ "Größe des Caches unter Kontrolle zu halten."
100
+
101
+ #: classes/autoptimizeConfig.php:107
102
+ msgid "Exclude scripts from autoptimize:"
103
+ msgstr "Folgende Skripte von Autoptimize ausschließen:"
104
+
105
+ #: classes/autoptimizeConfig.php:109
106
+ msgid ""
107
+ "A comma-seperated list of scripts you want to exclude from being "
108
+ "Autoptimized, for example 'whatever.js, another.js' (without the quotes) to "
109
+ "exclude those scripts from being aggregated and minimized by Autoptimize."
110
+ msgstr ""
111
+ "Eine mit Kommas getrennte Liste von Skripten die von Autoptimized "
112
+ "augeschlossen werden sollen. Zum Beispiel kann folgende Liste verwendet "
113
+ "werden 'whatever.js, another.js' (ohne Anführungszeichen) um die genannten "
114
+ "Skripte von der Optimierung durch Autoptimize auszuschließen."
115
+
116
+ #: classes/autoptimizeConfig.php:112
117
+ msgid "Add try-catch wrapping?"
118
+ msgstr "Try-Catch Block hinzufügen?"
119
+
120
+ #: classes/autoptimizeConfig.php:114
121
+ msgid ""
122
+ "If your scripts break because of an script error, you might want to try this."
123
+ msgstr ""
124
+ "Wenn das Laden der Skripte aufgrund eines Skriptfehlers unterbrochen wird, "
125
+ "kannst du diese Option ausprobieren."
126
+
127
+ #: classes/autoptimizeConfig.php:118
128
+ msgid "CSS Options"
129
+ msgstr "CSS Optionen"
130
+
131
+ #: classes/autoptimizeConfig.php:121
132
+ msgid "Optimize CSS Code?"
133
+ msgstr "CSS Code optimieren?"
134
+
135
+ #: classes/autoptimizeConfig.php:125
136
+ msgid "Generate data: URIs for images?"
137
+ msgstr "data: URIs für Bilder generieren?"
138
+
139
+ #: classes/autoptimizeConfig.php:127
140
+ msgid ""
141
+ "Enable this to include small background-images in the CSS itself instead of "
142
+ "as seperate downloads."
143
+ msgstr ""
144
+ "Aktiviere diese Option um kleine Hintergrundbilder in CSS einzufügen anstatt "
145
+ "diese separat herunterzuladen."
146
+
147
+ #: classes/autoptimizeConfig.php:130
148
+ msgid "Defer CSS loading?"
149
+ msgstr "Laden von CSS verzögern?"
150
+
151
+ #: classes/autoptimizeConfig.php:132
152
+ msgid ""
153
+ "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for "
154
+ "mobile performance reasons having it deferred can be better."
155
+ msgstr ""
156
+ "Normalerweise wird CSS im &lt;head&gt;-Bereich der HTML-Seite geladen. Für "
157
+ "die Performance in mobilen Browsern kann ein verzögertes Laden jedoch besser "
158
+ "sein."
159
+
160
+ #: classes/autoptimizeConfig.php:135
161
+ msgid "Look for styles only in &lt;head&gt;?"
162
+ msgstr "Nach CSS nur in &lt;head&gt; suchen?"
163
+
164
+ #: classes/autoptimizeConfig.php:137
165
+ msgid ""
166
+ "Don't autoptimize CSS outside the head-section. If the cache gets big, you "
167
+ "might want to enable this."
168
+ msgstr ""
169
+ "CSS außerhalb des head-Bereichs nicht optimieren. Die Aktivierung dieser "
170
+ "Option kann sinnvoll sein, wenn der Cache sehr groß wird."
171
+
172
+ #: classes/autoptimizeConfig.php:140
173
+ msgid "Exclude CSS from autoptimize:"
174
+ msgstr "Folgende CSS Dateien von Autoptimize ausschließen:"
175
+
176
+ #: classes/autoptimizeConfig.php:142
177
+ msgid ""
178
+ "A comma-seperated list of CSS you want to exclude from being Autoptimized."
179
+ msgstr ""
180
+ "Eine mit Kommas getrennte Liste von CSS-Dateien die von der Optimierung "
181
+ "durch Autoptimized augeschlossen werden sollen."
182
+
183
+ #: classes/autoptimizeConfig.php:146
184
+ msgid "CDN Options"
185
+ msgstr "CDN Optionen"
186
+
187
+ #: classes/autoptimizeConfig.php:149
188
+ msgid "CDN Base URL"
189
+ msgstr "CDN Basis URL:"
190
+
191
+ #: classes/autoptimizeConfig.php:151
192
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
193
+ msgstr "Gib hier die CDN Basis URL ein, wenn du CDN aktivieren möchtest."
194
+
195
+ #: classes/autoptimizeConfig.php:155
196
+ msgid "Cache Info"
197
+ msgstr "Cache Info"
198
+
199
+ #: classes/autoptimizeConfig.php:158
200
+ msgid "Cache folder"
201
+ msgstr "Cache Ordner:"
202
+
203
+ #: classes/autoptimizeConfig.php:162
204
+ msgid "Can we write?"
205
+ msgstr "Schreibberechtigung?"
206
+
207
+ #: classes/autoptimizeConfig.php:163
208
+ msgid "Yes"
209
+ msgstr "Ja"
210
+
211
+ #: classes/autoptimizeConfig.php:163
212
+ msgid "No"
213
+ msgstr "Nein"
214
+
215
+ #: classes/autoptimizeConfig.php:166
216
+ msgid "Cached styles and scripts"
217
+ msgstr "Gecachte CSS-Dateien und Skripte:"
218
+
219
+ #: classes/autoptimizeConfig.php:170
220
+ msgid "Save aggregated script/css as static files?"
221
+ msgstr "Zusammengefügte CSS / Skript-Dateien als statische Dateien speichern?"
222
+
223
+ #: classes/autoptimizeConfig.php:172
224
+ msgid "Enable this if your webserver can handle the compression and expiry."
225
+ msgstr ""
226
+ "Aktiviere diese Option, wenn dein Webserver mit Komprimierung und HTTP-"
227
+ "Expires umgehen kann."
228
+
229
+ #: classes/autoptimizeConfig.php:178
230
+ msgid "Save Changes"
231
+ msgstr "Änderungen speichern"
232
+
233
+ #: classes/autoptimizeConfig.php:179
234
+ msgid "Save Changes and Empty Cache"
235
+ msgstr "Änderungen speichern und Cache leeren"
236
+
237
+ #: classes/autoptimizeConfig.php:185
238
+ msgid "Do not donate for this plugin!"
239
+ msgstr "Bitte nicht für dieses Plugin spenden!"
240
+
241
+ #: classes/autoptimizeConfig.php:188
242
+ msgid "futtta about"
243
+ msgstr "Über futtta"
244
+
245
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
246
+ #. Plugin Name of the plugin/theme
247
+ #: classes/autoptimizeConfig.php:190
248
+ msgid "Autoptimize"
249
+ msgstr "Autoptimize"
250
+
251
+ #: classes/autoptimizeConfig.php:191
252
+ msgid "WordPress"
253
+ msgstr "WordPress"
254
+
255
+ #: classes/autoptimizeConfig.php:192
256
+ msgid "Web Technology"
257
+ msgstr "Web Technologien"
258
+
259
+ #: classes/autoptimizeConfig.php:245
260
+ msgid "Autoptimize Options"
261
+ msgstr "Autoptimize Optionen"
262
+
263
+ #: classes/autoptimizeConfig.php:291 classes/autoptimizeConfig.php:298
264
+ msgid "Settings"
265
+ msgstr "Einstellungen"
266
+
267
+ #. Plugin URI of the plugin/theme
268
+ msgid "http://blog.futtta.be/autoptimize"
269
+ msgstr "http://blog.futtta.be/autoptimize"
270
+
271
+ #. Description of the plugin/theme
272
+ msgid ""
273
+ "Optimizes your website, concatenating the CSS and JavaScript code, and "
274
+ "compressing it."
275
+ msgstr ""
276
+ "Optimiert deine Webseite, fügt CSS und JavaScripte Code zusammen und "
277
+ "komprimiert diesen."
278
+
279
+ #. Author of the plugin/theme
280
+ msgid "Frank Goossens (futtta)"
281
+ msgstr "Frank Goossens (futtta)"
282
+
283
+ #. Author URI of the plugin/theme
284
+ msgid "http://blog.futtta.be/"
285
+ msgstr "http://blog.futtta.be/"
localization/autoptimize-fa_IR.mo CHANGED
Binary file
localization/autoptimize-fa_IR.po CHANGED
@@ -1,209 +1,292 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR Emilio Lpez
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
  msgid ""
7
  msgstr ""
8
- "Project-Id-Version: Autoptimize\n"
9
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
10
- "POT-Creation-Date: 2009-10-19 21:41+0000\n"
11
- "PO-Revision-Date: 2013-09-15 10:38+0330\n"
12
- "Last-Translator: Hamed.T <lh4medl@gmail.com>\n"
13
- "Language-Team: http://basics.ir <ham3d.t@gmail.com>\n"
 
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
  "X-Generator: Poedit 1.5.7\n"
18
- "Language: Persian\n"
19
  "X-Poedit-SourceCharset: UTF-8\n"
20
 
21
- #: classes/autoptimizeConfig.php:50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  msgid "Autoptimize Settings"
23
  msgstr "تنظیمات Autoptimize"
24
 
25
- #: classes/autoptimizeConfig.php:71
 
 
 
 
 
 
 
 
26
  msgid "HTML Options"
27
- msgstr "تنضیمات HTML"
28
 
29
- #: classes/autoptimizeConfig.php:74
30
  msgid "Optimize HTML Code?"
31
- msgstr "کد HTML بهینه سازی شوند؟"
32
 
33
- #: classes/autoptimizeConfig.php:78
34
  msgid "Keep HTML comments?"
35
- msgstr "کامنت های HTML را نگه داریم؟"
36
 
37
- #: classes/autoptimizeConfig.php:80
38
  msgid ""
39
- "Disabled by default. Enable this if you want HTML comments to remain in the "
40
- "page."
41
  msgstr ""
42
- "به صورت پیش فرض غیرفعال است. اگر می خواهید کامنت های HTML در صفحه باقی بماند "
43
- "این گزینه را فعال کنید."
44
 
45
- #: classes/autoptimizeConfig.php:84
46
  msgid "JavaScript Options"
47
- msgstr "تنظیمات javascript"
48
 
49
- #: classes/autoptimizeConfig.php:87
50
  msgid "Optimize JavaScript Code?"
51
- msgstr "کدهای javascript بهینه سازی شوند؟"
52
 
53
- #: classes/autoptimizeConfig.php:91
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  msgid "Look for scripts only in &lt;head&gt;?"
55
- msgstr "فقط اسکریپت های موجود در &lt;head&gt; را بهینه سازی کنیم؟"
56
 
57
- #: classes/autoptimizeConfig.php:93 classes/autoptimizeConfig.php:116
58
  msgid ""
59
- "Disabled by default. If the cache gets big, you might want to enable this."
 
60
  msgstr ""
61
- "به صورت پیش فرض غیرفعال است. اگر حجم کش اسکریپت ها زیاد شد، شاید مایل باشید "
62
- "از این گزینه استفاده کنید."
 
63
 
64
- #: classes/autoptimizeConfig.php:96
65
- msgid "Add try-catch wrapping?"
66
- msgstr "سعی در درک کردن بسته بندی؟"
67
 
68
- #: classes/autoptimizeConfig.php:98
69
  msgid ""
70
- "Disabled by default. If your scripts break because of an script error, you "
71
- "might want to try this."
 
72
  msgstr ""
73
- "به صورت پیش فرض غیر فعال است. اگر اسکریپت های شما به دلیل خطای یک اسکریپت "
74
- "درست نمایش داده نشوند، شاید مایل باشید از این گزینه استفاده کنید."
75
 
76
- #: classes/autoptimizeConfig.php:101 classes/autoptimizeConfig.php:124
77
- msgid "Use YUI compression?"
78
- msgstr "از فشرده سازی YUI استفاده شود؟"
79
 
80
- #: classes/autoptimizeConfig.php:103 classes/autoptimizeConfig.php:126
81
  msgid ""
82
- "Disabled by default. Read [autoptimize]/yui/README.txt for more information."
83
  msgstr ""
84
- "به صورت پیش فرض غیر فعال است. اطلاعات بیشتر [autoptimize]/yui/README.txt"
 
85
 
86
- #: classes/autoptimizeConfig.php:107
87
  msgid "CSS Options"
88
  msgstr "تنظیمات CSS"
89
 
90
- #: classes/autoptimizeConfig.php:110
91
  msgid "Optimize CSS Code?"
92
  msgstr "کدهای CSS بهینه سازی شوند؟"
93
 
94
- #: classes/autoptimizeConfig.php:114
95
- msgid "Look for styles on just &lt;head&gt;?"
96
- msgstr "فقط استایل های موجود در تگ &lt;head&gt; بهینه سازی شوند؟"
97
-
98
- #: classes/autoptimizeConfig.php:119
99
  msgid "Generate data: URIs for images?"
100
- msgstr "تولید data URIs برای تصاویر؟"
101
 
102
- #: classes/autoptimizeConfig.php:121
103
- msgid "Disabled by default. Enable this to include images on the CSS itself."
 
 
104
  msgstr ""
105
- "به صورت پیش فرض غیرفعال است. برای پیوست تصاویر به CSS از این گزینه استفاده "
106
- "کنید."
107
 
108
  #: classes/autoptimizeConfig.php:130
109
- msgid "CDN Options"
110
- msgstr "تنظیمات CDN"
111
-
112
- #: classes/autoptimizeConfig.php:133
113
- msgid "Rewrite JavaScript URLs?"
114
- msgstr "بازنویسی آدرس javascript?"
115
 
116
- #: classes/autoptimizeConfig.php:135 classes/autoptimizeConfig.php:145
117
- #: classes/autoptimizeConfig.php:155
118
  msgid ""
119
- "Disabled by default. Do not enable this unless you know what you are doing."
 
120
  msgstr ""
121
- "به صورت پیش فرض غیر فعال است. این گزینه را فعال نکنید مگر اینکه از کار خود "
122
- "آگاهی داشته باشید."
123
 
124
- #: classes/autoptimizeConfig.php:138
125
- msgid "JavaScript Base URL"
126
- msgstr "آدرس پایه javascipt"
127
 
128
- #: classes/autoptimizeConfig.php:140 classes/autoptimizeConfig.php:150
129
- #: classes/autoptimizeConfig.php:160
130
  msgid ""
131
- "This is the new base URL that will be used when rewriting. It should point "
132
- "to the blog root directory."
133
  msgstr ""
134
- "این آدرس پایه جدید است که زمان بازنویسی استفاده خواهد شد. این باید در ریشه "
135
- "دایرکتوری بلاگ قرار بگیرد."
136
 
137
- #: classes/autoptimizeConfig.php:143
138
- msgid "Rewrite CSS URLs?"
139
- msgstr "بازنویسی آدرس CSS?"
140
 
141
- #: classes/autoptimizeConfig.php:148
142
- msgid "CSS Base URL"
143
- msgstr "آدرس پایه CSS"
 
 
 
144
 
145
- #: classes/autoptimizeConfig.php:153
146
- msgid "Rewrite Image URLs?"
147
- msgstr "بازنویسی آدرس تصاویر؟"
148
 
149
- #: classes/autoptimizeConfig.php:158
150
- msgid "Image Base URL"
151
- msgstr "آدرس پایه تصاویر"
152
 
153
- #: classes/autoptimizeConfig.php:164
 
 
 
 
 
154
  msgid "Cache Info"
155
  msgstr "اطلاعات کش"
156
 
157
- #: classes/autoptimizeConfig.php:167
158
  msgid "Cache folder"
159
  msgstr "فولدر کش"
160
 
161
- #: classes/autoptimizeConfig.php:171
162
  msgid "Can we write?"
163
- msgstr "قادر به نوشتن (write) هستیم؟"
164
 
165
- #: classes/autoptimizeConfig.php:172
166
  msgid "Yes"
167
  msgstr "بله"
168
 
169
- #: classes/autoptimizeConfig.php:172
170
  msgid "No"
171
  msgstr "خیر"
172
 
173
- #: classes/autoptimizeConfig.php:175
174
  msgid "Cached styles and scripts"
175
- msgstr "برای استایل ها و اسکریپت ها از کش استفاده شود"
176
 
177
- #: classes/autoptimizeConfig.php:179
178
- msgid "Do not compress cache files"
179
- msgstr "فایل های کش را فشرده سازی نکن"
180
 
181
- #: classes/autoptimizeConfig.php:181
182
- msgid ""
183
- "Disabled by default. Enable this if you want to compress the served files "
184
- "using your webserver."
185
  msgstr ""
186
- "به صورت پیش فرض غیر فعال است. اگر مایل هستید فایل های ارائه شده توسط وب سرور "
187
- "شما فشرده سازی شوند از این گزینه استفاده کنید."
188
 
189
- #: classes/autoptimizeConfig.php:188
190
  msgid "Save Changes"
191
- msgstr "ذخیره تنظیمات"
192
 
193
- #: classes/autoptimizeConfig.php:189
194
  msgid "Save Changes and Empty Cache"
195
- msgstr "ذخیره تنظیمات و تخلیه کش"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
 
197
- #: classes/autoptimizeConfig.php:199
 
 
 
 
198
  msgid "Autoptimize Options"
199
  msgstr "تنظیمات Autoptimize"
200
 
201
- #: classes/autoptimizeConfig.php:236 classes/autoptimizeConfig.php:243
202
  msgid "Settings"
203
  msgstr "تنظیمات"
204
 
205
- #. Description of an extension
 
 
 
 
206
  msgid ""
207
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
208
  "compressing it."
209
- msgstr "بهینه سازی وبسایت، الحاق کدهای Javascript و CSS و فشرده سازی."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
 
 
 
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+00:00\n"
8
+ "PO-Revision-Date: 2013-10-21 21:19+0330\n"
9
+ "Last-Translator: Hamed.T <ham3d.t@gmail.com>\n"
10
+ "Language-Team: http://basics.ir/ <ham3d.t@gmail.com>\n"
11
+ "Language: Persian\n"
12
  "MIME-Version: 1.0\n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Poedit 1.5.7\n"
 
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
 
18
+ #: autoptimize.php:66
19
+ msgid ""
20
+ "Thank you for installing and activating Autoptimize. Please configure it "
21
+ "under \"Settings\" -> \"Autoptimize\" to start improving your site's "
22
+ "performance."
23
+ msgstr ""
24
+ "از اینکه Autoptimize را نصب و فعال کردید متشکریم. لطفاً تنظیمات خود را در "
25
+ "مسیر \"تنظیمات > Autoptimize\" انجام دهید تا کارایی و سرعت سایت شما افزایش "
26
+ "یابد."
27
+
28
+ #: autoptimize.php:72
29
+ msgid ""
30
+ "Autoptimize has just been updated. Please <strong>test your site now</"
31
+ "strong> and adapt Autoptimize config if needed."
32
+ msgstr ""
33
+ "Autoptimize به روز رسانی شد. لطفاً <strong/>اکنون سایت خود را امتحان "
34
+ "کنید<strong> و اگر لازم بود تنظیمات Autoptimize را تغییر دهید."
35
+
36
+ #: classes/autoptimizeConfig.php:56
37
  msgid "Autoptimize Settings"
38
  msgstr "تنظیمات Autoptimize"
39
 
40
+ #: classes/autoptimizeConfig.php:62 classes/autoptimizeConfig.php:68
41
+ msgid "Show advanced settings"
42
+ msgstr "نمایش تنظیمات پیشرفته"
43
+
44
+ #: classes/autoptimizeConfig.php:63 classes/autoptimizeConfig.php:69
45
+ msgid "Hide advanced settings"
46
+ msgstr "پنهان نمودن تنظیمات پیشرفته"
47
+
48
+ #: classes/autoptimizeConfig.php:77
49
  msgid "HTML Options"
50
+ msgstr "تنظیمات HTML"
51
 
52
+ #: classes/autoptimizeConfig.php:80
53
  msgid "Optimize HTML Code?"
54
+ msgstr "کدهای HTML بهینه سازی شوند؟"
55
 
56
+ #: classes/autoptimizeConfig.php:84
57
  msgid "Keep HTML comments?"
58
+ msgstr "کامنت های HTML باقی بمانند؟"
59
 
60
+ #: classes/autoptimizeConfig.php:86
61
  msgid ""
62
+ "Enable this if you want HTML comments to remain in the page, needed for e.g. "
63
+ "AdSense to function properly."
64
  msgstr ""
65
+ "اگر مایل هستید تا کامنت های HTML در صفحه باقی بماند این گزینه را فعال کنید."
 
66
 
67
+ #: classes/autoptimizeConfig.php:90
68
  msgid "JavaScript Options"
69
+ msgstr "تنظیمات جاوا اسکریپت"
70
 
71
+ #: classes/autoptimizeConfig.php:93
72
  msgid "Optimize JavaScript Code?"
73
+ msgstr "کدهای جاوا اسکریپت بهینه سازی شوند؟"
74
 
75
+ #: classes/autoptimizeConfig.php:97
76
+ msgid "Force JavaScript in &lt;head&gt;?"
77
+ msgstr "فایل جاوا اسکریپت در قسمت &lt;head&gt; باقی بماند؟"
78
+
79
+ #: classes/autoptimizeConfig.php:99
80
+ msgid ""
81
+ "For performance reasons it is better to include JavaScript at the bottom of "
82
+ "HTML, but this sometimes breaks things. Especially useful for jQuery-based "
83
+ "themes."
84
+ msgstr ""
85
+ "برای کارایی بیشتر بهتر است تا فایل جاوا اسکریپت در انتهای صفحه قرار بگیرد، "
86
+ "اما این ممکن است باعث تداخل در کارایی پوسته هایی شود که تابع Jquery هستند."
87
+
88
+ #: classes/autoptimizeConfig.php:102
89
  msgid "Look for scripts only in &lt;head&gt;?"
90
+ msgstr "فقط اسکریپت هایی که در قسمت &lt;head&gt; بهینه سازی شوند؟"
91
 
92
+ #: classes/autoptimizeConfig.php:104
93
  msgid ""
94
+ "Mostly usefull in combination with previous option when using jQuery-based "
95
+ "templates, but might help keeping cache size under control."
96
  msgstr ""
97
+ "کارایی بیشتر این گزینه زمانی است که همراه با گزینه قبلی در پوسته های تابع "
98
+ "Jquery استفاده شود، همچنین باعث می شود اندازه فایل کش شده را تحت کنترل داشته "
99
+ "باشید."
100
 
101
+ #: classes/autoptimizeConfig.php:107
102
+ msgid "Exclude scripts from autoptimize:"
103
+ msgstr "جلوگیری از بهینه سازی اسکریپت ها:"
104
 
105
+ #: classes/autoptimizeConfig.php:109
106
  msgid ""
107
+ "A comma-seperated list of scripts you want to exclude from being "
108
+ "Autoptimized, for example 'whatever.js, another.js' (without the quotes) to "
109
+ "exclude those scripts from being aggregated and minimized by Autoptimize."
110
  msgstr ""
111
+ "برای جلوگیری از بهینه سازی اسکریپت ها لیستی از اسکریپت ها را با استفاده از "
112
+ "کاما از هم جدا کنید و در فیلد زیر وارد کنید. مانند: whatever.js, another.js"
113
 
114
+ #: classes/autoptimizeConfig.php:112
115
+ msgid "Add try-catch wrapping?"
116
+ msgstr "سعی در درک کردن بسته بندی؟"
117
 
118
+ #: classes/autoptimizeConfig.php:114
119
  msgid ""
120
+ "If your scripts break because of an script error, you might want to try this."
121
  msgstr ""
122
+ "اگر اسکریپت های شما به دلیل خطای یک اسکریپت درست نمایش داده نشوند، شاید مایل "
123
+ "باشید از این گزینه استفاده کنید."
124
 
125
+ #: classes/autoptimizeConfig.php:118
126
  msgid "CSS Options"
127
  msgstr "تنظیمات CSS"
128
 
129
+ #: classes/autoptimizeConfig.php:121
130
  msgid "Optimize CSS Code?"
131
  msgstr "کدهای CSS بهینه سازی شوند؟"
132
 
133
+ #: classes/autoptimizeConfig.php:125
 
 
 
 
134
  msgid "Generate data: URIs for images?"
135
+ msgstr "تولید داده: URI برای تصاویر"
136
 
137
+ #: classes/autoptimizeConfig.php:127
138
+ msgid ""
139
+ "Enable this to include small background-images in the CSS itself instead of "
140
+ "as seperate downloads."
141
  msgstr ""
142
+ "با فعال کردن این گزینه تصاویر کوچک پس زمینه ی موجود در CSS به جای اینکه "
143
+ "جداگانه بارگذاری شود توسط data URI همراه با فایل CSS بارگذاری می شوند."
144
 
145
  #: classes/autoptimizeConfig.php:130
146
+ msgid "Defer CSS loading?"
147
+ msgstr "به تاخیر انداختن بارگذاری CSS?"
 
 
 
 
148
 
149
+ #: classes/autoptimizeConfig.php:132
 
150
  msgid ""
151
+ "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for "
152
+ "mobile performance reasons having it deferred can be better."
153
  msgstr ""
154
+ "در حالت عادی CSS در قسمت &lt;head&gt; بارگذاری می شود، اما برای افزایش "
155
+ "کارایی در گوشی های همراه بهتر است که با تاخیر بارگذاری شوند."
156
 
157
+ #: classes/autoptimizeConfig.php:135
158
+ msgid "Look for styles only in &lt;head&gt;?"
159
+ msgstr "فقط استایل هایی که در قسمت &lt;head&gt; هستند بهینه سازی شوند؟"
160
 
161
+ #: classes/autoptimizeConfig.php:137
 
162
  msgid ""
163
+ "Don't autoptimize CSS outside the head-section. If the cache gets big, you "
164
+ "might want to enable this."
165
  msgstr ""
166
+ "استایل هایی که خارج از قسمت head هستند بهینه سازی نمی شوند. اگر حجم کش زیاد "
167
+ "باشد شاید مایل باشید تا از این گزینه استفاده کنید."
168
 
169
+ #: classes/autoptimizeConfig.php:140
170
+ msgid "Exclude CSS from autoptimize:"
171
+ msgstr "جلوگیری از بهینه سازی CSS ها:"
172
 
173
+ #: classes/autoptimizeConfig.php:142
174
+ msgid ""
175
+ "A comma-seperated list of CSS you want to exclude from being Autoptimized."
176
+ msgstr ""
177
+ "با استفاده از کاما لیست فایل های CSS ایی که می خواهید از بهینه سازی آن ها "
178
+ "جلوگیری شود در فیلد زیر وارد کنید."
179
 
180
+ #: classes/autoptimizeConfig.php:146
181
+ msgid "CDN Options"
182
+ msgstr "تنظیمات CDN"
183
 
184
+ #: classes/autoptimizeConfig.php:149
185
+ msgid "CDN Base URL"
186
+ msgstr "آدرس پایه CDN"
187
 
188
+ #: classes/autoptimizeConfig.php:151
189
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
190
+ msgstr ""
191
+ "اگر می خواهید CDN فعال شود آدرس CDN ریشه دایرکتوری بلاگ خود را وارد کنید."
192
+
193
+ #: classes/autoptimizeConfig.php:155
194
  msgid "Cache Info"
195
  msgstr "اطلاعات کش"
196
 
197
+ #: classes/autoptimizeConfig.php:158
198
  msgid "Cache folder"
199
  msgstr "فولدر کش"
200
 
201
+ #: classes/autoptimizeConfig.php:162
202
  msgid "Can we write?"
203
+ msgstr "حق نوشتن (write) داریم؟"
204
 
205
+ #: classes/autoptimizeConfig.php:163
206
  msgid "Yes"
207
  msgstr "بله"
208
 
209
+ #: classes/autoptimizeConfig.php:163
210
  msgid "No"
211
  msgstr "خیر"
212
 
213
+ #: classes/autoptimizeConfig.php:166
214
  msgid "Cached styles and scripts"
215
+ msgstr "استایل ها و اسکریپت های کش شده"
216
 
217
+ #: classes/autoptimizeConfig.php:170
218
+ msgid "Save aggregated script/css as static files?"
219
+ msgstr "جمع و ذخیره اسکریپت/CSS در یک فایل ثابت(static)؟"
220
 
221
+ #: classes/autoptimizeConfig.php:172
222
+ msgid "Enable this if your webserver can handle the compression and expiry."
 
 
223
  msgstr ""
224
+ "اگر وب سرور شما می تواند فشرده سازی و کش فایل ها را انجام دهد این گزینه را "
225
+ "فعال کنید."
226
 
227
+ #: classes/autoptimizeConfig.php:178
228
  msgid "Save Changes"
229
+ msgstr "ذخیره تغییرات"
230
 
231
+ #: classes/autoptimizeConfig.php:179
232
  msgid "Save Changes and Empty Cache"
233
+ msgstr "ذخیره تغییرات و تخلیه کش"
234
+
235
+ #: classes/autoptimizeConfig.php:185
236
+ msgid "Do not donate for this plugin!"
237
+ msgstr "به این افزونه کمک مالی نکنید!"
238
+
239
+ #: classes/autoptimizeConfig.php:188
240
+ msgid "futtta about"
241
+ msgstr "درباره ی futtta"
242
+
243
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
244
+ #. Plugin Name of the plugin/theme
245
+ #: classes/autoptimizeConfig.php:190
246
+ msgid "Autoptimize"
247
+ msgstr "Autoptimize"
248
+
249
+ #: classes/autoptimizeConfig.php:191
250
+ msgid "WordPress"
251
+ msgstr "وردپرس"
252
 
253
+ #: classes/autoptimizeConfig.php:192
254
+ msgid "Web Technology"
255
+ msgstr "تکنولوژی وب"
256
+
257
+ #: classes/autoptimizeConfig.php:245
258
  msgid "Autoptimize Options"
259
  msgstr "تنظیمات Autoptimize"
260
 
261
+ #: classes/autoptimizeConfig.php:291 classes/autoptimizeConfig.php:298
262
  msgid "Settings"
263
  msgstr "تنظیمات"
264
 
265
+ #. Plugin URI of the plugin/theme
266
+ msgid "http://blog.futtta.be/autoptimize"
267
+ msgstr "http://blog.futtta.be/autoptimize"
268
+
269
+ #. Description of the plugin/theme
270
  msgid ""
271
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
272
  "compressing it."
273
+ msgstr ""
274
+ "با یکی کردن فایل های CSS و جاوا اسکریپت و فشرده سازی آن ها وب سایت شما را "
275
+ "بهینه سازی می کند."
276
+
277
+ #. Author of the plugin/theme
278
+ msgid "Frank Goossens (futtta)"
279
+ msgstr "Frank Goossens (futtta)"
280
+
281
+ #. Author URI of the plugin/theme
282
+ msgid "http://blog.futtta.be/"
283
+ msgstr "http://blog.futtta.be/"
284
+
285
+ #~ msgid "Do not compress cache files"
286
+ #~ msgstr "فایل های کش را فشرده سازی نکن"
287
+
288
+ #~ msgid ""
289
+ #~ "Enable this if you want to compress the served files using your webserver."
290
+ #~ msgstr ""
291
+ #~ "اگر مایل هستید فایل های ارائه شده توسط وب سرور شما فشرده سازی شوند از این "
292
+ #~ "گزینه استفاده کنید."
localization/autoptimize-fr_FR.mo CHANGED
Binary file
localization/autoptimize-fr_FR.po CHANGED
@@ -1,201 +1,289 @@
1
- # French translation for autoptimize
2
- # Copyright (c) 2009 Rosetta Contributors and Canonical Ltd 2009
3
- # This file is distributed under the same license as the autoptimize package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, 2009.
5
- #
6
  msgid ""
7
  msgstr ""
8
- "Project-Id-Version: autoptimize\n"
9
- "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10
- "POT-Creation-Date: 2009-10-19 21:41+0000\n"
11
- "PO-Revision-Date: 2009-07-25 18:25+0000\n"
12
- "Last-Translator: Emilio <Unknown>\n"
13
- "Language-Team: French <fr@li.org>\n"
 
 
14
  "MIME-Version: 1.0\n"
15
  "Content-Type: text/plain; charset=UTF-8\n"
16
  "Content-Transfer-Encoding: 8bit\n"
17
- "X-Launchpad-Export-Date: 2009-10-25 02:04+0000\n"
18
- "X-Generator: Launchpad (build Unknown)\n"
19
 
20
- #: classes/autoptimizeConfig.php:50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  msgid "Autoptimize Settings"
22
  msgstr "Configuration d'Autoptimize"
23
 
24
- #: classes/autoptimizeConfig.php:71
 
 
 
 
 
 
 
 
25
  msgid "HTML Options"
26
  msgstr "Options HTML"
27
 
28
- #: classes/autoptimizeConfig.php:74
29
  msgid "Optimize HTML Code?"
30
- msgstr "Optimiser le code HTML ?"
31
 
32
- #: classes/autoptimizeConfig.php:78
33
  msgid "Keep HTML comments?"
34
- msgstr "Conserver les commentaires HTML ?"
35
 
36
- #: classes/autoptimizeConfig.php:80
37
  msgid ""
38
- "Disabled by default. Enable this if you want HTML comments to remain in the "
39
- "page."
40
  msgstr ""
41
- "Désactivé par défaut. Activez cette option si vous voulez conserver les "
42
- "commentaires HTML dans la page."
43
 
44
- #: classes/autoptimizeConfig.php:84
45
  msgid "JavaScript Options"
46
- msgstr "Options Javascript"
47
 
48
- #: classes/autoptimizeConfig.php:87
49
  msgid "Optimize JavaScript Code?"
50
- msgstr "Optimiser le code Javascript ?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- #: classes/autoptimizeConfig.php:91
53
  msgid "Look for scripts only in &lt;head&gt;?"
54
  msgstr "Chercher les scripts uniquement dans l'en-tête ?"
55
 
56
- #: classes/autoptimizeConfig.php:93 classes/autoptimizeConfig.php:116
57
  msgid ""
58
- "Disabled by default. If the cache gets big, you might want to enable this."
 
59
  msgstr ""
60
- "Désactivé par défaut. Si le cache devient trop important, vous devriez "
61
- "activer ceci."
 
62
 
63
- #: classes/autoptimizeConfig.php:96
64
- msgid "Add try-catch wrapping?"
65
- msgstr ""
66
 
67
- #: classes/autoptimizeConfig.php:98
68
  msgid ""
69
- "Disabled by default. If your scripts break because of an script error, you "
70
- "might want to try this."
 
71
  msgstr ""
72
- "Désactivé par défaut. Si vos scripts plantent à cause d'une erreur de "
73
- "script, vous devriez essayer ceci."
 
 
74
 
75
- #: classes/autoptimizeConfig.php:101 classes/autoptimizeConfig.php:124
76
- msgid "Use YUI compression?"
77
- msgstr ""
78
 
79
- #: classes/autoptimizeConfig.php:103 classes/autoptimizeConfig.php:126
80
  msgid ""
81
- "Disabled by default. Read [autoptimize]/yui/README.txt for more information."
82
  msgstr ""
 
 
83
 
84
- #: classes/autoptimizeConfig.php:107
85
  msgid "CSS Options"
86
  msgstr "Options CSS"
87
 
88
- #: classes/autoptimizeConfig.php:110
89
  msgid "Optimize CSS Code?"
90
- msgstr "Optimiser le code CSS ?"
91
 
92
- #: classes/autoptimizeConfig.php:114
93
- msgid "Look for styles on just &lt;head&gt;?"
94
- msgstr "Chercher les styles uniquement dans l'en-tête ?"
95
-
96
- #: classes/autoptimizeConfig.php:119
97
  msgid "Generate data: URIs for images?"
98
- msgstr ""
99
 
100
- #: classes/autoptimizeConfig.php:121
101
- msgid "Disabled by default. Enable this to include images on the CSS itself."
 
 
102
  msgstr ""
 
 
103
 
104
  #: classes/autoptimizeConfig.php:130
105
- msgid "CDN Options"
106
- msgstr ""
107
 
108
- #: classes/autoptimizeConfig.php:133
109
- msgid "Rewrite JavaScript URLs?"
110
- msgstr ""
111
-
112
- #: classes/autoptimizeConfig.php:135 classes/autoptimizeConfig.php:145
113
- #: classes/autoptimizeConfig.php:155
114
  msgid ""
115
- "Disabled by default. Do not enable this unless you know what you are doing."
 
116
  msgstr ""
 
 
 
117
 
118
- #: classes/autoptimizeConfig.php:138
119
- msgid "JavaScript Base URL"
120
- msgstr ""
121
 
122
- #: classes/autoptimizeConfig.php:140 classes/autoptimizeConfig.php:150
123
- #: classes/autoptimizeConfig.php:160
124
  msgid ""
125
- "This is the new base URL that will be used when rewriting. It should point "
126
- "to the blog root directory."
127
  msgstr ""
 
 
128
 
129
- #: classes/autoptimizeConfig.php:143
130
- msgid "Rewrite CSS URLs?"
131
- msgstr ""
132
 
133
- #: classes/autoptimizeConfig.php:148
134
- msgid "CSS Base URL"
 
135
  msgstr ""
 
 
136
 
137
- #: classes/autoptimizeConfig.php:153
138
- msgid "Rewrite Image URLs?"
139
- msgstr ""
140
 
141
- #: classes/autoptimizeConfig.php:158
142
- msgid "Image Base URL"
 
 
 
 
143
  msgstr ""
 
 
144
 
145
- #: classes/autoptimizeConfig.php:164
146
  msgid "Cache Info"
147
  msgstr "Informations du cache"
148
 
149
- #: classes/autoptimizeConfig.php:167
150
  msgid "Cache folder"
151
- msgstr "Dossier du cache"
152
 
153
- #: classes/autoptimizeConfig.php:171
154
  msgid "Can we write?"
155
- msgstr ""
156
 
157
- #: classes/autoptimizeConfig.php:172
158
  msgid "Yes"
159
  msgstr "Oui"
160
 
161
- #: classes/autoptimizeConfig.php:172
162
  msgid "No"
163
  msgstr "Non"
164
 
165
- #: classes/autoptimizeConfig.php:175
166
  msgid "Cached styles and scripts"
167
  msgstr "Styles et scripts en cache"
168
 
169
- #: classes/autoptimizeConfig.php:179
170
- msgid "Do not compress cache files"
171
- msgstr ""
172
 
173
- #: classes/autoptimizeConfig.php:181
174
- msgid ""
175
- "Disabled by default. Enable this if you want to compress the served files "
176
- "using your webserver."
177
  msgstr ""
 
 
178
 
179
- #: classes/autoptimizeConfig.php:188
180
  msgid "Save Changes"
181
  msgstr "Enregistrer les modifications"
182
 
183
- #: classes/autoptimizeConfig.php:189
184
  msgid "Save Changes and Empty Cache"
185
- msgstr ""
186
 
187
- #: classes/autoptimizeConfig.php:199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  msgid "Autoptimize Options"
189
- msgstr "Options d'Autoptimize"
190
 
191
- #: classes/autoptimizeConfig.php:236 classes/autoptimizeConfig.php:243
192
  msgid "Settings"
193
  msgstr "Paramètres"
194
 
195
- #. Description of an extension
 
 
 
 
196
  msgid ""
197
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
198
  "compressing it."
199
  msgstr ""
200
- "Optimise votre site web en concaténant le code CSS et Javascript et en le "
201
  "compressant."
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
 
 
 
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+00:00\n"
8
+ "PO-Revision-Date: 2013-10-21 10:54+0100\n"
9
+ "Last-Translator: Nico - WordPress Hébergement <contact@wordpress-hebergement."
10
+ "fr>\n"
11
+ "Language-Team: WordPress Hébergement <contact@wordpress-hebergement.fr>\n"
12
+ "Language: FR\n"
13
  "MIME-Version: 1.0\n"
14
  "Content-Type: text/plain; charset=UTF-8\n"
15
  "Content-Transfer-Encoding: 8bit\n"
16
+ "X-Generator: Poedit 1.5.7\n"
 
17
 
18
+ #: autoptimize.php:66
19
+ msgid ""
20
+ "Thank you for installing and activating Autoptimize. Please configure it "
21
+ "under \"Settings\" -> \"Autoptimize\" to start improving your site's "
22
+ "performance."
23
+ msgstr ""
24
+ "Merci d'avoir installé et activé Autoptimize. Vous pouvez maintenant le "
25
+ "paramétrer via \"Réglages\" -> \"Autoptimize\" et commencer à améliorer les "
26
+ "performances de votre site"
27
+
28
+ #: autoptimize.php:72
29
+ msgid ""
30
+ "Autoptimize has just been updated. Please <strong>test your site now</"
31
+ "strong> and adapt Autoptimize config if needed."
32
+ msgstr ""
33
+ "Autoptimize vient d'être mis à jour. Vous pouvez maintenant <trong>tester "
34
+ "votre site</strong> et adapter si besoin les paramètres d'Autoptimize."
35
+
36
+ #: classes/autoptimizeConfig.php:56
37
  msgid "Autoptimize Settings"
38
  msgstr "Configuration d'Autoptimize"
39
 
40
+ #: classes/autoptimizeConfig.php:62 classes/autoptimizeConfig.php:68
41
+ msgid "Show advanced settings"
42
+ msgstr "Afficher les paramètres avancés"
43
+
44
+ #: classes/autoptimizeConfig.php:63 classes/autoptimizeConfig.php:69
45
+ msgid "Hide advanced settings"
46
+ msgstr "Cacher les paramètres avancés"
47
+
48
+ #: classes/autoptimizeConfig.php:77
49
  msgid "HTML Options"
50
  msgstr "Options HTML"
51
 
52
+ #: classes/autoptimizeConfig.php:80
53
  msgid "Optimize HTML Code?"
54
+ msgstr "Optimiser le code HTML"
55
 
56
+ #: classes/autoptimizeConfig.php:84
57
  msgid "Keep HTML comments?"
58
+ msgstr "Préserver les commentaires HTML"
59
 
60
+ #: classes/autoptimizeConfig.php:86
61
  msgid ""
62
+ "Enable this if you want HTML comments to remain in the page, needed for e.g. "
63
+ "AdSense to function properly."
64
  msgstr ""
65
+ "Sélectionnez cette option si vous souhaitez que vos commentaires HTML "
66
+ "restent dans la page (nécessaire par exemple pour qu'Adsense fonctionne)"
67
 
68
+ #: classes/autoptimizeConfig.php:90
69
  msgid "JavaScript Options"
70
+ msgstr "Options JavaScript"
71
 
72
+ #: classes/autoptimizeConfig.php:93
73
  msgid "Optimize JavaScript Code?"
74
+ msgstr "Optimiser le code JavaScript ?"
75
+
76
+ #: classes/autoptimizeConfig.php:97
77
+ msgid "Force JavaScript in &lt;head&gt;?"
78
+ msgstr "Forcer le JavaScript à charger dans l'en-tête de la page ?"
79
+
80
+ #: classes/autoptimizeConfig.php:99
81
+ msgid ""
82
+ "For performance reasons it is better to include JavaScript at the bottom of "
83
+ "HTML, but this sometimes breaks things. Especially useful for jQuery-based "
84
+ "themes."
85
+ msgstr ""
86
+ "Pour améliorer les performances, il est préférable d'inclure le JavaScript à "
87
+ "la fin du code HTML, mais cela peut parfois 'casser' certaines pages "
88
+ "(notamment pour les thèmes à base de jQuery)."
89
 
90
+ #: classes/autoptimizeConfig.php:102
91
  msgid "Look for scripts only in &lt;head&gt;?"
92
  msgstr "Chercher les scripts uniquement dans l'en-tête ?"
93
 
94
+ #: classes/autoptimizeConfig.php:104
95
  msgid ""
96
+ "Mostly usefull in combination with previous option when using jQuery-based "
97
+ "templates, but might help keeping cache size under control."
98
  msgstr ""
99
+ "Surtout utile combiné aux précédentes options lorsque vous utilisez des "
100
+ "templates à base de jQuery, mais peut aussi permettre de diminuer la taille "
101
+ "du cache."
102
 
103
+ #: classes/autoptimizeConfig.php:107
104
+ msgid "Exclude scripts from autoptimize:"
105
+ msgstr "Scripts à exclure d'Autoptimize"
106
 
107
+ #: classes/autoptimizeConfig.php:109
108
  msgid ""
109
+ "A comma-seperated list of scripts you want to exclude from being "
110
+ "Autoptimized, for example 'whatever.js, another.js' (without the quotes) to "
111
+ "exclude those scripts from being aggregated and minimized by Autoptimize."
112
  msgstr ""
113
+ "Liste des scripts - séparés par des virgules - que vous ne souhaitez pas "
114
+ "Autoptimiser. Par exemple: 'monscript.js, monautrescript.js' (sans les "
115
+ "gullemets) pour exclure ces scripts de l'aggrégation et la compression "
116
+ "réalisée par Autoptimize."
117
 
118
+ #: classes/autoptimizeConfig.php:112
119
+ msgid "Add try-catch wrapping?"
120
+ msgstr "Ajouter une gestion des erreurs (trycatch) ?"
121
 
122
+ #: classes/autoptimizeConfig.php:114
123
  msgid ""
124
+ "If your scripts break because of an script error, you might want to try this."
125
  msgstr ""
126
+ "Si votre script est 'cassé' par des erreurs, vous pouvez essayer cette "
127
+ "option."
128
 
129
+ #: classes/autoptimizeConfig.php:118
130
  msgid "CSS Options"
131
  msgstr "Options CSS"
132
 
133
+ #: classes/autoptimizeConfig.php:121
134
  msgid "Optimize CSS Code?"
135
+ msgstr "Optimiser le code CSS"
136
 
137
+ #: classes/autoptimizeConfig.php:125
 
 
 
 
138
  msgid "Generate data: URIs for images?"
139
+ msgstr "Génération de données: URI pour les images?"
140
 
141
+ #: classes/autoptimizeConfig.php:127
142
+ msgid ""
143
+ "Enable this to include small background-images in the CSS itself instead of "
144
+ "as seperate downloads."
145
  msgstr ""
146
+ "Sélectionnez cette option pour inclure les petites images de fond dans le "
147
+ "CSS lui-même au lieu d'un chargement séparé."
148
 
149
  #: classes/autoptimizeConfig.php:130
150
+ msgid "Defer CSS loading?"
151
+ msgstr "Reporter le chargement des CSS"
152
 
153
+ #: classes/autoptimizeConfig.php:132
 
 
 
 
 
154
  msgid ""
155
+ "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for "
156
+ "mobile performance reasons having it deferred can be better."
157
  msgstr ""
158
+ "Normalement, les CSS sont chargés dans l'en-tête du code HTML, mais pour "
159
+ "améliorer les performances de lecture par un terminal mobile, il peut être "
160
+ "préférable de reporter ce chargement."
161
 
162
+ #: classes/autoptimizeConfig.php:135
163
+ msgid "Look for styles only in &lt;head&gt;?"
164
+ msgstr "Ne rechercher les styles que dans l'en-tête ?"
165
 
166
+ #: classes/autoptimizeConfig.php:137
 
167
  msgid ""
168
+ "Don't autoptimize CSS outside the head-section. If the cache gets big, you "
169
+ "might want to enable this."
170
  msgstr ""
171
+ "N'optimise pas les CSS situés en dehors de l'en-tête. Si votre cache devient "
172
+ "trop important, vous pouvez utliser cette option."
173
 
174
+ #: classes/autoptimizeConfig.php:140
175
+ msgid "Exclude CSS from autoptimize:"
176
+ msgstr "Exclure ces CSS d'Autoptimise."
177
 
178
+ #: classes/autoptimizeConfig.php:142
179
+ msgid ""
180
+ "A comma-seperated list of CSS you want to exclude from being Autoptimized."
181
  msgstr ""
182
+ "Liste des fichiers CSS - spérarés par des virgules - que vous souhaitez "
183
+ "exclure de l'Autoptimisation."
184
 
185
+ #: classes/autoptimizeConfig.php:146
186
+ msgid "CDN Options"
187
+ msgstr "Options CDN"
188
 
189
+ #: classes/autoptimizeConfig.php:149
190
+ msgid "CDN Base URL"
191
+ msgstr "Base URL du CDN"
192
+
193
+ #: classes/autoptimizeConfig.php:151
194
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
195
  msgstr ""
196
+ "Saisissez l'URL du répertoire racine de votre site si vous souhaitez "
197
+ "utiliser un CDN."
198
 
199
+ #: classes/autoptimizeConfig.php:155
200
  msgid "Cache Info"
201
  msgstr "Informations du cache"
202
 
203
+ #: classes/autoptimizeConfig.php:158
204
  msgid "Cache folder"
205
+ msgstr "Répertoire du cache"
206
 
207
+ #: classes/autoptimizeConfig.php:162
208
  msgid "Can we write?"
209
+ msgstr "Droits d'écriture ?"
210
 
211
+ #: classes/autoptimizeConfig.php:163
212
  msgid "Yes"
213
  msgstr "Oui"
214
 
215
+ #: classes/autoptimizeConfig.php:163
216
  msgid "No"
217
  msgstr "Non"
218
 
219
+ #: classes/autoptimizeConfig.php:166
220
  msgid "Cached styles and scripts"
221
  msgstr "Styles et scripts en cache"
222
 
223
+ #: classes/autoptimizeConfig.php:170
224
+ msgid "Save aggregated script/css as static files?"
225
+ msgstr "Enregistrer les scripts/css en tant que fichiers statiques ?"
226
 
227
+ #: classes/autoptimizeConfig.php:172
228
+ msgid "Enable this if your webserver can handle the compression and expiry."
 
 
229
  msgstr ""
230
+ "Sélectionnez cette option si votre serveur peut gérer la compression et "
231
+ "l'expiration des fichiers."
232
 
233
+ #: classes/autoptimizeConfig.php:178
234
  msgid "Save Changes"
235
  msgstr "Enregistrer les modifications"
236
 
237
+ #: classes/autoptimizeConfig.php:179
238
  msgid "Save Changes and Empty Cache"
239
+ msgstr "Enregistrer les modifications et vider le cache"
240
 
241
+ #: classes/autoptimizeConfig.php:185
242
+ msgid "Do not donate for this plugin!"
243
+ msgstr "Ne faites pas de don pas pour ce plugin!"
244
+
245
+ #: classes/autoptimizeConfig.php:188
246
+ msgid "futtta about"
247
+ msgstr "futta à propos de"
248
+
249
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
250
+ #. Plugin Name of the plugin/theme
251
+ #: classes/autoptimizeConfig.php:190
252
+ msgid "Autoptimize"
253
+ msgstr "Autoptimize"
254
+
255
+ #: classes/autoptimizeConfig.php:191
256
+ msgid "WordPress"
257
+ msgstr "WordPress"
258
+
259
+ #: classes/autoptimizeConfig.php:192
260
+ msgid "Web Technology"
261
+ msgstr "La technologie Web"
262
+
263
+ #: classes/autoptimizeConfig.php:245
264
  msgid "Autoptimize Options"
265
+ msgstr "Options Autoptimize "
266
 
267
+ #: classes/autoptimizeConfig.php:291 classes/autoptimizeConfig.php:298
268
  msgid "Settings"
269
  msgstr "Paramètres"
270
 
271
+ #. Plugin URI of the plugin/theme
272
+ msgid "http://blog.futtta.be/autoptimize"
273
+ msgstr "http://blog.futtta.be/autoptimize"
274
+
275
+ #. Description of the plugin/theme
276
  msgid ""
277
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
278
  "compressing it."
279
  msgstr ""
280
+ "Optimise votre site web en rassemblant les CSS et JavaScript et en les "
281
  "compressant."
282
+
283
+ #. Author of the plugin/theme
284
+ msgid "Frank Goossens (futtta)"
285
+ msgstr "Frank Goossens (futtta)"
286
+
287
+ #. Author URI of the plugin/theme
288
+ msgid "http://blog.futtta.be/"
289
+ msgstr "http://blog.futtta.be/"
localization/autoptimize-nl_BE.mo ADDED
Binary file
localization/autoptimize-nl_BE.po ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+00:00\n"
8
+ "PO-Revision-Date: 2013-10-21 12:33+0100\n"
9
+ "Last-Translator: frank goossens <futtta@gmail.com>\n"
10
+ "Language-Team: <futtta@gmail.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Poedit-Language: Dutch\n"
15
+ "X-Poedit-Country: BELGIUM\n"
16
+
17
+ #: autoptimize.php:66
18
+ msgid "Thank you for installing and activating Autoptimize. Please configure it under \"Settings\" -> \"Autoptimize\" to start improving your site's performance."
19
+ msgstr "Tof dat je Autoptimize geïnstalleerd hebt! Je kunt de plugin nu configureren onder \"Instellingen\" -> \"Autoptimize\"."
20
+
21
+ #: autoptimize.php:72
22
+ msgid "Autoptimize has just been updated. Please <strong>test your site now</strong> and adapt Autoptimize config if needed."
23
+ msgstr "Autoptimize is juist geüpdate, <strong>test je site nu</strong> en wijzig de Autoptimize instellingen indien nodig."
24
+
25
+ #: classes/autoptimizeConfig.php:56
26
+ msgid "Autoptimize Settings"
27
+ msgstr "Autoptimize Instellingen"
28
+
29
+ #: classes/autoptimizeConfig.php:62
30
+ #: classes/autoptimizeConfig.php:68
31
+ msgid "Show advanced settings"
32
+ msgstr "Toon geadvanceerde instellingen"
33
+
34
+ #: classes/autoptimizeConfig.php:63
35
+ #: classes/autoptimizeConfig.php:69
36
+ msgid "Hide advanced settings"
37
+ msgstr "Verberg geadvanceerde instellingen"
38
+
39
+ #: classes/autoptimizeConfig.php:77
40
+ msgid "HTML Options"
41
+ msgstr "HTML Opties"
42
+
43
+ #: classes/autoptimizeConfig.php:80
44
+ msgid "Optimize HTML Code?"
45
+ msgstr "Optimaliseer HTML Code?"
46
+
47
+ #: classes/autoptimizeConfig.php:84
48
+ msgid "Keep HTML comments?"
49
+ msgstr "HTML commentaar bewaren?"
50
+
51
+ #: classes/autoptimizeConfig.php:86
52
+ msgid "Enable this if you want HTML comments to remain in the page, needed for e.g. AdSense to function properly."
53
+ msgstr "Activeer deze optie om commentaar-blokken in de HTML te behouden, nodig voor onder andere bepaalde AdSense configuraties."
54
+
55
+ #: classes/autoptimizeConfig.php:90
56
+ msgid "JavaScript Options"
57
+ msgstr "JavaScript Opties"
58
+
59
+ #: classes/autoptimizeConfig.php:93
60
+ msgid "Optimize JavaScript Code?"
61
+ msgstr "Optimaliseer JavaScript Code?"
62
+
63
+ #: classes/autoptimizeConfig.php:97
64
+ msgid "Force JavaScript in &lt;head&gt;?"
65
+ msgstr "Duw JavaScript in &lt;head&gt;?"
66
+
67
+ #: classes/autoptimizeConfig.php:99
68
+ msgid "For performance reasons it is better to include JavaScript at the bottom of HTML, but this sometimes breaks things. Especially useful for jQuery-based themes."
69
+ msgstr "Voor rauwe performantie is het beter om JavaScript pas op het einde van de HTML binnen te halen, maar dit zorgt soms voor problemen, vooral bij jQuery-gebaseerde sites."
70
+
71
+ #: classes/autoptimizeConfig.php:102
72
+ msgid "Look for scripts only in &lt;head&gt;?"
73
+ msgstr "Haal javascript enkel uit &lt;head&gt;?"
74
+
75
+ #: classes/autoptimizeConfig.php:104
76
+ msgid "Mostly usefull in combination with previous option when using jQuery-based templates, but might help keeping cache size under control."
77
+ msgstr "Vooral nuttig in combinatie met de vorige optie voor jQuery-gebaseerde sites, maar kan ook helpen om de cache-size onder controle te houden."
78
+
79
+ #: classes/autoptimizeConfig.php:107
80
+ msgid "Exclude scripts from autoptimize:"
81
+ msgstr "Sluit deze scripts uit van optimalisering:"
82
+
83
+ #: classes/autoptimizeConfig.php:109
84
+ msgid "A comma-seperated list of scripts you want to exclude from being Autoptimized, for example 'whatever.js, another.js' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize."
85
+ msgstr "Lijst van scripts die je wilt uitsluiten van optimalisatie, gescheiden door komma's. Voorbeeld; 'whatever.js, another.js' (zonder de quotes)."
86
+
87
+ #: classes/autoptimizeConfig.php:112
88
+ msgid "Add try-catch wrapping?"
89
+ msgstr "Voeg try-catch toe rond javascript?"
90
+
91
+ #: classes/autoptimizeConfig.php:114
92
+ msgid "If your scripts break because of an script error, you might want to try this."
93
+ msgstr "Als je errors krijgt bij javascript-aggregatie, kun je dit proberen."
94
+
95
+ #: classes/autoptimizeConfig.php:118
96
+ msgid "CSS Options"
97
+ msgstr "CSS Opties"
98
+
99
+ #: classes/autoptimizeConfig.php:121
100
+ msgid "Optimize CSS Code?"
101
+ msgstr "Optimaliseer CSS Code?"
102
+
103
+ #: classes/autoptimizeConfig.php:125
104
+ msgid "Generate data: URIs for images?"
105
+ msgstr "Vervang image-links in CSS door data: URIs?"
106
+
107
+ #: classes/autoptimizeConfig.php:127
108
+ msgid "Enable this to include small background-images in the CSS itself instead of as seperate downloads."
109
+ msgstr "Acitveer deze optie om kleine background-images in de CSS te bewaren in plaats van aparte files."
110
+
111
+ #: classes/autoptimizeConfig.php:130
112
+ msgid "Defer CSS loading?"
113
+ msgstr "Stel inladen CSS uit tot na binnenhalen pagina?"
114
+
115
+ #: classes/autoptimizeConfig.php:132
116
+ msgid "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for mobile performance reasons having it deferred can be better."
117
+ msgstr "Normaal wordt CSS in de &lt;head&gt;-sectie van de HTML geladen, maar voor mobiele performantie kan het beter zijn om dat pas op het einde van de HTML te doen."
118
+
119
+ #: classes/autoptimizeConfig.php:135
120
+ msgid "Look for styles only in &lt;head&gt;?"
121
+ msgstr "Haal CSS enkel uit &lt;head&gt;?"
122
+
123
+ #: classes/autoptimizeConfig.php:137
124
+ msgid "Don't autoptimize CSS outside the head-section. If the cache gets big, you might want to enable this."
125
+ msgstr "De CSS buiten de &lt;head&gt; niet mee optimaliseren. Kan helpen om de cache-omvang te beperken."
126
+
127
+ #: classes/autoptimizeConfig.php:140
128
+ msgid "Exclude CSS from autoptimize:"
129
+ msgstr "Sluit deze CSS uit van optimalisering:"
130
+
131
+ #: classes/autoptimizeConfig.php:142
132
+ msgid "A comma-seperated list of CSS you want to exclude from being Autoptimized."
133
+ msgstr "Lijst van CSS die je wilt uitsluiten van optimalisatie, gescheiden door komma's. Voorbeeld; 'whatever.css, style.css' (zonder de quotes)."
134
+
135
+ #: classes/autoptimizeConfig.php:146
136
+ msgid "CDN Options"
137
+ msgstr "CDN Opties"
138
+
139
+ #: classes/autoptimizeConfig.php:149
140
+ msgid "CDN Base URL"
141
+ msgstr "Basis CDN URL"
142
+
143
+ #: classes/autoptimizeConfig.php:151
144
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
145
+ msgstr "Vul hier je CDN blog root directory URL in om CDN te activeren."
146
+
147
+ #: classes/autoptimizeConfig.php:155
148
+ msgid "Cache Info"
149
+ msgstr "Cache Info"
150
+
151
+ #: classes/autoptimizeConfig.php:158
152
+ msgid "Cache folder"
153
+ msgstr "Cache folder"
154
+
155
+ #: classes/autoptimizeConfig.php:162
156
+ msgid "Can we write?"
157
+ msgstr "Kunnen we schrijven naar die folder?"
158
+
159
+ #: classes/autoptimizeConfig.php:163
160
+ msgid "Yes"
161
+ msgstr "Ja"
162
+
163
+ #: classes/autoptimizeConfig.php:163
164
+ msgid "No"
165
+ msgstr "Nee"
166
+
167
+ #: classes/autoptimizeConfig.php:166
168
+ msgid "Cached styles and scripts"
169
+ msgstr "CSS en scripts in cache"
170
+
171
+ #: classes/autoptimizeConfig.php:170
172
+ msgid "Save aggregated script/css as static files?"
173
+ msgstr "Bewaar geoptimaliseerde CSS en JS als statische bestanden?"
174
+
175
+ #: classes/autoptimizeConfig.php:172
176
+ msgid "Enable this if your webserver can handle the compression and expiry."
177
+ msgstr "Activeer dit als je webserver compressie en cache-baarheid zelf kan afhandelen."
178
+
179
+ #: classes/autoptimizeConfig.php:178
180
+ msgid "Save Changes"
181
+ msgstr "Bewaar wijzigingen"
182
+
183
+ #: classes/autoptimizeConfig.php:179
184
+ msgid "Save Changes and Empty Cache"
185
+ msgstr "Bewaar en maak cache leeg."
186
+
187
+ #: classes/autoptimizeConfig.php:185
188
+ msgid "Do not donate for this plugin!"
189
+ msgstr "Geef geen geld voor deze plugin!"
190
+
191
+ #: classes/autoptimizeConfig.php:188
192
+ msgid "futtta about"
193
+ msgstr "futtta over"
194
+
195
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
196
+ #. Plugin Name of the plugin/theme
197
+ #: classes/autoptimizeConfig.php:190
198
+ msgid "Autoptimize"
199
+ msgstr "Autoptimize"
200
+
201
+ #: classes/autoptimizeConfig.php:191
202
+ msgid "WordPress"
203
+ msgstr "WordPress"
204
+
205
+ #: classes/autoptimizeConfig.php:192
206
+ msgid "Web Technology"
207
+ msgstr "Web Technologie"
208
+
209
+ #: classes/autoptimizeConfig.php:245
210
+ msgid "Autoptimize Options"
211
+ msgstr "Autoptimize Opties"
212
+
213
+ #: classes/autoptimizeConfig.php:291
214
+ #: classes/autoptimizeConfig.php:298
215
+ msgid "Settings"
216
+ msgstr "Instellingen"
217
+
218
+ #. Plugin URI of the plugin/theme
219
+ msgid "http://blog.futtta.be/autoptimize"
220
+ msgstr "http://blog.futtta.be/autoptimize"
221
+
222
+ #. Description of the plugin/theme
223
+ msgid "Optimizes your website, concatenating the CSS and JavaScript code, and compressing it."
224
+ msgstr "Optimaliseert je website door CSS en JavaScript te combineren en samen te drukken."
225
+
226
+ #. Author of the plugin/theme
227
+ msgid "Frank Goossens (futtta)"
228
+ msgstr "Frank Goossens (futtta)"
229
+
230
+ #. Author URI of the plugin/theme
231
+ msgid "http://blog.futtta.be/"
232
+ msgstr "http://blog.futtta.be/"
233
+
localization/autoptimize-nl_NL.mo ADDED
Binary file
localization/autoptimize-nl_NL.po ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+00:00\n"
8
+ "PO-Revision-Date: 2013-10-21 12:29+0100\n"
9
+ "Last-Translator: frank goossens <futtta@gmail.com>\n"
10
+ "Language-Team: <futtta@gmail.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "X-Poedit-Language: Dutch\n"
15
+ "X-Poedit-Country: NETHERLANDS\n"
16
+
17
+ #: autoptimize.php:66
18
+ msgid "Thank you for installing and activating Autoptimize. Please configure it under \"Settings\" -> \"Autoptimize\" to start improving your site's performance."
19
+ msgstr "Tof dat je Autoptimize geïnstalleerd hebt! Je kunt de plugin nu configureren onder \"Instellingen\" -> \"Autoptimize\"."
20
+
21
+ #: autoptimize.php:72
22
+ msgid "Autoptimize has just been updated. Please <strong>test your site now</strong> and adapt Autoptimize config if needed."
23
+ msgstr "Autoptimize is juist geüpdate, <strong>test je site nu</strong> en wijzig de Autoptimize instellingen indien nodig."
24
+
25
+ #: classes/autoptimizeConfig.php:56
26
+ msgid "Autoptimize Settings"
27
+ msgstr "Autoptimize Instellingen"
28
+
29
+ #: classes/autoptimizeConfig.php:62
30
+ #: classes/autoptimizeConfig.php:68
31
+ msgid "Show advanced settings"
32
+ msgstr "Toon geadvanceerde instellingen"
33
+
34
+ #: classes/autoptimizeConfig.php:63
35
+ #: classes/autoptimizeConfig.php:69
36
+ msgid "Hide advanced settings"
37
+ msgstr "Verberg geadvanceerde instellingen"
38
+
39
+ #: classes/autoptimizeConfig.php:77
40
+ msgid "HTML Options"
41
+ msgstr "HTML Opties"
42
+
43
+ #: classes/autoptimizeConfig.php:80
44
+ msgid "Optimize HTML Code?"
45
+ msgstr "Optimaliseer HTML Code?"
46
+
47
+ #: classes/autoptimizeConfig.php:84
48
+ msgid "Keep HTML comments?"
49
+ msgstr "HTML commentaar bewaren?"
50
+
51
+ #: classes/autoptimizeConfig.php:86
52
+ msgid "Enable this if you want HTML comments to remain in the page, needed for e.g. AdSense to function properly."
53
+ msgstr "Activeer deze optie om commentaar-blokken in de HTML te behouden, nodig voor onder andere bepaalde AdSense configuraties."
54
+
55
+ #: classes/autoptimizeConfig.php:90
56
+ msgid "JavaScript Options"
57
+ msgstr "JavaScript Opties"
58
+
59
+ #: classes/autoptimizeConfig.php:93
60
+ msgid "Optimize JavaScript Code?"
61
+ msgstr "Optimaliseer JavaScript Code?"
62
+
63
+ #: classes/autoptimizeConfig.php:97
64
+ msgid "Force JavaScript in &lt;head&gt;?"
65
+ msgstr "Duw JavaScript in &lt;head&gt;?"
66
+
67
+ #: classes/autoptimizeConfig.php:99
68
+ msgid "For performance reasons it is better to include JavaScript at the bottom of HTML, but this sometimes breaks things. Especially useful for jQuery-based themes."
69
+ msgstr "Voor rauwe performantie is het beter om JavaScript pas op het einde van de HTML binnen te halen, maar dit zorgt soms voor problemen, vooral bij jQuery-gebaseerde sites."
70
+
71
+ #: classes/autoptimizeConfig.php:102
72
+ msgid "Look for scripts only in &lt;head&gt;?"
73
+ msgstr "Haal javascript enkel uit &lt;head&gt;?"
74
+
75
+ #: classes/autoptimizeConfig.php:104
76
+ msgid "Mostly usefull in combination with previous option when using jQuery-based templates, but might help keeping cache size under control."
77
+ msgstr "Vooral nuttig in combinatie met de vorige optie voor jQuery-gebaseerde sites, maar kan ook helpen om de cache-size onder controle te houden."
78
+
79
+ #: classes/autoptimizeConfig.php:107
80
+ msgid "Exclude scripts from autoptimize:"
81
+ msgstr "Sluit deze scripts uit van optimalisering:"
82
+
83
+ #: classes/autoptimizeConfig.php:109
84
+ msgid "A comma-seperated list of scripts you want to exclude from being Autoptimized, for example 'whatever.js, another.js' (without the quotes) to exclude those scripts from being aggregated and minimized by Autoptimize."
85
+ msgstr "Lijst van scripts die je wilt uitsluiten van optimalisatie, gescheiden door komma's. Voorbeeld; 'whatever.js, another.js' (zonder de quotes)."
86
+
87
+ #: classes/autoptimizeConfig.php:112
88
+ msgid "Add try-catch wrapping?"
89
+ msgstr "Voeg try-catch toe rond javascript?"
90
+
91
+ #: classes/autoptimizeConfig.php:114
92
+ msgid "If your scripts break because of an script error, you might want to try this."
93
+ msgstr "Als je errors krijgt bij javascript-aggregatie, kun je dit proberen."
94
+
95
+ #: classes/autoptimizeConfig.php:118
96
+ msgid "CSS Options"
97
+ msgstr "CSS Opties"
98
+
99
+ #: classes/autoptimizeConfig.php:121
100
+ msgid "Optimize CSS Code?"
101
+ msgstr "Optimaliseer CSS Code?"
102
+
103
+ #: classes/autoptimizeConfig.php:125
104
+ msgid "Generate data: URIs for images?"
105
+ msgstr "Vervang image-links in CSS door data: URIs?"
106
+
107
+ #: classes/autoptimizeConfig.php:127
108
+ msgid "Enable this to include small background-images in the CSS itself instead of as seperate downloads."
109
+ msgstr "Acitveer deze optie om kleine background-images in de CSS te bewaren in plaats van aparte files."
110
+
111
+ #: classes/autoptimizeConfig.php:130
112
+ msgid "Defer CSS loading?"
113
+ msgstr "Stel inladen CSS uit tot na binnenhalen pagina?"
114
+
115
+ #: classes/autoptimizeConfig.php:132
116
+ msgid "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for mobile performance reasons having it deferred can be better."
117
+ msgstr "Normaal wordt CSS in de &lt;head&gt;-sectie van de HTML geladen, maar voor mobiele performantie kan het beter zijn om dat pas op het einde van de HTML te doen."
118
+
119
+ #: classes/autoptimizeConfig.php:135
120
+ msgid "Look for styles only in &lt;head&gt;?"
121
+ msgstr "Haal CSS enkel uit &lt;head&gt;?"
122
+
123
+ #: classes/autoptimizeConfig.php:137
124
+ msgid "Don't autoptimize CSS outside the head-section. If the cache gets big, you might want to enable this."
125
+ msgstr "De CSS buiten de &lt;head&gt; niet mee optimaliseren. Kan helpen om de cache-omvang te beperken."
126
+
127
+ #: classes/autoptimizeConfig.php:140
128
+ msgid "Exclude CSS from autoptimize:"
129
+ msgstr "Sluit deze CSS uit van optimalisering:"
130
+
131
+ #: classes/autoptimizeConfig.php:142
132
+ msgid "A comma-seperated list of CSS you want to exclude from being Autoptimized."
133
+ msgstr "Lijst van CSS die je wilt uitsluiten van optimalisatie, gescheiden door komma's. Voorbeeld; 'whatever.css, style.css' (zonder de quotes)."
134
+
135
+ #: classes/autoptimizeConfig.php:146
136
+ msgid "CDN Options"
137
+ msgstr "CDN Opties"
138
+
139
+ #: classes/autoptimizeConfig.php:149
140
+ msgid "CDN Base URL"
141
+ msgstr "Basis CDN URL"
142
+
143
+ #: classes/autoptimizeConfig.php:151
144
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
145
+ msgstr "Vul hier je CDN blog root directory URL in om CDN te activeren."
146
+
147
+ #: classes/autoptimizeConfig.php:155
148
+ msgid "Cache Info"
149
+ msgstr "Cache Info"
150
+
151
+ #: classes/autoptimizeConfig.php:158
152
+ msgid "Cache folder"
153
+ msgstr "Cache folder"
154
+
155
+ #: classes/autoptimizeConfig.php:162
156
+ msgid "Can we write?"
157
+ msgstr "Kunnen we schrijven naar die folder?"
158
+
159
+ #: classes/autoptimizeConfig.php:163
160
+ msgid "Yes"
161
+ msgstr "Ja"
162
+
163
+ #: classes/autoptimizeConfig.php:163
164
+ msgid "No"
165
+ msgstr "Nee"
166
+
167
+ #: classes/autoptimizeConfig.php:166
168
+ msgid "Cached styles and scripts"
169
+ msgstr "CSS en scripts in cache"
170
+
171
+ #: classes/autoptimizeConfig.php:170
172
+ msgid "Save aggregated script/css as static files?"
173
+ msgstr "Bewaar geoptimaliseerde CSS en JS als statische bestanden?"
174
+
175
+ #: classes/autoptimizeConfig.php:172
176
+ msgid "Enable this if your webserver can handle the compression and expiry."
177
+ msgstr "Activeer dit als je webserver compressie en cache-baarheid zelf kan afhandelen."
178
+
179
+ #: classes/autoptimizeConfig.php:178
180
+ msgid "Save Changes"
181
+ msgstr "Bewaar wijzigingen"
182
+
183
+ #: classes/autoptimizeConfig.php:179
184
+ msgid "Save Changes and Empty Cache"
185
+ msgstr "Bewaar en maak cache leeg."
186
+
187
+ #: classes/autoptimizeConfig.php:185
188
+ msgid "Do not donate for this plugin!"
189
+ msgstr "Geef geen geld voor deze plugin!"
190
+
191
+ #: classes/autoptimizeConfig.php:188
192
+ msgid "futtta about"
193
+ msgstr "futtta over"
194
+
195
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
196
+ #. Plugin Name of the plugin/theme
197
+ #: classes/autoptimizeConfig.php:190
198
+ msgid "Autoptimize"
199
+ msgstr "Autoptimize"
200
+
201
+ #: classes/autoptimizeConfig.php:191
202
+ msgid "WordPress"
203
+ msgstr "WordPress"
204
+
205
+ #: classes/autoptimizeConfig.php:192
206
+ msgid "Web Technology"
207
+ msgstr "Web Technologie"
208
+
209
+ #: classes/autoptimizeConfig.php:245
210
+ msgid "Autoptimize Options"
211
+ msgstr "Autoptimize Opties"
212
+
213
+ #: classes/autoptimizeConfig.php:291
214
+ #: classes/autoptimizeConfig.php:298
215
+ msgid "Settings"
216
+ msgstr "Instellingen"
217
+
218
+ #. Plugin URI of the plugin/theme
219
+ msgid "http://blog.futtta.be/autoptimize"
220
+ msgstr "http://blog.futtta.be/autoptimize"
221
+
222
+ #. Description of the plugin/theme
223
+ msgid "Optimizes your website, concatenating the CSS and JavaScript code, and compressing it."
224
+ msgstr "Optimaliseert je website door CSS en JavaScript te combineren en samen te drukken."
225
+
226
+ #. Author of the plugin/theme
227
+ msgid "Frank Goossens (futtta)"
228
+ msgstr "Frank Goossens (futtta)"
229
+
230
+ #. Author URI of the plugin/theme
231
+ msgid "http://blog.futtta.be/"
232
+ msgstr "http://blog.futtta.be/"
233
+
localization/autoptimize-sv_SE.mo ADDED
Binary file
localization/autoptimize-sv_SE.po ADDED
@@ -0,0 +1,266 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-12 10:32:38+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: 2013-10-14 21:54+0100\n"
12
+ "Last-Translator: Jonathan Sulo <jonathan@sulo.se>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+ "X-Generator: Poedit 1.5.7\n"
15
+
16
+ #: autoptimize.php:61
17
+ msgid ""
18
+ "Thank you for installing and activating Autoptimize. Please configure it "
19
+ "under \"Settings\" -> \"Autoptimize\" to start improving your site's "
20
+ "performance."
21
+ msgstr ""
22
+ "Tack för att du har installerat och aktiverat Autoptimize. Konfigurera "
23
+ "tillägget under \"Inställningar\" -> \"Autoptimize\" för att förbättra "
24
+ "prestandan på din webbplats."
25
+
26
+ #: classes/autoptimizeConfig.php:56
27
+ msgid "Autoptimize Settings"
28
+ msgstr "Inställningar för Autoptimize"
29
+
30
+ #: classes/autoptimizeConfig.php:62 classes/autoptimizeConfig.php:68
31
+ msgid "Show advanced settings"
32
+ msgstr "Visa avancerade inställningar"
33
+
34
+ #: classes/autoptimizeConfig.php:63 classes/autoptimizeConfig.php:69
35
+ msgid "Hide advanced settings"
36
+ msgstr "Dölj avancerade inställningar"
37
+
38
+ #: classes/autoptimizeConfig.php:77
39
+ msgid "HTML Options"
40
+ msgstr "HTML-alternativ"
41
+
42
+ #: classes/autoptimizeConfig.php:80
43
+ msgid "Optimize HTML Code?"
44
+ msgstr "Optimera HTML-kod?"
45
+
46
+ #: classes/autoptimizeConfig.php:84
47
+ msgid "Keep HTML comments?"
48
+ msgstr "Behåll HTML-kommentarer?"
49
+
50
+ #: classes/autoptimizeConfig.php:86
51
+ msgid ""
52
+ "Enable this if you want HTML comments to remain in the page, needed for e.g. "
53
+ "AdSense to function properly."
54
+ msgstr ""
55
+ "Välj detta för att behålla HTML-kommentarer på sidan, vilket behövs för att "
56
+ "t ex AdSense ska fungera bra."
57
+
58
+ #: classes/autoptimizeConfig.php:90
59
+ msgid "JavaScript Options"
60
+ msgstr "JavaScript-alternativ"
61
+
62
+ #: classes/autoptimizeConfig.php:93
63
+ msgid "Optimize JavaScript Code?"
64
+ msgstr "Optimera JavaScript-kod?"
65
+
66
+ #: classes/autoptimizeConfig.php:97
67
+ msgid "Force JavaScript in &lt;head&gt;?"
68
+ msgstr "Tvinga in JavaScript i &lt;head&gt;?"
69
+
70
+ #: classes/autoptimizeConfig.php:99
71
+ msgid ""
72
+ "For performance reasons it is better to include JavaScript at the bottom of "
73
+ "HTML, but this sometimes breaks things. Especially useful for jQuery-based "
74
+ "themes."
75
+ msgstr ""
76
+ "Av prestandaskäl är det bättre att inkludera JavaScript i slutet av HTML-"
77
+ "koden, men det kan ibland orsaka fel. Särskilt användbart för jQuery-"
78
+ "baserade teman."
79
+
80
+ #: classes/autoptimizeConfig.php:102
81
+ msgid "Look for scripts only in &lt;head&gt;?"
82
+ msgstr "Leta efter scripts enbart i &lt;head&gt;?"
83
+
84
+ #: classes/autoptimizeConfig.php:104
85
+ msgid ""
86
+ "Mostly usefull in combination with previous option when using jQuery-based "
87
+ "templates, but might help keeping cache size under control."
88
+ msgstr ""
89
+ "Mest användbart i kombination med föregående alternativ, när jQuery-baserade "
90
+ "teman används, men kan även reducera storleken på cachen."
91
+
92
+ #: classes/autoptimizeConfig.php:107
93
+ msgid "Exclude scripts from autoptimize:"
94
+ msgstr "Exkludera script från Autoptimize:"
95
+
96
+ #: classes/autoptimizeConfig.php:109
97
+ msgid ""
98
+ "A comma-seperated list of scripts you want to exclude from being "
99
+ "Autoptimized, for example 'whatever.js, another.js' (without the quotes) to "
100
+ "exclude those scripts from being aggregated and minimized by Autoptimize."
101
+ msgstr ""
102
+ "En komma-separerad lista med scripts som ska exkluderas från Autoptimize. "
103
+ "Ange t ex 'whatever.js, another.js' (utan citattecken) för att inte "
104
+ "sammanfoga och minimera dessa script."
105
+
106
+ #: classes/autoptimizeConfig.php:112
107
+ msgid "Add try-catch wrapping?"
108
+ msgstr "Lägg till try-catch-inbäddning?"
109
+
110
+ #: classes/autoptimizeConfig.php:114
111
+ msgid ""
112
+ "If your scripts break because of an script error, you might want to try this."
113
+ msgstr "Om script slutar fungera pga script-fel, testa då detta alternativ."
114
+
115
+ #: classes/autoptimizeConfig.php:118
116
+ msgid "CSS Options"
117
+ msgstr "CSS-alternativ"
118
+
119
+ #: classes/autoptimizeConfig.php:121
120
+ msgid "Optimize CSS Code?"
121
+ msgstr "Optimera CSS-kod?"
122
+
123
+ #: classes/autoptimizeConfig.php:125
124
+ msgid "Generate data: URIs for images?"
125
+ msgstr "Generera data: URI för bilder?"
126
+
127
+ #: classes/autoptimizeConfig.php:127
128
+ msgid ""
129
+ "Enable this to include small background-images in the CSS itself instead of "
130
+ "as seperate downloads."
131
+ msgstr ""
132
+ "Välj detta för att inkludera mindre bakgrundsbilder direkt i CSS, istället "
133
+ "för separata nedladdningar."
134
+
135
+ #: classes/autoptimizeConfig.php:130
136
+ msgid "Defer CSS loading?"
137
+ msgstr "Senarelägg inladdning av CSS?"
138
+
139
+ #: classes/autoptimizeConfig.php:132
140
+ msgid ""
141
+ "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for "
142
+ "mobile performance reasons having it deferred can be better."
143
+ msgstr ""
144
+ "CSS laddas vanligtvis in i &lt;head&gt;-sektionen för HTML-sidan, men för "
145
+ "bättre mobil prestanda kan det vara bra att senarelägga inladdningen."
146
+
147
+ #: classes/autoptimizeConfig.php:135
148
+ msgid "Look for styles only in &lt;head&gt;?"
149
+ msgstr "Leta efter stilmallar enbart inom &lt;head&gt;?"
150
+
151
+ #: classes/autoptimizeConfig.php:137
152
+ msgid ""
153
+ "Don't autoptimize CSS outside the head-section. If the cache gets big, you "
154
+ "might want to enable this."
155
+ msgstr ""
156
+ "Optimera inte CSS utanför head-sektionen. Om cachen blir för stor, testa då "
157
+ "detta alternativ."
158
+
159
+ #: classes/autoptimizeConfig.php:140
160
+ msgid "Exclude CSS from autoptimize:"
161
+ msgstr "Exkludera CSS från Autoptimize:"
162
+
163
+ #: classes/autoptimizeConfig.php:142
164
+ msgid ""
165
+ "A comma-seperated list of CSS you want to exclude from being Autoptimized."
166
+ msgstr ""
167
+ "En komma-separerad lista med stilmallar som ska exkluderas från Autoptimize."
168
+
169
+ #: classes/autoptimizeConfig.php:146
170
+ msgid "CDN Options"
171
+ msgstr "CDN-alternativ"
172
+
173
+ #: classes/autoptimizeConfig.php:149
174
+ msgid "CDN Base URL"
175
+ msgstr "CDN bas-URL"
176
+
177
+ #: classes/autoptimizeConfig.php:151
178
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
179
+ msgstr "Ange rotmappen för din webbplats CDN om du vill aktivera CDN."
180
+
181
+ #: classes/autoptimizeConfig.php:155
182
+ msgid "Cache Info"
183
+ msgstr "Cache-information"
184
+
185
+ #: classes/autoptimizeConfig.php:158
186
+ msgid "Cache folder"
187
+ msgstr "Cache-mapp"
188
+
189
+ #: classes/autoptimizeConfig.php:162
190
+ msgid "Can we write?"
191
+ msgstr "Kan vi skriva?"
192
+
193
+ #: classes/autoptimizeConfig.php:163
194
+ msgid "Yes"
195
+ msgstr "Ja"
196
+
197
+ #: classes/autoptimizeConfig.php:163
198
+ msgid "No"
199
+ msgstr "Nej"
200
+
201
+ #: classes/autoptimizeConfig.php:166
202
+ msgid "Cached styles and scripts"
203
+ msgstr "Stilmallar och scripts i cachen"
204
+
205
+ #: classes/autoptimizeConfig.php:170
206
+ msgid "Do not compress cache files"
207
+ msgstr "Komprimera inte cache-filer"
208
+
209
+ #: classes/autoptimizeConfig.php:172
210
+ msgid ""
211
+ "Enable this if you want to compress the served files using your webserver."
212
+ msgstr "Välj detta för att komprimera filerna som levereras av din webbserver."
213
+
214
+ #: classes/autoptimizeConfig.php:178
215
+ msgid "Save Changes"
216
+ msgstr "Spara inställningar"
217
+
218
+ #: classes/autoptimizeConfig.php:179
219
+ msgid "Save Changes and Empty Cache"
220
+ msgstr "Spara inställningar och töm cache"
221
+
222
+ #: classes/autoptimizeConfig.php:187
223
+ msgid "futtta about"
224
+ msgstr "Om futtta"
225
+
226
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
227
+ #. Plugin Name of the plugin/theme
228
+ #: classes/autoptimizeConfig.php:189
229
+ msgid "Autoptimize"
230
+ msgstr "Autoptimize"
231
+
232
+ #: classes/autoptimizeConfig.php:190
233
+ msgid "WordPress"
234
+ msgstr "WordPress"
235
+
236
+ #: classes/autoptimizeConfig.php:191
237
+ msgid "Web Technology"
238
+ msgstr "Webbteknik"
239
+
240
+ #: classes/autoptimizeConfig.php:244
241
+ msgid "Autoptimize Options"
242
+ msgstr "Alternativ för Autoptimize"
243
+
244
+ #: classes/autoptimizeConfig.php:290 classes/autoptimizeConfig.php:297
245
+ msgid "Settings"
246
+ msgstr "Inställningar"
247
+
248
+ #. Plugin URI of the plugin/theme
249
+ msgid "http://blog.futtta.be/autoptimize"
250
+ msgstr "http://blog.futtta.be/autoptimize"
251
+
252
+ #. Description of the plugin/theme
253
+ msgid ""
254
+ "Optimizes your website, concatenating the CSS and JavaScript code, and "
255
+ "compressing it."
256
+ msgstr ""
257
+ "Optimerar din webbplats, sammanfogar CSS och Javascript samt komprimerar "
258
+ "filer."
259
+
260
+ #. Author of the plugin/theme
261
+ msgid "Frank Goossens (futtta)"
262
+ msgstr "Frank Goossens (futtta)"
263
+
264
+ #. Author URI of the plugin/theme
265
+ msgid "http://blog.futtta.be/"
266
+ msgstr "http://blog.futtta.be/"
localization/autoptimize.pot CHANGED
@@ -1,192 +1,252 @@
1
- # SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) YEAR Emilio Lpez
3
- # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
7
  msgid ""
8
  msgstr ""
9
- "Project-Id-Version: PACKAGE VERSION\n"
10
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
11
- "POT-Creation-Date: 2009-10-19 21:41+0000\n"
12
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
  "MIME-Version: 1.0\n"
16
- "Content-Type: text/plain; charset=CHARSET\n"
17
  "Content-Transfer-Encoding: 8bit\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
- #: classes/autoptimizeConfig.php:50
20
  msgid "Autoptimize Settings"
21
  msgstr ""
22
 
23
- #: classes/autoptimizeConfig.php:71
 
 
 
 
 
 
 
 
24
  msgid "HTML Options"
25
  msgstr ""
26
 
27
- #: classes/autoptimizeConfig.php:74
28
  msgid "Optimize HTML Code?"
29
  msgstr ""
30
 
31
- #: classes/autoptimizeConfig.php:78
32
  msgid "Keep HTML comments?"
33
  msgstr ""
34
 
35
- #: classes/autoptimizeConfig.php:80
36
  msgid ""
37
- "Disabled by default. Enable this if you want HTML comments to remain in the "
38
- "page."
39
  msgstr ""
40
 
41
- #: classes/autoptimizeConfig.php:84
42
  msgid "JavaScript Options"
43
  msgstr ""
44
 
45
- #: classes/autoptimizeConfig.php:87
46
  msgid "Optimize JavaScript Code?"
47
  msgstr ""
48
 
49
- #: classes/autoptimizeConfig.php:91
 
 
 
 
 
 
 
 
 
 
 
50
  msgid "Look for scripts only in &lt;head&gt;?"
51
  msgstr ""
52
 
53
- #: classes/autoptimizeConfig.php:93 classes/autoptimizeConfig.php:116
54
  msgid ""
55
- "Disabled by default. If the cache gets big, you might want to enable this."
 
56
  msgstr ""
57
 
58
- #: classes/autoptimizeConfig.php:96
59
- msgid "Add try-catch wrapping?"
60
  msgstr ""
61
 
62
- #: classes/autoptimizeConfig.php:98
63
  msgid ""
64
- "Disabled by default. If your scripts break because of an script error, you "
65
- "might want to try this."
 
66
  msgstr ""
67
 
68
- #: classes/autoptimizeConfig.php:101 classes/autoptimizeConfig.php:124
69
- msgid "Use YUI compression?"
70
  msgstr ""
71
 
72
- #: classes/autoptimizeConfig.php:103 classes/autoptimizeConfig.php:126
73
  msgid ""
74
- "Disabled by default. Read [autoptimize]/yui/README.txt for more information."
75
  msgstr ""
76
 
77
- #: classes/autoptimizeConfig.php:107
78
  msgid "CSS Options"
79
  msgstr ""
80
 
81
- #: classes/autoptimizeConfig.php:110
82
  msgid "Optimize CSS Code?"
83
  msgstr ""
84
 
85
- #: classes/autoptimizeConfig.php:114
86
- msgid "Look for styles on just &lt;head&gt;?"
87
- msgstr ""
88
-
89
- #: classes/autoptimizeConfig.php:119
90
  msgid "Generate data: URIs for images?"
91
  msgstr ""
92
 
93
- #: classes/autoptimizeConfig.php:121
94
- msgid "Disabled by default. Enable this to include images on the CSS itself."
 
 
95
  msgstr ""
96
 
97
  #: classes/autoptimizeConfig.php:130
98
- msgid "CDN Options"
99
  msgstr ""
100
 
101
- #: classes/autoptimizeConfig.php:133
102
- msgid "Rewrite JavaScript URLs?"
103
- msgstr ""
104
-
105
- #: classes/autoptimizeConfig.php:135 classes/autoptimizeConfig.php:145
106
- #: classes/autoptimizeConfig.php:155
107
  msgid ""
108
- "Disabled by default. Do not enable this unless you know what you are doing."
 
109
  msgstr ""
110
 
111
- #: classes/autoptimizeConfig.php:138
112
- msgid "JavaScript Base URL"
113
  msgstr ""
114
 
115
- #: classes/autoptimizeConfig.php:140 classes/autoptimizeConfig.php:150
116
- #: classes/autoptimizeConfig.php:160
117
  msgid ""
118
- "This is the new base URL that will be used when rewriting. It should point "
119
- "to the blog root directory."
120
  msgstr ""
121
 
122
- #: classes/autoptimizeConfig.php:143
123
- msgid "Rewrite CSS URLs?"
124
  msgstr ""
125
 
126
- #: classes/autoptimizeConfig.php:148
127
- msgid "CSS Base URL"
 
128
  msgstr ""
129
 
130
- #: classes/autoptimizeConfig.php:153
131
- msgid "Rewrite Image URLs?"
132
  msgstr ""
133
 
134
- #: classes/autoptimizeConfig.php:158
135
- msgid "Image Base URL"
 
 
 
 
136
  msgstr ""
137
 
138
- #: classes/autoptimizeConfig.php:164
139
  msgid "Cache Info"
140
  msgstr ""
141
 
142
- #: classes/autoptimizeConfig.php:167
143
  msgid "Cache folder"
144
  msgstr ""
145
 
146
- #: classes/autoptimizeConfig.php:171
147
  msgid "Can we write?"
148
  msgstr ""
149
 
150
- #: classes/autoptimizeConfig.php:172
151
  msgid "Yes"
152
  msgstr ""
153
 
154
- #: classes/autoptimizeConfig.php:172
155
  msgid "No"
156
  msgstr ""
157
 
158
- #: classes/autoptimizeConfig.php:175
159
  msgid "Cached styles and scripts"
160
  msgstr ""
161
 
162
- #: classes/autoptimizeConfig.php:179
163
- msgid "Do not compress cache files"
164
  msgstr ""
165
 
166
- #: classes/autoptimizeConfig.php:181
167
- msgid ""
168
- "Disabled by default. Enable this if you want to compress the served files "
169
- "using your webserver."
170
  msgstr ""
171
 
172
- #: classes/autoptimizeConfig.php:188
173
  msgid "Save Changes"
174
  msgstr ""
175
 
176
- #: classes/autoptimizeConfig.php:189
177
  msgid "Save Changes and Empty Cache"
178
  msgstr ""
179
 
180
- #: classes/autoptimizeConfig.php:199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  msgid "Autoptimize Options"
182
  msgstr ""
183
 
184
- #: classes/autoptimizeConfig.php:236 classes/autoptimizeConfig.php:243
185
  msgid "Settings"
186
  msgstr ""
187
 
188
- #. Description of an extension
 
 
 
 
189
  msgid ""
190
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
191
  "compressing it."
192
  msgstr ""
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 Autoptimize
2
+ # This file is distributed under the same license as the Autoptimize package.
 
 
 
 
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Autoptimize 1.7.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/autoptimize\n"
7
+ "POT-Creation-Date: 2013-10-21 07:38:13+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: 2013-MO-DA HO:MI+ZONE\n"
12
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+ "Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+ #: autoptimize.php:66
16
+ msgid ""
17
+ "Thank you for installing and activating Autoptimize. Please configure it "
18
+ "under \"Settings\" -> \"Autoptimize\" to start improving your site's "
19
+ "performance."
20
+ msgstr ""
21
+
22
+ #: autoptimize.php:72
23
+ msgid ""
24
+ "Autoptimize has just been updated. Please <strong>test your site now</"
25
+ "strong> and adapt Autoptimize config if needed."
26
+ msgstr ""
27
 
28
+ #: classes/autoptimizeConfig.php:56
29
  msgid "Autoptimize Settings"
30
  msgstr ""
31
 
32
+ #: classes/autoptimizeConfig.php:62 classes/autoptimizeConfig.php:68
33
+ msgid "Show advanced settings"
34
+ msgstr ""
35
+
36
+ #: classes/autoptimizeConfig.php:63 classes/autoptimizeConfig.php:69
37
+ msgid "Hide advanced settings"
38
+ msgstr ""
39
+
40
+ #: classes/autoptimizeConfig.php:77
41
  msgid "HTML Options"
42
  msgstr ""
43
 
44
+ #: classes/autoptimizeConfig.php:80
45
  msgid "Optimize HTML Code?"
46
  msgstr ""
47
 
48
+ #: classes/autoptimizeConfig.php:84
49
  msgid "Keep HTML comments?"
50
  msgstr ""
51
 
52
+ #: classes/autoptimizeConfig.php:86
53
  msgid ""
54
+ "Enable this if you want HTML comments to remain in the page, needed for e.g. "
55
+ "AdSense to function properly."
56
  msgstr ""
57
 
58
+ #: classes/autoptimizeConfig.php:90
59
  msgid "JavaScript Options"
60
  msgstr ""
61
 
62
+ #: classes/autoptimizeConfig.php:93
63
  msgid "Optimize JavaScript Code?"
64
  msgstr ""
65
 
66
+ #: classes/autoptimizeConfig.php:97
67
+ msgid "Force JavaScript in &lt;head&gt;?"
68
+ msgstr ""
69
+
70
+ #: classes/autoptimizeConfig.php:99
71
+ msgid ""
72
+ "For performance reasons it is better to include JavaScript at the bottom of "
73
+ "HTML, but this sometimes breaks things. Especially useful for jQuery-based "
74
+ "themes."
75
+ msgstr ""
76
+
77
+ #: classes/autoptimizeConfig.php:102
78
  msgid "Look for scripts only in &lt;head&gt;?"
79
  msgstr ""
80
 
81
+ #: classes/autoptimizeConfig.php:104
82
  msgid ""
83
+ "Mostly usefull in combination with previous option when using jQuery-based "
84
+ "templates, but might help keeping cache size under control."
85
  msgstr ""
86
 
87
+ #: classes/autoptimizeConfig.php:107
88
+ msgid "Exclude scripts from autoptimize:"
89
  msgstr ""
90
 
91
+ #: classes/autoptimizeConfig.php:109
92
  msgid ""
93
+ "A comma-seperated list of scripts you want to exclude from being "
94
+ "Autoptimized, for example 'whatever.js, another.js' (without the quotes) to "
95
+ "exclude those scripts from being aggregated and minimized by Autoptimize."
96
  msgstr ""
97
 
98
+ #: classes/autoptimizeConfig.php:112
99
+ msgid "Add try-catch wrapping?"
100
  msgstr ""
101
 
102
+ #: classes/autoptimizeConfig.php:114
103
  msgid ""
104
+ "If your scripts break because of an script error, you might want to try this."
105
  msgstr ""
106
 
107
+ #: classes/autoptimizeConfig.php:118
108
  msgid "CSS Options"
109
  msgstr ""
110
 
111
+ #: classes/autoptimizeConfig.php:121
112
  msgid "Optimize CSS Code?"
113
  msgstr ""
114
 
115
+ #: classes/autoptimizeConfig.php:125
 
 
 
 
116
  msgid "Generate data: URIs for images?"
117
  msgstr ""
118
 
119
+ #: classes/autoptimizeConfig.php:127
120
+ msgid ""
121
+ "Enable this to include small background-images in the CSS itself instead of "
122
+ "as seperate downloads."
123
  msgstr ""
124
 
125
  #: classes/autoptimizeConfig.php:130
126
+ msgid "Defer CSS loading?"
127
  msgstr ""
128
 
129
+ #: classes/autoptimizeConfig.php:132
 
 
 
 
 
130
  msgid ""
131
+ "Normally CSS is loaded in the &lt;head&gt;-section of the HTML, but for "
132
+ "mobile performance reasons having it deferred can be better."
133
  msgstr ""
134
 
135
+ #: classes/autoptimizeConfig.php:135
136
+ msgid "Look for styles only in &lt;head&gt;?"
137
  msgstr ""
138
 
139
+ #: classes/autoptimizeConfig.php:137
 
140
  msgid ""
141
+ "Don't autoptimize CSS outside the head-section. If the cache gets big, you "
142
+ "might want to enable this."
143
  msgstr ""
144
 
145
+ #: classes/autoptimizeConfig.php:140
146
+ msgid "Exclude CSS from autoptimize:"
147
  msgstr ""
148
 
149
+ #: classes/autoptimizeConfig.php:142
150
+ msgid ""
151
+ "A comma-seperated list of CSS you want to exclude from being Autoptimized."
152
  msgstr ""
153
 
154
+ #: classes/autoptimizeConfig.php:146
155
+ msgid "CDN Options"
156
  msgstr ""
157
 
158
+ #: classes/autoptimizeConfig.php:149
159
+ msgid "CDN Base URL"
160
+ msgstr ""
161
+
162
+ #: classes/autoptimizeConfig.php:151
163
+ msgid "Enter your CDN blog root directory URL if you want to enable CDN."
164
  msgstr ""
165
 
166
+ #: classes/autoptimizeConfig.php:155
167
  msgid "Cache Info"
168
  msgstr ""
169
 
170
+ #: classes/autoptimizeConfig.php:158
171
  msgid "Cache folder"
172
  msgstr ""
173
 
174
+ #: classes/autoptimizeConfig.php:162
175
  msgid "Can we write?"
176
  msgstr ""
177
 
178
+ #: classes/autoptimizeConfig.php:163
179
  msgid "Yes"
180
  msgstr ""
181
 
182
+ #: classes/autoptimizeConfig.php:163
183
  msgid "No"
184
  msgstr ""
185
 
186
+ #: classes/autoptimizeConfig.php:166
187
  msgid "Cached styles and scripts"
188
  msgstr ""
189
 
190
+ #: classes/autoptimizeConfig.php:170
191
+ msgid "Save aggregated script/css as static files?"
192
  msgstr ""
193
 
194
+ #: classes/autoptimizeConfig.php:172
195
+ msgid "Enable this if your webserver can handle the compression and expiry."
 
 
196
  msgstr ""
197
 
198
+ #: classes/autoptimizeConfig.php:178
199
  msgid "Save Changes"
200
  msgstr ""
201
 
202
+ #: classes/autoptimizeConfig.php:179
203
  msgid "Save Changes and Empty Cache"
204
  msgstr ""
205
 
206
+ #: classes/autoptimizeConfig.php:185
207
+ msgid "Do not donate for this plugin!"
208
+ msgstr ""
209
+
210
+ #: classes/autoptimizeConfig.php:188
211
+ msgid "futtta about"
212
+ msgstr ""
213
+
214
+ #. #-#-#-#-# plugin.pot (Autoptimize 1.7.0) #-#-#-#-#
215
+ #. Plugin Name of the plugin/theme
216
+ #: classes/autoptimizeConfig.php:190
217
+ msgid "Autoptimize"
218
+ msgstr ""
219
+
220
+ #: classes/autoptimizeConfig.php:191
221
+ msgid "WordPress"
222
+ msgstr ""
223
+
224
+ #: classes/autoptimizeConfig.php:192
225
+ msgid "Web Technology"
226
+ msgstr ""
227
+
228
+ #: classes/autoptimizeConfig.php:245
229
  msgid "Autoptimize Options"
230
  msgstr ""
231
 
232
+ #: classes/autoptimizeConfig.php:291 classes/autoptimizeConfig.php:298
233
  msgid "Settings"
234
  msgstr ""
235
 
236
+ #. Plugin URI of the plugin/theme
237
+ msgid "http://blog.futtta.be/autoptimize"
238
+ msgstr ""
239
+
240
+ #. Description of the plugin/theme
241
  msgid ""
242
  "Optimizes your website, concatenating the CSS and JavaScript code, and "
243
  "compressing it."
244
  msgstr ""
245
+
246
+ #. Author of the plugin/theme
247
+ msgid "Frank Goossens (futtta)"
248
+ msgstr ""
249
+
250
+ #. Author URI of the plugin/theme
251
+ msgid "http://blog.futtta.be/"
252
+ msgstr ""
readme.txt CHANGED
@@ -1,24 +1,27 @@
1
  === Autoptimize ===
2
  Contributors: futtta, turl
3
- Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, performance, pagespeed, booster, multisite
 
4
  Requires at least: 2.7
5
- Tested up to: 3.6.1
6
- Stable tag: 1.6.6
7
 
8
- Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS and CSS.
9
 
10
  == Description ==
11
 
12
- Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts to the footer. It also minifies the HTML code itself, making your page really lightweight.
13
 
14
  If you consider performance important, we recommend the use of a caching-plugin such as e.g. [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/) or
15
- [HyperCache](http://wordpress.org/extend/plugins/hyper-cache/).
16
 
17
  == Installation ==
18
 
19
- 1. Upload the `autoptimize` folder to to the `/wp-content/plugins/` directory
 
 
20
  1. Activate the plugin through the 'Plugins' menu in WordPress
21
- 1. Go to `Settings -> Autoptimize` and enable the options you want. Generally this means "Optimize HTML/CSS/JavaScript", but if you experience problems you might want to disable some.
22
 
23
  == Frequently Asked Questions ==
24
 
@@ -30,28 +33,53 @@ It concatenates all scripts and styles, minifies and compresses them, adds expir
30
 
31
  Yes, most of the time, but there will always be exceptions. Although Autoptimize goes through great lengths to work with as many themes and plugins possible, there undoubtably are circumstances in which Autoptimize will not work to the full extent (full HTML, JS and CSS optimization). See "Troubleshooting" below for info on how to proceed if you encounter issues.
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  = Does Autoptimize work with BuddyPress? =
34
 
35
- Based on feedback received from BuddyPress users, CSS and JS-Autoptimization do not seem to work correctly, leaving you with only HTML optimizations. I will look into this in the future and am happy to take hints or code-improvements the help with BuddyPress compatibility in the mean time.
36
 
37
  = Compatibility with WP SlimSat =
38
 
39
  There have been reports of sightings of javascript errors when using Autoptimize together with WP SlimStat. Both [Camu (WP SlimStat developer)](http://profiles.wordpress.org/coolmann/) and I have installed both plugins on test-environments and [found no proof of such incompatibility](http://wordpress.org/support/topic/dropdown-menus-dont-work-when-slimstat-is-enabled?replies=14#post-4086894). Our common conclusion is that there are rare cases in which yet another theme or plugin's JavaScript are triggering these errors. If you do encounter JavaScript-errors when you have both WP SlimStat and Autoptimize installed, add "SlimStatParams, wp-slimstat.js" in the "Exclude scripts from autoptimize:" option on the admin-page and all should be well.
40
 
41
- = Why are some options marked as Deprecated? =
42
- YUI compression and the CDN options are marked as deprecated to indicate that this functionality will be removed for the next major version (probably 1.7.0). YUI compression was pretty exotic and required one to install JAVA and the YUI compression software. CDN options are deprecated as well; CDN isn't core functionality and can better be accomplished using e.g. [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/) (which is a must-have companion of Autoptimize anyhow).
43
-
44
  = Configuring & Troubleshooting Autoptimize =
45
 
46
- After having installed and activated the plugin, you'll have access to an admin page where you can to enable HTML, CSS and JavaScript optimization. According to your liking, you can start of just enabling all of them, or if you're more cautious one at a time.
47
 
48
- If your blog doens't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues:
49
- * In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem. You can also force CSS not to be aggregated by wrapping it in noptimize-tags in your theme or widget.
 
50
  * In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Enable the option "Look for scripts only in head?" and/or "Force JavaScript in <head>?" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript or excluding it from within your template files or widgets by wrapping the code between noptimize-tags. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.
 
51
  * If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
52
  * If you tried the troubleshooting tips above and you still can't get CSS and JS working at all, you can ask for support on the [WordPress Autoptimize support forum](http://wordpress.org/support/plugin/autoptimize). See below for a description of what information you should provide in your "trouble ticket"
53
 
54
- = How can I exclude some CSS/JS/HTML from being autoptimized? =
 
 
 
 
 
55
  Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
56
  `<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->`
57
 
@@ -71,6 +99,20 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  = 1.6.6 =
75
  * New: disable autoptimizatoin by putting part of your HTML, JS or CSS in between noptimize-tags, e.g.;
76
  `<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->`
@@ -114,7 +156,7 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
114
  * bugfix for breakage with unusual WordPress directory layout as reported by [Josef from blog-it-solutions.de](http://www.blog-it-solutions.de/).
115
 
116
  = 1.5.1 =
117
- * bugfix: add CSS before opening title-tag instead of after closing title, to avoid CSS being loaded in wrong order, as reported by [fotofashion](http://fotoandfashion.de/) and [blogitsolutions](www.blog-it-solutions.de) (thanks guys)
118
 
119
  = 1.5 =
120
  * first bugfix release by [futtta](http://blog.futtta.be/2013/01/07/adopting-an-oss-orphan-autoptimize/), thanks for a great plugin Turl!
1
  === Autoptimize ===
2
  Contributors: futtta, turl
3
+ Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, minification, performance, pagespeed, booster, multisite
4
+ Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
5
  Requires at least: 2.7
6
+ Tested up to: 3.7.0
7
+ Stable tag: 1.7.0
8
 
9
+ Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
10
 
11
  == Description ==
12
 
13
+ Autoptimize makes optimizing your site really easy. It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts to the footer. It also minifies the HTML code itself, making your page really lightweight. There are advanced options available to enable you to tailor Autoptimize to each and every site's specific need.
14
 
15
  If you consider performance important, we recommend the use of a caching-plugin such as e.g. [WP Super Cache](http://wordpress.org/extend/plugins/wp-super-cache/) or
16
+ [HyperCache](http://wordpress.org/extend/plugins/hyper-cache/) to complement Autoptimize.
17
 
18
  == Installation ==
19
 
20
+ Just install form your WordPress "Plugins|Add New" screen and all will be well. Manual installation is very straightforward as well:
21
+
22
+ 1. Upload the zip-file and unzip it in the /wp-content/plugins/ directory
23
  1. Activate the plugin through the 'Plugins' menu in WordPress
24
+ 1. Go to `Settings -> Autoptimize` and enable the options you want. Generally this means "Optimize HTML/ CSS/ JavaScript".
25
 
26
  == Frequently Asked Questions ==
27
 
33
 
34
  Yes, most of the time, but there will always be exceptions. Although Autoptimize goes through great lengths to work with as many themes and plugins possible, there undoubtably are circumstances in which Autoptimize will not work to the full extent (full HTML, JS and CSS optimization). See "Troubleshooting" below for info on how to proceed if you encounter issues.
35
 
36
+ = What is the use of deferring CSS? =
37
+
38
+ CSS in general should go in the head of the document. Recently a.o. Google started promoting deferring non-essential CSS, while inlining those styles needed to build the page above the fold. This is especially important to render pages as quickly as possible on mobile devices. To implement this, you'll need to:
39
+
40
+ * identify the essential CSS to style your average page (be strict, keep this as light a possible)
41
+ * minimize that using one of the many online minimizing tools
42
+ * wrap the minimized CSS between style-tags
43
+ * wrap style-block between noptimize-tags (see above)
44
+ * put the resulting CSS in the head of your page (should be in the header.php file of your theme)
45
+ * check the option to defer CSS
46
+
47
+ = How does CDN work? =
48
+
49
+ Starting from version 1.7.0, CDN is activated upon entering the CDN blog root directory (e.g. http://cdn.example.net/wordpress/). If that URL is present, it will used for all Autoptimize-generated files (i.e. aggregated CSS and JS), includinng background-images in the CSS (when not using data-uri's).
50
+
51
+ If you want your uploaded images to be on the CDN as well, you can change the upload_url_path in your WordPress configuration (/wp-admin/options.php) to the target CDN upload directory (e.g. http://cdn.example.net/wordpress/wp-content/uploads/). Do take into consideration this only works for images uploaded from that point onwards, not for images that already were uploaded. Thanks to [BeautyPirate for the tip](http://wordpress.org/support/topic/please-don%c2%b4t-remove-cdn?replies=15#post-4720048)!
52
+
53
+ = How can I force the aggregated files to be static CSS or JS instead of PHP? =
54
+
55
+ If your webserver is properly configured to handle compression (gzip or deflate) and cache expiry (expires and cache-control with sufficient cacheability), you don't need Autoptimize to handle that for you. In that case you can check the "Save aggregated script/css as static files?"-option, which will force Autoptimize to save the aggregated files as .css and .js-files (meaning no PHP is needed to serve these files).
56
+
57
  = Does Autoptimize work with BuddyPress? =
58
 
59
+ Based on earlier feedback received from BuddyPress users, CSS and JS-Autoptimization do not seem to work correctly, leaving you with only HTML optimizations. This might be due to problems in Autoptimize which have already been fixed, so feel free to give it a shot anyhow.
60
 
61
  = Compatibility with WP SlimSat =
62
 
63
  There have been reports of sightings of javascript errors when using Autoptimize together with WP SlimStat. Both [Camu (WP SlimStat developer)](http://profiles.wordpress.org/coolmann/) and I have installed both plugins on test-environments and [found no proof of such incompatibility](http://wordpress.org/support/topic/dropdown-menus-dont-work-when-slimstat-is-enabled?replies=14#post-4086894). Our common conclusion is that there are rare cases in which yet another theme or plugin's JavaScript are triggering these errors. If you do encounter JavaScript-errors when you have both WP SlimStat and Autoptimize installed, add "SlimStatParams, wp-slimstat.js" in the "Exclude scripts from autoptimize:" option on the admin-page and all should be well.
64
 
 
 
 
65
  = Configuring & Troubleshooting Autoptimize =
66
 
67
+ After having installed and activated the plugin, you'll have access to an admin page where you can to enable HTML, CSS and JavaScript optimization. According to your liking, you can start of just enabling all of them, or if you're more cautious one at a time.
68
 
69
+ If your blog doesn't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using "advanced settings":
70
+
71
+ * In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem. You can also force CSS not to be aggregated by wrapping it in noptimize-tags in your theme or widget or by adding filename (for external stylesheets) or string (for inline styles) to the exclude-list.
72
  * In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Enable the option "Look for scripts only in head?" and/or "Force JavaScript in <head>?" and try again. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript or excluding it from within your template files or widgets by wrapping the code between noptimize-tags. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way.
73
+ * If your theme uses jQuery, you can try either forcing all in head or excluding jquery(-min).js (and jQuery-plugins if needed).
74
  * If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
75
  * If you tried the troubleshooting tips above and you still can't get CSS and JS working at all, you can ask for support on the [WordPress Autoptimize support forum](http://wordpress.org/support/plugin/autoptimize). See below for a description of what information you should provide in your "trouble ticket"
76
 
77
+ = How does "Exclude from autoptimize" work? =
78
+
79
+ You can exclude both JS and CSS from being processed by Autoptimize by using the appropriate settings in the admin-screen. If you want to exclude an external file from being Autoptimized, add the filename (e.g. jquery.js). If you want to exclude inline CSS or JS, add a (unique) string that is in that block of code.
80
+
81
+ = What is noptimize? =
82
+
83
  Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
84
  `<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->`
85
 
99
 
100
  == Changelog ==
101
 
102
+ = 1.7.0 =
103
+ * New: exclude CSS
104
+ * New: defer CSS
105
+ * Updated minimizing components (JSMin & YUI PHP CSSMin)
106
+ * Updated admin-page, hiding advanced configuration options
107
+ * Updated CDN-support for added simplicity (code & UI-wise), including changing background image url in CSS
108
+ * Updated/ new translations provided for [French: wordpress-hebergement.fr](http://www.wordpress-hebergement.fr/), [Persian: Hamed Irani](http://basics.ir/), [Swedish: Jonathan Sulo](http://sulo.se/), [German: blog-it-solutions.de](http://www.blog-it-solutions.de/) and Dutch
109
+ * Removed support for YUI
110
+ * Flush HTML caching plugin's cache when flushing Autoptimize's one
111
+ * fix for BOM marker in CSS-files [as seen in Frontier theme](http://wordpress.org/support/topic/sidebar-problem-42), kudo's to [Download Converter](http://convertertoolz.com/) for reporting!
112
+ * fix for [protocol-less 3rd party scripts disappearing](http://wordpress.org/support/topic/javascript-optimize-breaks-twentythirteen-mobile-menu), thanks for reporting p33t3r!
113
+ * fix for stylesheets without type="text/css" not being autoptimized as reported by [renzo](http://cocobeanproductions.com/)
114
+ * tested with WordPress 3.7 beta2 (admin-bar.min.js added to automatically excluded scripts)
115
+
116
  = 1.6.6 =
117
  * New: disable autoptimizatoin by putting part of your HTML, JS or CSS in between noptimize-tags, e.g.;
118
  `<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->`
156
  * bugfix for breakage with unusual WordPress directory layout as reported by [Josef from blog-it-solutions.de](http://www.blog-it-solutions.de/).
157
 
158
  = 1.5.1 =
159
+ * bugfix: add CSS before opening title-tag instead of after closing title, to avoid CSS being loaded in wrong order, as reported by [fotofashion](http://fotoandfashion.de/) and [blogitsolutions](http://www.blog-it-solutions.de) (thanks guys)
160
 
161
  = 1.5 =
162
  * first bugfix release by [futtta](http://blog.futtta.be/2013/01/07/adopting-an-oss-orphan-autoptimize/), thanks for a great plugin Turl!
yui/README.txt DELETED
@@ -1,13 +0,0 @@
1
- HOW TO USE YUI COMPRESSION
2
- --------------------------
3
-
4
- To use YUI Compression for JavaScript and CSS code, you need:
5
- 1- java installed and working on the server
6
- 2- YUI Compressor .jar file on the same directory as this file, with
7
- "yuicompressor.jar" as name. You can get it here:
8
- http://yuilibrary.com/downloads/#yuicompressor
9
- 3- PHP's shell_exec function enabled.
10
- 4- Writing permissions on this directory
11
-
12
- When all the requerimients are fullfilled, you will be able to enable
13
- YUI compression on Autoptimize's config page.