WP Manifestindependent plugin directory
manifest / privacy / wordpress-plugin-cookiebar

Sid

Custom message cookiebar.

by artcom venture GmbH · github.com/artcomventure/wordpress-plugin-cookiebar

0stars
0forks

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.zip

Readme

Sid ... THE WordPress Cookiebar

Custom message cookiebar.

Installation

  1. 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.git

    If you want a different folder name than wordpress-plugin-cookiebar extend clone command by 'FOLDERNAME' (replace the word 'FOLDERNAME' by your chosen one):

    $ git clone https://github.com/artcomventure/wordpress-plugin-cookiebar.git 'FOLDERNAME'
  1. Activate the plugin 'Sid' through the 'Plugins' screen in WordPress.
  2. Enjoy

Settings

Once activated you'll find the 'Cookiebar' settings page listed in the submenu of 'Settings'.

  1. Enter the content of the cookiebar (multi-language-ready1).
  2. Set confirmation/rejection UI (text and type).
  3. Define cookiebar style (font size, colors, position).
  4. UX

image

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:

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.

Read the full README on GitHub →