Sid
Custom message cookiebar.
by artcom venture GmbH · github.com/artcomventure/wordpress-plugin-cookiebar
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/artcomventure/wordpress-plugin-cookiebar/archive/refs/heads/master.zipReadme
Sid ... THE WordPress Cookiebar
Custom message cookiebar.
Installation
- Upload files to the
/wp-content/plugins/directory of your WordPress installation.
- Either download the latest files and extract zip (optionally rename folder)
- ... or clone repository:
$ cd /PATH/TO/WORDPRESS/wp-content/plugins/ $ git clone https://github.com/artcomventure/wordpress-plugin-cookiebar.gitIf you want a different folder name than
wordpress-plugin-cookiebarextend clone command by'FOLDERNAME'(replace the word'FOLDERNAME'by your chosen one):$ git clone https://github.com/artcomventure/wordpress-plugin-cookiebar.git 'FOLDERNAME'
- Activate the plugin 'Sid' through the 'Plugins' screen in WordPress.
- Enjoy
Settings
Once activated you'll find the 'Cookiebar' settings page listed in the submenu of 'Settings'.
- Enter the content of the cookiebar (multi-language-ready1).
- Set confirmation/rejection UI (text and type).
- Define cookiebar style (font size, colors, position).
- UX

1 Compatible with Bogo, Polylang, WP Multilang and all others2
2 Edit the list of languages with filter hook ('sid_get_available_languages') see Usage PHP
Usage
Javascript
// do stuff the moment cookiebar is confirmed
document.body.addEventListener( 'sid-accepted', function() {
// ...
}, false );
if ( typeof Sid === 'undefined' || Sid.accepted ) {
// do stuff if cookiebar is not in use or already confirmed
}
// do stuff the moment cookiebar is rejected
document.body.addEventListener( 'sid-declined', function() {
// ...
}, false );
if ( typeof Sid === 'undefined' || Sid.declined ) {
// do stuff if cookiebar is not in use or already declined
}
PHP
if ( !function_exists( 'sid_is_accepted' ) || sid_is_accepted() ) {
// do stuff if cookiebar is confirmed
}
if ( !function_exists( 'sid_is_declined' ) || sid_is_declined() ) {
// do stuff if cookiebar is declined
}
// edit the list of languages with filter hook
add_filter( 'sid_get_available_languages', 'filter_languages' );
function filter_languages ( $languages ) {
// locale => 'native name'
return $languages;
}
Plugin Updates
Although the plugin is not yet listed on https://wordpress.org/plugins/, you can use WordPress' update functionality to keep it in sync with the files from GitHub.
Please use for this our WordPress Repository Updater with the settings:
- Repository URL: https://github.com/artcomventure/wordpress-plugin-cookiebar/
- Subfolder (optionally, if you don't want/need the development files in your environment): build
We test our plugin through its paces, but we advise you to take all safety precautions before the update. Just in case of the unexpected.
Questions, concerns, needs, suggestions?
Don't hesitate! Issues welcome.