Find what the plugin loads on your WordPress website pages

TermsFeed AutoTerms loads 1 stylesheet and up to 3 scripts on a website page, each under a WordPress handle that your code depends on or a page speed plugin excludes. The Cookie Consent kit prints its configuration and its vendor scripts inline, with fixed ids. The notice kits write 3 cookies from JavaScript and ask your WordPress website for current Update Notices on a cached page.

TermsFeed Free Cookie Consent 4.2.0 is the script the Cookie Consent kit loads. Look up its methods, callbacks, events, consent cookie, and markup in Free Cookie Consent for Developers.

Website script and style handles

4 handles cover every file the plugin loads on the front end of your WordPress website, and none of them loads on wp-login.php or wp-register.php.

Handle Type What it loads Printed in Loaded when
wpautoterms_css Style The stylesheet for the kit containers, the footer legal links, and the notices, with the plugin version as ver <head> Every website page
wpautoterms_base Script The helper wpAutoTermsDomReady(), with no dependencies <head> Registered on every page, printed only as a dependency of wpautoterms_js_notices or of a script of yours
wpautoterms_js_notices Script The Cookie Notice and Update Notices script, which depends on jquery, wp-util, and wpautoterms_base Footer The Cookie Notice kit or the Update Notices kit is on
wpautoterms_js_cookie_consent Script Cookie Consent 4.2.0 from https://www.termsfeed.com/public/cookie-consent/4.2.0/cookie-consent.js, with the ver parameter WordPress adds <head> The Cookie Consent kit is on

WordPress prints each file with the id <handle>-js or <handle>-css, and the notice settings in an inline script before the notices script. Version 3.0.8 replaced the notice handles wpautoterms_js_cookies_notice and wpautoterms_js_update_notice with wpautoterms_js_notices, so replace the old handles in the exclusion list of any optimization plugin.

The kit colors and fonts print as <style type="text/css" media="all"> elements without an id, and the notices script adds <style id="wpautoterms-top-fixed-style"> and <style id="wpautoterms-bottom-fixed-style"> to move the body:before and body:after pseudo-elements. Look up the CSS classes and container IDs of every kit except Cookie Consent in TermsFeed AutoTerms CSS Classes and Containers.

The Cookie Consent kit prints up to 3 inline elements with fixed ids in the footer, inside #wpautoterms-bottom-static-container, then each vendor script. The ids stay the same on every page, so your own scripts and styles target these elements by id.

Id Element Holds Printed when
termsfeed-autoterms-cookie-consent-style <style> The Additional CSS on the Customization tab The field holds CSS
termsfeed-autoterms-cookie-consent-callbacks <script> The Callbacks field, assigned to window.wpautotermsCookieConsentCallbacks The Callbacks field holds an object literal
termsfeed-autoterms-cookie-consent-script <script> The configuration and the call that starts Cookie Consent, run once the page is parsed Always, while the kit is on
termsfeed-autoterms-cookie-consent-vendor-script-<name> <script type="text/plain"> A vendor script that has no id of its own A vendor script with code is stored

The kit prints the vendor scripts after the inline elements, each between 2 HTML comments that name it. Find the full footer markup and the id rule for vendor scripts in Cookie Banner Code on WordPress Pages.

JavaScript globals the plugin defines for your scripts and front-end tests

The plugin defines these globals, which tell your script or a front-end test what the plugin ran on the page. Each one exists only on a page where the plugin printed the script that defines it.

Global Type Present when Holds
wpAutoTermsDomReady( fn ) Function wpautoterms_base is printed Runs fn( jQuery ) once the DOM is parsed and jQuery exists; a call made after that runs fn at once
wpautoterms_js_cookies_notice Object The Cookie Notice kit is on disable ("1" for a logged-in user while "Disable for logged-in users" is "yes", otherwise ""), cookie_path, cookie_name (wpautoterms-cookies-notice), class (wpautoterms-cookies-notice)
wpautoterms_js_update_notice Object The Update Notices kit is on disable, cookie_path, data (the notice data the page carries), ajaxurl, action (wpautoterms_check_updates), cache_detector_cookie, cache_detector_path, cache_detector_domain, cache_detector_value
window.wpautotermsCookieConsentCallbacks Object The Cookie Consent kit is on with valid Callbacks The object of the Callbacks field, which the kit passes to Cookie Consent
window.wpautotermsNoticesInitialized Boolean The notices script ran true; a second copy of the notices script stops when it finds it

wpAutoTermsDomReady() waits for jQuery that a page speed plugin combines, defers, or delays. It checks every 50 milliseconds for 5 seconds, then every 500 milliseconds (0.5 seconds), and stops after 5 minutes. It checks again on the first mouse movement, click, key press, scroll, or touch, and on the load event, and an error in one handler does not stop the others.

Use wpAutoTermsDomReady() in your own script by naming wpautoterms_base and jquery as dependencies. The helper waits for jQuery but never loads it, which is why jquery is a dependency. Put the PHP in the child theme functions.php, and save the script as js/legal-tweaks.js in the child theme.

add_action(
	'wp_enqueue_scripts',
	function () {
		wp_enqueue_script(
			'mytheme-legal-tweaks',
			get_stylesheet_directory_uri() . '/js/legal-tweaks.js',
			array( 'wpautoterms_base', 'jquery' ),
			'1.0.0',
			true
		);
	}
);

