Support » Theme: Hueman » minify dynamic js and css created by php

  • Hello, I just got a little bit fighting with Autoptimize and his “Also aggregate inline JS?” function. because no matter I tried, AO cache still growing, because of different JS for every page.

    I found the problem – some Hueman’s JS and CSS are created on the fly. – Solved by disabling this feature.

    But can you please minify this generated JS in PHP? For example in this files are some parts of non minified JS which is included in to page and webs like don’t like it ๐Ÿ™‚

Viewing 3 replies - 1 through 3 (of 3 total)
  • no, AO does not aggregate .php-files, only static .css or .js ones I’m afraid. an alternative could be to let huaman create the JS (and CSS) on the fly (as static files, I suppose) and then to exclude those that have cache-breaking code from optimization?


    Thread Starter mikrom


    yes, but mainly I think hueman authors can chenge for example in init-front.php around line 458


            <script type="text/javascript">
              jQuery( function($){
                if ( $('#flexslider-featured').length ) {
                  $('#flexslider-featured').on('featured-slider-ready', function() {
                    $( '#<?php echo $_unique_id; ?>' ).animateSvg();
                } else { $( '#<?php echo $_unique_id; ?>' ).animateSvg( { svg_opacity : 0.3, filter_opacity : 0.5 } ); }

    to that

            <script type="text/javascript">
    jQuery(function(a){a("#flexslider-featured").length?a("#flexslider-featured").on("featured-slider-ready",function(){a("#<?php echo $_unique_id; ?>").animateSvg()}):a("#<?php echo $_unique_id; ?>").animateSvg({svg_opacity:.3,filter_opacity:.5})});

    etc in other mentioned files ๐Ÿ™‚

    yeah, that would be a solution as well ๐Ÿ™‚

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘minify dynamic js and css created by php’ is closed to new replies.