• Resolved emmamiumiu

    (@emmamiumiu)


    Hello there,

    I’ve been asked to remove version information on the source code and I’ve used a plugin to do so but I’ve found that version information about Complianz can still be seen in the following script.

    Is there a way to hide this information?

    <script type='text/javascript' id='cmplz-cookiebanner-js-extra'>
    /* <![CDATA[ */
    var complianz = {"prefix":"cmplz_","user_banner_id":"2","set_cookies":[],"block_ajax_content":"","banner_version":"23","version":"6.3.5","store_consent":"","do_not_track":""(...)};
    /* ]]> */
    </script>

    thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    @emmamiumiu This is possible, using a snippet like this:

    function cmplz_my_remove_version($output, $obj){
        $output['version'] = '11';//your custom version here
        return $output;
    }
    add_filter( 'cmplz_cookiebanner_settings_front_end', 'cmplz_my_remove_version', 10, 2 );

    Please note that the version is used to check if the localstorage for users needs to be cleared. A possible solution is to use a hash of the cmplz_version constant or something like ’10.’.cmplz_version

    Thread Starter emmamiumiu

    (@emmamiumiu)

    @rogierlankhorst

    Thank you so much for your quick answer.

    Do you mean that i shouldn’t leave it empty?

    Sorry i didn’t understand the

    use a hash of the cmplz_version constant or something like ’10.’.cmplz_version

    Plugin Author Rogier Lankhorst

    (@rogierlankhorst)

    Yes, preferably it’s not empty. Something like:

    $output['version'] = '10'.cmplz_version;

    A hash is probably not necessary, but can be created like this:

    password_hash(cmplz_version, PASSWORD_DEFAULT);

    Thread Starter emmamiumiu

    (@emmamiumiu)

    @rogierlankhorst

    Got it!
    Thank you so much for your quick and simple answer!

    Have a very nice day,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide version information from source code’ is closed to new replies.