• uDAY

    (@udayborate)


    How to enqueue this css and js file
    /plugins//icegram/assets/css/frontend.min.css?var=1.10.28.2
    /plugins/icegram/message-types/popup/themes/popup.min.css?var=1.10.28.2
    /plugins/icegram/assets/js/icegram.min.js?var=1.10.28.2

    • This topic was modified 5 months, 1 week ago by uDAY.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Icegram

    (@icegram)

    Hi,

    Can you please let me know where and why do you want to enqueue this listed js and css files?
    In Icegram we have already enqueued these js and CSS.

    uDAY

    (@udayborate)

    i m replacing all enqueue plugins and themes url with my cdn url

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @udayborate Unless you are reporting your topic and yourself as a spammer and nee to be banned (and I’m pretty sure that’s not the case) then please do not report topics.

    It’s for eliminating forum abuse or something broken in the forums. It is not a “cut the line and get support faster” link.

    Was trying to do this too. Figured out that you can deliver these scripts and styles through your CDN with filters in your functions.php:

    
    add_filter('add_icegram_css', 'my_icegram_css');
    add_filter('add_icegram_script', 'my_icegram_scripts');
    
    function my_icegram_scripts($scripts){
    	$siteURL = "yoursite.com";
    	$cdnURL = "yourcdn.com";
    	$count = count($scripts);
    	for ($x = 0; $x < $count; $x++) {
    		$value = $scripts[$x];
    		$value = str_replace($siteURL,$cdnURL,$value);
    		$scripts[$x] = $value;
    	}
    	return $scripts;
    }
    
    function my_icegram_css($css){
    	$siteURL = "yoursite.com";
    	$cdnURL = "yourcdn.com";
    	$count = count($css);
    	for ($x = 0; $x < $count; $x++) {
    		$value = $css[$x];
    		$value = str_replace($siteURL,$cdnURL,$value);
    		$css[$x] = $value;
    	}
    	return $css;
    }
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.