These are the constants that are used or can be used with Advanced Ads. Most of these constants can just be defined in your site’s wp-config.php file with a single line like this:
define( 'ADVANCED_ADS_PRO_REFERRER_EXDAYS', 0 );
This constant is set in case ads are disabled. You can either set it manually in your theme or plugin or it is included using one of many options to bulk disable ads.
Sample code you can use to set the constant: (always test if it already exists!)
Set this constant in your wp-config.php file in order to allow AdSense ads to appear on 404 error pages.
Basic plugin path.
Basic plugin URL.
Included in Advanced Ads Pro.
Length of the content when ad injection is used.
Set this constant if you don’t want to create responsive images for image ads and images in rich content ads as introduced in WordPress 4.4.
Slug and textdomain used in many places to identify the plugin.
Define this constant with any value and only ad admin users will see the ad debug output.
Set this contant if you don’t want anonymizeIp enabled by default with Analytics tracking features.
Set this constant in order to prevent overriding attributes in the theme PHP functions or shortcodes to work.
Set this constant to disable code highlighting in the plain text ad type.
Set this constant in order to disable ad group weight updates in the frontend. Only on very high traffic sites it can happen that the ad weights get overridden through a frontend call while an admin saves them in the admin area, so the old value is restored and the update has no effect.
Remove the shortcode icon from the TinyMCE interface for all users.
Set this constant to remove the option to use and execute PHP within ad code.
Set this constant in order to allow revisions for ads (only ad content).
Log requests to Google AdSense API in wp-content/advanced-ads-google-api-requests.log .
Allow applying content injection to a custom filter.
See an example here.
Set this constant in order to allow injection of ads into hidden elements. Especially meant for the Custom Position placement.
Set the cookie duration of the page impressions visitor condition in Advanced Ads Pro in days. Default: 3650 days (10 years).
Set the cookie duration of the URL referrer visitor condition in Advanced Ads Pro in days. Default: 365 days.
Set the cookie duration of the visitor profile cookie in seconds. Default 2592000 seconds (30 days).
Disable the browser width visitor condition in the Responsive add-on.
Set this constant to show license debug information in Advanced Ads > Settings > Licenses when trying to enable or disable a license. It will prevent the license activation to work, so remove it if no longer needed.
Don’t show critical plugin errors in WordPress Admin.
Define this constant in order to activate a tracking debug log. Find more details under Debug tracking here.
Set this constant in order to not spread impressions and clicks over a given period when an impression or click limit and an expiry date is set.
Don’t generate a public stats page per ad.
Don’t track any activity from logged in users