WordPress.org

Plugin Directory

Changeset 892852


Ignore:
Timestamp:
04/14/14 11:42:06 (3 years ago)
Author:
NodeCode
Message:

release 1.3.4

Location:
wp-minify-fix
Files:
2 edited
13 copied

Legend:

Unmodified
Added
Removed
  • wp-minify-fix/tags/1.3.4/readme.txt

    r892638 r892852  
    44Requires at least: 2.7 
    55Tested up to: 3.8.1 
    6 Stable Tag: 1.3.3 
     6Stable Tag: 1.3.4 
    77 
    88[Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files 
     
    2222* move CSS-@imports to the top of the output 
    2323* bottom CSS- and JavaScript output fixed 
     24* support for script-tags without `type="text/javascript"` 
     25* detection of protocol-relative URLs as external file (e.g. Google AdSense) 
    2426 
    2527= How Does it Work? = 
     
    4547 
    4648== Changelog == 
     49= 1.3.4 = 
     50* support for script-tags without `type="text/javascript"` 
     51* detection of protocol-relative URLs as external file (e.g. Google AdSense) 
     52 
    4753= 1.3.3 = 
    4854* bottom CSS- and JavaScript output fixed  
  • wp-minify-fix/tags/1.3.4/wp-minify.php

    r892638 r892852  
    44Plugin URI: http://wordpress.org/plugins/wp-minify-fixed/ 
    55Description: [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files to improve page load time. 
    6 Version: 1.3.3 
     6Version: 1.3.4 
    77Author: NodeCode 
    88Author URI: http://nodecode.de 
     
    3535  var $name_proper = 'WP Minify Fix';  
    3636  var $required_wp_version = '2.7'; 
    37   var $version = '1.3.3'; 
     37  var $version = '1.3.4'; 
    3838 
    3939  var $c = null; 
     
    518518    $site_url = trailingslashit(get_option('siteurl')); 
    519519    $url = str_replace($site_url, '', $url); // relative paths only for local urls 
    520     $url = preg_replace('/^\//', '', $url); // strip front / if any 
     520    //$url = preg_replace('/^\//', '', $url); // strip front / if any 
    521521    $url = preg_replace('/\?.*/i', '', $url); // throws away parameters, if any 
    522522    return $url; 
     
    528528    } 
    529529 
    530     if (substr($url, 0, 4) != 'http' 
     530    if (substr($url, 0, 4) != 'http' && substr($url, 0, 2) != '//' 
    531531      && (substr($url, -3, 3) == '.js' || substr($url, -4, 4) == '.css')) { 
    532532      return false; 
     
    785785 
    786786    foreach ($script_tags_match[0] as $script_tag) { 
    787       if (strpos(strtolower($script_tag), 'text/javascript') !== false) { 
    788         preg_match('/src=[\'"]([^\'"]+)/', $script_tag, $src_match); 
    789         if ($src_match[1]) { 
    790           // include it if it is in the include list 
    791           $include = false; 
    792           $inclusions = $wpm_options['js_include']; 
    793           foreach ($inclusions as $include_pat) { 
    794             $include_pat = trim($include_pat); 
    795             if (strlen($include_pat) > 0 && strpos($src_match[1], $include_pat) !== false) { 
    796               $include = true; 
     787      preg_match('/src=[\'"]([^\'"]+)/', $script_tag, $src_match); 
     788      if ($src_match[1]) { 
     789        // include it if it is in the include list 
     790        $include = false; 
     791        $inclusions = $wpm_options['js_include']; 
     792        foreach ($inclusions as $include_pat) { 
     793          $include_pat = trim($include_pat); 
     794          if (strlen($include_pat) > 0 && strpos($src_match[1], $include_pat) !== false) { 
     795            $include = true; 
     796            break; 
     797          } 
     798        } 
     799 
     800        if (!$include) { 
     801          // support external files? 
     802          if (!$wpm_options['cache_external'] && $this->is_external($src_match[1])) { 
     803            continue; // skip if we don't cache externals and this file is external 
     804          } 
     805 
     806          // do not include anything in excluded list 
     807          $skip = false; 
     808          $exclusions = array_merge($this->default_exclude, $wpm_options['js_exclude']); 
     809          foreach ($exclusions as $exclude_pat) { 
     810            $exclude_pat = trim($exclude_pat); 
     811            if (strlen($exclude_pat) > 0 && strpos($src_match[1], $exclude_pat) !== false) { 
     812              $skip = true; 
    797813              break; 
    798814            } 
    799815          } 
    800  
    801           if (!$include) { 
    802             // support external files? 
    803             if (!$wpm_options['cache_external'] && $this->is_external($src_match[1])) { 
    804               continue; // skip if we don't cache externals and this file is external 
    805             } 
    806  
    807             // do not include anything in excluded list 
    808             $skip = false; 
    809             $exclusions = array_merge($this->default_exclude, $wpm_options['js_exclude']); 
    810             foreach ($exclusions as $exclude_pat) { 
    811               $exclude_pat = trim($exclude_pat); 
    812               if (strlen($exclude_pat) > 0 && strpos($src_match[1], $exclude_pat) !== false) { 
    813                 $skip = true; 
    814                 break; 
    815               } 
    816             } 
    817             if ($skip) continue; 
    818           } 
    819  
    820           $content = str_replace($script_tag, '', $content); 
    821           $js_locations[] = $this->get_js_location($src_match[1]); 
     816          if ($skip) continue; 
    822817        } 
     818 
     819        $content = str_replace($script_tag, '', $content); 
     820        $js_locations[] = $this->get_js_location($src_match[1]); 
    823821      } 
    824822    } 
  • wp-minify-fix/trunk/readme.txt

    r892638 r892852  
    44Requires at least: 2.7 
    55Tested up to: 3.8.1 
    6 Stable Tag: 1.3.3 
     6Stable Tag: 1.3.4 
    77 
    88[Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files 
     
    2222* move CSS-@imports to the top of the output 
    2323* bottom CSS- and JavaScript output fixed 
     24* support for script-tags without `type="text/javascript"` 
     25* detection of protocol-relative URLs as external file (e.g. Google AdSense) 
    2426 
    2527= How Does it Work? = 
     
    4547 
    4648== Changelog == 
     49= 1.3.4 = 
     50* support for script-tags without `type="text/javascript"` 
     51* detection of protocol-relative URLs as external file (e.g. Google AdSense) 
     52 
    4753= 1.3.3 = 
    4854* bottom CSS- and JavaScript output fixed  
  • wp-minify-fix/trunk/wp-minify.php

    r892638 r892852  
    44Plugin URI: http://wordpress.org/plugins/wp-minify-fixed/ 
    55Description: [Fixed] This plugin uses the Minify engine to combine and compress JS and CSS files to improve page load time. 
    6 Version: 1.3.3 
     6Version: 1.3.4 
    77Author: NodeCode 
    88Author URI: http://nodecode.de 
     
    3535  var $name_proper = 'WP Minify Fix';  
    3636  var $required_wp_version = '2.7'; 
    37   var $version = '1.3.3'; 
     37  var $version = '1.3.4'; 
    3838 
    3939  var $c = null; 
     
    518518    $site_url = trailingslashit(get_option('siteurl')); 
    519519    $url = str_replace($site_url, '', $url); // relative paths only for local urls 
    520     $url = preg_replace('/^\//', '', $url); // strip front / if any 
     520    //$url = preg_replace('/^\//', '', $url); // strip front / if any 
    521521    $url = preg_replace('/\?.*/i', '', $url); // throws away parameters, if any 
    522522    return $url; 
     
    528528    } 
    529529 
    530     if (substr($url, 0, 4) != 'http' 
     530    if (substr($url, 0, 4) != 'http' && substr($url, 0, 2) != '//' 
    531531      && (substr($url, -3, 3) == '.js' || substr($url, -4, 4) == '.css')) { 
    532532      return false; 
     
    785785 
    786786    foreach ($script_tags_match[0] as $script_tag) { 
    787       if (strpos(strtolower($script_tag), 'text/javascript') !== false) { 
    788         preg_match('/src=[\'"]([^\'"]+)/', $script_tag, $src_match); 
    789         if ($src_match[1]) { 
    790           // include it if it is in the include list 
    791           $include = false; 
    792           $inclusions = $wpm_options['js_include']; 
    793           foreach ($inclusions as $include_pat) { 
    794             $include_pat = trim($include_pat); 
    795             if (strlen($include_pat) > 0 && strpos($src_match[1], $include_pat) !== false) { 
    796               $include = true; 
     787      preg_match('/src=[\'"]([^\'"]+)/', $script_tag, $src_match); 
     788      if ($src_match[1]) { 
     789        // include it if it is in the include list 
     790        $include = false; 
     791        $inclusions = $wpm_options['js_include']; 
     792        foreach ($inclusions as $include_pat) { 
     793          $include_pat = trim($include_pat); 
     794          if (strlen($include_pat) > 0 && strpos($src_match[1], $include_pat) !== false) { 
     795            $include = true; 
     796            break; 
     797          } 
     798        } 
     799 
     800        if (!$include) { 
     801          // support external files? 
     802          if (!$wpm_options['cache_external'] && $this->is_external($src_match[1])) { 
     803            continue; // skip if we don't cache externals and this file is external 
     804          } 
     805 
     806          // do not include anything in excluded list 
     807          $skip = false; 
     808          $exclusions = array_merge($this->default_exclude, $wpm_options['js_exclude']); 
     809          foreach ($exclusions as $exclude_pat) { 
     810            $exclude_pat = trim($exclude_pat); 
     811            if (strlen($exclude_pat) > 0 && strpos($src_match[1], $exclude_pat) !== false) { 
     812              $skip = true; 
    797813              break; 
    798814            } 
    799815          } 
    800  
    801           if (!$include) { 
    802             // support external files? 
    803             if (!$wpm_options['cache_external'] && $this->is_external($src_match[1])) { 
    804               continue; // skip if we don't cache externals and this file is external 
    805             } 
    806  
    807             // do not include anything in excluded list 
    808             $skip = false; 
    809             $exclusions = array_merge($this->default_exclude, $wpm_options['js_exclude']); 
    810             foreach ($exclusions as $exclude_pat) { 
    811               $exclude_pat = trim($exclude_pat); 
    812               if (strlen($exclude_pat) > 0 && strpos($src_match[1], $exclude_pat) !== false) { 
    813                 $skip = true; 
    814                 break; 
    815               } 
    816             } 
    817             if ($skip) continue; 
    818           } 
    819  
    820           $content = str_replace($script_tag, '', $content); 
    821           $js_locations[] = $this->get_js_location($src_match[1]); 
     816          if ($skip) continue; 
    822817        } 
     818 
     819        $content = str_replace($script_tag, '', $content); 
     820        $js_locations[] = $this->get_js_location($src_match[1]); 
    823821      } 
    824822    } 
Note: See TracChangeset for help on using the changeset viewer.