[resolved] Rafflecopter and Autoptimize problem (3 posts)

  1. Josef Seidl
    Posted 3 years ago #

    Hi futtta,

    today I tried to implement Rafflecopter into a blog post and found a problem in combination with Autoptimize.

    If I insert the following Rafflecopter code

    <a class="rafl" id="rc-fcf3520" href="http://www.rafflecopter.com/rafl/display/fcf3520/" rel="nofollow">Rafflecopter Giveaway</a><br />
    <script type="text/javascript" src="//d12vno17mo87cx.cloudfront.net/embed/rafl/cptr.js"></script>

    in one of my blog articles, the javascript code will be deleted after publishing the article. If I set the option "Optimize JavaScript Code?" to OFF in the settings of Autoptimize it works fine.

    Is this a general problem or how can I solve this problem without deactivating JavaScript optimization.

    The link to my article is Blog IT-Solutions



  2. Frank Goossens
    Plugin Author

    Posted 3 years ago #

    You can exclude javascript from being processed by Autoptimize by adding e.g. their filename (cptr.js in your case) to the array "dontmove" in wp-options/plugins/autoptimize/classes/autoptimizeScripts.php.

    In the upcoming 1.6.0 there will be a form on the Autoptimize admin page to do this (so you don't have to re-apply this with every update of the plugin).

  3. Josef Seidl
    Posted 3 years ago #

    Thanks for this great support. Now it works! :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.