The script labels the footer legal links for screen readers once jQuery runs, including a jQuery that a page speed plugin delays.

wpAutoTermsDomReady( function ( $ ) {
	$( '.wpautoterms-footer' ).attr( 'role', 'navigation' ).attr( 'aria-label', 'Legal pages' );
} );

A front-end test reads the same globals. This check prints the globals in the Console tab of DevTools on a page with the Cookie Notice kit on.

( function () {
	var notice = document.querySelector( '.wpautoterms-cookies-notice' );

	console.table( {
		noticesScriptRan: window.wpautotermsNoticesInitialized === true,
		cookieNoticeShown: !! notice && window.getComputedStyle( notice ).display !== 'none',
		cookieNoticeClosed: document.cookie.indexOf( 'wpautoterms-cookies-notice=1' ) !== -1,
		cookieConsentCallbacks: typeof window.wpautotermsCookieConsentCallbacks
	} );
} )();

For a logged-out visitor who has not closed the Cookie Notice, noticesScriptRan and cookieNoticeShown print true, and cookieNoticeClosed prints false. cookieConsentCallbacks prints object while the Cookie Consent kit is on with Callbacks, and undefined otherwise.

The post-load jQuery event fires after the Update Notices render. Attach code to it with TermsFeed AutoTerms Action Hooks and Filters.

Cookies the notice kits write

The plugin writes 3 cookies from JavaScript for the Cookie Notice and Update Notices kits, and does not set cookies from PHP. Each cookie lasts 7 days, because Safari caps cookies that JavaScript writes at 7 days. The values are URL-encoded, and the cookies do not carry a Secure or SameSite attribute, so the browser applies its default. Find each cookie under Cookies in the Application tab of Chrome DevTools.

Cookie Value Lifetime Path and domain Written when
wpautoterms-cookies-notice 1 7 days The site home path, such as / or /blog/, on the current host The visitor clicks the Cookie Notice close link
wpautoterms-update-notice-<post ID> The modified time of the legal page, as a number of seconds 7 days The site home path, on the current host The visitor closes an Update Notice, 1 cookie for each page the notice lists
wpautoterms_cache_detector A random token of letters and digits 7 days The WordPress cookie path and cookie domain, COOKIEPATH and COOKIE_DOMAIN Every page load while the Update Notices kit is on, except for logged-in visitors while "Disable for logged-in users" is "yes"

The cache detector tells a fresh page from a cached one. The page echoes the token that the request carried, and a page that echoes a different token, or a first page view with no token, counts as cached.

The Cookie Consent kit does not set a cookie of its own. Decode the consent cookie that Cookie Consent writes with the steps in Read the Consent State With Free Cookie Consent.

The update check the notices script sends to admin-ajax.php

On a page that the plugin treats as cached, the notices script sends POST /wp-admin/admin-ajax.php with the body action=wpautoterms_check_updates. The request does not carry a nonce, and logged-out visitors send it. The response lists the Update Notices that no cookie in the browser has dismissed yet.

The same request sent with curl, with example.com standing for your WordPress website, returns the notices a new visitor gets.

curl -s -X POST -d 'action=wpautoterms_check_updates' https://example.com/wp-admin/admin-ajax.php

A response with 1 notice has this shape.

{
  "data": [
    {
      "message": "Our <a href=\"https://example.com/termsfeed/privacy-policy/\">Privacy Policy</a> has been updated on October 3, 2026.",
      "cookies": ["wpautoterms-update-notice-12"],
      "values": [1791016000]
    }
  ]
}

The response is {"data":[]} while the Update Notices kit is off, and for a logged-in user while "Disable for logged-in users" is "yes". A firewall or security plugin that blocks admin-ajax.php for visitors stops the Update Notices on cached pages, and the Console shows [WPAutoTerms][UpdateNotice] Query error. Allow the request with the steps in Update Notice Not Appearing in WordPress.

Exclude the AutoTerms plugin scripts from delay in page speed plugins

Exclude the Cookie Consent script and the 2 inline scripts the Cookie Consent kit prints from JavaScript delay in page speed plugins such as WP Rocket and LiteSpeed Cache. The run script starts Cookie Consent as soon as the page is parsed. With only the Cookie Consent script delayed, the page does not get the consent banner and the Console shows cookieconsent is not defined. With both delayed, the consent banner appears after the first scroll or click.

Add these strings to the list of scripts that your page speed plugin excludes from JavaScript delay. The first matches the script URL, and the other 2 match the inline script code.

www.termsfeed.com/public/cookie-consent/
wpautotermsCookieConsentCallbacks
wpautotermsRunCookieConsent

Enter these strings rather than the script ids. WP Rocket takes file URLs or keywords in the "Excluded JavaScript Files" box of "Delay JavaScript execution". LiteSpeed Cache takes full addresses or partial strings in "JS Deferred / Delayed Excludes". After any change to a page speed plugin, check in the page source that each JavaScript vendor script still carries type="text/plain" in its own <script> tag, outside any combined file.

The Cookie Notice and Update Notices need an exclusion only while a combined file fails with an error in the Console. wpAutoTermsDomReady() waits for jQuery, so the bars appear once jQuery and the notices script load, after the first interaction when a plugin delays scripts until then. The Update Notices wait up to 10 seconds for wp-util, then log [WPAutoTerms][UpdateNotice] wp.template is not available in the Console. Set up and test the exclusions for each page speed plugin with WordPress Caching Plugins.