WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[Feature Request] Filter on $cOptions (code attached) (1 post)

  1. setola
    Member
    Posted 2 years ago #

    Hello Frederick,

    for some reasons I have to minify some js that are symlinked on the server. I've tried to find some settings in the admin page but I failed :)
    Can it be possible to have a way to add the real path into the allowed paths of Minify?

    For info here's the code I've edited to make it work:

    line 29 of ./lib/Minify/Minify/Controller/MinApp.php

    $cOptions = apply_filters('w3tc_custom_minapp_options',array_merge(
                array(
                    'allowDirs' => '//'
                    ,'groupsOnly' => false
                    ,'groups' => array()
                    ,'maxFiles' => 100
                )
                ,(isset($options['minApp']) ? $options['minApp'] : array())
            ));

    and then added these lines to my functions.php

    add_filter('w3tc_custom_minapp_options', 'allow_dirs', 10, 1);
    function allow_dirs($arr){
    	$arr['allowDirs'] = array_merge((array)$arr['allowDirs'], array('/usr/local/fastbooking/'));
    	return $arr;
    }

    (I know this is really a workaround... but it works for now :) )

    http://wordpress.org/extend/plugins/w3-total-cache/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic