• Hiya,

    Thanks for updating the plugin and making the front-end texts translatable.

    I found a number of errors in my error log and things breaking in the plugin. Please accept the following fixes.

    File: cookiecontrol.php

    Find line 93:

    wp_register_style( 'style.css', $siteurl.'/wp-content/plugins/cookie-control/css/style.css', null, '1.0', 'screen' );

    Replace with:

    wp_register_style( 'ccc_style', plugins_url( 'css/style.css', dirname( __FILE__ ) ), null, '1.0', 'screen' );

    Find line 132:

    <input type="text" name="cookiecontrol_settings[apiKey]" id="cookiecontrol_settings[apiKey]" value="<?php echo $options['apiKey'] ?>" size="50" />

    Replace with:

    <input type="text" name="cookiecontrol_settings[apiKey]" id="cookiecontrol_settings[apiKey]" value="<?php if( isset( $options['apiKey'] ) ) { echo $options['apiKey']; } ?>" size="50" />

    Find line 140-143:

    <input type="radio" class="first" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_FREE" <?php checked('PROD_FREE', $options['product']); ?> />Free
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID" <?php checked('PROD_PAID', $options['product']); ?> />Single Domain
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID_MULTISITE" <?php checked('PROD_PAID_MULTISITE', $options['product']); ?> />Multi Domain
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID_CUSTOM" <?php checked('PROD_PAID_CUSTOM', $options['product']); ?> />Custom

    Replace with:

    <input type="radio" class="first" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_FREE" <?php ( isset( $options['product'] ) ? checked('PROD_FREE', $options['product']) : '' ); ?> />Free
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID" <?php ( isset( $options['product'] ) ? checked('PROD_PAID', $options['product']) : '' ); ?> />Single Domain
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID_MULTISITE" <?php ( isset( $options['product'] ) ? checked('PROD_PAID_MULTISITE', $options['product']) : '' ); ?> />Multi Domain
    			<input type="radio" name="cookiecontrol_settings[product]" id="cookiecontrol_settings[product]" value="PROD_PAID_CUSTOM" <?php ( isset( $options['product'] ) ? checked('PROD_PAID_CUSTOM', $options['product']) : '' ); ?> />Custom

    Find line 466:

    wp_enqueue_script('cookiecontrol', WP_CONTENT_URL.'/plugins/cookie-control/js/cookieControl-6.1.min.js', array('jquery'), '', false);

    Replace with:

    wp_enqueue_script('cookiecontrol', plugins_url( 'js/cookieControl-6.1.min.js', dirname( __FILE__ ) ), array('jquery'), '', false);

    If you would be willing to put the plugin code on GitHub or a similar version control website, I’ll gladly send you some pull requests with these and other fixes.

    Hope this helps!

    Smile,
    Juliette

    https://www.ads-software.com/plugins/cookie-control/

  • The topic ‘Various small bugs fixes’ is closed to new replies.