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.
Thread Starter
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;
}