Undefined variable: version
-
Hi Richard,
Great plugin, thank you!
I have noticed this error when installing it to vegafuszeray.hu:
Notice: Undefined variable: version in /home/vegafuszeray/public_html/wp-content/plugins/cookie-law-info/php/functions.php on line 137
I’ve fixed it by adding $version = ‘1.5.3’; after the if block. (See below)
Sorry if this is a repost, I haven’t seen this error posted in the forum.
Cheers,
Adamfunction cookielawinfo_enqueue_frontend_scripts() {
$the_options = cookielawinfo_get_admin_settings();
if ( $the_options[‘is_on’] == true ) {/**
* Force reload
*/
$version = ‘1.5.3’;wp_register_style( ‘cookielawinfo-style’, CLI_PLUGIN_URL . ‘css/cli-style.css’, null, $version );
wp_enqueue_style( ‘cookielawinfo-style’ );wp_enqueue_script( ‘cookie-law-info-script’, CLI_PLUGIN_URL . ‘js/cookielawinfo.js’, array( ‘jquery’ ), $version );
}
$version = ‘1.5.3’;
wp_register_style( ‘cookielawinfo-table-style’, CLI_PLUGIN_URL . ‘css/cli-tables.css’, null, $version );
}
The topic ‘Undefined variable: version’ is closed to new replies.