Skip to content

Developers page

← The screens of Cookie Rocks

Written for Cookie Rocks 2.11.0, checked on 6 November 2026. The current version is 2.11.2: some details may have changed.

What this screen is for. The Developers screen of the Cookie Rocks menu tells the person who builds or maintains the site what Cookie Rocks was tested with, and which cookies it knows.

The Developers page of Cookie Rocks, with the compatibility table and the known cookies
Cookie Rocks 2.11.2 · Click to enlarge

What to do here

  1. In Compatibility, compare the column Tested with the column On this site. The plugins and themes installed on your site come first.
  2. In Known services, type a name under Find a service to look for the tools your site uses. A tool missing from the list shows as an unknown script on the Cookies screen, where you can report it.

The screen has no settings. The full developer reference is on this site, under Developers.

Compatibility

The introduction gives the date of the last check: “A newer version usually works; it is tested for the next release.” The table has three columns:

  • Software: WordPress, PHP, then plugins and themes.
  • Tested: the version tested and its date, with a label that says how. For WordPress and PHP, the version tested and the minimum.
  • On this site: the version installed on your site, or Not installed.

WordPress, PHP and the plugins and themes installed on your site are in the table. The others are folded under Other plugins and themes tested, with their number. Type a name under Find a plugin or theme: a folded section that holds it opens.

LabelWhat it means
Tested at each versionTested automatically before each release of Cookie Rocks.
Tested on a live siteTried on a real site, at the date shown.
Tested automatically with its latest versionInstalled from WordPress.org in a test WordPress, in its latest version, and tested with Cookie Rocks.
Reproduced in the testsIts behaviour is reproduced in the tests, without the plugin itself.
Written from its documentationSupport written from the documentation of its publisher, not yet tried for real.

The list grows with each version of Cookie Rocks. The table in your administration is the reference for the version you run.

Known services

The 675 tools whose cookies Cookie Rocks knows in your pages, with their logos, in one folded section per category: Necessary, Preferences, Statistics, Marketing, each with its number. Type a name under Find a service to find a tool. The column What it does gives the purpose of each one. The scan of the Cookies screen then says, for each tool found on your site, whether it loads before the visitor’s choice.

Change the look with CSS (Pro)

This section appears with Cookie Rocks Pro only: the Audit adds no banner. Add your CSS where your site already keeps its own:

  • Appearance, Customize, Additional CSS (classic themes);
  • Appearance, Editor, Styles, Additional CSS (block themes);
  • the custom CSS field of your theme or page builder;
  • the stylesheet of your child theme.

Start with the variables: one line changes the whole banner. Use the selector .cr-root[data-theme] so that your values apply in the light and dark themes. The screen shows this example, with a Copy button:

/* Square corners and a lighter shadow, in light and dark themes */
.cr-root[data-theme] {
	--cr-radius: 6px;
	--cr-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

/* Buttons in capital letters */
.cr-root .cr-btn {
	text-transform: uppercase;
	letter-spacing: .04em;
}

If your CSS has no effect, check the Appearance screen. When you change a value there, the banner writes it on the .cr-root element itself, and that value wins over your stylesheet. This applies to --cr-accent, --cr-accent-text, --cr-radius and --cr-gap, and to the shadow when Shadows is off. Either keep the default value on the Appearance screen (20 px for the corners and the distance), or add !important to your value.

Variables

VariableWhat it sets
--cr-accentAccent colour: buttons and switches. Set it on the Appearance screen.
--cr-accent-textText on the accent colour. Chosen automatically to stay readable.
--cr-bgBackground of the banner and the details.
--cr-fgMain text.
--cr-mutedSecondary text.
--cr-lineBorders and separators.
--cr-softLight backgrounds: the “Let me choose” button, the categories.
--cr-trackSwitches that are off.
--cr-shadowShadow of the banner and the details. When Shadows is off on the Appearance screen, no shadow is shown, whatever this value.
--cr-radiusRounded corners, in pixels. Set it on the Appearance screen.
--cr-gapDistance between the banner and the screen edges, in pixels. Set it on the Appearance screen.

--cr-gap sets the distance between the floating box and the screen edges: 20 px by default. The Distance from the screen edges setting of the Appearance screen goes from 0 to 40 px. At 0, the box sits in the corner, and its corners on the screen side are square. The bar at the bottom of the page does not change. On a phone, the distance is 8 px at most.

Classes

ClassElement
.cr-rootContainer of everything. Attributes: data-theme (auto, light, dark), data-layout (box, bar, and minimal for the discreet box), data-position (left, right).
.cr-bannerThe banner.
.cr-eyebrow, .cr-title, .cr-textSite name, title and text of the banner.
.cr-btn--solid“Reject all” and “Accept all” buttons of the banner, with the same look. In the details, the “Save my choices” button.
.cr-btn--outline“Reject all” and “Accept all” in the details. In the banner, “Reject all” when “Accept all” is highlighted on the Appearance screen.
.cr-btn--soft“Let me choose” button.
.cr-dialogThe details window, with .cr-cat for each category and .cr-switch for the switches.
.cr-widgetThe cookie button.
.cr-toastThe short message after a choice.
.cr-form-noticeThe request shown above forms protected by reCAPTCHA.
.cr-manage-linkThe “Manage cookies” link of the shortcode.
.cr-policy, .cr-policy__serviceThe cookie policy of the shortcode, and the card of each tool in it.

.cr-policy__credit is the thin frame of the credit at the bottom of the cookie policy, when Credit is ticked on the Consent screen. Its style is written in the element itself, so that it fits every theme.

Video and map placeholders are drawn inside their own frame: they follow the accent colour, not your CSS. While the details panel is open, the html element has the class cr-locked.

Hold a script, link, accounts, JavaScript, PHP filters (Pro)

These five sections appear with Cookie Rocks Pro only. They give a short summary, with code to copy:

  • Hold a script until consent: known cookies are held automatically. For another script, change its type and add the category, for example <script type="text/plain" src="…">, or <iframe> for a frame. After consent, held scripts download together and run in page order. A script that takes more than 3 seconds to arrive stops holding back the next ones: code that calls a tool right after its script should wait for that tool to be ready. See JavaScript API and events.
  • Let a script load at once: add the attribute data-cr-ignore to a script or a stylesheet, and Cookie Rocks leaves it alone, before any choice, even when it belongs to a known service. Use it only for code that sets no cookie and sends no personal data, or that the law lets load without consent. It does not apply to iframes.
  • “Manage cookies” link: the [cookie_rocks_link] shortcode, a menu link to #cr-preferences, or any element with the attribute data-cr-open. For the United States, [cookie_rocks_link type="do-not-sell"] writes “Do Not Sell or Share My Personal Information”, in the language of the page. For your own wording: [cookie_rocks_link text="…"]. See Shortcodes.
  • Accounts managed outside WordPress: with the GPC signal honoured, a refusal follows the visitor’s account. WordPress accounts (WooCommerce, memberships) need nothing. If your customers sign in with another system, call do_action( 'cookie_rocks_account', $customer_id ); on each page they see while signed in, before anything is printed (on init, for example). Only a fingerprint of the ID is kept.
  • JavaScript: CookieRocks.open(), CookieRocks.hasConsent(), CookieRocks.onConsent(), the cookie-rocks:change event, and the Google Tag Manager events cr_consent_ready and cr_consent_update, with the variable cr_consent. See JavaScript API and events.
  • PHP filters: cookie_rocks_texts, cookie_rocks_categories, cookie_rocks_services, cookie_rocks_config, cookie_rocks_gcm_map. See PHP filters, actions and REST API, which lists every hook.

Next step: the developer reference.