WordPress.org

Ready to get started?Download WordPress

Forums

Disabling a plugin with javascript (1 post)

  1. al_bourne
    Member
    Posted 1 year ago #

    Hi there,

    I wondered if anyone out there can help me.

    I have "Facebook Like Button" running as a plugin on my wordpress blog. Works great and as it should.

    Since the EU cookie law policy came into force I need to disable the plugin until the user consents.

    I have a cookie consent working (not a plugin) which requires me to put the following code around the elements I wish to stop working:

    <script>
    /// if user has accepted the cookie agreement..
    if (jQuery.cookie('cc_cookie_accept') == "cc_cookie_accept") {
    ///// allow plugin to run
    /// plugin code here
    }
    </script>

    Is this at all achievable? I need to stop the facebook like button plugin working completely not just hide the buttons. As the purpose is to stop any cookies from being placed.

    Any help or direction is greatly appreciated.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Topic