Plugin Directory

Changeset 190642


Ignore:
Timestamp:
01/06/2010 04:50:00 PM (16 years ago)
Author:
julienappert
Message:

0.1.2

Location:
external-files-optimizer
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • external-files-optimizer/trunk/external-files-optimizer.php

    r186082 r190642  
    55Author: Julien Appert
    66Author URI: http://julienappert.com
    7 Version: 0.1.1
     7Version: 0.1.2
    88Description: automatically combine and compress css/js files generate with wp_head and wp_footer
    99*/
  • external-files-optimizer/trunk/load-styles.php

    r186082 r190642  
    4343   
    4444    // remplace les url() par les url absolues si nécessaire
    45 $content = preg_replace("/url\(['|\"]*([^http:\/\/].*)['|\"]*\)/", "url(".dirname($extfiles['styles'][$handle])."/$1)", $content); 
     45    preg_match_all("/url\(['|\"]*([^'|\"|\)]*)['|\"]*\)/", $content, $matches,PREG_PATTERN_ORDER); 
     46    if(count($matches[1])>0){
     47        foreach($matches[1] as $key=>$match){
     48            if(substr($match,0,7) != 'http://'){
     49                    $content = preg_replace("/(".str_replace(array('(',')','/'), array('\(','\)','\/'),$matches[0][$key]).")/", "url(".dirname($extfiles['styles'][$handle])."/".$match.")", $content);
     50            }
     51        }   
     52    }
    4653   
    4754    $out .= $content ;
  • external-files-optimizer/trunk/readme.txt

    r186082 r190642  
    33Tags:optimize, optimizer, speed,external, file, plugin, css, js
    44Requires at leat: 2.7
    5 Tested up to:2.8.6
    6 Stable tag:0.1.1
     5Tested up to:2.9.1
     6Stable tag:0.1.2
    77
    88Description: automatically combine and compress css/js files generate with wp_head() and wp_footer()
     
    1616== Changelog ==
    1717
     18= 0.1.2 =
     19* bugfix
     20
    1821= 0.1.1 =
    1922* bugfix about relative url in css files
Note: See TracChangeset for help on using the changeset viewer.