Version Description
Download this release
Release Info
Developer | devowl |
Plugin | Real Cookie Banner: GDPR (DSGVO) & ePrivacy Cookie Consent |
Version | 2.10.1 |
Comparing to | |
See all releases |
Version 2.10.1
- CHANGELOG.md +1755 -0
- LICENSE +693 -0
- LICENSE_3RD_PARTY_JS.md +3337 -0
- LICENSE_3RD_PARTY_PHP.md +115 -0
- README.txt +217 -0
- inc/Activator.php +215 -0
- inc/AdInitiator.php +118 -0
- inc/Assets.php +518 -0
- inc/Cache.php +73 -0
- inc/Clear.php +130 -0
- inc/Core.php +816 -0
- inc/DemoEnvironment.php +82 -0
- inc/IpHandler.php +127 -0
- inc/Localization.php +94 -0
- inc/MyConsent.php +367 -0
- inc/RpmInitiator.php +74 -0
- inc/Stats.php +150 -0
- inc/UserConsent.php +392 -0
- inc/Utils.php +551 -0
- inc/api/index.php +3 -0
- inc/api/services.php +62 -0
- inc/base/Core.php +28 -0
- inc/base/UtilsProvider.php +30 -0
- inc/base/index.php +5 -0
- inc/base/others/cachebuster-lib.php +9 -0
- inc/base/others/cachebuster.php +152 -0
- inc/base/others/fallback-already.php +34 -0
- inc/base/others/fallback-php-version.php +24 -0
- inc/base/others/fallback-rest-api.php +29 -0
- inc/base/others/fallback-wp-version.php +28 -0
- inc/base/others/index.php +1 -0
- inc/base/others/start.php +44 -0
- inc/comp/PresetsPluginIntegrations.php +201 -0
- inc/comp/RevisionContextDependingOption.php +100 -0
- inc/comp/index.php +5 -0
- inc/comp/language/Hooks.php +240 -0
- inc/comp/language/index.php +5 -0
- inc/comp/migration/AbstractDashboardTileMigration.php +215 -0
- inc/comp/migration/DashboardTileMigrationMajor2.php +275 -0
- inc/comp/migration/index.php +5 -0
- inc/import/Export.php +260 -0
- inc/import/ExportConsent.php +112 -0
- inc/import/Import.php +326 -0
- inc/import/ImportBlocker.php +171 -0
- inc/import/ImportCookies.php +166 -0
- inc/import/ImportCustomizeBanner.php +122 -0
- inc/import/ImportGroups.php +106 -0
- inc/import/ImportMessages.php +416 -0
- inc/import/ImportSettings.php +146 -0
- inc/import/ImportTcfVendorConfigurations.php +105 -0
- inc/import/index.php +5 -0
- inc/index.php +5 -0
- inc/overrides/interfce/IOverrideCore.php +23 -0
- inc/overrides/interfce/IOverrideStats.php +38 -0
- inc/overrides/interfce/index.php +5 -0
- inc/overrides/interfce/settings/IOverrideConsent.php +24 -0
- inc/overrides/interfce/settings/IOverrideCountryBypass.php +58 -0
- inc/overrides/interfce/settings/IOverrideGeneral.php +30 -0
- inc/overrides/interfce/settings/IOverrideMultisite.php +36 -0
- inc/overrides/interfce/settings/IOverrideTCF.php +70 -0
- inc/overrides/interfce/settings/index.php +5 -0
- inc/overrides/lite/Core.php +672 -0
- inc/overrides/lite/Stats.php +41 -0
- inc/overrides/lite/index.php +5 -0
- inc/overrides/lite/rest/Service.php +63 -0
- inc/overrides/lite/rest/index.php +5 -0
- inc/overrides/lite/settings/Consent.php +22 -0
- inc/overrides/lite/settings/CountryBypass.php +51 -0
- inc/overrides/lite/settings/General.php +26 -0
- inc/overrides/lite/settings/Multisite.php +30 -0
- inc/overrides/lite/settings/TCF.php +65 -0
- inc/overrides/lite/settings/index.php +5 -0
- inc/presets/AbstractBlockerPreset.php +38 -0
- inc/presets/AbstractCookiePreset.php +39 -0
- inc/presets/BannerPresets.php +1921 -0
- inc/presets/BlockerPresets.php +277 -0
- inc/presets/CookiePresets.php +246 -0
- inc/presets/PresetIdentifierMap.php +151 -0
- inc/presets/Presets.php +303 -0
- inc/presets/UpdateNotice.php +139 -0
- inc/presets/free/ElementorPreset.php +86 -0
- inc/presets/free/FontAwesomePreset.php +57 -0
- inc/presets/free/GoogleFontsPreset.php +108 -0
- inc/presets/free/GravatarPreset.php +57 -0
- inc/presets/free/JetPackCommentsPreset.php +430 -0
- inc/presets/free/JetpackSiteStatsPreset.php +397 -0
- inc/presets/free/RealCookieBannerPreset.php +80 -0
- inc/presets/free/WordPressCommentsPreset.php +97 -0
- inc/presets/free/WordPressEmojisPreset.php +55 -0
- inc/presets/free/WordPressPluginEmbed.php +52 -0
- inc/presets/free/WordPressUserLoginPreset.php +100 -0
- inc/presets/free/YoutubePreset.php +403 -0
- inc/presets/free/blocker/FontAwesomePreset.php +37 -0
- inc/presets/free/blocker/GoogleFontsPreset.php +40 -0
- inc/presets/free/blocker/GravatarPreset.php +34 -0
- inc/presets/free/blocker/JetPackCommentsPreset.php +40 -0
- inc/presets/free/blocker/JetPackSiteStatsPreset.php +35 -0
- inc/presets/free/blocker/WordPressCommentsPreset.php +32 -0
- inc/presets/free/blocker/WordPressEmojisPreset.php +33 -0
- inc/presets/free/blocker/WordPressPluginEmbed.php +39 -0
- inc/presets/free/blocker/WordPressUserLoginPreset.php +37 -0
- inc/presets/free/blocker/YoutubePreset.php +45 -0
- inc/presets/free/blocker/index.php +5 -0
- inc/presets/free/index.php +5 -0
- inc/presets/index.php +5 -0
- inc/presets/middleware/AdoptTierFromClassNamespaceMiddleware.php +34 -0
- inc/presets/middleware/BlockerExistsMiddleware.php +44 -0
- inc/presets/middleware/BlockerHostsOptionsMiddleware.php +60 -0
- inc/presets/middleware/CookieBlockerPresetIdsMiddleware.php +74 -0
- inc/presets/middleware/CookieExistsMiddleware.php +34 -0
- inc/presets/middleware/CookieGroupNamesBackwardsCompatibleMiddleware.php +56 -0
- inc/presets/middleware/CookieManagerMiddleware.php +60 -0
- inc/presets/middleware/CookiesDeactivateAutomaticContentBlockerCreationByNeedsMiddleware.php +34 -0
- inc/presets/middleware/DisablePresetByNeedsMiddleware.php +78 -0
- inc/presets/middleware/DisableTechnicalHandlingThroughPluginMiddleware.php +50 -0
- inc/presets/middleware/ExtendsMiddleware.php +64 -0
- inc/presets/middleware/index.php +5 -0
- inc/presets/pro/ActiveCampaignSiteTrackingPreset.php +41 -0
- inc/presets/pro/AdInserterPreset.php +52 -0
- inc/presets/pro/AddThisPreset.php +40 -0
- inc/presets/pro/AddToAnyPreset.php +41 -0
- inc/presets/pro/AdobeTypekitPreset.php +40 -0
- inc/presets/pro/AmazonAssociatesWidgetPreset.php +40 -0
- inc/presets/pro/AnalytifyPreset.php +54 -0
- inc/presets/pro/AnchorFmPreset.php +40 -0
- inc/presets/pro/AppleMusicPreset.php +40 -0
- inc/presets/pro/AwinLinkImageAdsPreset.php +41 -0
- inc/presets/pro/AwinPublisherMasterTagPreset.php +41 -0
- inc/presets/pro/BingAdsPreset.php +0 -0
CHANGELOG.md
ADDED
@@ -0,0 +1,1755 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Change Log
|
2 |
+
|
3 |
+
All notable changes to this project will be documented in this file.
|
4 |
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5 |
+
|
6 |
+
## 2.10.1 (2021-11-24)
|
7 |
+
|
8 |
+
|
9 |
+
### chore
|
10 |
+
|
11 |
+
* block Google Maps embedded with Premium Addons for Elementor (CU-1u409yv)
|
12 |
+
|
13 |
+
|
14 |
+
### fix
|
15 |
+
|
16 |
+
* compatibility with WP Cloudflare Super Page Cache plugin (CU-1uv3wuf)
|
17 |
+
* consider newly requested consent as no-consent-given in consentApi (CU-qtbjxk)
|
18 |
+
|
19 |
+
|
20 |
+
### perf
|
21 |
+
|
22 |
+
* large websites with a lot of external URLs makes the WordPress admin slow (CU-1u9wehh)
|
23 |
+
|
24 |
+
|
25 |
+
### style
|
26 |
+
|
27 |
+
* avoid CLS animation warning in Lighthouse when animations are deactivated (CU-1u9xage)
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
+
|
33 |
+
# 2.10.0 (2021-11-18)
|
34 |
+
|
35 |
+
|
36 |
+
### feat
|
37 |
+
|
38 |
+
* new content blocker template Elementor Forms with Google reCAPTCHA (CU-nqbu52)
|
39 |
+
|
40 |
+
|
41 |
+
### fix
|
42 |
+
|
43 |
+
* add TCF stub to anti-ad-block system (CU-1phrar6)
|
44 |
+
* compatiblity with Themeco X Pro page builder (CU-11eagky)
|
45 |
+
* consents could not be given in private wordpress.com sites (CU-1td2p11)
|
46 |
+
* do not show all Facebook services when only one is found (CU-1nn1qrg)
|
47 |
+
* missing Linkedin Partner ID in service template for noscript fallback (CU-rga6b3)
|
48 |
+
* rename some cookies to be more descriptive about their origin (CU-1tjwxmr)
|
49 |
+
* show a warning in main settings page when the user is using an adblocker (CU-1hwuugw)
|
50 |
+
* show essential services' labels in content blocker form (CU-p5fgk8)
|
51 |
+
* show notice if GTM/MTM is not defined as service but setted as manager (CU-z9n7g2)
|
52 |
+
* with some MySQL database versions the scanner found external URLs are not displayed (CU-1tjtn8q)
|
53 |
+
|
54 |
+
|
55 |
+
### refactor
|
56 |
+
|
57 |
+
* save user country in consent itself instead of independent revision (CU-1tjy2nr)
|
58 |
+
|
59 |
+
|
60 |
+
|
61 |
+
|
62 |
+
|
63 |
+
## 2.9.3 (2021-11-12)
|
64 |
+
|
65 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
66 |
+
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
|
71 |
+
## 2.9.2 (2021-11-11)
|
72 |
+
|
73 |
+
|
74 |
+
### chore
|
75 |
+
|
76 |
+
* remove not-finished translations from feature branches to avoid huge ZIP size (CU-1rgn5h3)
|
77 |
+
|
78 |
+
|
79 |
+
### fix
|
80 |
+
|
81 |
+
* block Google Analytics embedded via Rank Math as locally hosted gtag (CU-1q2x5pa)
|
82 |
+
* block Google Maps in Elementor widget
|
83 |
+
* block gtag events in WooCommerce Enhanced Tracking (CU-1qe7tam)
|
84 |
+
* compatibility with latest Ninja Forms update (CU-1uf8fq9)
|
85 |
+
* compatibility with Modern Events Calendar and Google Maps (CU-1qecxy4)
|
86 |
+
* compatibility with UCSS / CCSS in LiteSpeed Cache plugin (CU-1m1h4mh)
|
87 |
+
* content blocker for Google Maps in WPResidence theme
|
88 |
+
* correctly display special characters in page dropdown in settings (CU-1phmb9g)
|
89 |
+
* correctly filter modified publisher restrictions for TCF purposes (CU-1rarxc7)
|
90 |
+
* do not block content in script text templates (CU-1qe7t0t)
|
91 |
+
* filter by URL with more accurate pure referer respecting current permalink settings (CU-ad0gf1)
|
92 |
+
* redirect back to scanner when creating the WooCommerce service (service without content blocker, CU-1nn08eb)
|
93 |
+
|
94 |
+
|
95 |
+
### refactor
|
96 |
+
|
97 |
+
* extract content blocker to own package @devowl-wp/headless-content-blocker (CU-1nfazd0)
|
98 |
+
* extract HTML-extractor to own package @devowl-wp/fast-html-tag
|
99 |
+
|
100 |
+
|
101 |
+
### style
|
102 |
+
|
103 |
+
* line height in header of elementor widget so content blocker text does not overlap
|
104 |
+
|
105 |
+
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
## 2.9.1 (2021-11-03)
|
110 |
+
|
111 |
+
|
112 |
+
### fix
|
113 |
+
|
114 |
+
* create visual content blocker within responsive container (like Vimeo, CU-1mju68j)
|
115 |
+
* do not lazy load Code on page load scripts when WP Rocket is active (CU-1mjk6cn)
|
116 |
+
* never block inline scripts only holding JSON objects (CU-1mjv9gh)
|
117 |
+
* try to find possible visual content blockers in hidden modals (CU-1my8az3)
|
118 |
+
* warning in PHP 8 when creating a new service (CU-1my8zcu)
|
119 |
+
* warning in PHP 8 when using WP CLI (CU-1my8zcu)
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
+
|
125 |
+
# 2.9.0 (2021-10-12)
|
126 |
+
|
127 |
+
|
128 |
+
### ci
|
129 |
+
|
130 |
+
* remove some jobs no longer needed in CI (CU-1jtj4fg)
|
131 |
+
|
132 |
+
|
133 |
+
### feat
|
134 |
+
|
135 |
+
* allow to filter by context, period and URL in list of consents (CU-ad0gf1)
|
136 |
+
* block Vimeo Showcases in Vimeo content blocker
|
137 |
+
* new service and content blocker template Taboola (CU-n1bn4x)
|
138 |
+
|
139 |
+
|
140 |
+
### fix
|
141 |
+
|
142 |
+
* allow to reset group texts correctly for the current blog language (CU-1k51cgn)
|
143 |
+
* compatibility with Extension for Elementor plugin (CU-1kvu486)
|
144 |
+
* compatibility with Meow Lightbox (CU-1m784c9)
|
145 |
+
* compatibility with WP Google Maps Gold add-on (CU-1kankt3)
|
146 |
+
* compatiblity with Groove Mneu Plugin (CU-1kgeggn)
|
147 |
+
* do not allow to import PRO templates in free version as we cannot ensure up-to-date (CU-1bzrthu)
|
148 |
+
* do not show empty context in context dropdown if there were already consents
|
149 |
+
* do not try to expose empty hosts / URLs in content blocker settings (CU-1k51ax2)
|
150 |
+
* remove Google Adsense warnings in console when ads are initialized multiple times (CU-1m7c86a)
|
151 |
+
* scanner did not found Google reCAPTCHA when used standalone (CU-1kvurfe)
|
152 |
+
* show fallback language for language context is list of consents
|
153 |
+
* use correct user locale for REST API requests in admin area when different from blog language (CU-1k51hkh)
|
154 |
+
|
155 |
+
|
156 |
+
### perf
|
157 |
+
|
158 |
+
* block very (very) large inline CSS (like fusion builder does) took up to 5 seconds (CU-1kvpuwz)
|
159 |
+
|
160 |
+
|
161 |
+
|
162 |
+
|
163 |
+
|
164 |
+
# 2.8.0 (2021-09-30)
|
165 |
+
|
166 |
+
|
167 |
+
### build
|
168 |
+
|
169 |
+
* allow to define allowed locales to make release management possible (CU-1257b2b)
|
170 |
+
* copy files for i18n so we can drop override hooks and get performance boost (CU-wtt3hy)
|
171 |
+
|
172 |
+
|
173 |
+
### chore
|
174 |
+
|
175 |
+
* english translation revision (CU-vhmn9k)
|
176 |
+
* prepare for continuous localization with weblate (CU-f94bdr)
|
177 |
+
* remove language files from repository (CU-f94bdr)
|
178 |
+
* rename 'Statistic' to 'Statistics' (CU-12gwu5r)
|
179 |
+
* translation review round 2 (CU-vhmn9k)
|
180 |
+
|
181 |
+
|
182 |
+
### ci
|
183 |
+
|
184 |
+
* introduce continuous localization (CU-f94bdr)
|
185 |
+
|
186 |
+
|
187 |
+
### feat
|
188 |
+
|
189 |
+
* allow to declare an external URL for imprint and privacy policy page (CU-kv7qu2)
|
190 |
+
|
191 |
+
|
192 |
+
### fix
|
193 |
+
|
194 |
+
* allow to translate external URL of imprint and privacy policy page with WPML and PolyLang in customizer (CU-kv7qu2)
|
195 |
+
* backwards-compatible Statistic cookie group naming for service templates (CU-12gwu5r)
|
196 |
+
* block content also on pages which got declared as hidden in cookie settings (CU-1jkue32)
|
197 |
+
* block Google Maps in Adava with Fusion Builder as "Fusion Google Map" (CU-12b2jft)
|
198 |
+
* content blocker for Google Maps in Avada theme
|
199 |
+
* custom config for COOKIEPATH never should be empty (CU-1jth67d)
|
200 |
+
* do not follow CORS redirected URLs in scanner (CU-11m6me9)
|
201 |
+
* do not show cookie banner in legacy widget preview coming with WP 5.8 (CU-1jdzfnn)
|
202 |
+
* link for customer center in Licensing tab not present (CU-vhmn9k)
|
203 |
+
* make animations work again in Divi page builder when a custom link with blocked URL got created (CU-1jz6bgn)
|
204 |
+
* save job result for cors requests while scanning pages (CU-1je508f)
|
205 |
+
* scanner threw an error when using WP < 5.5 and deleting a file
|
206 |
+
|
207 |
+
|
208 |
+
### perf
|
209 |
+
|
210 |
+
* remove translation overrides in preference of language files (CU-wtt3hy)
|
211 |
+
|
212 |
+
|
213 |
+
### refactor
|
214 |
+
|
215 |
+
* grunt-mojito to abstract grunt-continuous-localization package (CU-f94bdr)
|
216 |
+
* introduce @devowl-wp/continuous-integration
|
217 |
+
* introduce new command with execa instead of own exec implementation
|
218 |
+
|
219 |
+
|
220 |
+
### style
|
221 |
+
|
222 |
+
* do line break content blocker buttons (CU-12b05vm)
|
223 |
+
|
224 |
+
|
225 |
+
|
226 |
+
|
227 |
+
|
228 |
+
# 2.7.0 (2021-09-08)
|
229 |
+
|
230 |
+
|
231 |
+
### chore
|
232 |
+
|
233 |
+
* translate new service templates (CU-yrgfkk)
|
234 |
+
|
235 |
+
|
236 |
+
### docs
|
237 |
+
|
238 |
+
* mention support for automatic video playback for Dailymotion and Loom at wordpress.org (CU-yrge7n)
|
239 |
+
|
240 |
+
|
241 |
+
### feat
|
242 |
+
|
243 |
+
* autoplay for Loom and Dailymotion (CU-yrge7n)
|
244 |
+
* new service and content blocker template Dailymotion (CU-n1f306)
|
245 |
+
* new service and content blocker template Giphy (CU-mt8ktd)
|
246 |
+
* new service and content blocker template LinkedIn Ads (Insight Tag, CU-rga6b3)
|
247 |
+
* new service and content blocker template Loom (CU-u9fxx7)
|
248 |
+
* new service and content blocker template OpenStreetMap (CU-pn8mu0)
|
249 |
+
* new service and content blocker template TikTok Pixel (CU-p1a7av)
|
250 |
+
* new service and content blocker template WordPress Plugin embed (CU-p382wk)
|
251 |
+
|
252 |
+
|
253 |
+
### fix
|
254 |
+
|
255 |
+
* adjust texts for powered-by link (CU-we5cq1)
|
256 |
+
* allow force hidden also for absolute positioned content like Dailymotion embed
|
257 |
+
* bypass CMP – Coming Soon & Maintenance Plugin when scanning a site (CU-118ud0m)
|
258 |
+
* bypass Under Construction by WebFactory plugin when scanning a site (CU-118ud0m)
|
259 |
+
* compatibility with lazysizes (used e.g. in EWWW, CU-11ehp99)
|
260 |
+
* content blocker removes inline style in some cases (e.g. when parent is wrapper)
|
261 |
+
* do not clear cache too often when accesing the Dashboard and no consents are given yet (CU-10huz72)
|
262 |
+
* extract @font-face CSS rules correctly (Divi latest update, CU-118mpjh)
|
263 |
+
* php logging Undefined offset: 1 in scanner/Query.php
|
264 |
+
* server error when content blocker finds CSS style which does not represent an URL (CU-10hruca)
|
265 |
+
* transmit realCookieBannerOptInEvents and realCookieBannerOptOutEvents variable to GTM/MTM data layer (CU-118ugwy)
|
266 |
+
* wrong GTM template variables for AddToAny service
|
267 |
+
|
268 |
+
|
269 |
+
|
270 |
+
|
271 |
+
|
272 |
+
## 2.6.5 (2021-08-31)
|
273 |
+
|
274 |
+
|
275 |
+
### fix
|
276 |
+
|
277 |
+
* add missing script to be scanned for Google Adsense (CU-yyep3k)
|
278 |
+
* allow to unblock nested jQuery ready functions (WP Google Maps, CU-wkyk4h)
|
279 |
+
* compatibility with latest PHP version 8.0.9
|
280 |
+
* compatibility with latest Thrive Leads plugin version (CU-yrkt9b)
|
281 |
+
* compatibility with latest Thrive themes & plugins (global CSS variables, CU-wkuq39)
|
282 |
+
* compatibility with Thrive Quiz Builder (CU-yjt538)
|
283 |
+
* console warning when google maps is used but jQuery is not yet ready on page load
|
284 |
+
* decode URLs differently than e.g. JSON attributes when unblocking content (CU-z3zua1)
|
285 |
+
* do not try to apply content blocker to rewritten endpoints which server downloads / binary data (CU-z9qhnd)
|
286 |
+
* make CSS functions work when they are blocked via Content Blocker (CU-wkuq39)
|
287 |
+
* scanner should not find link rel=author links
|
288 |
+
* with some caching plugins enabled the consent can no longer be saved after x hours (CU-wtj9td)
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
|
293 |
+
|
294 |
+
## 2.6.4 (2021-08-20)
|
295 |
+
|
296 |
+
|
297 |
+
### chore
|
298 |
+
|
299 |
+
* update PHP dependencies
|
300 |
+
|
301 |
+
|
302 |
+
### docs
|
303 |
+
|
304 |
+
* use redirects for legal documents
|
305 |
+
|
306 |
+
|
307 |
+
### fix
|
308 |
+
|
309 |
+
* allow emojis in cookie banner and content blocker (CU-u3xv7j)
|
310 |
+
* banner not visible for older safari and internet explorer browser (CU-vhq9jn)
|
311 |
+
* banner not visible for older safari and internet explorer browser (CU-vhq9jn)
|
312 |
+
* compatibility with latest Avada Fusion Builder (live editor, CU-u9mb2h)
|
313 |
+
* consider non-WWW host as same host and do not detect as external URL (CU-u9m6rv)
|
314 |
+
* consider WWW subdomain also for link preconnects and dns-prefetch for the correct template (CU-u9m5e5)
|
315 |
+
* cookie banner history dropdown gets wrong font color (CU-u9m484)
|
316 |
+
* do not show content blocker in Fusion Builder live editor (CU-u9mb2h)
|
317 |
+
* empty Google Analytics 4 opt-in code (CU-w8c0r4)
|
318 |
+
* false-positive detection of Reamaze in scanner
|
319 |
+
* modals wrongly titled
|
320 |
+
* modify composer autoloading to avoid multiple injections (CU-w8kvcq)
|
321 |
+
* scanner did not find sitemap correctly when WPML is active (CU-vhpgdw)
|
322 |
+
|
323 |
+
|
324 |
+
### style
|
325 |
+
|
326 |
+
* delete button in service form in wrong position
|
327 |
+
|
328 |
+
|
329 |
+
|
330 |
+
|
331 |
+
|
332 |
+
## 2.6.3 (2021-08-12)
|
333 |
+
|
334 |
+
|
335 |
+
### chore
|
336 |
+
|
337 |
+
* update text when scanner has finished to make clear it is coming from Real Cookie Banner (CU-t1ccx6)
|
338 |
+
|
339 |
+
|
340 |
+
### docs
|
341 |
+
|
342 |
+
* enhance wordpress.org product description (CU-rvu601)
|
343 |
+
|
344 |
+
|
345 |
+
### fix
|
346 |
+
|
347 |
+
* allow different site and home URL for the scanner to find robots.txt (CU-t1mafb)
|
348 |
+
* allow optional path to Matomo Host (CU-t1cpvz)
|
349 |
+
* customizer did not load correctly (CU-u3q46w)
|
350 |
+
* link to multisite consent forwarding knowledge base article (CU-rg8p46)
|
351 |
+
* remove React warning in developer console about unique keys (CU-u3q46w)
|
352 |
+
* scanner compatibility with PHP < 7.3
|
353 |
+
* www URLs of the same WordPress installations were considered as external URL in scanner (CU-6fcxcr)
|
354 |
+
|
355 |
+
|
356 |
+
### refactor
|
357 |
+
|
358 |
+
* remove unnecessary translations
|
359 |
+
|
360 |
+
|
361 |
+
|
362 |
+
|
363 |
+
|
364 |
+
## 2.6.2 (2021-08-11)
|
365 |
+
|
366 |
+
|
367 |
+
### fix
|
368 |
+
|
369 |
+
* error message when using PHP < 7.3
|
370 |
+
* loose sitemap index URLs (CU-rvwmnk)
|
371 |
+
|
372 |
+
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
## 2.6.1 (2021-08-10)
|
377 |
+
|
378 |
+
|
379 |
+
### fix
|
380 |
+
|
381 |
+
* link rel blocker should handle subdomains correctly
|
382 |
+
* userlike blocker should block by their CDN instead of usual URL
|
383 |
+
|
384 |
+
|
385 |
+
|
386 |
+
|
387 |
+
|
388 |
+
# 2.6.0 (2021-08-10)
|
389 |
+
|
390 |
+
|
391 |
+
### chore
|
392 |
+
|
393 |
+
* introduce new developer filter RCB/Blocker/IsBlocked/AllowMultiple and RCB/Blocker/ResolveBlockables (CU-7mvhak)
|
394 |
+
* new developer filter RCB/Blocker/SelectorSyntax/IsBlocked
|
395 |
+
* settled TODOs and update since-versions (CU-7mvhak)
|
396 |
+
* translations into German (CU-pb8dpn)
|
397 |
+
* update texts for scanner tab (hint, CU-mtddjt)
|
398 |
+
|
399 |
+
|
400 |
+
### docs
|
401 |
+
|
402 |
+
* service scanner featured in wordpress.org description (CU-n9cuyh)
|
403 |
+
|
404 |
+
|
405 |
+
### feat
|
406 |
+
|
407 |
+
* add 9 new content blockers for existing services (CU-mtdp7v)
|
408 |
+
* add content blocker for 19 services so the scanner can find it (CU-mtdp7v)
|
409 |
+
* add new checklist item to scan the website (CU-mk8ec0)
|
410 |
+
* allow to create a new service from scratch directly within a content blocker form (CU-mk8ec0)
|
411 |
+
* allow to scan also essential services which could not be blocked (e.g. Elementor)
|
412 |
+
* automatically rescan updated posts
|
413 |
+
* block link preconnect's and dns-prefetch's automatically based on URL hosts defined in content blocker (CU-nn7g16)
|
414 |
+
* handle external URLs popover with Cookie Experts dialog (CU-mk8ec0)
|
415 |
+
* introduce client worker and localStorage restore functionality (CU-kh49jp)
|
416 |
+
* introduce functionality to find sitemap or fallback to WP default if not existing (CU-kfbzc6)
|
417 |
+
* introduce mechanism to scan a site for usable presets and external URLs (CU-kf71p4)
|
418 |
+
* introduce new package @devowl-wp/sitemap-crawler to parse and crawl a sitemap (CU-kh49jp)
|
419 |
+
* introduce scanner UI for found presets and external URLs (CU-m57phr)
|
420 |
+
* introduce UI for scanned markups for predefined presets (CU-m57phr)
|
421 |
+
* new service and content blocker preset Ad Inserter (plugin, CU-kvcmp7)
|
422 |
+
* popup notification when scan hast finished and allow to ignore external URLs (CU-m57phr)
|
423 |
+
* proper error handling with UI when e.g. the Real Cookie Banner scanner fails (CU-7mvhak)
|
424 |
+
* show global notice when using services without consent
|
425 |
+
* show recommended services not by content blocker but by dependency (CU-mtdp7v)
|
426 |
+
* translate scanner into German (CU-n9cuyh)
|
427 |
+
* use @devowl-wp/real-queue to scan the complete website (CU-kh49jp)
|
428 |
+
|
429 |
+
|
430 |
+
### fix
|
431 |
+
|
432 |
+
* add remarketing to Google Ads Conversation Tracking service template (CU-pb9txp)
|
433 |
+
* allow to block the same element by multiple attributes (CU-p3agpd)
|
434 |
+
* always save the markup so redundant external URLs can be wiped (CU-mtdp7v)
|
435 |
+
* automatically start scan process for the first time
|
436 |
+
* be more loose when getting and parsing the sitemap
|
437 |
+
* block ad block from Ad Inserter newer than 2.7.2 in content blocker template (CU-kvcmp7)
|
438 |
+
* change close label text when updating privacy preferences (CU-rgdp01)
|
439 |
+
* compatibility with Impreza frontend page builder
|
440 |
+
* compatibility with latest Thrive Architect plugin (CU-p3agpd)
|
441 |
+
* compatibility with Ultimate Video WP Bakery Page builder add-ons (CU-pd9uab)
|
442 |
+
* create new service within content blocker shows zero as prefilled group
|
443 |
+
* do not add duplicate URLs to queue
|
444 |
+
* do not enqueue real-queue on frontend for logged-in users
|
445 |
+
* german support link (CU-rg8qrt)
|
446 |
+
* improve German translations for scanner (CU-n9cuyh)
|
447 |
+
* include all revision data in single consent export
|
448 |
+
* native integration for Analytify preset (disabled status, CU-n1f1xc)
|
449 |
+
* native integration for GA Google Analytics preset (disabled status, CU-n1f1xc)
|
450 |
+
* native integration for MonsterInsights preset (disabled status, CU-n1f1xc)
|
451 |
+
* native integration for RankMath SEO Google Analytics (install code, CU-n1bd59)
|
452 |
+
* native integration for WooCommerce Google Analytics preset (disabled status, CU-n1f1xc)
|
453 |
+
* preset WordPress Emojis should also block the DNS prefetch
|
454 |
+
* remove extended presets from scan results
|
455 |
+
* review 1 (CU-mtdp7v, CU-n1f1xc)
|
456 |
+
* review 1 (CU-nd8ep0)
|
457 |
+
* review 2 (CU-7mvhak)
|
458 |
+
* review 2 (CU-nd8ep0)
|
459 |
+
* review 3 (CU-7mvhak)
|
460 |
+
* review user tests #1 (CU-nvafz0)
|
461 |
+
* review user tests #2 (CU-nvafz0)
|
462 |
+
* review user tests #3 (CU-nvafz0)
|
463 |
+
* split Google Analytics into two content blockers UA and V4 (CU-nq8c3j)
|
464 |
+
* tag to fully blocked associated with found count instead of distinct of sites count
|
465 |
+
* update Facebook Post preset to be compatible with Facebook Video (CU-p1dxwp)
|
466 |
+
* use correct cookie experts link (CU-mtddaa)
|
467 |
+
|
468 |
+
|
469 |
+
### perf
|
470 |
+
|
471 |
+
* speed up scan process by reducing server requests (CU-nvafz0)
|
472 |
+
|
473 |
+
|
474 |
+
### refactor
|
475 |
+
|
476 |
+
* introduce new keywords needs for presets (CU-mzf8gj)
|
477 |
+
* move code dynamic fields to preset attributes (CU-h38crf)
|
478 |
+
* presets extends should no longer be a class name, instead use identifier (CU-n19da6)
|
479 |
+
* split i18n and request methods to save bundle size
|
480 |
+
* use instance for blocked result in RCB/Blocker/IsBlocked filters (CU-nxeknj)
|
481 |
+
|
482 |
+
|
483 |
+
### style
|
484 |
+
|
485 |
+
* background color for recommandations admin bar menu
|
486 |
+
* gray out already existing prestes in service and content blocker template screen
|
487 |
+
* move Google Ads hint about Adwords ID to the input field
|
488 |
+
|
489 |
+
|
490 |
+
|
491 |
+
|
492 |
+
|
493 |
+
## 2.5.1 (2021-08-05)
|
494 |
+
|
495 |
+
|
496 |
+
### chore
|
497 |
+
|
498 |
+
* translate (CU-pkhcg8)
|
499 |
+
* update TCF dependencies to latest version (CU-pq8wt4)
|
500 |
+
|
501 |
+
|
502 |
+
### fix
|
503 |
+
|
504 |
+
* decode and encode HTML attributes correctly and only when needed (CU-q1a82b)
|
505 |
+
* duplicate external hosts in multisite forwarding leads to invisible banner
|
506 |
+
* enhance Google Maps Content Blocker to be compatible with WP Store Locator (CU-pkhmqy)
|
507 |
+
* introduce new unique-write attribute in opt-in field for Google Ads and Google Analytics (CU-raj3eg)
|
508 |
+
* put powered-by link in banner in same align as the legal links (CU-pn8pcz)
|
509 |
+
* reload page after consent change (CU-pnbunr)
|
510 |
+
* reset essential cookies correctly when custom choice is selected
|
511 |
+
* review 1 (CU-pn8pcz)
|
512 |
+
|
513 |
+
|
514 |
+
### refactor
|
515 |
+
|
516 |
+
* remove TCF global scope coding (CU-pq8wt4)
|
517 |
+
|
518 |
+
|
519 |
+
### style
|
520 |
+
|
521 |
+
* make content blocker hosts collapsable instead of showing all (CU-pkhcg8)
|
522 |
+
|
523 |
+
|
524 |
+
|
525 |
+
|
526 |
+
|
527 |
+
# 2.5.0 (2021-07-16)
|
528 |
+
|
529 |
+
|
530 |
+
### chore
|
531 |
+
|
532 |
+
* update compatibility with WordPress 5.8 (CU-n9dfx9)
|
533 |
+
|
534 |
+
|
535 |
+
### feat
|
536 |
+
|
537 |
+
* new service and content blocker preset Podigee (CU-nzbb2q)
|
538 |
+
|
539 |
+
|
540 |
+
### fix
|
541 |
+
|
542 |
+
* assign GetYourGuide preset to Marketing cookie group instead of Functional (CU-nv85ef)
|
543 |
+
* imported content blockers leads to empty admin page in lite version (CU-nzc6gg)
|
544 |
+
* regex for Google Ads Conversation Tracking ID too strict
|
545 |
+
|
546 |
+
|
547 |
+
|
548 |
+
|
549 |
+
|
550 |
+
# 2.4.0 (2021-07-09)
|
551 |
+
|
552 |
+
|
553 |
+
### feat
|
554 |
+
|
555 |
+
* new cookie and content blocker preset MailPoet (CU-m3dtuf)
|
556 |
+
|
557 |
+
|
558 |
+
### fix
|
559 |
+
|
560 |
+
* add EFTA countries to countries where the GDPR applies (CU-mhcqjz)
|
561 |
+
* compatibility with dynamic modules in Thrive Architect (CU-n9bup4)
|
562 |
+
* compatibility with Elementor video overlay and lightbox (CU-nkb66n)
|
563 |
+
* compatibility with Pinterest JavaScript SDK (CU-nkaq8m)
|
564 |
+
* compatibility with themify.me Builder Maps Pro add-on (CU-nna6bg)
|
565 |
+
* compatibility with themify.me video modules (CU-nna6bg)
|
566 |
+
* compatibility with WP Rocket 3.9 (CU-nkav4w)
|
567 |
+
* cookie groups are sortable again via drag & drop (CU-nhfmkt)
|
568 |
+
* detect multisite / network wide plugins as active for services (CU-mzb2kw)
|
569 |
+
* do not block content in Themify.me page builder (CU-nna6bg)
|
570 |
+
* do not hide blocked elements when they use visual parent from children element
|
571 |
+
* do not show banner for browsers without cookie support (CU-v77cgg)
|
572 |
+
* do not stop code execution for opt-in scripts and content blocker when blocked through Ad blocker (CU-ndd0dp)
|
573 |
+
* explain where to find Google Adwords ID in Google Ads service template (CU-mtav6f)
|
574 |
+
* lite version dashboard not scrollable (CU-nd8e07)
|
575 |
+
* recalculate responsive handlers after content got unblocked (CU-nnfb22)
|
576 |
+
* typo in Google Maps content blocker description
|
577 |
+
|
578 |
+
|
579 |
+
|
580 |
+
|
581 |
+
|
582 |
+
# 2.3.0 (2021-06-15)
|
583 |
+
|
584 |
+
|
585 |
+
### chore
|
586 |
+
|
587 |
+
* allow to check for consent with consentApi by post ID (CU-m9e56j)
|
588 |
+
* introduce new PHP developer API wp_rcb_service_groups() and wp_rcb_services_by_group() (CU-m9e56j)
|
589 |
+
* simplify text of the age notice (CU-m3a6n2)
|
590 |
+
* translate new presets (CU-m38dkk, CU-kt8cat, CU-m3dtuf, CU-m15mty)
|
591 |
+
|
592 |
+
|
593 |
+
### feat
|
594 |
+
|
595 |
+
* automatically delegate click from content blocker when we unblock a link
|
596 |
+
* content blocker Google Translate compatible with "Translate WordPress" plugin (CU-m3e1fm)
|
597 |
+
* define Google Adsense Publisher ID in Google Adsense service template to alloew e.g. auto ads (CU-m7e13d)
|
598 |
+
* new cookie and content blocker preset Calendly (CU-m38dkk)
|
599 |
+
* new cookie and content blocker preset MailPoet (CU-m3dtuf)
|
600 |
+
* new cookie and content blocker preset My Cruise Excursion / meine-landesausflüge (CU-kt8cat)
|
601 |
+
* new cookie and content blocker preset Smash Balloon Social Photo Feed (CU-m15mty)
|
602 |
+
|
603 |
+
|
604 |
+
### fix
|
605 |
+
|
606 |
+
* adjust three customizer presets to be compatible with latest Dr. Schwenke newsletter (Dark patterns, CU-m1e0zn)
|
607 |
+
* allow service for MailPoet 2 (deprecated plugin, CU-m3dtuf)
|
608 |
+
* allow window.onload assignments in blocked content (CU-m38dkk)
|
609 |
+
* block reddit post embed as iframe (CU-m15mty)
|
610 |
+
* compatibility with Astra theme and hamburger menu (automatically collapse if clicked too early)
|
611 |
+
* compatibility with BookingKit and blur effect (CU-m1acj0)
|
612 |
+
* content blocker could not find already existing cookies
|
613 |
+
* do not show element server-side rendered to improve web vitals (CU-m15mty)
|
614 |
+
* elementor ready trigger is dispatched too early
|
615 |
+
* hide Refresh site on consent option as it is not needed (CU-m9dey3)
|
616 |
+
* load animate.css only when needed (CU-mddt99)
|
617 |
+
* show warning when accept essentials differs from accept all button type (CU-m1e0zn)
|
618 |
+
|
619 |
+
|
620 |
+
### revert
|
621 |
+
|
622 |
+
* disable MailPoet preset as it is not yet ready (https://git.io/JnqoX, CU-m3dtuf)
|
623 |
+
|
624 |
+
|
625 |
+
|
626 |
+
|
627 |
+
|
628 |
+
# 2.2.0 (2021-06-05)
|
629 |
+
|
630 |
+
|
631 |
+
### chore
|
632 |
+
|
633 |
+
* clearer differentiation of the plugin's benefits in wordpress.org description (CU-kbaequ)
|
634 |
+
* clearer differentiation of the plugin's benefits in wordpress.org description (CU-kbaequ)
|
635 |
+
* clearer differentiation of the plugin's benefits in wordpress.org description (CU-kbaequ)
|
636 |
+
* clearer differentiation of the plugin's benefits in wordpress.org description (CU-kbaequ)
|
637 |
+
* translate new cookie and content blocker presets (CU-kt7e5r, CU-kk8gvu, CU-k759kz)
|
638 |
+
* update Cloudflare service template (CU-ff6vzc)
|
639 |
+
|
640 |
+
|
641 |
+
### feat
|
642 |
+
|
643 |
+
* allow match elements by div[my-attribute-exists], div[class^="starts-with-value"] and div[class$="ends-with-value"] (CU-kt829t)
|
644 |
+
* new content blocker for WordPress login when using e.g. reCaptcha (CU-jqb6y0)
|
645 |
+
* new cookie and content blocker preset Awin Link and Image Ads (CU-k759kz)
|
646 |
+
* new cookie and content blocker preset Awin Publisher MasterTag (CU-k759kz)
|
647 |
+
* new cookie and content blocker preset ConvertKit (CU-kk8gvu)
|
648 |
+
* new cookie and content blocker preset GetYourGuide (CU-kt829t)
|
649 |
+
* new cookie and content blocker preset WP-Matomo Integration (former WP-Piwik, CU-kt7e5r)
|
650 |
+
|
651 |
+
|
652 |
+
### fix
|
653 |
+
|
654 |
+
* avoid duplicate execution of inline scripts when they take longer than 1 second
|
655 |
+
* block more JS code in content blocker of "Mailchimp for WooCommerce" template
|
656 |
+
* compatibility with 'Modern' admin style
|
657 |
+
* compatibility with Elementor PRO Video API / blocks (CU-kd5nne)
|
658 |
+
* compatibility with Elementor Video API for Vimeo and YouTube (CU-kd5nne)
|
659 |
+
* compatibility with Google Maps plugin by flippercode (CU-kn82nw)
|
660 |
+
* do anonymize localized variables in wp-login.php (CU-jqb6y0)
|
661 |
+
* do not allow creating a content blocker when you try to assign a cookie to essential group (CU-jqb6y0)
|
662 |
+
* do not apply content blocker in customizer preview
|
663 |
+
* page does not get reloaded automatically after consent on safari / iOS (CU-kt8q4n)
|
664 |
+
* use anti-ad-block system also in login page (CU-kh5jpd)
|
665 |
+
* use script tag with custom type declaration to be HTML markup compatible (head, CU-kt4njv)
|
666 |
+
|
667 |
+
|
668 |
+
|
669 |
+
|
670 |
+
|
671 |
+
# 2.1.0 (2021-05-25)
|
672 |
+
|
673 |
+
|
674 |
+
### chore
|
675 |
+
|
676 |
+
* compatibility with latest antd version
|
677 |
+
* introduce new developer filter RCB/Misc/ProUrlArgs (CU-jbayae)
|
678 |
+
* introduce new RCB/Hint section to add custom tiles to the right dashboard section (CU-jbayae)
|
679 |
+
* migarte loose mode to compiler assumptions
|
680 |
+
* own chunk for blocker vendors, but still share (CU-jhbuvd)
|
681 |
+
* polyfill setimmediate only if needed (CU-jh3czf)
|
682 |
+
* prettify code to new standard
|
683 |
+
* remove es6-promise polyfill (CU-jh3czn)
|
684 |
+
* remove whatwg-fetch polyfill (CU-jh3czg)
|
685 |
+
* revert update of typedoc@0.20.x as it does not support monorepos yet
|
686 |
+
* upgrade dependencies to latest minor version
|
687 |
+
|
688 |
+
|
689 |
+
### ci
|
690 |
+
|
691 |
+
* move type check to validate stage
|
692 |
+
|
693 |
+
|
694 |
+
### docs
|
695 |
+
|
696 |
+
* highlight that not all service templates are free in wordpress.org plugin description
|
697 |
+
|
698 |
+
|
699 |
+
### feat
|
700 |
+
|
701 |
+
* allow to block content in login page (e.g. using Google reCaptcha, CU-jqb6y0)
|
702 |
+
* new service and content blocker preset Sendinblue (CU-k3cf3r)
|
703 |
+
* new service and content blocker preset Xing Events (CU-k3cfab)
|
704 |
+
|
705 |
+
|
706 |
+
### fix
|
707 |
+
|
708 |
+
* allow visual parent by children selector (querySelector on blocked content, CU-k7601j)
|
709 |
+
* block new elements of Popup Maker in content blocker template
|
710 |
+
* compatibility with Astra theme oEmbed container (CU-k18eqe)
|
711 |
+
* compatibility with Dynamic Content for Elementor plugin (CU-k7601j)
|
712 |
+
* compatibility with elementor widgets when they are directly blocked (CU-k7601j)
|
713 |
+
* do not content block when elementor preview is active
|
714 |
+
* do not rely on install_plugins capability, instead use activate_plugins so GIT-synced WP instances work too (CU-k599a2)
|
715 |
+
* padding of content blocker parent got reset
|
716 |
+
* support for @font-face directive when blocking inline style (CU-k3cf3r)
|
717 |
+
* visual parent does not work for custom elementor blocker (CU-k7601j)
|
718 |
+
* when an inline script creates a new DOM element it is sometimes invisible (CU-k3cf3r)
|
719 |
+
* white screen when searching for duplicate content blockers
|
720 |
+
|
721 |
+
|
722 |
+
### refactor
|
723 |
+
|
724 |
+
* move compatibility code to own folder
|
725 |
+
* own function to override native addEventListener functionality
|
726 |
+
* style classes to functions for tree shaking (CU-jh75eg)
|
727 |
+
|
728 |
+
|
729 |
+
### revert
|
730 |
+
|
731 |
+
* own vendor bundle for blocker
|
732 |
+
|
733 |
+
|
734 |
+
### style
|
735 |
+
|
736 |
+
* pro dialog (CU-jbayae)
|
737 |
+
|
738 |
+
|
739 |
+
### test
|
740 |
+
|
741 |
+
* make window.fetch stubbable (CU-jh3cza)
|
742 |
+
|
743 |
+
|
744 |
+
|
745 |
+
|
746 |
+
|
747 |
+
## 2.0.3 (2021-05-14)
|
748 |
+
|
749 |
+
|
750 |
+
### fix
|
751 |
+
|
752 |
+
* customizer does not work when WP Fastest Cache is active (CU-jq9aua)
|
753 |
+
* multilingual plugins like Weglot and TranslatePress should show more options in Consent Forwarding setting
|
754 |
+
|
755 |
+
|
756 |
+
|
757 |
+
|
758 |
+
|
759 |
+
## 2.0.2 (2021-05-12)
|
760 |
+
|
761 |
+
|
762 |
+
### fix
|
763 |
+
|
764 |
+
* compatibility with PixelYourSite Facebook image tag (pixel)
|
765 |
+
* compatibility with WP Rocket lazy loading scripts (CU-jq4bhw)
|
766 |
+
|
767 |
+
|
768 |
+
|
769 |
+
|
770 |
+
|
771 |
+
## 2.0.1 (2021-05-11)
|
772 |
+
|
773 |
+
|
774 |
+
### docs
|
775 |
+
|
776 |
+
* update README typos
|
777 |
+
|
778 |
+
|
779 |
+
### fix
|
780 |
+
|
781 |
+
* **hotfix :** new cookie presets are not visible for Weglot users (CU-hk3jfn)
|
782 |
+
|
783 |
+
|
784 |
+
|
785 |
+
|
786 |
+
|
787 |
+
# 2.0.0 (2021-05-11)
|
788 |
+
|
789 |
+
|
790 |
+
### build
|
791 |
+
|
792 |
+
* allow to patch scoped build artifact to fix unicode issues (CU-80ub8k)
|
793 |
+
* allow to set config name for yarn dev
|
794 |
+
* consume TCF CMP ID via environment variable (CU-h15h9f)
|
795 |
+
* own JS bundle for TCF banner and enqueue stub (CU-fk051q)
|
796 |
+
* update wordpress.org screenshot assets (CU-gf917p)
|
797 |
+
* wrong refernce to PSR-4 namespace
|
798 |
+
|
799 |
+
|
800 |
+
### chore
|
801 |
+
|
802 |
+
* add screenshots for TCF compatibility and Geo-restriction (CU-gf917p)
|
803 |
+
* core features description text (CU-gf7dnf)
|
804 |
+
* deactivate option to resepect Do Not Track by default (CU-gx1m76)
|
805 |
+
* increase minimum PHP version to 7.2 (CU-fh3qby)
|
806 |
+
* introduce new filter to disable setting the RCB cookie via RCB/SetCookie/Allow
|
807 |
+
* minimum required version of PHP is 7.2
|
808 |
+
* name cookie designs consistently (CU-g779gw)
|
809 |
+
* remove classnames as dependency
|
810 |
+
* rename "cookies" to "services" for consistent wording (CU-f571nh)
|
811 |
+
* sharp terms of buttons and labels in cookie banner
|
812 |
+
* update @iabtcf packages to >= 1.2.0 to support TCF 2.1 (CU-h539k3)
|
813 |
+
* update @iabtcf packages to stable version (CU-g977x9)
|
814 |
+
* update texts to be more informative about legal basis and print text for Consent Forwarding if active (respects also TCF global scope) (CU-cq1rka)
|
815 |
+
* use more normal style to be independent from formal/informal language (CU-f4ycka)
|
816 |
+
|
817 |
+
|
818 |
+
### docs
|
819 |
+
|
820 |
+
* wordpress.org description revised (CU-gf7dnf)
|
821 |
+
|
822 |
+
|
823 |
+
### feat
|
824 |
+
|
825 |
+
* add contrast ratio validator and call-to-action adjustments for TCF compatibility (CU-cq25hu)
|
826 |
+
* add GVL instance to all available banner contexts (CU-fjzcd8)
|
827 |
+
* allow to customize the text of the powered-by link (CU-f74d53)
|
828 |
+
* allow to define a list of countries to show only the banner to them e.g. only EU (Country Bypass, CU-80ub8k)
|
829 |
+
* allow to export and import TCF vendor configurations (CU-ff0yvh)
|
830 |
+
* allow to forward TCF consent with Consent Forwarding (CU-ff10cy)
|
831 |
+
* allow to reset all settings to default in Settings tab (CU-8extcg)
|
832 |
+
* automatically refresh GVL via button and periodically (CU-63ty1t)
|
833 |
+
* calculate suitable stacks and add them to revision (CU-fh0bx6)
|
834 |
+
* compatibility of TCF vendors with ePrivacy USA functionality (CU-h57u92)
|
835 |
+
* compatibility with TCF v2.1 (device storage disclosures, CU-h74vna)
|
836 |
+
* complement translations for English and German (CU-ex0u4a)
|
837 |
+
* completion of English and German translations (CU-ex0u4a)
|
838 |
+
* completion of English and German translations (CU-ex0u4a)
|
839 |
+
* contrast ratio warning for non-TCF users, opt-in cookie banner activation through popconfirm (CU-j78m3t)
|
840 |
+
* create content blockers for TCF vendor configurations (CU-gv58rr)
|
841 |
+
* download and normalize Global Vendor List for TCF compatibility (CU-63ty1t)
|
842 |
+
* eight new cookie banner presets (CU-g779gw)
|
843 |
+
* introduce Learn More links to different parts of the UI (CU-gv58rr)
|
844 |
+
* introduce new service field to allow opt-out based on legal basis (CU-ht2zwt)
|
845 |
+
* introduce origin of business entity field for TCF integration (CU-g53zgk)
|
846 |
+
* introduce revision for TCF vendors and declarations (CU-ff0zhy)
|
847 |
+
* introduce settings tab for TCF compatibility in Cookies > Settings (CU-cq29n2)
|
848 |
+
* introduce so-called Custom Bypass so developers can dynamically set a predecision and hide the banner automatically (e.g. Geolocation, CU-80ub8k)
|
849 |
+
* introduce UI to create a TCF vendor configuration and create TCF vendor configuration REST API (CU-crwq2r)
|
850 |
+
* introduce UI to edit a TCF vendor configuration (CU-crwq2r)
|
851 |
+
* native compatibility with preloading and defer scripts with caching plugins (CU-h75rh2)
|
852 |
+
* new cookie presets for Ezoic (CU-ch2rng)
|
853 |
+
* new customizer control to adjust the opacity of box shadow color (CU-cz1d9t)
|
854 |
+
* persist TCF strings for proof of consent and dispatch to CMP API (CU-ff0z49)
|
855 |
+
* properly replace non-javascript ad tags with current TC String (CU-ct1gfd)
|
856 |
+
* provide a migration wizard for v2 in the dashboard (CU-g75t1p)
|
857 |
+
* register new Custom Post Type for TCF vendor configurations (CU-crwq2r)
|
858 |
+
* show and allow to customize TCF stacks (CU-cq1rka)
|
859 |
+
* show TCF vendors and declarations (purposes, special purposes, ...) in second view of cookie banner (CU-ff0yvh)
|
860 |
+
* translate backend into German (CU-ex0u4a)
|
861 |
+
* translate frontend into German (CU-ex0u4a)
|
862 |
+
* when navigating to /tcf-vendors/new show a list of all available vendors (CU-crwq2r)
|
863 |
+
|
864 |
+
|
865 |
+
### fix
|
866 |
+
|
867 |
+
* add custom bypasses to the DnT stats pie chart (CU-gf4egf)
|
868 |
+
* add United Kingdom (GB) as default to Country Bypass list (CU-hz8rka)
|
869 |
+
* assign cookie groups and cookies to correct source language after adding a new language to WPML (CU-hz3a83)
|
870 |
+
* automatically clear page caches after license activation / deactivation (CU-jd7t87)
|
871 |
+
* automatically deactivate option to respect DnT header when activating TCF for the first time
|
872 |
+
* compatibility TCF and WPML / PolyLang
|
873 |
+
* compatibility with Customizer checkbox values and Redis Object Cache (CU-jd4662)
|
874 |
+
* cookie history could not be closed when no consent given
|
875 |
+
* do not output RCB settings as base64 encoded string (CU-gx8jkw)
|
876 |
+
* first review with Advanced Ads (Pro, CU-g9665t)
|
877 |
+
* localize stacks correctly and sort by score (CU-ff0zhy)
|
878 |
+
* make consentAPI available in head scripts
|
879 |
+
* make group description texts resettable (CU-gf3dew)
|
880 |
+
* notices thrown when no vendor given (CU-ff0yvh)
|
881 |
+
* output UUID on legal sites, too (CU-jha8xc)
|
882 |
+
* review 1 (TCF, CU-ff0yck)
|
883 |
+
* review 2 (CU-ff0yvh)
|
884 |
+
* review 3 (CU-ff0yvh)
|
885 |
+
* review 4 (CU-ff0yvh)
|
886 |
+
* review 5 (CU-ff0z49)
|
887 |
+
* review 6 (CU-80ub8k)
|
888 |
+
* review 7 (CU-80ub8k)
|
889 |
+
* review TCF CMP validator (CU-hh395u, CU-hh3dkn)
|
890 |
+
* review with user test (thanks to Carlo, CU-gd12qp)
|
891 |
+
* review with user test (thanks to Franz, CU-gd12mq)
|
892 |
+
* review with user test (thanks to Franz, CU-gd12mq)
|
893 |
+
* review with user test (thanks to Jonas, CU-gd12hq)
|
894 |
+
* show vendor ID in list table of TCF vendors (CU-gf8h2g)
|
895 |
+
* show vendor list link for TCF banner in footer (CU-g977x9)
|
896 |
+
* the Lighthouse crawler is not a bot (CU-j575je)
|
897 |
+
* translate "legitimate interest" always with "Berechtigtes Interesse" (CU-ht31w2)
|
898 |
+
* translate footer text correctly for TranslatePress / Weglot (CU-ht82qm)
|
899 |
+
* usage with deferred scripts and content blocker (DOM waterfall, CU-gn4ng5)
|
900 |
+
|
901 |
+
|
902 |
+
### perf
|
903 |
+
|
904 |
+
* avoid catastrophal backtracing and speed up regular expression for inline scripts/styles by 90% (CU-j77a9g)
|
905 |
+
* combine vendor modules to a common chunk for both TCF and non-TCF
|
906 |
+
* introduce deferred and preloaded scripts for cookie banner (CU-gn4ng5)
|
907 |
+
* remove TCF CmpApi from non-TCF bundle
|
908 |
+
|
909 |
+
|
910 |
+
### refactor
|
911 |
+
|
912 |
+
* create wp-webpack package for WordPress packages and plugins
|
913 |
+
* introduce bundleAnalyzerOptions in development package
|
914 |
+
* introduce eslint-config package
|
915 |
+
* introduce new grunt workspaces package for monolithic usage
|
916 |
+
* introduce new package to validate composer licenses and generate disclaimer
|
917 |
+
* introduce new package to validate yarn licenses and generate disclaimer
|
918 |
+
* introduce new script to run-yarn-children commands
|
919 |
+
* make content blocker independent of custom post type
|
920 |
+
* make Vimeo and SoundCloud to Pro presets (CU-gf49yy)
|
921 |
+
* move build scripts to proper backend and WP package
|
922 |
+
* move jest scripts to proper backend and WP package
|
923 |
+
* move PHP Unit bootstrap file to @devowl-wp/utils package
|
924 |
+
* move PHPUnit and Cypress scripts to @devowl-wp/utils package
|
925 |
+
* move special blocker PHP classes in own namespace
|
926 |
+
* move technical doc scripts to proper WP and backend package
|
927 |
+
* move WP build process to @devowl-wp/utils
|
928 |
+
* move WP i18n scripts to @devowl-wp/utils
|
929 |
+
* move WP specific typescript config to @devowl-wp/wp-webpack package
|
930 |
+
* remove @devowl-wp/development package
|
931 |
+
* split stubs.php to individual plugins' package
|
932 |
+
|
933 |
+
|
934 |
+
### style
|
935 |
+
|
936 |
+
* improve Web Vitals by setting a fixed width / height for the logo (CU-j575je)
|
937 |
+
* refactor all banner presets (CU-fn68er)
|
938 |
+
|
939 |
+
|
940 |
+
### test
|
941 |
+
|
942 |
+
* fix failing smoke test for Real Cookie Banner Lite
|
943 |
+
|
944 |
+
|
945 |
+
### BREAKING CHANGE
|
946 |
+
|
947 |
+
* please upgrade your PHP version to >= 7.2
|
948 |
+
|
949 |
+
|
950 |
+
|
951 |
+
|
952 |
+
|
953 |
+
## 1.14.1 (2021-04-27)
|
954 |
+
|
955 |
+
|
956 |
+
### ci
|
957 |
+
|
958 |
+
* push plugin artifacts to GitLab Generic Packages registry (CU-hd6ef6)
|
959 |
+
|
960 |
+
|
961 |
+
### fix
|
962 |
+
|
963 |
+
* compatibility with Lite Speed Cache; white screen in customizer
|
964 |
+
* introduce new filter RCB/Blocker/InlineScript/AvoidBlockByLocalizedVariable and fix copmatibility with EmpowerWP/Mesmerize (CU-hb8v51)
|
965 |
+
* notice array_walk_recursive() expects parameter 1 to be array, integer given
|
966 |
+
* output buffer callback should be called always and cannot be removed by third parties
|
967 |
+
|
968 |
+
|
969 |
+
### refactor
|
970 |
+
|
971 |
+
* use shorter function to get cookie by name (CU-hv8ypq)
|
972 |
+
|
973 |
+
|
974 |
+
### revert
|
975 |
+
|
976 |
+
* output buffer callback should be called always and cannot be removed by third parties
|
977 |
+
|
978 |
+
|
979 |
+
|
980 |
+
|
981 |
+
|
982 |
+
# 1.14.0 (2021-04-15)
|
983 |
+
|
984 |
+
|
985 |
+
### chore
|
986 |
+
|
987 |
+
* translate new cookie and content blocker presets (CU-h158p2)
|
988 |
+
|
989 |
+
|
990 |
+
### feat
|
991 |
+
|
992 |
+
* new cookie and content blocker preset Metricool (CU-gz7ptb)
|
993 |
+
* new cookie and content blocker preset Popup Maker (CU-gt22gk)
|
994 |
+
* new cookie and content blocker preset RankMath Google Analytics (CU-gh4gcw)
|
995 |
+
* new cookie and content blocker preset Thrive Leads (CU-gh4qgh)
|
996 |
+
|
997 |
+
|
998 |
+
### fix
|
999 |
+
|
1000 |
+
* allow to Add Media in banner description
|
1001 |
+
* allow to extract blocked inline style to own style HTML block (CU-gk0d9a)
|
1002 |
+
* allow to granular block urls in inline CSS (CU-gk0d9a)
|
1003 |
+
* allow to set privacy policy URL per language (WPML, PolyLang, CU-gq33k2)
|
1004 |
+
* avoid catasrophical backtrace when blocking an inline style (CU-gh964b)
|
1005 |
+
* compatibility with LiteSpeed cache buffer
|
1006 |
+
* compatibility with MailerLite content blocker and Thrive Archtiect page builder (CU-gh4hr5)
|
1007 |
+
* compatibility with Ultimate Video (CU-fz6gxc)
|
1008 |
+
* consentSync API returned the wrong found cookie when two cookies use same technical definitions - introduced relevance scoring
|
1009 |
+
* usage with PolyLang with more than two languages and copy automatically to new languages (CU-gt3kam)
|
1010 |
+
|
1011 |
+
|
1012 |
+
|
1013 |
+
|
1014 |
+
|
1015 |
+
## 1.13.1 (2021-03-30)
|
1016 |
+
|
1017 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
1018 |
+
|
1019 |
+
|
1020 |
+
|
1021 |
+
|
1022 |
+
|
1023 |
+
# 1.13.0 (2021-03-23)
|
1024 |
+
|
1025 |
+
|
1026 |
+
### chore
|
1027 |
+
|
1028 |
+
* translate and register new presets (CU-fn1j8z, CU-c6vmwh)
|
1029 |
+
|
1030 |
+
|
1031 |
+
### docs
|
1032 |
+
|
1033 |
+
* new compatibilities in wordpress.org description (CU-fk068g)
|
1034 |
+
|
1035 |
+
|
1036 |
+
### feat
|
1037 |
+
|
1038 |
+
* new cookie and content blocker preset Bloom (CU-fn1j8z)
|
1039 |
+
* new cookie and content blocker preset Typeform (CU-c6vmwh)
|
1040 |
+
|
1041 |
+
|
1042 |
+
### fix
|
1043 |
+
|
1044 |
+
* calculate rendered height for banner footer to gain better edge smoothing
|
1045 |
+
* compatibility of content blocker with TranslatePress and Weglot (CU-fz6gxc)
|
1046 |
+
* compatibility with Ultimate Video (CU-fz6gxc)
|
1047 |
+
* export of consents contained notices in some PHP environments (CU-ff0z49)
|
1048 |
+
* show notice for frontend banner if no license is active (CU-fyzukg)
|
1049 |
+
* use the correct permalinks in the banner footer (CU-e8x3em)
|
1050 |
+
|
1051 |
+
|
1052 |
+
|
1053 |
+
|
1054 |
+
|
1055 |
+
# 1.12.0 (2021-03-10)
|
1056 |
+
|
1057 |
+
|
1058 |
+
### build
|
1059 |
+
|
1060 |
+
* plugin tested for WordPress 5.7 (CU-f4ydk2)
|
1061 |
+
|
1062 |
+
|
1063 |
+
### chore
|
1064 |
+
|
1065 |
+
* register and translate new presets (CU-eyzegt, CU-f4yzpm)
|
1066 |
+
|
1067 |
+
|
1068 |
+
### feat
|
1069 |
+
|
1070 |
+
* new cookie and content blocker preset Yandex Metrica (CU-f4yzpm)
|
1071 |
+
* new cookie preset for Bing Ads (Microsoft UET) (CU-eyzegt)
|
1072 |
+
* new cookie preset found.ee (CU-f97ady)
|
1073 |
+
|
1074 |
+
|
1075 |
+
### fix
|
1076 |
+
|
1077 |
+
* more granular translation for TranslatePress for blockers, cookie group, cookies and banner texts
|
1078 |
+
|
1079 |
+
|
1080 |
+
|
1081 |
+
|
1082 |
+
|
1083 |
+
# 1.11.0 (2021-03-10)
|
1084 |
+
|
1085 |
+
|
1086 |
+
### chore
|
1087 |
+
|
1088 |
+
* hide some notices on try.devowl.io (CU-f53trz)
|
1089 |
+
|
1090 |
+
|
1091 |
+
### feat
|
1092 |
+
|
1093 |
+
* added ability to auto play videos if they got unblocked (Divi Page Builder, CU-f51p51)
|
1094 |
+
* added ability to auto play videos if they got unblocked (JetElements for Elementor, CU-f51p51)
|
1095 |
+
* autoplay YoutTube and Vimeo videos after unblocking through content blocker (CU-f558r1)
|
1096 |
+
|
1097 |
+
|
1098 |
+
### fix
|
1099 |
+
|
1100 |
+
* compatibility with Combine JavaScript in WP Rocket (CU-f35k4j)
|
1101 |
+
* compatibility with Divi videos (e.g. YouTube) when using an overlay
|
1102 |
+
* compatibility with JetElements for Elementor Video Player (CU-f51p51)
|
1103 |
+
* compatibility with lazy loaded scripts e.g. WP Rocket when they are present in the configuration list (CU-f35k4j)
|
1104 |
+
* in some cases the blocked content was still display:none after unblocking (e.g. GTranslate, CU-f35k4j)
|
1105 |
+
|
1106 |
+
|
1107 |
+
|
1108 |
+
|
1109 |
+
|
1110 |
+
# 1.10.0 (2021-03-02)
|
1111 |
+
|
1112 |
+
|
1113 |
+
### chore
|
1114 |
+
|
1115 |
+
* update german text for privacy settings history dialog title (CU-ev2070)
|
1116 |
+
|
1117 |
+
|
1118 |
+
### feat
|
1119 |
+
|
1120 |
+
* allow to customize more texts for content blocker (CU-ev2070)
|
1121 |
+
* new cookie preset (CU-ev6jyb)
|
1122 |
+
|
1123 |
+
|
1124 |
+
### fix
|
1125 |
+
|
1126 |
+
* allow HTML formatting in content blocker accept info text (CU-ev2070)
|
1127 |
+
* compatibility with Thrive Architect embeds
|
1128 |
+
* compatibility with Thrive Archtitect Custom HTML block
|
1129 |
+
* do not allow cookie duration greater than 365 (CU-cpyc46)
|
1130 |
+
* do not override position:relative for content blocker
|
1131 |
+
|
1132 |
+
|
1133 |
+
|
1134 |
+
|
1135 |
+
|
1136 |
+
# 1.9.0 (2021-02-24)
|
1137 |
+
|
1138 |
+
|
1139 |
+
### chore
|
1140 |
+
|
1141 |
+
* drop moment bundle where not needed (CU-e94pnh)
|
1142 |
+
* introduce new JavaScript API window.consentApi.consentSync
|
1143 |
+
|
1144 |
+
|
1145 |
+
### docs
|
1146 |
+
|
1147 |
+
* rename test drive to sanbox (#ef26y8)
|
1148 |
+
|
1149 |
+
|
1150 |
+
### feat
|
1151 |
+
|
1152 |
+
* new cookie banner preset 'Ronny's Dialog'
|
1153 |
+
* new customizer option in Body > Accept all Button > Align side by side (CU-cv0d8g)
|
1154 |
+
|
1155 |
+
|
1156 |
+
### fix
|
1157 |
+
|
1158 |
+
* compatibility with X Theme and Cornerstone
|
1159 |
+
* content blocker containers may also have an empty style
|
1160 |
+
* content blocker for JetPack Site Stats too aggressive when using together with wordpress.com
|
1161 |
+
* content blocking for Quform in some cases to aggressive (#ejxq3b)
|
1162 |
+
* do not annonymously server when SCRIPT_DEBUG is active
|
1163 |
+
* do not apply style to parent containers if no style was previously present
|
1164 |
+
* do not show cookie banner when editing in Divi and Beaver Builder page builder
|
1165 |
+
* illegal mix of collations (CU-ef1dtp)
|
1166 |
+
* in some cases the original iframe was blocked, but not completely hidden
|
1167 |
+
* when a profile deactivate syntax highlighting, the cookie form did not work (CU-en3mxa)
|
1168 |
+
|
1169 |
+
|
1170 |
+
|
1171 |
+
|
1172 |
+
|
1173 |
+
# 1.8.0 (2021-02-16)
|
1174 |
+
|
1175 |
+
|
1176 |
+
### chore
|
1177 |
+
|
1178 |
+
* register and translate new cookie and content blocker presets
|
1179 |
+
* show notice for Quform cause content blocker is not necessery (CU-cawja6)
|
1180 |
+
|
1181 |
+
|
1182 |
+
### feat
|
1183 |
+
|
1184 |
+
* allow to apply content blockers to JSON output of e.g. REST services
|
1185 |
+
* improve English translation (#devznm)
|
1186 |
+
* new cookie and content blocker preset Issuu (CU-e14yht)
|
1187 |
+
* new cookie and content blocker preset Pinterest Tag (CU-eb3wu9)
|
1188 |
+
* new cookie and content blocker preset Quform (CU-cawja6)
|
1189 |
+
* new cookie preset Klarna Checkout for WooCommerce (CU-e2z7u7)
|
1190 |
+
* new cookie preset TranslatePress (CU-e14nf6)
|
1191 |
+
|
1192 |
+
|
1193 |
+
### fix
|
1194 |
+
|
1195 |
+
* compatibility Instagram blocker with WoodMart theme
|
1196 |
+
* compatibility with Elementor inline styles
|
1197 |
+
* compatibility with TranslatePress (CU-cew7v9)
|
1198 |
+
* do not block links without class and external URLs
|
1199 |
+
* do not output calculated time for blocker when not requested; compatibility with Themebeez Toolkit
|
1200 |
+
* show correct tooltip when Google / Matomo Tag Manager template can not be created (CU-e6xyc5)
|
1201 |
+
|
1202 |
+
|
1203 |
+
|
1204 |
+
|
1205 |
+
|
1206 |
+
## 1.7.3 (2021-02-05)
|
1207 |
+
|
1208 |
+
|
1209 |
+
### docs
|
1210 |
+
|
1211 |
+
* update README to be compatible with Requires at least (CU-df2wb4)
|
1212 |
+
|
1213 |
+
|
1214 |
+
### fix
|
1215 |
+
|
1216 |
+
* in some edge cases the wordpress autoupdater does not fire the wp action and dynamic javascript assets are not generated
|
1217 |
+
|
1218 |
+
|
1219 |
+
|
1220 |
+
|
1221 |
+
|
1222 |
+
## 1.7.2 (2021-02-05)
|
1223 |
+
|
1224 |
+
|
1225 |
+
### chore
|
1226 |
+
|
1227 |
+
* show notice after one week when setup not yet completed (CU-djx8ga)
|
1228 |
+
|
1229 |
+
|
1230 |
+
### fix
|
1231 |
+
|
1232 |
+
* deliver anonymous assets like JavaScripts files correctly (CU-dgz2p9)
|
1233 |
+
* remove anonymous javascript files on uninstall (CU-dgz2p9)
|
1234 |
+
|
1235 |
+
|
1236 |
+
|
1237 |
+
|
1238 |
+
|
1239 |
+
## 1.7.1 (2021-02-02)
|
1240 |
+
|
1241 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
1242 |
+
|
1243 |
+
|
1244 |
+
|
1245 |
+
|
1246 |
+
|
1247 |
+
# 1.7.0 (2021-02-02)
|
1248 |
+
|
1249 |
+
|
1250 |
+
### chore
|
1251 |
+
|
1252 |
+
* allow to edit custom post types and taxnomies to be edited via native UI for debug purposes
|
1253 |
+
* remove limit for cookies and content blockers (CU-d6z2u6)
|
1254 |
+
|
1255 |
+
|
1256 |
+
### docs
|
1257 |
+
|
1258 |
+
* improved product description for wordpress.org (#d6z2u6)
|
1259 |
+
|
1260 |
+
|
1261 |
+
### feat
|
1262 |
+
|
1263 |
+
* new cookie and content blocker preset MailerLite (CU-d10rw9)
|
1264 |
+
* new cookie preset CleanTalk Spam Protection (CU-d93t70)
|
1265 |
+
* new cookie preset WordFence (CU-dcyv72)
|
1266 |
+
|
1267 |
+
|
1268 |
+
### fix
|
1269 |
+
|
1270 |
+
* allow to block inline styles by URL (CU-d10rw9)
|
1271 |
+
* compatibility with Custom Facebook Feed Pro v3.18 (CU-cwx3bn)
|
1272 |
+
* compatibility with FooBox lightbox (CU-dczh1k)
|
1273 |
+
* compatibility with TranslatePress to avoid flickering (CU-dd4a3q)
|
1274 |
+
* compatibility with Uncode Google Maps block (CU-d12m5q)
|
1275 |
+
* content blocker should also execute window 'load' event after unblock (CU-d12m5q)
|
1276 |
+
* do correctly find duplicate content blockers and avoid them (CU-d10rw9)
|
1277 |
+
* do not block twice for custom element blockers (CU-d10rw9)
|
1278 |
+
* translated page in footer is not shown in PolyLang correctly (CU-d6wumw)
|
1279 |
+
|
1280 |
+
|
1281 |
+
|
1282 |
+
|
1283 |
+
|
1284 |
+
# 1.6.0 (2021-01-24)
|
1285 |
+
|
1286 |
+
|
1287 |
+
### chore
|
1288 |
+
|
1289 |
+
* register new cookie and content blockers and update README (CU-cwx3bn)
|
1290 |
+
|
1291 |
+
|
1292 |
+
### feat
|
1293 |
+
|
1294 |
+
* allow to make customizer fields resettable with a button (CU-crwyqn)
|
1295 |
+
* new banner preset in customizer 'Clean Dialog'
|
1296 |
+
* new content blocker preset CleverReach with Google Recaptcha (CU-cryuv0)
|
1297 |
+
* new cookie and content blocker preset Custom Twitter Feeds (Tweets Widget) (CU-cwx3bn)
|
1298 |
+
* new cookie and content blocker preset Feeds for YouTube (CU-cwx3bn)
|
1299 |
+
* new cookie and content blocker preset FontAwesome (CU-cx067u)
|
1300 |
+
* new cookie and content blocker preset Smash Balloon Social Post Feed (CU-cwx3bn)
|
1301 |
+
* preset extends middleware now supports extendsStart and extendsEnd for array properties (CU-cwx3bn)
|
1302 |
+
|
1303 |
+
|
1304 |
+
### fix
|
1305 |
+
|
1306 |
+
* allow all URLs for affiliates in PRO version (CU-cyyh2z)
|
1307 |
+
* compatibility with CloudFlare caches; nonce is no longer needed as we have rate limit in public APIs (CU-cwvke2)
|
1308 |
+
* compatibility with Impreza lazy loading grid (CU-94w719)
|
1309 |
+
* improve UX when creating Content Blocker and open the Add-Cookie form in a modal instead of new tab (CU-cz12vj)
|
1310 |
+
* review 1 (CU-cz12vj)
|
1311 |
+
* wrong character encoding for VG Wort preset
|
1312 |
+
|
1313 |
+
|
1314 |
+
### refactor
|
1315 |
+
|
1316 |
+
* remove unused classes and methods
|
1317 |
+
|
1318 |
+
|
1319 |
+
### revert
|
1320 |
+
|
1321 |
+
* always show recommened cookies in content blocker select (CU-cwx3bn)
|
1322 |
+
|
1323 |
+
|
1324 |
+
### style
|
1325 |
+
|
1326 |
+
* do not break line in cookie preset selector description
|
1327 |
+
* use flexbox instead of usual containers for banner buttons (CU-cv0ff2)
|
1328 |
+
|
1329 |
+
|
1330 |
+
|
1331 |
+
|
1332 |
+
|
1333 |
+
# 1.5.0 (2021-01-18)
|
1334 |
+
|
1335 |
+
|
1336 |
+
### chore
|
1337 |
+
|
1338 |
+
* introduce new developer filters RCB/Blocker/KeepAttributes and RCB/Blocker/VisualParent (CU-cn0wvd)
|
1339 |
+
* new Consent API function consentApi.consent() and consentApi.consentAll() to wait for consent
|
1340 |
+
* presets can no be extended by a parent class definition
|
1341 |
+
* register new cookie and content blockers and update README (CU-cewwda)
|
1342 |
+
* translate new presets, update README
|
1343 |
+
|
1344 |
+
|
1345 |
+
### feat
|
1346 |
+
|
1347 |
+
* new content blocker preset Google Analytics (CU-cewwda)
|
1348 |
+
* new cookie and content blocker preset Analytify (CU-cewwda)
|
1349 |
+
* new cookie and content blocker preset ExactMetrics (CU-cewwda)
|
1350 |
+
* new cookie and content blocker preset Facebook For WooCommerce (CU-cewwda)
|
1351 |
+
* new cookie and content blocker preset GA Google Analytics (CU-cewwda)
|
1352 |
+
* new cookie and content blocker preset Mailchimp for WooCommerce (CU-cn234z)
|
1353 |
+
* new cookie and content blocker preset Matomo WordPress plugin (CU-ch3etd)
|
1354 |
+
* new cookie and content blocker preset MonsterInsights (CU-cewwda)
|
1355 |
+
* new cookie and content blocker preset WooCommerce Google Analytics Integration (CU-cewwda)
|
1356 |
+
* new cookie preset Lucky Orange (CU-ccwj8v)
|
1357 |
+
* new cookie preset WooCommerce Stripe (CU-cn232u)
|
1358 |
+
* recommend MonsterInsights content blocker in Google Analytics cookie preset (CU-cewwda)
|
1359 |
+
|
1360 |
+
|
1361 |
+
### fix
|
1362 |
+
|
1363 |
+
* automatically invalidate preset cache after any plugin activated / deactivated
|
1364 |
+
* compatibility with FloThemes embed codes and blocks (CU-cn0wvd)
|
1365 |
+
* do not show footer links when label is empty (CU-cjwyqw)
|
1366 |
+
* do not show hidden or disabled content blocker presets in cookie form
|
1367 |
+
* extended presets can disable technical handling through compatible plugin (CU-cewwda)
|
1368 |
+
* footer not shown when imprint empty in PRO version
|
1369 |
+
* include description in preset search index
|
1370 |
+
* overcompressed logo
|
1371 |
+
* review 1 (CU-cewwda)
|
1372 |
+
|
1373 |
+
|
1374 |
+
### refactor
|
1375 |
+
|
1376 |
+
* presets gets more and more complex, let's simplify with a middleware system
|
1377 |
+
|
1378 |
+
|
1379 |
+
### style
|
1380 |
+
|
1381 |
+
* gray out disabled cookie and content blocker presets
|
1382 |
+
* gray out plugin-specific cookie and content blocker presets
|
1383 |
+
* show a tooltip when a preset is currently disabled
|
1384 |
+
|
1385 |
+
|
1386 |
+
|
1387 |
+
|
1388 |
+
|
1389 |
+
## 1.4.2 (2021-01-11)
|
1390 |
+
|
1391 |
+
|
1392 |
+
### fix
|
1393 |
+
|
1394 |
+
* in some edge cases WP Rocket does blockage twice (CU-ccvvdn)
|
1395 |
+
|
1396 |
+
|
1397 |
+
|
1398 |
+
|
1399 |
+
|
1400 |
+
## 1.4.1 (2021-01-11)
|
1401 |
+
|
1402 |
+
|
1403 |
+
### fix
|
1404 |
+
|
1405 |
+
* hotfix to make presets available again
|
1406 |
+
|
1407 |
+
|
1408 |
+
|
1409 |
+
|
1410 |
+
|
1411 |
+
# 1.4.0 (2021-01-11)
|
1412 |
+
|
1413 |
+
|
1414 |
+
### build
|
1415 |
+
|
1416 |
+
* reduce javascript bundle size by using babel runtime correctly with webpack / babel-loader
|
1417 |
+
|
1418 |
+
|
1419 |
+
### chore
|
1420 |
+
|
1421 |
+
* translate new cookie and blocker presets and register
|
1422 |
+
* **release :** publish [ci skip]
|
1423 |
+
* **release :** publish [ci skip]
|
1424 |
+
|
1425 |
+
|
1426 |
+
### ci
|
1427 |
+
|
1428 |
+
* automatically activate PRO version in review application (CU-hatpe6)
|
1429 |
+
|
1430 |
+
|
1431 |
+
### docs
|
1432 |
+
|
1433 |
+
* update README (CU-bevae9)
|
1434 |
+
|
1435 |
+
|
1436 |
+
### feat
|
1437 |
+
|
1438 |
+
* new cookie and content blocker preset ActiveCampaign forms and site tracking (CU-bh04kz)
|
1439 |
+
* new cookie and content blocker preset Discord (CU-c6vmgg)
|
1440 |
+
* new cookie and content blocker preset MyFonts.net (CU-cawhga)
|
1441 |
+
* new cookie and content blocker preset Proven Expert (Widget) (CU-cawhfp)
|
1442 |
+
* new cookie preset Elementor (CU-cawhdk)
|
1443 |
+
* new cookie preset Mouseflow (CU-cawj3n)
|
1444 |
+
* new cookie preset Userlike (CU-cawhr3)
|
1445 |
+
|
1446 |
+
|
1447 |
+
### fix
|
1448 |
+
|
1449 |
+
* apply gzip compression on the fly to the anti-ad-block system (CU-bx0am1)
|
1450 |
+
* compatibility with All In One WP Security & Firewall (CU-bh08zp)
|
1451 |
+
* compatibility with Facebook for WooCommerce plugin (CU-bwwwrt)
|
1452 |
+
* compatibility with Meks Easy Photo Feed Widget Instagram feed (CU-bx0wd7)
|
1453 |
+
* compatibility with Oxygen page builder
|
1454 |
+
* compatibility with video and audio shortcode (CU-bt21kd)
|
1455 |
+
* compatibility with youtu.be domain in YouTube content blocker preset (CU-bt21hp)
|
1456 |
+
* compatiblity with WP Rocket lazy loading inline scripts (CU-bwwwrt)
|
1457 |
+
* compatiblity with WP Rocket lazy loading YouTube videos (CU-byw6ua)
|
1458 |
+
* content blocker for video and audio tags in some edge cases
|
1459 |
+
* cookie preset selector busy indicator (CU-a8x3j0)
|
1460 |
+
* generate dependency map for translations
|
1461 |
+
* jquery issue when not in use (jQuery is now optional for RCB)
|
1462 |
+
* use correct stubs for PolyLang
|
1463 |
+
|
1464 |
+
|
1465 |
+
### perf
|
1466 |
+
|
1467 |
+
* preset PHP classes are only loaded when needed (CU-a8x3j0)
|
1468 |
+
* speed up caching of presets (CU-a8x3j0)
|
1469 |
+
|
1470 |
+
|
1471 |
+
### style
|
1472 |
+
|
1473 |
+
* input text fields in config page (CU-a8x3j0)
|
1474 |
+
|
1475 |
+
|
1476 |
+
|
1477 |
+
|
1478 |
+
|
1479 |
+
# 1.3.0 (2020-12-15)
|
1480 |
+
|
1481 |
+
|
1482 |
+
### chore
|
1483 |
+
|
1484 |
+
* introduce custom powered-by link in PRO version (CU-b8wzqu)
|
1485 |
+
|
1486 |
+
|
1487 |
+
### feat
|
1488 |
+
|
1489 |
+
* introduce rcb-consent-print-uuid shortcode (CU-bateay)
|
1490 |
+
* new cookie and content blocker preset AddThis (CU-beva7q)
|
1491 |
+
* new cookie and content blocker preset AddToAny (CU-beva7q)
|
1492 |
+
* new cookie and content blocker preset Anchor.fm (CU-beva7q)
|
1493 |
+
* new cookie and content blocker preset Apple Music (CU-beva7q)
|
1494 |
+
* new cookie and content blocker preset Bing Maps (CU-beva7q)
|
1495 |
+
* new cookie and content blocker preset reddit (CU-beva7q)
|
1496 |
+
* new cookie and content blocker preset Spotify (CU-beva7q)
|
1497 |
+
* new cookie and content blocker preset TikTok (CU-beva7q)
|
1498 |
+
* new cookie and content blocker preset WordPress Emojis (CU-beva7q)
|
1499 |
+
|
1500 |
+
|
1501 |
+
### fix
|
1502 |
+
|
1503 |
+
* block sandbox attribute for iframes (CU-beva7q)
|
1504 |
+
* compatibility with WP External Links icon in banner and blocker footer (CU-bew81p)
|
1505 |
+
* dashboard in lite version scrolls automatically to bottom (CU-bez8qn)
|
1506 |
+
* list of consents does not expand if not initially saved settings once before
|
1507 |
+
* memory error while reading the consent list (CU-9yzhrr)
|
1508 |
+
* show ePrivacy and age notice even without description in visual content blocker (CU-beurgy)
|
1509 |
+
|
1510 |
+
|
1511 |
+
### refactor
|
1512 |
+
|
1513 |
+
* introduce code splitting to reduce config page JavaScript assets (CU-b10ahe)
|
1514 |
+
|
1515 |
+
|
1516 |
+
|
1517 |
+
|
1518 |
+
|
1519 |
+
## 1.2.4 (2020-12-10)
|
1520 |
+
|
1521 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
1522 |
+
|
1523 |
+
|
1524 |
+
|
1525 |
+
|
1526 |
+
|
1527 |
+
## 1.2.3 (2020-12-09)
|
1528 |
+
|
1529 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
1530 |
+
|
1531 |
+
|
1532 |
+
|
1533 |
+
|
1534 |
+
|
1535 |
+
## 1.2.2 (2020-12-09)
|
1536 |
+
|
1537 |
+
|
1538 |
+
### build
|
1539 |
+
|
1540 |
+
* use correct pro folders in build folder (CU-5ymbqn)
|
1541 |
+
|
1542 |
+
|
1543 |
+
### chore
|
1544 |
+
|
1545 |
+
* update to cypress v6 (CU-7gmaxc)
|
1546 |
+
* update to webpack v5 (CU-4akvz6)
|
1547 |
+
* updates typings and min. Node.js and Yarn version (CU-9rq9c7)
|
1548 |
+
|
1549 |
+
|
1550 |
+
### fix
|
1551 |
+
|
1552 |
+
* anonymous localized script settings to avoid incompatibility with WP Rocket lazy execution (CU-b4rp51)
|
1553 |
+
* automatically deactivate lite version when installing pro version (CU-5ymbqn)
|
1554 |
+
* compatibility with WP External Links (CU-b8w6yv)
|
1555 |
+
* validate cookie host according to RFC 1123 instead of RFC 952 (CU-b31nf0)
|
1556 |
+
|
1557 |
+
|
1558 |
+
### test
|
1559 |
+
|
1560 |
+
* smoke tests for Real Cookie Banner PRO
|
1561 |
+
|
1562 |
+
|
1563 |
+
|
1564 |
+
|
1565 |
+
|
1566 |
+
## 1.2.1 (2020-12-05)
|
1567 |
+
|
1568 |
+
|
1569 |
+
### fix
|
1570 |
+
|
1571 |
+
* sometimes the privacy and imprint link are not correctly redirected (CU-b2x8wp)
|
1572 |
+
|
1573 |
+
|
1574 |
+
|
1575 |
+
|
1576 |
+
|
1577 |
+
# 1.2.0 (2020-12-01)
|
1578 |
+
|
1579 |
+
|
1580 |
+
### chore
|
1581 |
+
|
1582 |
+
* translate new presets
|
1583 |
+
* update dependencies (CU-3cj43t)
|
1584 |
+
* update major dependencies (CU-3cj43t)
|
1585 |
+
* update to composer v2 (CU-4akvjg)
|
1586 |
+
* update to core-js@3 (CU-3cj43t)
|
1587 |
+
* update to TypeScript 4.1 (CU-3cj43t)
|
1588 |
+
|
1589 |
+
|
1590 |
+
### feat
|
1591 |
+
|
1592 |
+
* new cookie preset Zoho Forms and Zoho Bookings (CU-awy9wa)
|
1593 |
+
|
1594 |
+
|
1595 |
+
### refactor
|
1596 |
+
|
1597 |
+
* enforce explicit-member-accessibility (CU-a6w5bv)
|
1598 |
+
|
1599 |
+
|
1600 |
+
|
1601 |
+
|
1602 |
+
|
1603 |
+
## 1.1.3 (2020-11-26)
|
1604 |
+
|
1605 |
+
|
1606 |
+
### fix
|
1607 |
+
|
1608 |
+
* compatibility with WebFontLoader for Google Fonts and Adobe Typekit (CU-aq01tu)
|
1609 |
+
* never block codeOnPageLoad scripts of cookies (introduce consent-skip-blocker HTML attribute, CU-aq01tu)
|
1610 |
+
|
1611 |
+
|
1612 |
+
|
1613 |
+
|
1614 |
+
|
1615 |
+
## 1.1.2 (2020-11-25)
|
1616 |
+
|
1617 |
+
|
1618 |
+
### fix
|
1619 |
+
|
1620 |
+
* code on page load should be execute inside head-tag (CU-aq01tu)
|
1621 |
+
* consent does not get saved in development websites (CU-aq0tbk)
|
1622 |
+
* wrong link to consent forwarding in german WordPress installation
|
1623 |
+
|
1624 |
+
|
1625 |
+
|
1626 |
+
|
1627 |
+
|
1628 |
+
## 1.1.1 (2020-11-24)
|
1629 |
+
|
1630 |
+
|
1631 |
+
### fix
|
1632 |
+
|
1633 |
+
* compatibility with RankMath SEO
|
1634 |
+
* do not block content in beaver builder edit mode (CU-agzcrp)
|
1635 |
+
* do not output rcb calc time in json content type responses (Beaver Builder compatibility, CU-agzcrp)
|
1636 |
+
|
1637 |
+
|
1638 |
+
|
1639 |
+
|
1640 |
+
|
1641 |
+
# 1.1.0 (2020-11-24)
|
1642 |
+
|
1643 |
+
|
1644 |
+
### docs
|
1645 |
+
|
1646 |
+
* add MS Clarity in README
|
1647 |
+
|
1648 |
+
|
1649 |
+
### feat
|
1650 |
+
|
1651 |
+
* new cookie preset Google Trends (CU-ajrchu)
|
1652 |
+
* new cookie preset Microsoft Clarity (#a8rv4x)
|
1653 |
+
|
1654 |
+
|
1655 |
+
### fix
|
1656 |
+
|
1657 |
+
* allow document.write for unblocked scripts (#ajrchu)
|
1658 |
+
* compatibility with upcoming WordPress 5.6 (CU-amzjdz)
|
1659 |
+
* decode HTML entities in content blocker scripts, e.g. old Google Trends embed (#ajrchu)
|
1660 |
+
* ensure banner overlay is always a children of document.body (CU-agz6u3)
|
1661 |
+
* ensure banner overlay is always a children of document.body (CU-agz6u3)
|
1662 |
+
* modify Google Trends to work with older embed codes (CU-ajrchu)
|
1663 |
+
* modify max index length for MySQL 5.6 databases so all database tables get created (CU-agzcrp)
|
1664 |
+
* multiple content blockers should be inside a blocking wrapper (CU-ajrchu)
|
1665 |
+
* order with multiple content blocker scripts (#ajrchu)
|
1666 |
+
* typo in german translation (CU-agzcrp)
|
1667 |
+
* update Jetpack Site Stats and Comments content blocker (CU-amr3f1)
|
1668 |
+
* use no-store caching for WP REST API calls to avoid issues with browsers and CloudFlare (CU-agzcrp)
|
1669 |
+
* using multiple ads with Google Adsense (CU-ajrcn2)
|
1670 |
+
* wrong cookie count for first time usage in dashboard (CU-agzcrp)
|
1671 |
+
|
1672 |
+
|
1673 |
+
|
1674 |
+
|
1675 |
+
|
1676 |
+
## 1.0.4 (2020-11-19)
|
1677 |
+
|
1678 |
+
**Note:** This package (@devowl-wp/real-cookie-banner) has been updated because a dependency, which is also shipped with this package, has changed.
|
1679 |
+
|
1680 |
+
|
1681 |
+
|
1682 |
+
|
1683 |
+
|
1684 |
+
## 1.0.3 (2020-11-18)
|
1685 |
+
|
1686 |
+
|
1687 |
+
### fix
|
1688 |
+
|
1689 |
+
* add Divi maps block to Google Maps content blocker
|
1690 |
+
* banner not shown up in Happy Wedding Day theme
|
1691 |
+
* compatibility with Divi Maps block
|
1692 |
+
|
1693 |
+
|
1694 |
+
|
1695 |
+
|
1696 |
+
|
1697 |
+
## 1.0.2 (2020-11-17)
|
1698 |
+
|
1699 |
+
|
1700 |
+
### fix
|
1701 |
+
|
1702 |
+
* do not show licensing tab in free test drive (#acypm6)
|
1703 |
+
|
1704 |
+
|
1705 |
+
|
1706 |
+
|
1707 |
+
|
1708 |
+
## 1.0.1 (2020-11-17)
|
1709 |
+
|
1710 |
+
|
1711 |
+
### ci
|
1712 |
+
|
1713 |
+
* wrong license.devowl.io package.json
|
1714 |
+
|
1715 |
+
|
1716 |
+
### docs
|
1717 |
+
|
1718 |
+
* wordpress.org README
|
1719 |
+
|
1720 |
+
|
1721 |
+
### fix
|
1722 |
+
|
1723 |
+
* remove unnecessary dependency (composer) package (#acwy1g)
|
1724 |
+
|
1725 |
+
|
1726 |
+
|
1727 |
+
|
1728 |
+
|
1729 |
+
# 1.0.0 (2020-11-17)
|
1730 |
+
|
1731 |
+
|
1732 |
+
### chore
|
1733 |
+
|
1734 |
+
* initial release (#4rruvq)
|
1735 |
+
|
1736 |
+
|
1737 |
+
### test
|
1738 |
+
|
1739 |
+
* fix lite version smoke tests
|
1740 |
+
* fix smoke test
|
1741 |
+
* fix smoke tests for lite version
|
1742 |
+
* fix typo in lite smoke test
|
1743 |
+
|
1744 |
+
|
1745 |
+
* chore!: remove early access notice for newer updates (#4rruvq)
|
1746 |
+
* feat!: use new license server (#4rruvq)
|
1747 |
+
* ci!: release free version to wordpress.org automatically (#4rruvq)
|
1748 |
+
|
1749 |
+
|
1750 |
+
### BREAKING CHANGE
|
1751 |
+
|
1752 |
+
* we are live!
|
1753 |
+
* if you were a early access user, please upgrade to the initial version
|
1754 |
+
* you need to enter your license key again to get automatic updates
|
1755 |
+
* download initial version now here: https://wordpress.org/plugins/real-cookie-banner
|
LICENSE
ADDED
@@ -0,0 +1,693 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Real Cookie Banner: GDPR (DSGVO) & ePrivacy Cookie Consent
|
2 |
+
|
3 |
+
Copyright (C) 2020 devowl.io GmbH
|
4 |
+
|
5 |
+
This program is free software: you can redistribute it and/or modify it under
|
6 |
+
the terms of the GNU General Public License as published by the Free Software
|
7 |
+
Foundation, either version 3 of the License, or any later version.
|
8 |
+
|
9 |
+
This program is distributed in the hope that it will be useful, but WITHOUT
|
10 |
+
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
11 |
+
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
12 |
+
|
13 |
+
You should have received a copy of the GNU General Public License along with
|
14 |
+
this program. If not, see <https://www.gnu.org/licenses/>.
|
15 |
+
|
16 |
+
|
17 |
+
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
18 |
+
|
19 |
+
|
20 |
+
GNU GENERAL PUBLIC LICENSE
|
21 |
+
Version 3, 29 June 2007
|
22 |
+
|
23 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
24 |
+
Everyone is permitted to copy and distribute verbatim copies
|
25 |
+
of this license document, but changing it is not allowed.
|
26 |
+
|
27 |
+
Preamble
|
28 |
+
|
29 |
+
The GNU General Public License is a free, copyleft license for
|
30 |
+
software and other kinds of works.
|
31 |
+
|
32 |
+
The licenses for most software and other practical works are designed
|
33 |
+
to take away your freedom to share and change the works. By contrast,
|
34 |
+
the GNU General Public License is intended to guarantee your freedom to
|
35 |
+
share and change all versions of a program--to make sure it remains free
|
36 |
+
software for all its users. We, the Free Software Foundation, use the
|
37 |
+
GNU General Public License for most of our software; it applies also to
|
38 |
+
any other work released this way by its authors. You can apply it to
|
39 |
+
your programs, too.
|
40 |
+
|
41 |
+
When we speak of free software, we are referring to freedom, not
|
42 |
+
price. Our General Public Licenses are designed to make sure that you
|
43 |
+
have the freedom to distribute copies of free software (and charge for
|
44 |
+
them if you wish), that you receive source code or can get it if you
|
45 |
+
want it, that you can change the software or use pieces of it in new
|
46 |
+
free programs, and that you know you can do these things.
|
47 |
+
|
48 |
+
To protect your rights, we need to prevent others from denying you
|
49 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
50 |
+
certain responsibilities if you distribute copies of the software, or if
|
51 |
+
you modify it: responsibilities to respect the freedom of others.
|
52 |
+
|
53 |
+
For example, if you distribute copies of such a program, whether
|
54 |
+
gratis or for a fee, you must pass on to the recipients the same
|
55 |
+
freedoms that you received. You must make sure that they, too, receive
|
56 |
+
or can get the source code. And you must show them these terms so they
|
57 |
+
know their rights.
|
58 |
+
|
59 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
60 |
+
(1) assert copyright on the software, and (2) offer you this License
|
61 |
+
giving you legal permission to copy, distribute and/or modify it.
|
62 |
+
|
63 |
+
For the developers' and authors' protection, the GPL clearly explains
|
64 |
+
that there is no warranty for this free software. For both users' and
|
65 |
+
authors' sake, the GPL requires that modified versions be marked as
|
66 |
+
changed, so that their problems will not be attributed erroneously to
|
67 |
+
authors of previous versions.
|
68 |
+
|
69 |
+
Some devices are designed to deny users access to install or run
|
70 |
+
modified versions of the software inside them, although the manufacturer
|
71 |
+
can do so. This is fundamentally incompatible with the aim of
|
72 |
+
protecting users' freedom to change the software. The systematic
|
73 |
+
pattern of such abuse occurs in the area of products for individuals to
|
74 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
75 |
+
have designed this version of the GPL to prohibit the practice for those
|
76 |
+
products. If such problems arise substantially in other domains, we
|
77 |
+
stand ready to extend this provision to those domains in future versions
|
78 |
+
of the GPL, as needed to protect the freedom of users.
|
79 |
+
|
80 |
+
Finally, every program is threatened constantly by software patents.
|
81 |
+
States should not allow patents to restrict development and use of
|
82 |
+
software on general-purpose computers, but in those that do, we wish to
|
83 |
+
avoid the special danger that patents applied to a free program could
|
84 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
85 |
+
patents cannot be used to render the program non-free.
|
86 |
+
|
87 |
+
The precise terms and conditions for copying, distribution and
|
88 |
+
modification follow.
|
89 |
+
|
90 |
+
TERMS AND CONDITIONS
|
91 |
+
|
92 |
+
0. Definitions.
|
93 |
+
|
94 |
+
"This License" refers to version 3 of the GNU General Public License.
|
95 |
+
|
96 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
97 |
+
works, such as semiconductor masks.
|
98 |
+
|
99 |
+
"The Program" refers to any copyrightable work licensed under this
|
100 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
101 |
+
"recipients" may be individuals or organizations.
|
102 |
+
|
103 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
104 |
+
in a fashion requiring copyright permission, other than the making of an
|
105 |
+
exact copy. The resulting work is called a "modified version" of the
|
106 |
+
earlier work or a work "based on" the earlier work.
|
107 |
+
|
108 |
+
A "covered work" means either the unmodified Program or a work based
|
109 |
+
on the Program.
|
110 |
+
|
111 |
+
To "propagate" a work means to do anything with it that, without
|
112 |
+
permission, would make you directly or secondarily liable for
|
113 |
+
infringement under applicable copyright law, except executing it on a
|
114 |
+
computer or modifying a private copy. Propagation includes copying,
|
115 |
+
distribution (with or without modification), making available to the
|
116 |
+
public, and in some countries other activities as well.
|
117 |
+
|
118 |
+
To "convey" a work means any kind of propagation that enables other
|
119 |
+
parties to make or receive copies. Mere interaction with a user through
|
120 |
+
a computer network, with no transfer of a copy, is not conveying.
|
121 |
+
|
122 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
123 |
+
to the extent that it includes a convenient and prominently visible
|
124 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
125 |
+
tells the user that there is no warranty for the work (except to the
|
126 |
+
extent that warranties are provided), that licensees may convey the
|
127 |
+
work under this License, and how to view a copy of this License. If
|
128 |
+
the interface presents a list of user commands or options, such as a
|
129 |
+
menu, a prominent item in the list meets this criterion.
|
130 |
+
|
131 |
+
1. Source Code.
|
132 |
+
|
133 |
+
The "source code" for a work means the preferred form of the work
|
134 |
+
for making modifications to it. "Object code" means any non-source
|
135 |
+
form of a work.
|
136 |
+
|
137 |
+
A "Standard Interface" means an interface that either is an official
|
138 |
+
standard defined by a recognized standards body, or, in the case of
|
139 |
+
interfaces specified for a particular programming language, one that
|
140 |
+
is widely used among developers working in that language.
|
141 |
+
|
142 |
+
The "System Libraries" of an executable work include anything, other
|
143 |
+
than the work as a whole, that (a) is included in the normal form of
|
144 |
+
packaging a Major Component, but which is not part of that Major
|
145 |
+
Component, and (b) serves only to enable use of the work with that
|
146 |
+
Major Component, or to implement a Standard Interface for which an
|
147 |
+
implementation is available to the public in source code form. A
|
148 |
+
"Major Component", in this context, means a major essential component
|
149 |
+
(kernel, window system, and so on) of the specific operating system
|
150 |
+
(if any) on which the executable work runs, or a compiler used to
|
151 |
+
produce the work, or an object code interpreter used to run it.
|
152 |
+
|
153 |
+
The "Corresponding Source" for a work in object code form means all
|
154 |
+
the source code needed to generate, install, and (for an executable
|
155 |
+
work) run the object code and to modify the work, including scripts to
|
156 |
+
control those activities. However, it does not include the work's
|
157 |
+
System Libraries, or general-purpose tools or generally available free
|
158 |
+
programs which are used unmodified in performing those activities but
|
159 |
+
which are not part of the work. For example, Corresponding Source
|
160 |
+
includes interface definition files associated with source files for
|
161 |
+
the work, and the source code for shared libraries and dynamically
|
162 |
+
linked subprograms that the work is specifically designed to require,
|
163 |
+
such as by intimate data communication or control flow between those
|
164 |
+
subprograms and other parts of the work.
|
165 |
+
|
166 |
+
The Corresponding Source need not include anything that users
|
167 |
+
can regenerate automatically from other parts of the Corresponding
|
168 |
+
Source.
|
169 |
+
|
170 |
+
The Corresponding Source for a work in source code form is that
|
171 |
+
same work.
|
172 |
+
|
173 |
+
2. Basic Permissions.
|
174 |
+
|
175 |
+
All rights granted under this License are granted for the term of
|
176 |
+
copyright on the Program, and are irrevocable provided the stated
|
177 |
+
conditions are met. This License explicitly affirms your unlimited
|
178 |
+
permission to run the unmodified Program. The output from running a
|
179 |
+
covered work is covered by this License only if the output, given its
|
180 |
+
content, constitutes a covered work. This License acknowledges your
|
181 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
182 |
+
|
183 |
+
You may make, run and propagate covered works that you do not
|
184 |
+
convey, without conditions so long as your license otherwise remains
|
185 |
+
in force. You may convey covered works to others for the sole purpose
|
186 |
+
of having them make modifications exclusively for you, or provide you
|
187 |
+
with facilities for running those works, provided that you comply with
|
188 |
+
the terms of this License in conveying all material for which you do
|
189 |
+
not control copyright. Those thus making or running the covered works
|
190 |
+
for you must do so exclusively on your behalf, under your direction
|
191 |
+
and control, on terms that prohibit them from making any copies of
|
192 |
+
your copyrighted material outside their relationship with you.
|
193 |
+
|
194 |
+
Conveying under any other circumstances is permitted solely under
|
195 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
196 |
+
makes it unnecessary.
|
197 |
+
|
198 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
199 |
+
|
200 |
+
No covered work shall be deemed part of an effective technological
|
201 |
+
measure under any applicable law fulfilling obligations under article
|
202 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
203 |
+
similar laws prohibiting or restricting circumvention of such
|
204 |
+
measures.
|
205 |
+
|
206 |
+
When you convey a covered work, you waive any legal power to forbid
|
207 |
+
circumvention of technological measures to the extent such circumvention
|
208 |
+
is effected by exercising rights under this License with respect to
|
209 |
+
the covered work, and you disclaim any intention to limit operation or
|
210 |
+
modification of the work as a means of enforcing, against the work's
|
211 |
+
users, your or third parties' legal rights to forbid circumvention of
|
212 |
+
technological measures.
|
213 |
+
|
214 |
+
4. Conveying Verbatim Copies.
|
215 |
+
|
216 |
+
You may convey verbatim copies of the Program's source code as you
|
217 |
+
receive it, in any medium, provided that you conspicuously and
|
218 |
+
appropriately publish on each copy an appropriate copyright notice;
|
219 |
+
keep intact all notices stating that this License and any
|
220 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
221 |
+
keep intact all notices of the absence of any warranty; and give all
|
222 |
+
recipients a copy of this License along with the Program.
|
223 |
+
|
224 |
+
You may charge any price or no price for each copy that you convey,
|
225 |
+
and you may offer support or warranty protection for a fee.
|
226 |
+
|
227 |
+
5. Conveying Modified Source Versions.
|
228 |
+
|
229 |
+
You may convey a work based on the Program, or the modifications to
|
230 |
+
produce it from the Program, in the form of source code under the
|
231 |
+
terms of section 4, provided that you also meet all of these conditions:
|
232 |
+
|
233 |
+
a) The work must carry prominent notices stating that you modified
|
234 |
+
it, and giving a relevant date.
|
235 |
+
|
236 |
+
b) The work must carry prominent notices stating that it is
|
237 |
+
released under this License and any conditions added under section
|
238 |
+
7. This requirement modifies the requirement in section 4 to
|
239 |
+
"keep intact all notices".
|
240 |
+
|
241 |
+
c) You must license the entire work, as a whole, under this
|
242 |
+
License to anyone who comes into possession of a copy. This
|
243 |
+
License will therefore apply, along with any applicable section 7
|
244 |
+
additional terms, to the whole of the work, and all its parts,
|
245 |
+
regardless of how they are packaged. This License gives no
|
246 |
+
permission to license the work in any other way, but it does not
|
247 |
+
invalidate such permission if you have separately received it.
|
248 |
+
|
249 |
+
d) If the work has interactive user interfaces, each must display
|
250 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
251 |
+
interfaces that do not display Appropriate Legal Notices, your
|
252 |
+
work need not make them do so.
|
253 |
+
|
254 |
+
A compilation of a covered work with other separate and independent
|
255 |
+
works, which are not by their nature extensions of the covered work,
|
256 |
+
and which are not combined with it such as to form a larger program,
|
257 |
+
in or on a volume of a storage or distribution medium, is called an
|
258 |
+
"aggregate" if the compilation and its resulting copyright are not
|
259 |
+
used to limit the access or legal rights of the compilation's users
|
260 |
+
beyond what the individual works permit. Inclusion of a covered work
|
261 |
+
in an aggregate does not cause this License to apply to the other
|
262 |
+
parts of the aggregate.
|
263 |
+
|
264 |
+
6. Conveying Non-Source Forms.
|
265 |
+
|
266 |
+
You may convey a covered work in object code form under the terms
|
267 |
+
of sections 4 and 5, provided that you also convey the
|
268 |
+
machine-readable Corresponding Source under the terms of this License,
|
269 |
+
in one of these ways:
|
270 |
+
|
271 |
+
a) Convey the object code in, or embodied in, a physical product
|
272 |
+
(including a physical distribution medium), accompanied by the
|
273 |
+
Corresponding Source fixed on a durable physical medium
|
274 |
+
customarily used for software interchange.
|
275 |
+
|
276 |
+
b) Convey the object code in, or embodied in, a physical product
|
277 |
+
(including a physical distribution medium), accompanied by a
|
278 |
+
written offer, valid for at least three years and valid for as
|
279 |
+
long as you offer spare parts or customer support for that product
|
280 |
+
model, to give anyone who possesses the object code either (1) a
|
281 |
+
copy of the Corresponding Source for all the software in the
|
282 |
+
product that is covered by this License, on a durable physical
|
283 |
+
medium customarily used for software interchange, for a price no
|
284 |
+
more than your reasonable cost of physically performing this
|
285 |
+
conveying of source, or (2) access to copy the
|
286 |
+
Corresponding Source from a network server at no charge.
|
287 |
+
|
288 |
+
c) Convey individual copies of the object code with a copy of the
|
289 |
+
written offer to provide the Corresponding Source. This
|
290 |
+
alternative is allowed only occasionally and noncommercially, and
|
291 |
+
only if you received the object code with such an offer, in accord
|
292 |
+
with subsection 6b.
|
293 |
+
|
294 |
+
d) Convey the object code by offering access from a designated
|
295 |
+
place (gratis or for a charge), and offer equivalent access to the
|
296 |
+
Corresponding Source in the same way through the same place at no
|
297 |
+
further charge. You need not require recipients to copy the
|
298 |
+
Corresponding Source along with the object code. If the place to
|
299 |
+
copy the object code is a network server, the Corresponding Source
|
300 |
+
may be on a different server (operated by you or a third party)
|
301 |
+
that supports equivalent copying facilities, provided you maintain
|
302 |
+
clear directions next to the object code saying where to find the
|
303 |
+
Corresponding Source. Regardless of what server hosts the
|
304 |
+
Corresponding Source, you remain obligated to ensure that it is
|
305 |
+
available for as long as needed to satisfy these requirements.
|
306 |
+
|
307 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
308 |
+
you inform other peers where the object code and Corresponding
|
309 |
+
Source of the work are being offered to the general public at no
|
310 |
+
charge under subsection 6d.
|
311 |
+
|
312 |
+
A separable portion of the object code, whose source code is excluded
|
313 |
+
from the Corresponding Source as a System Library, need not be
|
314 |
+
included in conveying the object code work.
|
315 |
+
|
316 |
+
A "User Product" is either (1) a "consumer product", which means any
|
317 |
+
tangible personal property which is normally used for personal, family,
|
318 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
319 |
+
into a dwelling. In determining whether a product is a consumer product,
|
320 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
321 |
+
product received by a particular user, "normally used" refers to a
|
322 |
+
typical or common use of that class of product, regardless of the status
|
323 |
+
of the particular user or of the way in which the particular user
|
324 |
+
actually uses, or expects or is expected to use, the product. A product
|
325 |
+
is a consumer product regardless of whether the product has substantial
|
326 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
327 |
+
the only significant mode of use of the product.
|
328 |
+
|
329 |
+
"Installation Information" for a User Product means any methods,
|
330 |
+
procedures, authorization keys, or other information required to install
|
331 |
+
and execute modified versions of a covered work in that User Product from
|
332 |
+
a modified version of its Corresponding Source. The information must
|
333 |
+
suffice to ensure that the continued functioning of the modified object
|
334 |
+
code is in no case prevented or interfered with solely because
|
335 |
+
modification has been made.
|
336 |
+
|
337 |
+
If you convey an object code work under this section in, or with, or
|
338 |
+
specifically for use in, a User Product, and the conveying occurs as
|
339 |
+
part of a transaction in which the right of possession and use of the
|
340 |
+
User Product is transferred to the recipient in perpetuity or for a
|
341 |
+
fixed term (regardless of how the transaction is characterized), the
|
342 |
+
Corresponding Source conveyed under this section must be accompanied
|
343 |
+
by the Installation Information. But this requirement does not apply
|
344 |
+
if neither you nor any third party retains the ability to install
|
345 |
+
modified object code on the User Product (for example, the work has
|
346 |
+
been installed in ROM).
|
347 |
+
|
348 |
+
The requirement to provide Installation Information does not include a
|
349 |
+
requirement to continue to provide support service, warranty, or updates
|
350 |
+
for a work that has been modified or installed by the recipient, or for
|
351 |
+
the User Product in which it has been modified or installed. Access to a
|
352 |
+
network may be denied when the modification itself materially and
|
353 |
+
adversely affects the operation of the network or violates the rules and
|
354 |
+
protocols for communication across the network.
|
355 |
+
|
356 |
+
Corresponding Source conveyed, and Installation Information provided,
|
357 |
+
in accord with this section must be in a format that is publicly
|
358 |
+
documented (and with an implementation available to the public in
|
359 |
+
source code form), and must require no special password or key for
|
360 |
+
unpacking, reading or copying.
|
361 |
+
|
362 |
+
7. Additional Terms.
|
363 |
+
|
364 |
+
"Additional permissions" are terms that supplement the terms of this
|
365 |
+
License by making exceptions from one or more of its conditions.
|
366 |
+
Additional permissions that are applicable to the entire Program shall
|
367 |
+
be treated as though they were included in this License, to the extent
|
368 |
+
that they are valid under applicable law. If additional permissions
|
369 |
+
apply only to part of the Program, that part may be used separately
|
370 |
+
under those permissions, but the entire Program remains governed by
|
371 |
+
this License without regard to the additional permissions.
|
372 |
+
|
373 |
+
When you convey a copy of a covered work, you may at your option
|
374 |
+
remove any additional permissions from that copy, or from any part of
|
375 |
+
it. (Additional permissions may be written to require their own
|
376 |
+
removal in certain cases when you modify the work.) You may place
|
377 |
+
additional permissions on material, added by you to a covered work,
|
378 |
+
for which you have or can give appropriate copyright permission.
|
379 |
+
|
380 |
+
Notwithstanding any other provision of this License, for material you
|
381 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
382 |
+
that material) supplement the terms of this License with terms:
|
383 |
+
|
384 |
+
a) Disclaiming warranty or limiting liability differently from the
|
385 |
+
terms of sections 15 and 16 of this License; or
|
386 |
+
|
387 |
+
b) Requiring preservation of specified reasonable legal notices or
|
388 |
+
author attributions in that material or in the Appropriate Legal
|
389 |
+
Notices displayed by works containing it; or
|
390 |
+
|
391 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
392 |
+
requiring that modified versions of such material be marked in
|
393 |
+
reasonable ways as different from the original version; or
|
394 |
+
|
395 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
396 |
+
authors of the material; or
|
397 |
+
|
398 |
+
e) Declining to grant rights under trademark law for use of some
|
399 |
+
trade names, trademarks, or service marks; or
|
400 |
+
|
401 |
+
f) Requiring indemnification of licensors and authors of that
|
402 |
+
material by anyone who conveys the material (or modified versions of
|
403 |
+
it) with contractual assumptions of liability to the recipient, for
|
404 |
+
any liability that these contractual assumptions directly impose on
|
405 |
+
those licensors and authors.
|
406 |
+
|
407 |
+
All other non-permissive additional terms are considered "further
|
408 |
+
restrictions" within the meaning of section 10. If the Program as you
|
409 |
+
received it, or any part of it, contains a notice stating that it is
|
410 |
+
governed by this License along with a term that is a further
|
411 |
+
restriction, you may remove that term. If a license document contains
|
412 |
+
a further restriction but permits relicensing or conveying under this
|
413 |
+
License, you may add to a covered work material governed by the terms
|
414 |
+
of that license document, provided that the further restriction does
|
415 |
+
not survive such relicensing or conveying.
|
416 |
+
|
417 |
+
If you add terms to a covered work in accord with this section, you
|
418 |
+
must place, in the relevant source files, a statement of the
|
419 |
+
additional terms that apply to those files, or a notice indicating
|
420 |
+
where to find the applicable terms.
|
421 |
+
|
422 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
423 |
+
form of a separately written license, or stated as exceptions;
|
424 |
+
the above requirements apply either way.
|
425 |
+
|
426 |
+
8. Termination.
|
427 |
+
|
428 |
+
You may not propagate or modify a covered work except as expressly
|
429 |
+
provided under this License. Any attempt otherwise to propagate or
|
430 |
+
modify it is void, and will automatically terminate your rights under
|
431 |
+
this License (including any patent licenses granted under the third
|
432 |
+
paragraph of section 11).
|
433 |
+
|
434 |
+
However, if you cease all violation of this License, then your
|
435 |
+
license from a particular copyright holder is reinstated (a)
|
436 |
+
provisionally, unless and until the copyright holder explicitly and
|
437 |
+
finally terminates your license, and (b) permanently, if the copyright
|
438 |
+
holder fails to notify you of the violation by some reasonable means
|
439 |
+
prior to 60 days after the cessation.
|
440 |
+
|
441 |
+
Moreover, your license from a particular copyright holder is
|
442 |
+
reinstated permanently if the copyright holder notifies you of the
|
443 |
+
violation by some reasonable means, this is the first time you have
|
444 |
+
received notice of violation of this License (for any work) from that
|
445 |
+
copyright holder, and you cure the violation prior to 30 days after
|
446 |
+
your receipt of the notice.
|
447 |
+
|
448 |
+
Termination of your rights under this section does not terminate the
|
449 |
+
licenses of parties who have received copies or rights from you under
|
450 |
+
this License. If your rights have been terminated and not permanently
|
451 |
+
reinstated, you do not qualify to receive new licenses for the same
|
452 |
+
material under section 10.
|
453 |
+
|
454 |
+
9. Acceptance Not Required for Having Copies.
|
455 |
+
|
456 |
+
You are not required to accept this License in order to receive or
|
457 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
458 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
459 |
+
to receive a copy likewise does not require acceptance. However,
|
460 |
+
nothing other than this License grants you permission to propagate or
|
461 |
+
modify any covered work. These actions infringe copyright if you do
|
462 |
+
not accept this License. Therefore, by modifying or propagating a
|
463 |
+
covered work, you indicate your acceptance of this License to do so.
|
464 |
+
|
465 |
+
10. Automatic Licensing of Downstream Recipients.
|
466 |
+
|
467 |
+
Each time you convey a covered work, the recipient automatically
|
468 |
+
receives a license from the original licensors, to run, modify and
|
469 |
+
propagate that work, subject to this License. You are not responsible
|
470 |
+
for enforcing compliance by third parties with this License.
|
471 |
+
|
472 |
+
An "entity transaction" is a transaction transferring control of an
|
473 |
+
organization, or substantially all assets of one, or subdividing an
|
474 |
+
organization, or merging organizations. If propagation of a covered
|
475 |
+
work results from an entity transaction, each party to that
|
476 |
+
transaction who receives a copy of the work also receives whatever
|
477 |
+
licenses to the work the party's predecessor in interest had or could
|
478 |
+
give under the previous paragraph, plus a right to possession of the
|
479 |
+
Corresponding Source of the work from the predecessor in interest, if
|
480 |
+
the predecessor has it or can get it with reasonable efforts.
|
481 |
+
|
482 |
+
You may not impose any further restrictions on the exercise of the
|
483 |
+
rights granted or affirmed under this License. For example, you may
|
484 |
+
not impose a license fee, royalty, or other charge for exercise of
|
485 |
+
rights granted under this License, and you may not initiate litigation
|
486 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
487 |
+
any patent claim is infringed by making, using, selling, offering for
|
488 |
+
sale, or importing the Program or any portion of it.
|
489 |
+
|
490 |
+
11. Patents.
|
491 |
+
|
492 |
+
A "contributor" is a copyright holder who authorizes use under this
|
493 |
+
License of the Program or a work on which the Program is based. The
|
494 |
+
work thus licensed is called the contributor's "contributor version".
|
495 |
+
|
496 |
+
A contributor's "essential patent claims" are all patent claims
|
497 |
+
owned or controlled by the contributor, whether already acquired or
|
498 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
499 |
+
by this License, of making, using, or selling its contributor version,
|
500 |
+
but do not include claims that would be infringed only as a
|
501 |
+
consequence of further modification of the contributor version. For
|
502 |
+
purposes of this definition, "control" includes the right to grant
|
503 |
+
patent sublicenses in a manner consistent with the requirements of
|
504 |
+
this License.
|
505 |
+
|
506 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
507 |
+
patent license under the contributor's essential patent claims, to
|
508 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
509 |
+
propagate the contents of its contributor version.
|
510 |
+
|
511 |
+
In the following three paragraphs, a "patent license" is any express
|
512 |
+
agreement or commitment, however denominated, not to enforce a patent
|
513 |
+
(such as an express permission to practice a patent or covenant not to
|
514 |
+
sue for patent infringement). To "grant" such a patent license to a
|
515 |
+
party means to make such an agreement or commitment not to enforce a
|
516 |
+
patent against the party.
|
517 |
+
|
518 |
+
If you convey a covered work, knowingly relying on a patent license,
|
519 |
+
and the Corresponding Source of the work is not available for anyone
|
520 |
+
to copy, free of charge and under the terms of this License, through a
|
521 |
+
publicly available network server or other readily accessible means,
|
522 |
+
then you must either (1) cause the Corresponding Source to be so
|
523 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
524 |
+
patent license for this particular work, or (3) arrange, in a manner
|
525 |
+
consistent with the requirements of this License, to extend the patent
|
526 |
+
license to downstream recipients. "Knowingly relying" means you have
|
527 |
+
actual knowledge that, but for the patent license, your conveying the
|
528 |
+
covered work in a country, or your recipient's use of the covered work
|
529 |
+
in a country, would infringe one or more identifiable patents in that
|
530 |
+
country that you have reason to believe are valid.
|
531 |
+
|
532 |
+
If, pursuant to or in connection with a single transaction or
|
533 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
534 |
+
covered work, and grant a patent license to some of the parties
|
535 |
+
receiving the covered work authorizing them to use, propagate, modify
|
536 |
+
or convey a specific copy of the covered work, then the patent license
|
537 |
+
you grant is automatically extended to all recipients of the covered
|
538 |
+
work and works based on it.
|
539 |
+
|
540 |
+
A patent license is "discriminatory" if it does not include within
|
541 |
+
the scope of its coverage, prohibits the exercise of, or is
|
542 |
+
conditioned on the non-exercise of one or more of the rights that are
|
543 |
+
specifically granted under this License. You may not convey a covered
|
544 |
+
work if you are a party to an arrangement with a third party that is
|
545 |
+
in the business of distributing software, under which you make payment
|
546 |
+
to the third party based on the extent of your activity of conveying
|
547 |
+
the work, and under which the third party grants, to any of the
|
548 |
+
parties who would receive the covered work from you, a discriminatory
|
549 |
+
patent license (a) in connection with copies of the covered work
|
550 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
551 |
+
for and in connection with specific products or compilations that
|
552 |
+
contain the covered work, unless you entered into that arrangement,
|
553 |
+
or that patent license was granted, prior to 28 March 2007.
|
554 |
+
|
555 |
+
Nothing in this License shall be construed as excluding or limiting
|
556 |
+
any implied license or other defenses to infringement that may
|
557 |
+
otherwise be available to you under applicable patent law.
|
558 |
+
|
559 |
+
12. No Surrender of Others' Freedom.
|
560 |
+
|
561 |
+
If conditions are imposed on you (whether by court order, agreement or
|
562 |
+
otherwise) that contradict the conditions of this License, they do not
|
563 |
+
excuse you from the conditions of this License. If you cannot convey a
|
564 |
+
covered work so as to satisfy simultaneously your obligations under this
|
565 |
+
License and any other pertinent obligations, then as a consequence you may
|
566 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
567 |
+
to collect a royalty for further conveying from those to whom you convey
|
568 |
+
the Program, the only way you could satisfy both those terms and this
|
569 |
+
License would be to refrain entirely from conveying the Program.
|
570 |
+
|
571 |
+
13. Use with the GNU Affero General Public License.
|
572 |
+
|
573 |
+
Notwithstanding any other provision of this License, you have
|
574 |
+
permission to link or combine any covered work with a work licensed
|
575 |
+
under version 3 of the GNU Affero General Public License into a single
|
576 |
+
combined work, and to convey the resulting work. The terms of this
|
577 |
+
License will continue to apply to the part which is the covered work,
|
578 |
+
but the special requirements of the GNU Affero General Public License,
|
579 |
+
section 13, concerning interaction through a network will apply to the
|
580 |
+
combination as such.
|
581 |
+
|
582 |
+
14. Revised Versions of this License.
|
583 |
+
|
584 |
+
The Free Software Foundation may publish revised and/or new versions of
|
585 |
+
the GNU General Public License from time to time. Such new versions will
|
586 |
+
be similar in spirit to the present version, but may differ in detail to
|
587 |
+
address new problems or concerns.
|
588 |
+
|
589 |
+
Each version is given a distinguishing version number. If the
|
590 |
+
Program specifies that a certain numbered version of the GNU General
|
591 |
+
Public License "or any later version" applies to it, you have the
|
592 |
+
option of following the terms and conditions either of that numbered
|
593 |
+
version or of any later version published by the Free Software
|
594 |
+
Foundation. If the Program does not specify a version number of the
|
595 |
+
GNU General Public License, you may choose any version ever published
|
596 |
+
by the Free Software Foundation.
|
597 |
+
|
598 |
+
If the Program specifies that a proxy can decide which future
|
599 |
+
versions of the GNU General Public License can be used, that proxy's
|
600 |
+
public statement of acceptance of a version permanently authorizes you
|
601 |
+
to choose that version for the Program.
|
602 |
+
|
603 |
+
Later license versions may give you additional or different
|
604 |
+
permissions. However, no additional obligations are imposed on any
|
605 |
+
author or copyright holder as a result of your choosing to follow a
|
606 |
+
later version.
|
607 |
+
|
608 |
+
15. Disclaimer of Warranty.
|
609 |
+
|
610 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
611 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
612 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
613 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
614 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
615 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
616 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
617 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
618 |
+
|
619 |
+
16. Limitation of Liability.
|
620 |
+
|
621 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
622 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
623 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
624 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
625 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
626 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
627 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
628 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
629 |
+
SUCH DAMAGES.
|
630 |
+
|
631 |
+
17. Interpretation of Sections 15 and 16.
|
632 |
+
|
633 |
+
If the disclaimer of warranty and limitation of liability provided
|
634 |
+
above cannot be given local legal effect according to their terms,
|
635 |
+
reviewing courts shall apply local law that most closely approximates
|
636 |
+
an absolute waiver of all civil liability in connection with the
|
637 |
+
Program, unless a warranty or assumption of liability accompanies a
|
638 |
+
copy of the Program in return for a fee.
|
639 |
+
|
640 |
+
END OF TERMS AND CONDITIONS
|
641 |
+
|
642 |
+
How to Apply These Terms to Your New Programs
|
643 |
+
|
644 |
+
If you develop a new program, and you want it to be of the greatest
|
645 |
+
possible use to the public, the best way to achieve this is to make it
|
646 |
+
free software which everyone can redistribute and change under these terms.
|
647 |
+
|
648 |
+
To do so, attach the following notices to the program. It is safest
|
649 |
+
to attach them to the start of each source file to most effectively
|
650 |
+
state the exclusion of warranty; and each file should have at least
|
651 |
+
the "copyright" line and a pointer to where the full notice is found.
|
652 |
+
|
653 |
+
<one line to give the program's name and a brief idea of what it does.>
|
654 |
+
Copyright (C) <year> <name of author>
|
655 |
+
|
656 |
+
This program is free software: you can redistribute it and/or modify
|
657 |
+
it under the terms of the GNU General Public License as published by
|
658 |
+
the Free Software Foundation, either version 3 of the License, or
|
659 |
+
(at your option) any later version.
|
660 |
+
|
661 |
+
This program is distributed in the hope that it will be useful,
|
662 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
663 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
664 |
+
GNU General Public License for more details.
|
665 |
+
|
666 |
+
You should have received a copy of the GNU General Public License
|
667 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
Also add information on how to contact you by electronic and paper mail.
|
670 |
+
|
671 |
+
If the program does terminal interaction, make it output a short
|
672 |
+
notice like this when it starts in an interactive mode:
|
673 |
+
|
674 |
+
<program> Copyright (C) <year> <name of author>
|
675 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
676 |
+
This is free software, and you are welcome to redistribute it
|
677 |
+
under certain conditions; type `show c' for details.
|
678 |
+
|
679 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
680 |
+
parts of the General Public License. Of course, your program's commands
|
681 |
+
might be different; for a GUI interface, you would use an "about box".
|
682 |
+
|
683 |
+
You should also get your employer (if you work as a programmer) or school,
|
684 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
685 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
686 |
+
<https://www.gnu.org/licenses/>.
|
687 |
+
|
688 |
+
The GNU General Public License does not permit incorporating your program
|
689 |
+
into proprietary programs. If your program is a subroutine library, you
|
690 |
+
may consider it more useful to permit linking proprietary applications with
|
691 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
692 |
+
Public License instead of this License. But first, please read
|
693 |
+
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
LICENSE_3RD_PARTY_JS.md
ADDED
@@ -0,0 +1,3337 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
THE FOLLOWING SETS FORTH ATTRIBUTION NOTICES FOR THIRD PARTY SOFTWARE THAT MAY BE CONTAINED IN PORTIONS OF THE @DEVOWL WP/DEVELOPMENT PRODUCT.
|
2 |
+
|
3 |
+
async-validator, css-animation, dom-align, rc-align, rc-animate, rc-collapse, rc-dialog, rc-dropdown, rc-input-number, rc-menu, rc-notification, rc-pagination, rc-progress, rc-rate, rc-steps, rc-switch, rc-tabs. A copy of the source code may be downloaded from git@github.com:ant-design/css-animation.git (@ant-design/css-animation), git@github.com:yiminghe/add-dom-event-listener (add-dom-event-listener), git@github.com:yiminghe/async-validator.git (async-validator), git@github.com:yiminghe/css-animation.git (css-animation), git@github.com:yiminghe/dom-align.git (dom-align), git@github.com:react-component/align.git (rc-align), git@github.com:react-component/animate.git (rc-animate), git@github.com:react-component/collapse.git (rc-collapse), git@github.com:react-component/dialog.git (rc-dialog), git@github.com:react-component/dropdown.git (rc-dropdown), https://github.com/react-component/form.git (rc-form), git@github.com:react-component/input-number.git (rc-input-number), git@github.com:react-component/menu.git (rc-menu), git@github.com:react-component/notification.git (rc-notification), git@github.com:react-component/pagination.git (rc-pagination), git@github.com:react-component/progress.git (rc-progress), https://github.com/react-component/rate.git (rc-rate), git+ssh://git@github.com/react-component/steps.git (rc-steps), git@github.com:react-component/switch.git (rc-switch), git@github.com:react-component/tabs.git (rc-tabs), git@github.com:react-component/time-picker.git (rc-time-picker). This software contains the following license and notice below:
|
4 |
+
|
5 |
+
The MIT License (MIT)
|
6 |
+
|
7 |
+
Copyright (c) 2014-present yiminghe
|
8 |
+
|
9 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
10 |
+
|
11 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
12 |
+
|
13 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
14 |
+
|
15 |
+
-----
|
16 |
+
|
17 |
+
The following software may be included in this product: json2mq. A copy of the source code may be downloaded from https://github.com/ant-design/react-slick (@ant-design/react-slick), https://github.com/akiran/json2mq (json2mq), https://github.com/akiran/react-slick (react-slick). This software contains the following license and notice below:
|
18 |
+
|
19 |
+
The MIT License (MIT)
|
20 |
+
|
21 |
+
Copyright (c) 2014 Kiran Abburi
|
22 |
+
|
23 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
24 |
+
of this software and associated documentation files (the "Software"), to deal
|
25 |
+
in the Software without restriction, including without limitation the rights
|
26 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
27 |
+
copies of the Software, and to permit persons to whom the Software is
|
28 |
+
furnished to do so, subject to the following conditions:
|
29 |
+
|
30 |
+
The above copyright notice and this permission notice shall be included in all
|
31 |
+
copies or substantial portions of the Software.
|
32 |
+
|
33 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
34 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
35 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
36 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
37 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
38 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
39 |
+
SOFTWARE.
|
40 |
+
|
41 |
+
-----
|
42 |
+
|
43 |
+
The following software may be included in this product: memize, tannin. A copy of the source code may be downloaded from https://github.com/aduth/tannin.git (@tannin/compile), https://github.com/aduth/tannin.git (@tannin/evaluate), https://github.com/aduth/tannin.git (@tannin/plural-forms), https://github.com/aduth/tannin.git (@tannin/postfix), https://github.com/aduth/memize.git (memize), https://github.com/aduth/tannin.git (tannin). This software contains the following license and notice below:
|
44 |
+
|
45 |
+
[The MIT License (MIT)](https://opensource.org/licenses/MIT)
|
46 |
+
|
47 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
48 |
+
|
49 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
50 |
+
|
51 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
52 |
+
|
53 |
+
-----
|
54 |
+
|
55 |
+
The following software may be included in this product: airbnb-prop-types. A copy of the source code may be downloaded from git+https://github.com/airbnb/prop-types.git. This software contains the following license and notice below:
|
56 |
+
|
57 |
+
MIT License
|
58 |
+
|
59 |
+
Copyright (c) 2016 Airbnb
|
60 |
+
|
61 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
62 |
+
of this software and associated documentation files (the "Software"), to deal
|
63 |
+
in the Software without restriction, including without limitation the rights
|
64 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
65 |
+
copies of the Software, and to permit persons to whom the Software is
|
66 |
+
furnished to do so, subject to the following conditions:
|
67 |
+
|
68 |
+
The above copyright notice and this permission notice shall be included in all
|
69 |
+
copies or substantial portions of the Software.
|
70 |
+
|
71 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
72 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
73 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
74 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
75 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
76 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
77 |
+
SOFTWARE.
|
78 |
+
|
79 |
+
-----
|
80 |
+
|
81 |
+
The following software may be included in this product: object-assign. A copy of the source code may be downloaded from https://github.com/chalk/ansi-regex.git (ansi-regex), https://github.com/chalk/ansi-styles.git (ansi-styles), https://github.com/sindresorhus/array-differ.git (array-differ), https://github.com/sindresorhus/array-find-index.git (array-find-index), https://github.com/sindresorhus/array-union.git (array-union), https://github.com/sindresorhus/array-uniq.git (array-uniq), https://github.com/sindresorhus/arrify.git (arrify), https://github.com/sindresorhus/caller-callsite.git (caller-callsite), https://github.com/sindresorhus/caller-path.git (caller-path), https://github.com/sindresorhus/callsites.git (callsites), https://github.com/sindresorhus/camelcase.git (camelcase), https://github.com/sindresorhus/camelcase-keys.git (camelcase-keys), https://github.com/chalk/chalk.git (chalk), https://github.com/sindresorhus/cli-cursor.git (cli-cursor), https://github.com/sindresorhus/code-point-at.git (code-point-at), https://github.com/sindresorhus/dargs.git (dargs), https://github.com/sindresorhus/decamelize.git (decamelize), https://github.com/sindresorhus/detect-indent.git (detect-indent), https://github.com/sindresorhus/dot-prop.git (dot-prop), https://github.com/sindresorhus/escape-string-regexp.git (escape-string-regexp), https://github.com/sindresorhus/figures.git (figures), https://github.com/sindresorhus/file-type.git (file-type), https://github.com/sindresorhus/filename-reserved-regex.git (filename-reserved-regex), https://github.com/sindresorhus/filter-obj.git (filter-obj), https://github.com/sindresorhus/find-up.git (find-up), https://github.com/sindresorhus/get-stream.git (get-stream), https://github.com/sindresorhus/git-remote-origin-url.git (git-remote-origin-url), https://github.com/sindresorhus/got.git (got), https://github.com/sindresorhus/has-ansi.git (has-ansi), https://github.com/sindresorhus/import-fresh.git (import-fresh), https://github.com/sindresorhus/indent-string.git (indent-string), https://github.com/sindresorhus/into-stream.git (into-stream), https://github.com/sindresorhus/is-fullwidth-code-point.git (is-fullwidth-code-point), https://github.com/sindresorhus/is-obj.git (is-obj), https://github.com/sindresorhus/is-plain-obj.git (is-plain-obj), https://github.com/sindresorhus/is-stream.git (is-stream), https://github.com/sindresorhus/is-text-path.git (is-text-path), https://github.com/sindresorhus/is-webp.git (is-webp), https://github.com/sindresorhus/load-json-file.git (load-json-file), https://github.com/sindresorhus/locate-path.git (locate-path), https://github.com/sindresorhus/loud-rejection.git (loud-rejection), https://github.com/sindresorhus/lowercase-keys.git (lowercase-keys), https://github.com/sindresorhus/map-obj.git (map-obj), https://github.com/sindresorhus/meow.git (meow), https://github.com/sindresorhus/modify-values.git (modify-values), https://github.com/sindresorhus/npm-run-path.git (npm-run-path), https://github.com/sindresorhus/number-is-nan.git (number-is-nan), https://github.com/sindresorhus/object-assign.git (object-assign), https://github.com/sindresorhus/onetime.git (onetime), https://github.com/sindresorhus/os-homedir.git (os-homedir), https://github.com/sindresorhus/os-tmpdir.git (os-tmpdir), https://github.com/sindresorhus/p-cancelable.git (p-cancelable), https://github.com/sindresorhus/p-event.git (p-event), https://github.com/sindresorhus/p-finally.git (p-finally), https://github.com/sindresorhus/p-is-promise.git (p-is-promise), https://github.com/sindresorhus/p-locate.git (p-locate), https://github.com/sindresorhus/p-map-series.git (p-map-series), https://github.com/sindresorhus/p-reduce.git (p-reduce), https://github.com/sindresorhus/p-try.git (p-try), https://github.com/sindresorhus/p-waterfall.git (p-waterfall), https://github.com/sindresorhus/parse-json.git (parse-json), https://github.com/sindresorhus/path-exists.git (path-exists), https://github.com/sindresorhus/path-is-absolute.git (path-is-absolute), https://github.com/sindresorhus/path-key.git (path-key), https://github.com/sindresorhus/path-type.git (path-type), https://github.com/sindresorhus/pify.git (pify), https://github.com/sindresorhus/prepend-http.git (prepend-http), https://github.com/sindresorhus/read-pkg.git (read-pkg), https://github.com/sindresorhus/read-pkg-up.git (read-pkg-up), https://github.com/sindresorhus/redent.git (redent), https://github.com/sindresorhus/repeating.git (repeating), https://github.com/sindresorhus/resolve-cwd.git (resolve-cwd), https://github.com/sindresorhus/resolve-from.git (resolve-from), https://github.com/sindresorhus/restore-cursor.git (restore-cursor), https://github.com/sindresorhus/semver-truncate.git (semver-truncate), https://github.com/sindresorhus/shebang-regex.git (shebang-regex), https://github.com/sindresorhus/sort-keys.git (sort-keys), https://github.com/sindresorhus/string-width.git (string-width), https://github.com/chalk/strip-ansi.git (strip-ansi), https://github.com/sindresorhus/strip-bom.git (strip-bom), https://github.com/sindresorhus/strip-eof.git (strip-eof), https://github.com/sindresorhus/strip-indent.git (strip-indent), https://github.com/sindresorhus/strip-json-comments.git (strip-json-comments), https://github.com/sindresorhus/strip-outer.git (strip-outer), https://github.com/chalk/supports-color.git (supports-color), https://github.com/sindresorhus/temp-dir.git (temp-dir), https://github.com/sindresorhus/tempfile.git (tempfile), https://github.com/sindresorhus/trim-newlines.git (trim-newlines), https://github.com/sindresorhus/trim-repeated.git (trim-repeated), https://github.com/sindresorhus/url-parse-lax.git (url-parse-lax). This software contains the following license and notice below:
|
82 |
+
|
83 |
+
The MIT License (MIT)
|
84 |
+
|
85 |
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
86 |
+
|
87 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
88 |
+
of this software and associated documentation files (the "Software"), to deal
|
89 |
+
in the Software without restriction, including without limitation the rights
|
90 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
91 |
+
copies of the Software, and to permit persons to whom the Software is
|
92 |
+
furnished to do so, subject to the following conditions:
|
93 |
+
|
94 |
+
The above copyright notice and this permission notice shall be included in
|
95 |
+
all copies or substantial portions of the Software.
|
96 |
+
|
97 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
98 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
99 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
100 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
101 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
102 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
103 |
+
THE SOFTWARE.
|
104 |
+
|
105 |
+
-----
|
106 |
+
|
107 |
+
The following software may be included in this product: antd. A copy of the source code may be downloaded from https://github.com/ant-design/ant-design. This software contains the following license and notice below:
|
108 |
+
|
109 |
+
MIT LICENSE
|
110 |
+
|
111 |
+
Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
|
112 |
+
|
113 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
114 |
+
a copy of this software and associated documentation files (the
|
115 |
+
"Software"), to deal in the Software without restriction, including
|
116 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
117 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
118 |
+
permit persons to whom the Software is furnished to do so, subject to
|
119 |
+
the following conditions:
|
120 |
+
|
121 |
+
The above copyright notice and this permission notice shall be
|
122 |
+
included in all copies or substantial portions of the Software.
|
123 |
+
|
124 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
125 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
126 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
127 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
128 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
129 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
130 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
131 |
+
|
132 |
+
-----
|
133 |
+
|
134 |
+
The following software may be included in this product: antd, rc-drawer, rc-image, rc-table, rc-tree, rc-tree-select. A copy of the source code may be downloaded from https://github.com/ant-design/ant-design (antd), https://github.com/ant-motion/drawer.git (rc-drawer), git@github.com:react-component/image.git (rc-image), git@github.com:react-component/table.git (rc-table), git@github.com:react-component/tree.git (rc-tree), https://github.com/react-component/tree-select.git (rc-tree-select). This software contains the following license and notice below:
|
135 |
+
|
136 |
+
MIT LICENSE
|
137 |
+
|
138 |
+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
|
139 |
+
|
140 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
141 |
+
a copy of this software and associated documentation files (the
|
142 |
+
"Software"), to deal in the Software without restriction, including
|
143 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
144 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
145 |
+
permit persons to whom the Software is furnished to do so, subject to
|
146 |
+
the following conditions:
|
147 |
+
|
148 |
+
The above copyright notice and this permission notice shall be
|
149 |
+
included in all copies or substantial portions of the Software.
|
150 |
+
|
151 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
152 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
153 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
154 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
155 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
156 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
157 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
158 |
+
|
159 |
+
-----
|
160 |
+
|
161 |
+
The following software may be included in this product: path-to-regexp. A copy of the source code may be downloaded from git://github.com/blakeembrey/array-flatten.git (array-flatten), https://github.com/pillarjs/path-to-regexp.git (path-to-regexp). This software contains the following license and notice below:
|
162 |
+
|
163 |
+
The MIT License (MIT)
|
164 |
+
|
165 |
+
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
166 |
+
|
167 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
168 |
+
of this software and associated documentation files (the "Software"), to deal
|
169 |
+
in the Software without restriction, including without limitation the rights
|
170 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
171 |
+
copies of the Software, and to permit persons to whom the Software is
|
172 |
+
furnished to do so, subject to the following conditions:
|
173 |
+
|
174 |
+
The above copyright notice and this permission notice shall be included in
|
175 |
+
all copies or substantial portions of the Software.
|
176 |
+
|
177 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
178 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
179 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
180 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
181 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
182 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
183 |
+
THE SOFTWARE.
|
184 |
+
|
185 |
+
-----
|
186 |
+
|
187 |
+
The following software may be included in this product: define-properties, es-abstract. A copy of the source code may be downloaded from git://github.com/es-shims/array-includes.git (array-includes), git://github.com/ljharb/define-properties.git (define-properties), git://github.com/ljharb/es-abstract.git (es-abstract). This software contains the following license and notice below:
|
188 |
+
|
189 |
+
The MIT License (MIT)
|
190 |
+
|
191 |
+
Copyright (C) 2015 Jordan Harband
|
192 |
+
|
193 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
194 |
+
of this software and associated documentation files (the "Software"), to deal
|
195 |
+
in the Software without restriction, including without limitation the rights
|
196 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
197 |
+
copies of the Software, and to permit persons to whom the Software is
|
198 |
+
furnished to do so, subject to the following conditions:
|
199 |
+
|
200 |
+
The above copyright notice and this permission notice shall be included in
|
201 |
+
all copies or substantial portions of the Software.
|
202 |
+
|
203 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
204 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
205 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
206 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
207 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
208 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
209 |
+
THE SOFTWARE.
|
210 |
+
|
211 |
+
-----
|
212 |
+
|
213 |
+
The following software may be included in this product: asap. A copy of the source code may be downloaded from https://github.com/kriskowal/asap.git. This software contains the following license and notice below:
|
214 |
+
|
215 |
+
Copyright 2009–2014 Contributors. All rights reserved.
|
216 |
+
|
217 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
218 |
+
of this software and associated documentation files (the "Software"), to
|
219 |
+
deal in the Software without restriction, including without limitation the
|
220 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
221 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
222 |
+
furnished to do so, subject to the following conditions:
|
223 |
+
|
224 |
+
The above copyright notice and this permission notice shall be included in
|
225 |
+
all copies or substantial portions of the Software.
|
226 |
+
|
227 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
228 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
229 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
230 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
231 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
232 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
233 |
+
IN THE SOFTWARE.
|
234 |
+
|
235 |
+
-----
|
236 |
+
|
237 |
+
The following software may be included in this product: insert-css. A copy of the source code may be downloaded from git://github.com/hughsk/atob-lite.git (atob-lite), git://github.com/hughsk/btoa-lite.git (btoa-lite), git://github.com/substack/camelize.git (camelize), git://github.com/substack/node-concat-map.git (concat-map), git://github.com/shahata/dasherize.git (dasherize), git://github.com/substack/github-from-package.git (github-from-package), git://github.com/substack/insert-css.git (insert-css), git://github.com/hughsk/is-typedarray.git (is-typedarray), git://github.com/substack/minimist.git (minimist), git://github.com/substack/safe-regex.git (safe-regex), git://github.com/substack/node-wordwrap.git (wordwrap). This software contains the following license and notice below:
|
238 |
+
|
239 |
+
This software is released under the MIT license:
|
240 |
+
|
241 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
242 |
+
this software and associated documentation files (the "Software"), to deal in
|
243 |
+
the Software without restriction, including without limitation the rights to
|
244 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
245 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
246 |
+
subject to the following conditions:
|
247 |
+
|
248 |
+
The above copyright notice and this permission notice shall be included in all
|
249 |
+
copies or substantial portions of the Software.
|
250 |
+
|
251 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
252 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
253 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
254 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
255 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
256 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
257 |
+
|
258 |
+
-----
|
259 |
+
|
260 |
+
The following software may be included in this product: call-bind, get-intrinsic. A copy of the source code may be downloaded from git+https://github.com/ljharb/call-bind.git (call-bind), git+https://github.com/ljharb/get-intrinsic.git (get-intrinsic). This software contains the following license and notice below:
|
261 |
+
|
262 |
+
MIT License
|
263 |
+
|
264 |
+
Copyright (c) 2020 Jordan Harband
|
265 |
+
|
266 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
267 |
+
of this software and associated documentation files (the "Software"), to deal
|
268 |
+
in the Software without restriction, including without limitation the rights
|
269 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
270 |
+
copies of the Software, and to permit persons to whom the Software is
|
271 |
+
furnished to do so, subject to the following conditions:
|
272 |
+
|
273 |
+
The above copyright notice and this permission notice shall be included in all
|
274 |
+
copies or substantial portions of the Software.
|
275 |
+
|
276 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
277 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
278 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
279 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
280 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
281 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
282 |
+
SOFTWARE.
|
283 |
+
|
284 |
+
-----
|
285 |
+
|
286 |
+
The following software may be included in this product: cheerio. A copy of the source code may be downloaded from git://github.com/cheeriojs/cheerio.git. This software contains the following license and notice below:
|
287 |
+
|
288 |
+
MIT License
|
289 |
+
|
290 |
+
Copyright (c) 2016 Matt Mueller
|
291 |
+
|
292 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
293 |
+
of this software and associated documentation files (the "Software"), to deal
|
294 |
+
in the Software without restriction, including without limitation the rights
|
295 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
296 |
+
copies of the Software, and to permit persons to whom the Software is
|
297 |
+
furnished to do so, subject to the following conditions:
|
298 |
+
|
299 |
+
The above copyright notice and this permission notice shall be included in all
|
300 |
+
copies or substantial portions of the Software.
|
301 |
+
|
302 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
303 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
304 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
305 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
306 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
307 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
308 |
+
SOFTWARE.
|
309 |
+
|
310 |
+
-----
|
311 |
+
|
312 |
+
The following software may be included in this product: css-select, css-what, domelementtype, domhandler, domutils, entities, nth-check. A copy of the source code may be downloaded from git://github.com/cheeriojs/cheerio-select.git (cheerio-select), git://github.com/fb55/css-select.git (css-select), https://github.com/fb55/css-what (css-what), git://github.com/fb55/domelementtype.git (domelementtype), git://github.com/fb55/domhandler.git (domhandler), git://github.com/fb55/domutils.git (domutils), git://github.com/fb55/entities.git (entities), https://github.com/fb55/nth-check (nth-check). This software contains the following license and notice below:
|
313 |
+
|
314 |
+
Copyright (c) Felix Böhm
|
315 |
+
All rights reserved.
|
316 |
+
|
317 |
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
318 |
+
|
319 |
+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
320 |
+
|
321 |
+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
322 |
+
|
323 |
+
THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
|
324 |
+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
325 |
+
|
326 |
+
-----
|
327 |
+
|
328 |
+
The following software may be included in this product: lru-cache, semver, yallist. A copy of the source code may be downloaded from git://github.com/isaacs/chownr.git (chownr), https://github.com/npm/dezalgo (dezalgo), git+https://github.com/npm/fs-minipass.git (fs-minipass), https://github.com/npm/fs-write-stream-atomic (fs-write-stream-atomic), https://github.com/npm/fstream.git (fstream), git+https://github.com/isaacs/ignore-walk.git (ignore-walk), git://github.com/isaacs/ini.git (ini), git+https://github.com/isaacs/isexe.git (isexe), git://github.com/isaacs/json-stringify-safe (json-stringify-safe), git://github.com/isaacs/node-lru-cache.git (lru-cache), git://github.com/isaacs/minimatch.git (minimatch), git://github.com/isaacs/mute-stream (mute-stream), https://github.com/npm/nopt.git (nopt), git+https://github.com/npm/npm-packlist.git (npm-packlist), https://github.com/npm/npmlog.git (npmlog), git://github.com/isaacs/once (once), https://github.com/npm/osenv (osenv), https://github.com/isaacs/proto-list (proto-list), git+https://github.com/isaacs/pseudomap.git (pseudomap), git://github.com/isaacs/read.git (read), https://github.com/npm/read-package-tree (read-package-tree), https://github.com/npm/readdir-scoped-modules (readdir-scoped-modules), git://github.com/isaacs/rimraf.git (rimraf), https://github.com/npm/node-semver (semver), https://github.com/npm/node-tar.git (tar), git://github.com/isaacs/node-which.git (which), https://github.com/npm/wrappy (wrappy), git+https://github.com/isaacs/yallist.git (yallist). This software contains the following license and notice below:
|
329 |
+
|
330 |
+
The ISC License
|
331 |
+
|
332 |
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
333 |
+
|
334 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
335 |
+
purpose with or without fee is hereby granted, provided that the above
|
336 |
+
copyright notice and this permission notice appear in all copies.
|
337 |
+
|
338 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
339 |
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
340 |
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
341 |
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
342 |
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
343 |
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
344 |
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
345 |
+
|
346 |
+
-----
|
347 |
+
|
348 |
+
The following software may be included in this product: classnames. A copy of the source code may be downloaded from https://github.com/JedWatson/classnames.git. This software contains the following license and notice below:
|
349 |
+
|
350 |
+
The MIT License (MIT)
|
351 |
+
|
352 |
+
Copyright (c) 2017 Jed Watson
|
353 |
+
|
354 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
355 |
+
of this software and associated documentation files (the "Software"), to deal
|
356 |
+
in the Software without restriction, including without limitation the rights
|
357 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
358 |
+
copies of the Software, and to permit persons to whom the Software is
|
359 |
+
furnished to do so, subject to the following conditions:
|
360 |
+
|
361 |
+
The above copyright notice and this permission notice shall be included in all
|
362 |
+
copies or substantial portions of the Software.
|
363 |
+
|
364 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
365 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
366 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
367 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
368 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
369 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
370 |
+
SOFTWARE.
|
371 |
+
|
372 |
+
-----
|
373 |
+
|
374 |
+
The following software may be included in this product: classnames. A copy of the source code may be downloaded from https://github.com/JedWatson/classnames.git. This software contains the following license and notice below:
|
375 |
+
|
376 |
+
The MIT License (MIT)
|
377 |
+
|
378 |
+
Copyright (c) 2018 Jed Watson
|
379 |
+
|
380 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
381 |
+
of this software and associated documentation files (the "Software"), to deal
|
382 |
+
in the Software without restriction, including without limitation the rights
|
383 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
384 |
+
copies of the Software, and to permit persons to whom the Software is
|
385 |
+
furnished to do so, subject to the following conditions:
|
386 |
+
|
387 |
+
The above copyright notice and this permission notice shall be included in all
|
388 |
+
copies or substantial portions of the Software.
|
389 |
+
|
390 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
391 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
392 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
393 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
394 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
395 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
396 |
+
SOFTWARE.
|
397 |
+
|
398 |
+
-----
|
399 |
+
|
400 |
+
The following software may be included in this product: commander. A copy of the source code may be downloaded from https://github.com/tj/commander.js.git. This software contains the following license and notice below:
|
401 |
+
|
402 |
+
(The MIT License)
|
403 |
+
|
404 |
+
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
405 |
+
|
406 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
407 |
+
a copy of this software and associated documentation files (the
|
408 |
+
'Software'), to deal in the Software without restriction, including
|
409 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
410 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
411 |
+
permit persons to whom the Software is furnished to do so, subject to
|
412 |
+
the following conditions:
|
413 |
+
|
414 |
+
The above copyright notice and this permission notice shall be
|
415 |
+
included in all copies or substantial portions of the Software.
|
416 |
+
|
417 |
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
418 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
419 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
420 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
421 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
422 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
423 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
424 |
+
|
425 |
+
-----
|
426 |
+
|
427 |
+
The following software may be included in this product: compute-scroll-into-view. A copy of the source code may be downloaded from git+https://github.com/stipsan/compute-scroll-into-view.git. This software contains the following license and notice below:
|
428 |
+
|
429 |
+
MIT License
|
430 |
+
|
431 |
+
Copyright (c) 2018 Cody Olsen
|
432 |
+
|
433 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
434 |
+
of this software and associated documentation files (the "Software"), to deal
|
435 |
+
in the Software without restriction, including without limitation the rights
|
436 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
437 |
+
copies of the Software, and to permit persons to whom the Software is
|
438 |
+
furnished to do so, subject to the following conditions:
|
439 |
+
|
440 |
+
The above copyright notice and this permission notice shall be included in all
|
441 |
+
copies or substantial portions of the Software.
|
442 |
+
|
443 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
444 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
445 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
446 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
447 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
448 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
449 |
+
SOFTWARE.
|
450 |
+
|
451 |
+
-----
|
452 |
+
|
453 |
+
The following software may be included in this product: copy-to-clipboard. A copy of the source code may be downloaded from git+https://github.com/sudodoki/copy-to-clipboard. This software contains the following license and notice below:
|
454 |
+
|
455 |
+
MIT License
|
456 |
+
|
457 |
+
Copyright (c) 2017 sudodoki <smd.deluzion@gmail.com>
|
458 |
+
|
459 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
460 |
+
of this software and associated documentation files (the "Software"), to deal
|
461 |
+
in the Software without restriction, including without limitation the rights
|
462 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
463 |
+
copies of the Software, and to permit persons to whom the Software is
|
464 |
+
furnished to do so, subject to the following conditions:
|
465 |
+
|
466 |
+
The above copyright notice and this permission notice shall be included in all
|
467 |
+
copies or substantial portions of the Software.
|
468 |
+
|
469 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
470 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
471 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
472 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
473 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
474 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
475 |
+
SOFTWARE.
|
476 |
+
|
477 |
+
-----
|
478 |
+
|
479 |
+
The following software may be included in this product: core-js. A copy of the source code may be downloaded from https://github.com/zloirock/core-js.git. This software contains the following license and notice below:
|
480 |
+
|
481 |
+
Copyright (c) 2014-2020 Denis Pushkarev
|
482 |
+
|
483 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
484 |
+
of this software and associated documentation files (the "Software"), to deal
|
485 |
+
in the Software without restriction, including without limitation the rights
|
486 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
487 |
+
copies of the Software, and to permit persons to whom the Software is
|
488 |
+
furnished to do so, subject to the following conditions:
|
489 |
+
|
490 |
+
The above copyright notice and this permission notice shall be included in
|
491 |
+
all copies or substantial portions of the Software.
|
492 |
+
|
493 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
494 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
495 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
496 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
497 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
498 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
499 |
+
THE SOFTWARE.
|
500 |
+
|
501 |
+
-----
|
502 |
+
|
503 |
+
The following software may be included in this product: core-js. A copy of the source code may be downloaded from https://github.com/zloirock/core-js.git. This software contains the following license and notice below:
|
504 |
+
|
505 |
+
Copyright (c) 2014-2021 Denis Pushkarev
|
506 |
+
|
507 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
508 |
+
of this software and associated documentation files (the "Software"), to deal
|
509 |
+
in the Software without restriction, including without limitation the rights
|
510 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
511 |
+
copies of the Software, and to permit persons to whom the Software is
|
512 |
+
furnished to do so, subject to the following conditions:
|
513 |
+
|
514 |
+
The above copyright notice and this permission notice shall be included in
|
515 |
+
all copies or substantial portions of the Software.
|
516 |
+
|
517 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
518 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
519 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
520 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
521 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
522 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
523 |
+
THE SOFTWARE.
|
524 |
+
|
525 |
+
-----
|
526 |
+
|
527 |
+
The following software may be included in this product: core-js. A copy of the source code may be downloaded from https://github.com/zloirock/core-js.git. This software contains the following license and notice below:
|
528 |
+
|
529 |
+
Copyright (c) 2015 Denis Pushkarev
|
530 |
+
|
531 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
532 |
+
of this software and associated documentation files (the "Software"), to deal
|
533 |
+
in the Software without restriction, including without limitation the rights
|
534 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
535 |
+
copies of the Software, and to permit persons to whom the Software is
|
536 |
+
furnished to do so, subject to the following conditions:
|
537 |
+
|
538 |
+
The above copyright notice and this permission notice shall be included in
|
539 |
+
all copies or substantial portions of the Software.
|
540 |
+
|
541 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
542 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
543 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
544 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
545 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
546 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
547 |
+
THE SOFTWARE.
|
548 |
+
|
549 |
+
-----
|
550 |
+
|
551 |
+
The following software may be included in this product: core-util-is. A copy of the source code may be downloaded from git://github.com/isaacs/core-util-is. This software contains the following license and notice below:
|
552 |
+
|
553 |
+
Copyright Node.js contributors. All rights reserved.
|
554 |
+
|
555 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
556 |
+
of this software and associated documentation files (the "Software"), to
|
557 |
+
deal in the Software without restriction, including without limitation the
|
558 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
559 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
560 |
+
furnished to do so, subject to the following conditions:
|
561 |
+
|
562 |
+
The above copyright notice and this permission notice shall be included in
|
563 |
+
all copies or substantial portions of the Software.
|
564 |
+
|
565 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
566 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
567 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
568 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
569 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
570 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
571 |
+
IN THE SOFTWARE.
|
572 |
+
|
573 |
+
-----
|
574 |
+
|
575 |
+
The following software may be included in this product: prop-types, react-addons-create-fragment, warning. A copy of the source code may be downloaded from git+https://github.com/facebook/react.git (create-react-class), https://github.com/facebook/prop-types.git (prop-types), https://github.com/facebook/react.git (react-addons-create-fragment), https://github.com/BerkeleyTrue/warning.git (warning). This software contains the following license and notice below:
|
576 |
+
|
577 |
+
MIT License
|
578 |
+
|
579 |
+
Copyright (c) 2013-present, Facebook, Inc.
|
580 |
+
|
581 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
582 |
+
of this software and associated documentation files (the "Software"), to deal
|
583 |
+
in the Software without restriction, including without limitation the rights
|
584 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
585 |
+
copies of the Software, and to permit persons to whom the Software is
|
586 |
+
furnished to do so, subject to the following conditions:
|
587 |
+
|
588 |
+
The above copyright notice and this permission notice shall be included in all
|
589 |
+
copies or substantial portions of the Software.
|
590 |
+
|
591 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
592 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
593 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
594 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
595 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
596 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
597 |
+
SOFTWARE.
|
598 |
+
|
599 |
+
-----
|
600 |
+
|
601 |
+
The following software may be included in this product: d3-color, d3-interpolate, d3-timer. A copy of the source code may be downloaded from https://github.com/d3/d3-color.git (d3-color), https://github.com/d3/d3-interpolate.git (d3-interpolate), https://github.com/d3/d3-timer.git (d3-timer). This software contains the following license and notice below:
|
602 |
+
|
603 |
+
Copyright 2010-2016 Mike Bostock
|
604 |
+
All rights reserved.
|
605 |
+
|
606 |
+
Redistribution and use in source and binary forms, with or without modification,
|
607 |
+
are permitted provided that the following conditions are met:
|
608 |
+
|
609 |
+
* Redistributions of source code must retain the above copyright notice, this
|
610 |
+
list of conditions and the following disclaimer.
|
611 |
+
|
612 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
613 |
+
this list of conditions and the following disclaimer in the documentation
|
614 |
+
and/or other materials provided with the distribution.
|
615 |
+
|
616 |
+
* Neither the name of the author nor the names of contributors may be used to
|
617 |
+
endorse or promote products derived from this software without specific prior
|
618 |
+
written permission.
|
619 |
+
|
620 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
621 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
622 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
623 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
624 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
625 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
626 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
627 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
628 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
629 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
630 |
+
|
631 |
+
-----
|
632 |
+
|
633 |
+
The following software may be included in this product: d3-ease. A copy of the source code may be downloaded from https://github.com/d3/d3-ease.git. This software contains the following license and notice below:
|
634 |
+
|
635 |
+
Copyright 2010-2016 Mike Bostock
|
636 |
+
Copyright 2001 Robert Penner
|
637 |
+
All rights reserved.
|
638 |
+
|
639 |
+
Redistribution and use in source and binary forms, with or without modification,
|
640 |
+
are permitted provided that the following conditions are met:
|
641 |
+
|
642 |
+
* Redistributions of source code must retain the above copyright notice, this
|
643 |
+
list of conditions and the following disclaimer.
|
644 |
+
|
645 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
646 |
+
this list of conditions and the following disclaimer in the documentation
|
647 |
+
and/or other materials provided with the distribution.
|
648 |
+
|
649 |
+
* Neither the name of the author nor the names of contributors may be used to
|
650 |
+
endorse or promote products derived from this software without specific prior
|
651 |
+
written permission.
|
652 |
+
|
653 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
654 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
655 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
656 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
657 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
658 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
659 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
660 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
661 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
662 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
663 |
+
|
664 |
+
-----
|
665 |
+
|
666 |
+
The following software may be included in this product: date-fns. A copy of the source code may be downloaded from https://github.com/date-fns/date-fns. This software contains the following license and notice below:
|
667 |
+
|
668 |
+
Copyright (C) 2020 Sasha Koss and Lesha Koss
|
669 |
+
|
670 |
+
# License
|
671 |
+
|
672 |
+
date-fns is licensed under the [MIT license](http://kossnocorp.mit-license.org).
|
673 |
+
Read more about MIT at [TLDRLegal](https://tldrlegal.com/license/mit-license).
|
674 |
+
|
675 |
+
-----
|
676 |
+
|
677 |
+
The following software may be included in this product: dayjs. A copy of the source code may be downloaded from https://github.com/iamkun/dayjs.git. This software contains the following license and notice below:
|
678 |
+
|
679 |
+
MIT License
|
680 |
+
|
681 |
+
Copyright (c) 2018-present, iamkun
|
682 |
+
|
683 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
684 |
+
of this software and associated documentation files (the "Software"), to deal
|
685 |
+
in the Software without restriction, including without limitation the rights
|
686 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
687 |
+
copies of the Software, and to permit persons to whom the Software is
|
688 |
+
furnished to do so, subject to the following conditions:
|
689 |
+
|
690 |
+
The above copyright notice and this permission notice shall be included in all
|
691 |
+
copies or substantial portions of the Software.
|
692 |
+
|
693 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
694 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
695 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
696 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
697 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
698 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
699 |
+
SOFTWARE.
|
700 |
+
|
701 |
+
-----
|
702 |
+
|
703 |
+
The following software may be included in this product: deepmerge. A copy of the source code may be downloaded from git://github.com/TehShrike/deepmerge.git. This software contains the following license and notice below:
|
704 |
+
|
705 |
+
The MIT License (MIT)
|
706 |
+
|
707 |
+
Copyright (c) 2012 James Halliday, Josh Duff, and other contributors
|
708 |
+
|
709 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
710 |
+
of this software and associated documentation files (the "Software"), to deal
|
711 |
+
in the Software without restriction, including without limitation the rights
|
712 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
713 |
+
copies of the Software, and to permit persons to whom the Software is
|
714 |
+
furnished to do so, subject to the following conditions:
|
715 |
+
|
716 |
+
The above copyright notice and this permission notice shall be included in
|
717 |
+
all copies or substantial portions of the Software.
|
718 |
+
|
719 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
720 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
721 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
722 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
723 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
724 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
725 |
+
THE SOFTWARE.
|
726 |
+
|
727 |
+
-----
|
728 |
+
|
729 |
+
The following software may be included in this product: detect-browser. A copy of the source code may be downloaded from https://github.com/DamonOehlman/detect-browser.git. This software contains the following license and notice below:
|
730 |
+
|
731 |
+
The MIT License (MIT)
|
732 |
+
|
733 |
+
Copyright (c) 2019 Damon Oehlman <damon.oehlman@gmail.com>
|
734 |
+
|
735 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
736 |
+
of this software and associated documentation files (the "Software"), to deal
|
737 |
+
in the Software without restriction, including without limitation the rights
|
738 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
739 |
+
copies of the Software, and to permit persons to whom the Software is
|
740 |
+
furnished to do so, subject to the following conditions:
|
741 |
+
|
742 |
+
The above copyright notice and this permission notice shall be included in all
|
743 |
+
copies or substantial portions of the Software.
|
744 |
+
|
745 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
746 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
747 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
748 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
749 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
750 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
751 |
+
SOFTWARE.
|
752 |
+
|
753 |
+
-----
|
754 |
+
|
755 |
+
The following software may be included in this product: discontinuous-range. A copy of the source code may be downloaded from https://github.com/dtudury/discontinuous-range.git. This software contains the following license and notice below:
|
756 |
+
|
757 |
+
The MIT License (MIT)
|
758 |
+
|
759 |
+
Copyright (c) 2014 David Tudury
|
760 |
+
|
761 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
762 |
+
of this software and associated documentation files (the "Software"), to deal
|
763 |
+
in the Software without restriction, including without limitation the rights
|
764 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
765 |
+
copies of the Software, and to permit persons to whom the Software is
|
766 |
+
furnished to do so, subject to the following conditions:
|
767 |
+
|
768 |
+
The above copyright notice and this permission notice shall be included in all
|
769 |
+
copies or substantial portions of the Software.
|
770 |
+
|
771 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
772 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
773 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
774 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
775 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
776 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
777 |
+
SOFTWARE.
|
778 |
+
|
779 |
+
-----
|
780 |
+
|
781 |
+
The following software may be included in this product: dom-serializer. A copy of the source code may be downloaded from git://github.com/cheeriojs/dom-renderer.git. This software contains the following license and notice below:
|
782 |
+
|
783 |
+
License
|
784 |
+
|
785 |
+
(The MIT License)
|
786 |
+
|
787 |
+
Copyright (c) 2014 The cheeriojs contributors
|
788 |
+
|
789 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
790 |
+
|
791 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
792 |
+
|
793 |
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
794 |
+
|
795 |
+
-----
|
796 |
+
|
797 |
+
The following software may be included in this product: encoding. A copy of the source code may be downloaded from https://github.com/andris9/encoding.git. This software contains the following license and notice below:
|
798 |
+
|
799 |
+
Copyright (c) 2012-2014 Andris Reinman
|
800 |
+
|
801 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
802 |
+
of this software and associated documentation files (the "Software"), to deal
|
803 |
+
in the Software without restriction, including without limitation the rights
|
804 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
805 |
+
copies of the Software, and to permit persons to whom the Software is
|
806 |
+
furnished to do so, subject to the following conditions:
|
807 |
+
|
808 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
809 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
810 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
811 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
812 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
813 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
814 |
+
SOFTWARE.
|
815 |
+
|
816 |
+
-----
|
817 |
+
|
818 |
+
The following software may be included in this product: enzyme. A copy of the source code may be downloaded from https://github.com/airbnb/enzyme.git. This software contains the following license and notice below:
|
819 |
+
|
820 |
+
The MIT License (MIT)
|
821 |
+
|
822 |
+
Copyright (c) 2015 Airbnb, Inc.
|
823 |
+
|
824 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
825 |
+
of this software and associated documentation files (the "Software"), to deal
|
826 |
+
in the Software without restriction, including without limitation the rights
|
827 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
828 |
+
copies of the Software, and to permit persons to whom the Software is
|
829 |
+
furnished to do so, subject to the following conditions:
|
830 |
+
|
831 |
+
The above copyright notice and this permission notice shall be included in all
|
832 |
+
copies or substantial portions of the Software.
|
833 |
+
|
834 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
835 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
836 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
837 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
838 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
839 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
840 |
+
SOFTWARE.
|
841 |
+
|
842 |
+
-----
|
843 |
+
|
844 |
+
The following software may be included in this product: enzyme-adapter-react-16, enzyme-adapter-utils, enzyme-shallow-equal. A copy of the source code may be downloaded from https://github.com/enzymejs/enzyme.git (enzyme-adapter-react-16), https://github.com/enzymejs/enzyme.git (enzyme-adapter-utils), https://github.com/enzymejs/enzyme.git (enzyme-shallow-equal). This software contains the following license and notice below:
|
845 |
+
|
846 |
+
The MIT License (MIT)
|
847 |
+
|
848 |
+
Copyright (c) 2015 Airbnb, Inc. and contributors
|
849 |
+
|
850 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
851 |
+
of this software and associated documentation files (the "Software"), to deal
|
852 |
+
in the Software without restriction, including without limitation the rights
|
853 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
854 |
+
copies of the Software, and to permit persons to whom the Software is
|
855 |
+
furnished to do so, subject to the following conditions:
|
856 |
+
|
857 |
+
The above copyright notice and this permission notice shall be included in all
|
858 |
+
copies or substantial portions of the Software.
|
859 |
+
|
860 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
861 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
862 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
863 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
864 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
865 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
866 |
+
SOFTWARE.
|
867 |
+
|
868 |
+
-----
|
869 |
+
|
870 |
+
The following software may be included in this product: es-to-primitive, is-boolean-object, is-callable, is-date-object, is-number-object, is-string, is-symbol.entries, object.getownpropertydescriptors, object.values, string-at, string.prototype.trimleft, string.prototype.trimright. A copy of the source code may be downloaded from git://github.com/ljharb/es-to-primitive.git (es-to-primitive), git://github.com/ljharb/is-boolean-object.git (is-boolean-object), git://github.com/ljharb/is-callable.git (is-callable), git://github.com/ljharb/is-date-object.git (is-date-object), git://github.com/inspect-js/is-number-object.git (is-number-object), git://github.com/ljharb/is-string.git (is-string), git://github.com/inspect-js/is-symbol.git (is-symbol), git://github.com/es-shims/Object.entries.git (object.entries), git://github.com/es-shims/object.getownpropertydescriptors.git (object.getownpropertydescriptors), git://github.com/es-shims/Object.values.git (object.values), git://github.com/ljharb/string-at.git (string-at), git://github.com/es-shims/String.prototype.trimLeft.git (string.prototype.trimleft), git://github.com/es-shims/String.prototype.trimRight.git (string.prototype.trimright). This software contains the following license and notice below:
|
871 |
+
|
872 |
+
The MIT License (MIT)
|
873 |
+
|
874 |
+
Copyright (c) 2015 Jordan Harband
|
875 |
+
|
876 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
877 |
+
of this software and associated documentation files (the "Software"), to deal
|
878 |
+
in the Software without restriction, including without limitation the rights
|
879 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
880 |
+
copies of the Software, and to permit persons to whom the Software is
|
881 |
+
furnished to do so, subject to the following conditions:
|
882 |
+
|
883 |
+
The above copyright notice and this permission notice shall be included in all
|
884 |
+
copies or substantial portions of the Software.
|
885 |
+
|
886 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
887 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
888 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
889 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
890 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
891 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
892 |
+
SOFTWARE.
|
893 |
+
|
894 |
+
-----
|
895 |
+
|
896 |
+
The following software may be included in this product: es6-promise. A copy of the source code may be downloaded from git://github.com/stefanpenner/es6-promise.git. This software contains the following license and notice below:
|
897 |
+
|
898 |
+
Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors
|
899 |
+
|
900 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
901 |
+
this software and associated documentation files (the "Software"), to deal in
|
902 |
+
the Software without restriction, including without limitation the rights to
|
903 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
904 |
+
of the Software, and to permit persons to whom the Software is furnished to do
|
905 |
+
so, subject to the following conditions:
|
906 |
+
|
907 |
+
The above copyright notice and this permission notice shall be included in all
|
908 |
+
copies or substantial portions of the Software.
|
909 |
+
|
910 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
911 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
912 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
913 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
914 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
915 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
916 |
+
SOFTWARE.
|
917 |
+
|
918 |
+
-----
|
919 |
+
|
920 |
+
The following software may be included in this product: fbjs. A copy of the source code may be downloaded from https://github.com/facebook/fbjs.git. This software contains the following license and notice below:
|
921 |
+
|
922 |
+
MIT License
|
923 |
+
|
924 |
+
Copyright (c) 2013-present, Facebook, Inc.
|
925 |
+
|
926 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
927 |
+
this software and associated documentation files (the "Software"), to deal in
|
928 |
+
the Software without restriction, including without limitation the rights to
|
929 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
930 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
931 |
+
subject to the following conditions:
|
932 |
+
|
933 |
+
The above copyright notice and this permission notice shall be included in all
|
934 |
+
copies or substantial portions of the Software.
|
935 |
+
|
936 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
937 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
938 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
939 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
940 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
941 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
942 |
+
|
943 |
+
-----
|
944 |
+
|
945 |
+
The following software may be included in this product: fecha. A copy of the source code may be downloaded from https://taylorhakes@github.com/taylorhakes/fecha.git. This software contains the following license and notice below:
|
946 |
+
|
947 |
+
The MIT License (MIT)
|
948 |
+
|
949 |
+
Copyright (c) 2015 Taylor Hakes
|
950 |
+
|
951 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
952 |
+
of this software and associated documentation files (the "Software"), to deal
|
953 |
+
in the Software without restriction, including without limitation the rights
|
954 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
955 |
+
copies of the Software, and to permit persons to whom the Software is
|
956 |
+
furnished to do so, subject to the following conditions:
|
957 |
+
|
958 |
+
The above copyright notice and this permission notice shall be included in all
|
959 |
+
copies or substantial portions of the Software.
|
960 |
+
|
961 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
962 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
963 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
964 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
965 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
966 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
967 |
+
SOFTWARE.
|
968 |
+
|
969 |
+
-----
|
970 |
+
|
971 |
+
The following software may be included in this product: function-bind. A copy of the source code may be downloaded from git://github.com/Raynos/function-bind.git. This software contains the following license and notice below:
|
972 |
+
|
973 |
+
Copyright (c) 2013 Raynos.
|
974 |
+
|
975 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
976 |
+
of this software and associated documentation files (the "Software"), to deal
|
977 |
+
in the Software without restriction, including without limitation the rights
|
978 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
979 |
+
copies of the Software, and to permit persons to whom the Software is
|
980 |
+
furnished to do so, subject to the following conditions:
|
981 |
+
|
982 |
+
The above copyright notice and this permission notice shall be included in
|
983 |
+
all copies or substantial portions of the Software.
|
984 |
+
|
985 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
986 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
987 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
988 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
989 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
990 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
991 |
+
THE SOFTWARE.
|
992 |
+
|
993 |
+
-----
|
994 |
+
|
995 |
+
The following software may be included in this product: functions-have-names, html-element-map. A copy of the source code may be downloaded from git+https://github.com/inspect-js/functions-have-names.git (functions-have-names), git+https://github.com/ljharb/has-bigints.git (has-bigints), git+https://github.com/ljharb/html-element-map.git (html-element-map), git+https://github.com/ljharb/side-channel.git (side-channel), git+https://github.com/ljharb/unbox-primitive.git (unbox-primitive), git+https://github.com/inspect-js/which-boxed-primitive.git (which-boxed-primitive). This software contains the following license and notice below:
|
996 |
+
|
997 |
+
MIT License
|
998 |
+
|
999 |
+
Copyright (c) 2019 Jordan Harband
|
1000 |
+
|
1001 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1002 |
+
of this software and associated documentation files (the "Software"), to deal
|
1003 |
+
in the Software without restriction, including without limitation the rights
|
1004 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1005 |
+
copies of the Software, and to permit persons to whom the Software is
|
1006 |
+
furnished to do so, subject to the following conditions:
|
1007 |
+
|
1008 |
+
The above copyright notice and this permission notice shall be included in all
|
1009 |
+
copies or substantial portions of the Software.
|
1010 |
+
|
1011 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1012 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1013 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1014 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1015 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1016 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1017 |
+
SOFTWARE.
|
1018 |
+
|
1019 |
+
-----
|
1020 |
+
|
1021 |
+
The following software may be included in this product: gettext-parser. A copy of the source code may be downloaded from http://github.com/smhg/gettext-parser.git. This software contains the following license and notice below:
|
1022 |
+
|
1023 |
+
Copyright (c) 2014-2015 Andris Reinman
|
1024 |
+
|
1025 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1026 |
+
of this software and associated documentation files (the "Software"), to deal
|
1027 |
+
in the Software without restriction, including without limitation the rights
|
1028 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1029 |
+
copies of the Software, and to permit persons to whom the Software is
|
1030 |
+
furnished to do so, subject to the following conditions:
|
1031 |
+
|
1032 |
+
The above copyright notice and this permission notice shall be included in
|
1033 |
+
all copies or substantial portions of the Software.
|
1034 |
+
|
1035 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1036 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1037 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1038 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1039 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1040 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1041 |
+
THE SOFTWARE.
|
1042 |
+
|
1043 |
+
-----
|
1044 |
+
|
1045 |
+
The following software may be included in this product: gl-matrix. A copy of the source code may be downloaded from https://github.com/toji/gl-matrix.git. This software contains the following license and notice below:
|
1046 |
+
|
1047 |
+
Copyright (c) 2015-2020, Brandon Jones, Colin MacKenzie IV.
|
1048 |
+
|
1049 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1050 |
+
of this software and associated documentation files (the "Software"), to deal
|
1051 |
+
in the Software without restriction, including without limitation the rights
|
1052 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1053 |
+
copies of the Software, and to permit persons to whom the Software is
|
1054 |
+
furnished to do so, subject to the following conditions:
|
1055 |
+
|
1056 |
+
The above copyright notice and this permission notice shall be included in
|
1057 |
+
all copies or substantial portions of the Software.
|
1058 |
+
|
1059 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1060 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1061 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1062 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1063 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1064 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1065 |
+
THE SOFTWARE.
|
1066 |
+
|
1067 |
+
-----
|
1068 |
+
|
1069 |
+
The following software may be included in this product: has-symbols. A copy of the source code may be downloaded from git://github.com/inspect-js/has-symbols.git. This software contains the following license and notice below:
|
1070 |
+
|
1071 |
+
MIT License
|
1072 |
+
|
1073 |
+
Copyright (c) 2016 Jordan Harband
|
1074 |
+
|
1075 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1076 |
+
of this software and associated documentation files (the "Software"), to deal
|
1077 |
+
in the Software without restriction, including without limitation the rights
|
1078 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1079 |
+
copies of the Software, and to permit persons to whom the Software is
|
1080 |
+
furnished to do so, subject to the following conditions:
|
1081 |
+
|
1082 |
+
The above copyright notice and this permission notice shall be included in all
|
1083 |
+
copies or substantial portions of the Software.
|
1084 |
+
|
1085 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1086 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1087 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1088 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1089 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1090 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1091 |
+
SOFTWARE.
|
1092 |
+
|
1093 |
+
-----
|
1094 |
+
|
1095 |
+
The following software may be included in this product: history, react-router, react-router-dom. A copy of the source code may be downloaded from https://github.com/ReactTraining/history.git (history), https://github.com/ReactTraining/react-router.git (react-router), https://github.com/ReactTraining/react-router.git (react-router-dom). This software contains the following license and notice below:
|
1096 |
+
|
1097 |
+
MIT License
|
1098 |
+
|
1099 |
+
Copyright (c) React Training 2016-2018
|
1100 |
+
|
1101 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1102 |
+
of this software and associated documentation files (the "Software"), to deal
|
1103 |
+
in the Software without restriction, including without limitation the rights
|
1104 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1105 |
+
copies of the Software, and to permit persons to whom the Software is
|
1106 |
+
furnished to do so, subject to the following conditions:
|
1107 |
+
|
1108 |
+
The above copyright notice and this permission notice shall be included in all
|
1109 |
+
copies or substantial portions of the Software.
|
1110 |
+
|
1111 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1112 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1113 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1114 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1115 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1116 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1117 |
+
SOFTWARE.
|
1118 |
+
|
1119 |
+
-----
|
1120 |
+
|
1121 |
+
The following software may be included in this product: hoist-non-react-statics. A copy of the source code may be downloaded from git://github.com/mridgway/hoist-non-react-statics.git. This software contains the following license and notice below:
|
1122 |
+
|
1123 |
+
Software License Agreement (BSD License)
|
1124 |
+
========================================
|
1125 |
+
|
1126 |
+
Copyright (c) 2015, Yahoo! Inc. All rights reserved.
|
1127 |
+
----------------------------------------------------
|
1128 |
+
|
1129 |
+
Redistribution and use of this software in source and binary forms, with or
|
1130 |
+
without modification, are permitted provided that the following conditions are
|
1131 |
+
met:
|
1132 |
+
|
1133 |
+
* Redistributions of source code must retain the above copyright notice, this
|
1134 |
+
list of conditions and the following disclaimer.
|
1135 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
1136 |
+
this list of conditions and the following disclaimer in the documentation
|
1137 |
+
and/or other materials provided with the distribution.
|
1138 |
+
* Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
|
1139 |
+
used to endorse or promote products derived from this software without
|
1140 |
+
specific prior written permission of Yahoo! Inc.
|
1141 |
+
|
1142 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
1143 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
1144 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
1145 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
1146 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
1147 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
1148 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
1149 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
1150 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
1151 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1152 |
+
|
1153 |
+
-----
|
1154 |
+
|
1155 |
+
The following software may be included in this product: htmlparser2. A copy of the source code may be downloaded from git://github.com/fb55/htmlparser2.git. This software contains the following license and notice below:
|
1156 |
+
|
1157 |
+
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
1158 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1159 |
+
of this software and associated documentation files (the "Software"), to
|
1160 |
+
deal in the Software without restriction, including without limitation the
|
1161 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
1162 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
1163 |
+
furnished to do so, subject to the following conditions:
|
1164 |
+
|
1165 |
+
The above copyright notice and this permission notice shall be included in
|
1166 |
+
all copies or substantial portions of the Software.
|
1167 |
+
|
1168 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1169 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1170 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1171 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1172 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
1173 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
1174 |
+
IN THE SOFTWARE.
|
1175 |
+
|
1176 |
+
-----
|
1177 |
+
|
1178 |
+
The following software may be included in this product: iconv-lite. A copy of the source code may be downloaded from git://github.com/ashtuchkin/iconv-lite.git. This software contains the following license and notice below:
|
1179 |
+
|
1180 |
+
Copyright (c) 2011 Alexander Shtuchkin
|
1181 |
+
|
1182 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1183 |
+
a copy of this software and associated documentation files (the
|
1184 |
+
"Software"), to deal in the Software without restriction, including
|
1185 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1186 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1187 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1188 |
+
the following conditions:
|
1189 |
+
|
1190 |
+
The above copyright notice and this permission notice shall be
|
1191 |
+
included in all copies or substantial portions of the Software.
|
1192 |
+
|
1193 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1194 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1195 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1196 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1197 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1198 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1199 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1200 |
+
|
1201 |
+
-----
|
1202 |
+
|
1203 |
+
The following software may be included in this product: immer. A copy of the source code may be downloaded from https://github.com/mweststrate/immer.git. This software contains the following license and notice below:
|
1204 |
+
|
1205 |
+
MIT License
|
1206 |
+
|
1207 |
+
Copyright (c) 2017 Michel Weststrate
|
1208 |
+
|
1209 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1210 |
+
of this software and associated documentation files (the "Software"), to deal
|
1211 |
+
in the Software without restriction, including without limitation the rights
|
1212 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1213 |
+
copies of the Software, and to permit persons to whom the Software is
|
1214 |
+
furnished to do so, subject to the following conditions:
|
1215 |
+
|
1216 |
+
The above copyright notice and this permission notice shall be included in all
|
1217 |
+
copies or substantial portions of the Software.
|
1218 |
+
|
1219 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1220 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1221 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1222 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1223 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1224 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1225 |
+
SOFTWARE.
|
1226 |
+
|
1227 |
+
-----
|
1228 |
+
|
1229 |
+
The following software may be included in this product: regenerator-runtime. A copy of the source code may be downloaded from git://github.com/facebook/immutable-js.git (immutable), https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime (regenerator-runtime). This software contains the following license and notice below:
|
1230 |
+
|
1231 |
+
MIT License
|
1232 |
+
|
1233 |
+
Copyright (c) 2014-present, Facebook, Inc.
|
1234 |
+
|
1235 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1236 |
+
of this software and associated documentation files (the "Software"), to deal
|
1237 |
+
in the Software without restriction, including without limitation the rights
|
1238 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1239 |
+
copies of the Software, and to permit persons to whom the Software is
|
1240 |
+
furnished to do so, subject to the following conditions:
|
1241 |
+
|
1242 |
+
The above copyright notice and this permission notice shall be included in all
|
1243 |
+
copies or substantial portions of the Software.
|
1244 |
+
|
1245 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1246 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1247 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1248 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1249 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1250 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1251 |
+
SOFTWARE.
|
1252 |
+
|
1253 |
+
-----
|
1254 |
+
|
1255 |
+
The following software may be included in this product: inherits. A copy of the source code may be downloaded from git://github.com/isaacs/inherits. This software contains the following license and notice below:
|
1256 |
+
|
1257 |
+
The ISC License
|
1258 |
+
|
1259 |
+
Copyright (c) Isaac Z. Schlueter
|
1260 |
+
|
1261 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
1262 |
+
purpose with or without fee is hereby granted, provided that the above
|
1263 |
+
copyright notice and this permission notice appear in all copies.
|
1264 |
+
|
1265 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
1266 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
1267 |
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
1268 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
1269 |
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
1270 |
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
1271 |
+
PERFORMANCE OF THIS SOFTWARE.
|
1272 |
+
|
1273 |
+
-----
|
1274 |
+
|
1275 |
+
The following software may be included in this product: interpolate-components. A copy of the source code may be downloaded from git+https://github.com/Automattic/interpolate-components.git. This software contains the following license and notice below:
|
1276 |
+
|
1277 |
+
The GNU General Public License, Version 2, June 1991 (GPLv2)
|
1278 |
+
============================================================
|
1279 |
+
|
1280 |
+
> Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
1281 |
+
> 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
1282 |
+
|
1283 |
+
Everyone is permitted to copy and distribute verbatim copies of this license
|
1284 |
+
document, but changing it is not allowed.
|
1285 |
+
|
1286 |
+
|
1287 |
+
Preamble
|
1288 |
+
--------
|
1289 |
+
|
1290 |
+
The licenses for most software are designed to take away your freedom to share
|
1291 |
+
and change it. By contrast, the GNU General Public License is intended to
|
1292 |
+
guarantee your freedom to share and change free software--to make sure the
|
1293 |
+
software is free for all its users. This General Public License applies to most
|
1294 |
+
of the Free Software Foundation's software and to any other program whose
|
1295 |
+
authors commit to using it. (Some other Free Software Foundation software is
|
1296 |
+
covered by the GNU Library General Public License instead.) You can apply it to
|
1297 |
+
your programs, too.
|
1298 |
+
|
1299 |
+
When we speak of free software, we are referring to freedom, not price. Our
|
1300 |
+
General Public Licenses are designed to make sure that you have the freedom to
|
1301 |
+
distribute copies of free software (and charge for this service if you wish),
|
1302 |
+
that you receive source code or can get it if you want it, that you can change
|
1303 |
+
the software or use pieces of it in new free programs; and that you know you can
|
1304 |
+
do these things.
|
1305 |
+
|
1306 |
+
To protect your rights, we need to make restrictions that forbid anyone to deny
|
1307 |
+
you these rights or to ask you to surrender the rights. These restrictions
|
1308 |
+
translate to certain responsibilities for you if you distribute copies of the
|
1309 |
+
software, or if you modify it.
|
1310 |
+
|
1311 |
+
For example, if you distribute copies of such a program, whether gratis or for a
|
1312 |
+
fee, you must give the recipients all the rights that you have. You must make
|
1313 |
+
sure that they, too, receive or can get the source code. And you must show them
|
1314 |
+
these terms so they know their rights.
|
1315 |
+
|
1316 |
+
We protect your rights with two steps: (1) copyright the software, and (2) offer
|
1317 |
+
you this license which gives you legal permission to copy, distribute and/or
|
1318 |
+
modify the software.
|
1319 |
+
|
1320 |
+
Also, for each author's protection and ours, we want to make certain that
|
1321 |
+
everyone understands that there is no warranty for this free software. If the
|
1322 |
+
software is modified by someone else and passed on, we want its recipients to
|
1323 |
+
know that what they have is not the original, so that any problems introduced by
|
1324 |
+
others will not reflect on the original authors' reputations.
|
1325 |
+
|
1326 |
+
Finally, any free program is threatened constantly by software patents. We wish
|
1327 |
+
to avoid the danger that redistributors of a free program will individually
|
1328 |
+
obtain patent licenses, in effect making the program proprietary. To prevent
|
1329 |
+
this, we have made it clear that any patent must be licensed for everyone's free
|
1330 |
+
use or not licensed at all.
|
1331 |
+
|
1332 |
+
The precise terms and conditions for copying, distribution and modification
|
1333 |
+
follow.
|
1334 |
+
|
1335 |
+
|
1336 |
+
Terms And Conditions For Copying, Distribution And Modification
|
1337 |
+
---------------------------------------------------------------
|
1338 |
+
|
1339 |
+
**0.** This License applies to any program or other work which contains a notice
|
1340 |
+
placed by the copyright holder saying it may be distributed under the terms of
|
1341 |
+
this General Public License. The "Program", below, refers to any such program or
|
1342 |
+
work, and a "work based on the Program" means either the Program or any
|
1343 |
+
derivative work under copyright law: that is to say, a work containing the
|
1344 |
+
Program or a portion of it, either verbatim or with modifications and/or
|
1345 |
+
translated into another language. (Hereinafter, translation is included without
|
1346 |
+
limitation in the term "modification".) Each licensee is addressed as "you".
|
1347 |
+
|
1348 |
+
Activities other than copying, distribution and modification are not covered by
|
1349 |
+
this License; they are outside its scope. The act of running the Program is not
|
1350 |
+
restricted, and the output from the Program is covered only if its contents
|
1351 |
+
constitute a work based on the Program (independent of having been made by
|
1352 |
+
running the Program). Whether that is true depends on what the Program does.
|
1353 |
+
|
1354 |
+
**1.** You may copy and distribute verbatim copies of the Program's source code
|
1355 |
+
as you receive it, in any medium, provided that you conspicuously and
|
1356 |
+
appropriately publish on each copy an appropriate copyright notice and
|
1357 |
+
disclaimer of warranty; keep intact all the notices that refer to this License
|
1358 |
+
and to the absence of any warranty; and give any other recipients of the Program
|
1359 |
+
a copy of this License along with the Program.
|
1360 |
+
|
1361 |
+
You may charge a fee for the physical act of transferring a copy, and you may at
|
1362 |
+
your option offer warranty protection in exchange for a fee.
|
1363 |
+
|
1364 |
+
**2.** You may modify your copy or copies of the Program or any portion of it,
|
1365 |
+
thus forming a work based on the Program, and copy and distribute such
|
1366 |
+
modifications or work under the terms of Section 1 above, provided that you also
|
1367 |
+
meet all of these conditions:
|
1368 |
+
|
1369 |
+
* **a)** You must cause the modified files to carry prominent notices stating
|
1370 |
+
that you changed the files and the date of any change.
|
1371 |
+
|
1372 |
+
* **b)** You must cause any work that you distribute or publish, that in whole
|
1373 |
+
or in part contains or is derived from the Program or any part thereof, to
|
1374 |
+
be licensed as a whole at no charge to all third parties under the terms of
|
1375 |
+
this License.
|
1376 |
+
|
1377 |
+
* **c)** If the modified program normally reads commands interactively when
|
1378 |
+
run, you must cause it, when started running for such interactive use in the
|
1379 |
+
most ordinary way, to print or display an announcement including an
|
1380 |
+
appropriate copyright notice and a notice that there is no warranty (or
|
1381 |
+
else, saying that you provide a warranty) and that users may redistribute
|
1382 |
+
the program under these conditions, and telling the user how to view a copy
|
1383 |
+
of this License. (Exception: if the Program itself is interactive but does
|
1384 |
+
not normally print such an announcement, your work based on the Program is
|
1385 |
+
not required to print an announcement.)
|
1386 |
+
|
1387 |
+
These requirements apply to the modified work as a whole. If identifiable
|
1388 |
+
sections of that work are not derived from the Program, and can be reasonably
|
1389 |
+
considered independent and separate works in themselves, then this License, and
|
1390 |
+
its terms, do not apply to those sections when you distribute them as separate
|
1391 |
+
works. But when you distribute the same sections as part of a whole which is a
|
1392 |
+
work based on the Program, the distribution of the whole must be on the terms of
|
1393 |
+
this License, whose permissions for other licensees extend to the entire whole,
|
1394 |
+
and thus to each and every part regardless of who wrote it.
|
1395 |
+
|
1396 |
+
Thus, it is not the intent of this section to claim rights or contest your
|
1397 |
+
rights to work written entirely by you; rather, the intent is to exercise the
|
1398 |
+
right to control the distribution of derivative or collective works based on the
|
1399 |
+
Program.
|
1400 |
+
|
1401 |
+
In addition, mere aggregation of another work not based on the Program with the
|
1402 |
+
Program (or with a work based on the Program) on a volume of a storage or
|
1403 |
+
distribution medium does not bring the other work under the scope of this
|
1404 |
+
License.
|
1405 |
+
|
1406 |
+
**3.** You may copy and distribute the Program (or a work based on it, under
|
1407 |
+
Section 2) in object code or executable form under the terms of Sections 1 and 2
|
1408 |
+
above provided that you also do one of the following:
|
1409 |
+
|
1410 |
+
* **a)** Accompany it with the complete corresponding machine-readable source
|
1411 |
+
code, which must be distributed under the terms of Sections 1 and 2 above on
|
1412 |
+
a medium customarily used for software interchange; or,
|
1413 |
+
|
1414 |
+
* **b)** Accompany it with a written offer, valid for at least three years, to
|
1415 |
+
give any third party, for a charge no more than your cost of physically
|
1416 |
+
performing source distribution, a complete machine-readable copy of the
|
1417 |
+
corresponding source code, to be distributed under the terms of Sections 1
|
1418 |
+
and 2 above on a medium customarily used for software interchange; or,
|
1419 |
+
|
1420 |
+
* **c)** Accompany it with the information you received as to the offer to
|
1421 |
+
distribute corresponding source code. (This alternative is allowed only for
|
1422 |
+
noncommercial distribution and only if you received the program in object
|
1423 |
+
code or executable form with such an offer, in accord with Subsection b
|
1424 |
+
above.)
|
1425 |
+
|
1426 |
+
The source code for a work means the preferred form of the work for making
|
1427 |
+
modifications to it. For an executable work, complete source code means all the
|
1428 |
+
source code for all modules it contains, plus any associated interface
|
1429 |
+
definition files, plus the scripts used to control compilation and installation
|
1430 |
+
of the executable. However, as a special exception, the source code distributed
|
1431 |
+
need not include anything that is normally distributed (in either source or
|
1432 |
+
binary form) with the major components (compiler, kernel, and so on) of the
|
1433 |
+
operating system on which the executable runs, unless that component itself
|
1434 |
+
accompanies the executable.
|
1435 |
+
|
1436 |
+
If distribution of executable or object code is made by offering access to copy
|
1437 |
+
from a designated place, then offering equivalent access to copy the source code
|
1438 |
+
from the same place counts as distribution of the source code, even though third
|
1439 |
+
parties are not compelled to copy the source along with the object code.
|
1440 |
+
|
1441 |
+
**4.** You may not copy, modify, sublicense, or distribute the Program except as
|
1442 |
+
expressly provided under this License. Any attempt otherwise to copy, modify,
|
1443 |
+
sublicense or distribute the Program is void, and will automatically terminate
|
1444 |
+
your rights under this License. However, parties who have received copies, or
|
1445 |
+
rights, from you under this License will not have their licenses terminated so
|
1446 |
+
long as such parties remain in full compliance.
|
1447 |
+
|
1448 |
+
**5.** You are not required to accept this License, since you have not signed
|
1449 |
+
it. However, nothing else grants you permission to modify or distribute the
|
1450 |
+
Program or its derivative works. These actions are prohibited by law if you do
|
1451 |
+
not accept this License. Therefore, by modifying or distributing the Program (or
|
1452 |
+
any work based on the Program), you indicate your acceptance of this License to
|
1453 |
+
do so, and all its terms and conditions for copying, distributing or modifying
|
1454 |
+
the Program or works based on it.
|
1455 |
+
|
1456 |
+
**6.** Each time you redistribute the Program (or any work based on the
|
1457 |
+
Program), the recipient automatically receives a license from the original
|
1458 |
+
licensor to copy, distribute or modify the Program subject to these terms and
|
1459 |
+
conditions. You may not impose any further restrictions on the recipients'
|
1460 |
+
exercise of the rights granted herein. You are not responsible for enforcing
|
1461 |
+
compliance by third parties to this License.
|
1462 |
+
|
1463 |
+
**7.** If, as a consequence of a court judgment or allegation of patent
|
1464 |
+
infringement or for any other reason (not limited to patent issues), conditions
|
1465 |
+
are imposed on you (whether by court order, agreement or otherwise) that
|
1466 |
+
contradict the conditions of this License, they do not excuse you from the
|
1467 |
+
conditions of this License. If you cannot distribute so as to satisfy
|
1468 |
+
simultaneously your obligations under this License and any other pertinent
|
1469 |
+
obligations, then as a consequence you may not distribute the Program at all.
|
1470 |
+
For example, if a patent license would not permit royalty-free redistribution of
|
1471 |
+
the Program by all those who receive copies directly or indirectly through you,
|
1472 |
+
then the only way you could satisfy both it and this License would be to refrain
|
1473 |
+
entirely from distribution of the Program.
|
1474 |
+
|
1475 |
+
If any portion of this section is held invalid or unenforceable under any
|
1476 |
+
particular circumstance, the balance of the section is intended to apply and the
|
1477 |
+
section as a whole is intended to apply in other circumstances.
|
1478 |
+
|
1479 |
+
It is not the purpose of this section to induce you to infringe any patents or
|
1480 |
+
other property right claims or to contest validity of any such claims; this
|
1481 |
+
section has the sole purpose of protecting the integrity of the free software
|
1482 |
+
distribution system, which is implemented by public license practices. Many
|
1483 |
+
people have made generous contributions to the wide range of software
|
1484 |
+
distributed through that system in reliance on consistent application of that
|
1485 |
+
system; it is up to the author/donor to decide if he or she is willing to
|
1486 |
+
distribute software through any other system and a licensee cannot impose that
|
1487 |
+
choice.
|
1488 |
+
|
1489 |
+
This section is intended to make thoroughly clear what is believed to be a
|
1490 |
+
consequence of the rest of this License.
|
1491 |
+
|
1492 |
+
**8.** If the distribution and/or use of the Program is restricted in certain
|
1493 |
+
countries either by patents or by copyrighted interfaces, the original copyright
|
1494 |
+
holder who places the Program under this License may add an explicit
|
1495 |
+
geographical distribution limitation excluding those countries, so that
|
1496 |
+
distribution is permitted only in or among countries not thus excluded. In such
|
1497 |
+
case, this License incorporates the limitation as if written in the body of this
|
1498 |
+
License.
|
1499 |
+
|
1500 |
+
**9.** The Free Software Foundation may publish revised and/or new versions of
|
1501 |
+
the General Public License from time to time. Such new versions will be similar
|
1502 |
+
in spirit to the present version, but may differ in detail to address new
|
1503 |
+
problems or concerns.
|
1504 |
+
|
1505 |
+
Each version is given a distinguishing version number. If the Program specifies
|
1506 |
+
a version number of this License which applies to it and "any later version",
|
1507 |
+
you have the option of following the terms and conditions either of that version
|
1508 |
+
or of any later version published by the Free Software Foundation. If the
|
1509 |
+
Program does not specify a version number of this License, you may choose any
|
1510 |
+
version ever published by the Free Software Foundation.
|
1511 |
+
|
1512 |
+
**10.** If you wish to incorporate parts of the Program into other free programs
|
1513 |
+
whose distribution conditions are different, write to the author to ask for
|
1514 |
+
permission. For software which is copyrighted by the Free Software Foundation,
|
1515 |
+
write to the Free Software Foundation; we sometimes make exceptions for this.
|
1516 |
+
Our decision will be guided by the two goals of preserving the free status of
|
1517 |
+
all derivatives of our free software and of promoting the sharing and reuse of
|
1518 |
+
software generally.
|
1519 |
+
|
1520 |
+
|
1521 |
+
No Warranty
|
1522 |
+
-----------
|
1523 |
+
|
1524 |
+
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
|
1525 |
+
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
|
1526 |
+
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM
|
1527 |
+
"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
1528 |
+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
1529 |
+
PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
1530 |
+
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
1531 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
1532 |
+
|
1533 |
+
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
1534 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
|
1535 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
1536 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
|
1537 |
+
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
|
1538 |
+
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
1539 |
+
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
|
1540 |
+
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
1541 |
+
|
1542 |
+
-----
|
1543 |
+
|
1544 |
+
The following software may be included in this product: safe-buffer. A copy of the source code may be downloaded from git://github.com/feross/is-buffer.git (is-buffer), git://github.com/feross/safe-buffer.git (safe-buffer). This software contains the following license and notice below:
|
1545 |
+
|
1546 |
+
The MIT License (MIT)
|
1547 |
+
|
1548 |
+
Copyright (c) Feross Aboukhadijeh
|
1549 |
+
|
1550 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1551 |
+
of this software and associated documentation files (the "Software"), to deal
|
1552 |
+
in the Software without restriction, including without limitation the rights
|
1553 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1554 |
+
copies of the Software, and to permit persons to whom the Software is
|
1555 |
+
furnished to do so, subject to the following conditions:
|
1556 |
+
|
1557 |
+
The above copyright notice and this permission notice shall be included in
|
1558 |
+
all copies or substantial portions of the Software.
|
1559 |
+
|
1560 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1561 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1562 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1563 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1564 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1565 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1566 |
+
THE SOFTWARE.
|
1567 |
+
|
1568 |
+
-----
|
1569 |
+
|
1570 |
+
The following software may be included in this product: is-negative-zero, is-regex, object-is. A copy of the source code may be downloaded from git://github.com/es-shims/is-nan.git (is-nan), git://github.com/inspect-js/is-negative-zero.git (is-negative-zero), git://github.com/inspect-js/is-regex.git (is-regex), git://github.com/es-shims/object-is.git (object-is). This software contains the following license and notice below:
|
1571 |
+
|
1572 |
+
The MIT License (MIT)
|
1573 |
+
|
1574 |
+
Copyright (c) 2014 Jordan Harband
|
1575 |
+
|
1576 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
1577 |
+
this software and associated documentation files (the "Software"), to deal in
|
1578 |
+
the Software without restriction, including without limitation the rights to
|
1579 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
1580 |
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
1581 |
+
subject to the following conditions:
|
1582 |
+
|
1583 |
+
The above copyright notice and this permission notice shall be included in all
|
1584 |
+
copies or substantial portions of the Software.
|
1585 |
+
|
1586 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1587 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
1588 |
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
1589 |
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
1590 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
1591 |
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1592 |
+
|
1593 |
+
-----
|
1594 |
+
|
1595 |
+
The following software may be included in this product: is-subset. A copy of the source code may be downloaded from git@github.com:studio-b12/is-subset.git. This software contains the following license and notice below:
|
1596 |
+
|
1597 |
+
Copyright © 2015 Studio B12 GmbH
|
1598 |
+
|
1599 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
1600 |
+
|
1601 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
1602 |
+
|
1603 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1604 |
+
|
1605 |
+
-----
|
1606 |
+
|
1607 |
+
The following software may be included in this product: isbot. A copy of the source code may be downloaded from https://github.com/omrilotan/isbot. This software contains the following license and notice below:
|
1608 |
+
|
1609 |
+
This is free and unencumbered software released into the public domain.
|
1610 |
+
|
1611 |
+
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
|
1612 |
+
|
1613 |
+
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
|
1614 |
+
|
1615 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1616 |
+
|
1617 |
+
For more information, please refer to <http://unlicense.org/>
|
1618 |
+
|
1619 |
+
-----
|
1620 |
+
|
1621 |
+
The following software may be included in this product: isomorphic-fetch. A copy of the source code may be downloaded from https://github.com/matthew-andrews/isomorphic-fetch.git. This software contains the following license and notice below:
|
1622 |
+
|
1623 |
+
The MIT License (MIT)
|
1624 |
+
|
1625 |
+
Copyright (c) 2015 Matt Andrews
|
1626 |
+
|
1627 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1628 |
+
of this software and associated documentation files (the "Software"), to deal
|
1629 |
+
in the Software without restriction, including without limitation the rights
|
1630 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1631 |
+
copies of the Software, and to permit persons to whom the Software is
|
1632 |
+
furnished to do so, subject to the following conditions:
|
1633 |
+
|
1634 |
+
The above copyright notice and this permission notice shall be included in all
|
1635 |
+
copies or substantial portions of the Software.
|
1636 |
+
|
1637 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1638 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1639 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1640 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1641 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1642 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1643 |
+
SOFTWARE.
|
1644 |
+
|
1645 |
+
-----
|
1646 |
+
|
1647 |
+
The following software may be included in this product: jquery. A copy of the source code may be downloaded from https://github.com/jquery/jquery.git. This software contains the following license and notice below:
|
1648 |
+
|
1649 |
+
Copyright JS Foundation and other contributors, https://js.foundation/
|
1650 |
+
|
1651 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1652 |
+
a copy of this software and associated documentation files (the
|
1653 |
+
"Software"), to deal in the Software without restriction, including
|
1654 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1655 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1656 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1657 |
+
the following conditions:
|
1658 |
+
|
1659 |
+
The above copyright notice and this permission notice shall be
|
1660 |
+
included in all copies or substantial portions of the Software.
|
1661 |
+
|
1662 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1663 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1664 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1665 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1666 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1667 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1668 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1669 |
+
|
1670 |
+
-----
|
1671 |
+
|
1672 |
+
The following software may be included in this product: js-cookie. A copy of the source code may be downloaded from git://github.com/js-cookie/js-cookie.git. This software contains the following license and notice below:
|
1673 |
+
|
1674 |
+
MIT License
|
1675 |
+
|
1676 |
+
Copyright (c) 2018 Copyright 2018 Klaus Hartl, Fagner Brack, GitHub Contributors
|
1677 |
+
|
1678 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1679 |
+
of this software and associated documentation files (the "Software"), to deal
|
1680 |
+
in the Software without restriction, including without limitation the rights
|
1681 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1682 |
+
copies of the Software, and to permit persons to whom the Software is
|
1683 |
+
furnished to do so, subject to the following conditions:
|
1684 |
+
|
1685 |
+
The above copyright notice and this permission notice shall be included in all
|
1686 |
+
copies or substantial portions of the Software.
|
1687 |
+
|
1688 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1689 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1690 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1691 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1692 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1693 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1694 |
+
SOFTWARE.
|
1695 |
+
|
1696 |
+
-----
|
1697 |
+
|
1698 |
+
The following software may be included in this product: js-tokens. A copy of the source code may be downloaded from https://github.com/lydell/js-tokens.git. This software contains the following license and notice below:
|
1699 |
+
|
1700 |
+
The MIT License (MIT)
|
1701 |
+
|
1702 |
+
Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
|
1703 |
+
|
1704 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1705 |
+
of this software and associated documentation files (the "Software"), to deal
|
1706 |
+
in the Software without restriction, including without limitation the rights
|
1707 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1708 |
+
copies of the Software, and to permit persons to whom the Software is
|
1709 |
+
furnished to do so, subject to the following conditions:
|
1710 |
+
|
1711 |
+
The above copyright notice and this permission notice shall be included in
|
1712 |
+
all copies or substantial portions of the Software.
|
1713 |
+
|
1714 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1715 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1716 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1717 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1718 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1719 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1720 |
+
THE SOFTWARE.
|
1721 |
+
|
1722 |
+
-----
|
1723 |
+
|
1724 |
+
The following software may be included in this product: json-form-data. A copy of the source code may be downloaded from git+https://github.com/hyperatom/json-form-data.git. This software contains the following license and notice below:
|
1725 |
+
|
1726 |
+
MIT License
|
1727 |
+
|
1728 |
+
Copyright (c) 2018 Adam Barrell
|
1729 |
+
|
1730 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1731 |
+
of this software and associated documentation files (the "Software"), to deal
|
1732 |
+
in the Software without restriction, including without limitation the rights
|
1733 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1734 |
+
copies of the Software, and to permit persons to whom the Software is
|
1735 |
+
furnished to do so, subject to the following conditions:
|
1736 |
+
|
1737 |
+
The above copyright notice and this permission notice shall be included in all
|
1738 |
+
copies or substantial portions of the Software.
|
1739 |
+
|
1740 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1741 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1742 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1743 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1744 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1745 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1746 |
+
SOFTWARE.
|
1747 |
+
|
1748 |
+
-----
|
1749 |
+
|
1750 |
+
The following software may be included in this product: lodash, lodash.template, lodash.templatesettings. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash), https://github.com/lodash/lodash.git (lodash.template), https://github.com/lodash/lodash.git (lodash.templatesettings). This software contains the following license and notice below:
|
1751 |
+
|
1752 |
+
Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
1753 |
+
|
1754 |
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
1755 |
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
1756 |
+
|
1757 |
+
This software consists of voluntary contributions made by many
|
1758 |
+
individuals. For exact contribution history, see the revision history
|
1759 |
+
available at https://github.com/lodash/lodash
|
1760 |
+
|
1761 |
+
The following license applies to all parts of this software except as
|
1762 |
+
documented below:
|
1763 |
+
|
1764 |
+
====
|
1765 |
+
|
1766 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1767 |
+
a copy of this software and associated documentation files (the
|
1768 |
+
"Software"), to deal in the Software without restriction, including
|
1769 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1770 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1771 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1772 |
+
the following conditions:
|
1773 |
+
|
1774 |
+
The above copyright notice and this permission notice shall be
|
1775 |
+
included in all copies or substantial portions of the Software.
|
1776 |
+
|
1777 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1778 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1779 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1780 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1781 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1782 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1783 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1784 |
+
|
1785 |
+
====
|
1786 |
+
|
1787 |
+
Copyright and related rights for sample code are waived via CC0. Sample
|
1788 |
+
code is defined as all source code displayed within the prose of the
|
1789 |
+
documentation.
|
1790 |
+
|
1791 |
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
1792 |
+
|
1793 |
+
====
|
1794 |
+
|
1795 |
+
Files located in the node_modules and vendor directories are externally
|
1796 |
+
maintained libraries used by this software which have their own
|
1797 |
+
licenses; we recommend you read them, as their terms may differ from the
|
1798 |
+
terms above.
|
1799 |
+
|
1800 |
+
-----
|
1801 |
+
|
1802 |
+
The following software may be included in this product: lodash._reinterpolate. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git. This software contains the following license and notice below:
|
1803 |
+
|
1804 |
+
Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
|
1805 |
+
Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
|
1806 |
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
1807 |
+
|
1808 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1809 |
+
a copy of this software and associated documentation files (the
|
1810 |
+
"Software"), to deal in the Software without restriction, including
|
1811 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1812 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1813 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1814 |
+
the following conditions:
|
1815 |
+
|
1816 |
+
The above copyright notice and this permission notice shall be
|
1817 |
+
included in all copies or substantial portions of the Software.
|
1818 |
+
|
1819 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1820 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1821 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1822 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1823 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1824 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1825 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1826 |
+
|
1827 |
+
-----
|
1828 |
+
|
1829 |
+
The following software may be included in this product: lodash.camelcase, lodash.clonedeep, lodash.debounce, lodash.escape, lodash.flattendeep, lodash.get, lodash.includes, lodash.isinteger, lodash.ismatch, lodash.isplainobject, lodash.once, lodash.set, lodash.sortby, lodash.throttle, lodash.uniq. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash.camelcase), https://github.com/lodash/lodash.git (lodash.clonedeep), https://github.com/lodash/lodash.git (lodash.debounce), https://github.com/lodash/lodash.git (lodash.escape), https://github.com/lodash/lodash.git (lodash.flattendeep), https://github.com/lodash/lodash.git (lodash.get), https://github.com/lodash/lodash.git (lodash.includes), https://github.com/lodash/lodash.git (lodash.isinteger), https://github.com/lodash/lodash.git (lodash.ismatch), https://github.com/lodash/lodash.git (lodash.isplainobject), https://github.com/lodash/lodash.git (lodash.once), https://github.com/lodash/lodash.git (lodash.set), https://github.com/lodash/lodash.git (lodash.sortby), https://github.com/lodash/lodash.git (lodash.throttle), https://github.com/lodash/lodash.git (lodash.uniq). This software contains the following license and notice below:
|
1830 |
+
|
1831 |
+
Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
1832 |
+
|
1833 |
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
1834 |
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
1835 |
+
|
1836 |
+
This software consists of voluntary contributions made by many
|
1837 |
+
individuals. For exact contribution history, see the revision history
|
1838 |
+
available at https://github.com/lodash/lodash
|
1839 |
+
|
1840 |
+
The following license applies to all parts of this software except as
|
1841 |
+
documented below:
|
1842 |
+
|
1843 |
+
====
|
1844 |
+
|
1845 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1846 |
+
a copy of this software and associated documentation files (the
|
1847 |
+
"Software"), to deal in the Software without restriction, including
|
1848 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1849 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1850 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1851 |
+
the following conditions:
|
1852 |
+
|
1853 |
+
The above copyright notice and this permission notice shall be
|
1854 |
+
included in all copies or substantial portions of the Software.
|
1855 |
+
|
1856 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1857 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1858 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1859 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1860 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1861 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1862 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1863 |
+
|
1864 |
+
====
|
1865 |
+
|
1866 |
+
Copyright and related rights for sample code are waived via CC0. Sample
|
1867 |
+
code is defined as all source code displayed within the prose of the
|
1868 |
+
documentation.
|
1869 |
+
|
1870 |
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
1871 |
+
|
1872 |
+
====
|
1873 |
+
|
1874 |
+
Files located in the node_modules and vendor directories are externally
|
1875 |
+
maintained libraries used by this software which have their own
|
1876 |
+
licenses; we recommend you read them, as their terms may differ from the
|
1877 |
+
terms above.
|
1878 |
+
|
1879 |
+
-----
|
1880 |
+
|
1881 |
+
The following software may be included in this product: lodash.isboolean, lodash.isnumber, lodash.isstring. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git (lodash.isboolean), https://github.com/lodash/lodash.git (lodash.isnumber), https://github.com/lodash/lodash.git (lodash.isstring). This software contains the following license and notice below:
|
1882 |
+
|
1883 |
+
Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
1884 |
+
Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
|
1885 |
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
1886 |
+
|
1887 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1888 |
+
a copy of this software and associated documentation files (the
|
1889 |
+
"Software"), to deal in the Software without restriction, including
|
1890 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1891 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1892 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1893 |
+
the following conditions:
|
1894 |
+
|
1895 |
+
The above copyright notice and this permission notice shall be
|
1896 |
+
included in all copies or substantial portions of the Software.
|
1897 |
+
|
1898 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1899 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1900 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1901 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1902 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1903 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1904 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1905 |
+
|
1906 |
+
-----
|
1907 |
+
|
1908 |
+
The following software may be included in this product: lodash.isequal. A copy of the source code may be downloaded from https://github.com/lodash/lodash.git. This software contains the following license and notice below:
|
1909 |
+
|
1910 |
+
Copyright JS Foundation and other contributors <https://js.foundation/>
|
1911 |
+
|
1912 |
+
Based on Underscore.js, copyright Jeremy Ashkenas,
|
1913 |
+
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
|
1914 |
+
|
1915 |
+
This software consists of voluntary contributions made by many
|
1916 |
+
individuals. For exact contribution history, see the revision history
|
1917 |
+
available at https://github.com/lodash/lodash
|
1918 |
+
|
1919 |
+
The following license applies to all parts of this software except as
|
1920 |
+
documented below:
|
1921 |
+
|
1922 |
+
====
|
1923 |
+
|
1924 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
1925 |
+
a copy of this software and associated documentation files (the
|
1926 |
+
"Software"), to deal in the Software without restriction, including
|
1927 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
1928 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
1929 |
+
permit persons to whom the Software is furnished to do so, subject to
|
1930 |
+
the following conditions:
|
1931 |
+
|
1932 |
+
The above copyright notice and this permission notice shall be
|
1933 |
+
included in all copies or substantial portions of the Software.
|
1934 |
+
|
1935 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1936 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
1937 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1938 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
1939 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
1940 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1941 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1942 |
+
|
1943 |
+
====
|
1944 |
+
|
1945 |
+
Copyright and related rights for sample code are waived via CC0. Sample
|
1946 |
+
code is defined as all source code displayed within the prose of the
|
1947 |
+
documentation.
|
1948 |
+
|
1949 |
+
CC0: http://creativecommons.org/publicdomain/zero/1.0/
|
1950 |
+
|
1951 |
+
====
|
1952 |
+
|
1953 |
+
Files located in the node_modules and vendor directories are externally
|
1954 |
+
maintained libraries used by this software which have their own
|
1955 |
+
licenses; we recommend you read them, as their terms may differ from the
|
1956 |
+
terms above.
|
1957 |
+
|
1958 |
+
-----
|
1959 |
+
|
1960 |
+
The following software may be included in this product: loose-envify. A copy of the source code may be downloaded from git://github.com/zertosh/loose-envify.git. This software contains the following license and notice below:
|
1961 |
+
|
1962 |
+
The MIT License (MIT)
|
1963 |
+
|
1964 |
+
Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
|
1965 |
+
|
1966 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1967 |
+
of this software and associated documentation files (the "Software"), to deal
|
1968 |
+
in the Software without restriction, including without limitation the rights
|
1969 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1970 |
+
copies of the Software, and to permit persons to whom the Software is
|
1971 |
+
furnished to do so, subject to the following conditions:
|
1972 |
+
|
1973 |
+
The above copyright notice and this permission notice shall be included in
|
1974 |
+
all copies or substantial portions of the Software.
|
1975 |
+
|
1976 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1977 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1978 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1979 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1980 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1981 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1982 |
+
THE SOFTWARE.
|
1983 |
+
|
1984 |
+
-----
|
1985 |
+
|
1986 |
+
The following software may be included in this product: matches-selector. A copy of the source code may be downloaded from https://github.com/ForbesLindesay/matches-selector.git. This software contains the following license and notice below:
|
1987 |
+
|
1988 |
+
Copyright (c) 2013 Forbes Lindesay
|
1989 |
+
|
1990 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
1991 |
+
of this software and associated documentation files (the "Software"), to deal
|
1992 |
+
in the Software without restriction, including without limitation the rights
|
1993 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1994 |
+
copies of the Software, and to permit persons to whom the Software is
|
1995 |
+
furnished to do so, subject to the following conditions:
|
1996 |
+
|
1997 |
+
The above copyright notice and this permission notice shall be included in
|
1998 |
+
all copies or substantial portions of the Software.
|
1999 |
+
|
2000 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2001 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2002 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2003 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2004 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2005 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2006 |
+
THE SOFTWARE.
|
2007 |
+
|
2008 |
+
-----
|
2009 |
+
|
2010 |
+
The following software may be included in this product: tiny-invariant, tiny-warning. A copy of the source code may be downloaded from https://github.com/alexreardon/memoize-one.git (memoize-one), https://github.com/alexreardon/tiny-invariant.git (tiny-invariant), https://github.com/alexreardon/tiny-warning.git (tiny-warning). This software contains the following license and notice below:
|
2011 |
+
|
2012 |
+
MIT License
|
2013 |
+
|
2014 |
+
Copyright (c) 2019 Alexander Reardon
|
2015 |
+
|
2016 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2017 |
+
of this software and associated documentation files (the "Software"), to deal
|
2018 |
+
in the Software without restriction, including without limitation the rights
|
2019 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2020 |
+
copies of the Software, and to permit persons to whom the Software is
|
2021 |
+
furnished to do so, subject to the following conditions:
|
2022 |
+
|
2023 |
+
The above copyright notice and this permission notice shall be included in all
|
2024 |
+
copies or substantial portions of the Software.
|
2025 |
+
|
2026 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2027 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2028 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2029 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2030 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2031 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2032 |
+
SOFTWARE.
|
2033 |
+
|
2034 |
+
-----
|
2035 |
+
|
2036 |
+
The following software may be included in this product: mini-create-react-context. A copy of the source code may be downloaded from https://github.com/StringEpsilon/mini-create-react-context. This software contains the following license and notice below:
|
2037 |
+
|
2038 |
+
Copyright (c) 2019-present StringEpsilon <StringEpsilon@gmail.com>
|
2039 |
+
|
2040 |
+
Copyright (c) 2017-2019 James Kyle <me@thejameskyle.com>
|
2041 |
+
|
2042 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2043 |
+
of this software and associated documentation files (the "Software"), to deal
|
2044 |
+
in the Software without restriction, including without limitation the rights
|
2045 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2046 |
+
copies of the Software, and to permit persons to whom the Software is
|
2047 |
+
furnished to do so, subject to the following conditions:
|
2048 |
+
|
2049 |
+
The above copyright notice and this permission notice shall be included in all
|
2050 |
+
copies or substantial portions of the Software.
|
2051 |
+
|
2052 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2053 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2054 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2055 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2056 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2057 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2058 |
+
SOFTWARE.
|
2059 |
+
|
2060 |
+
-----
|
2061 |
+
|
2062 |
+
The following software may be included in this product: mobx, mobx-react, mobx-react-lite. A copy of the source code may be downloaded from https://github.com/mobxjs/mobx.git (mobx), https://github.com/mobxjs/mobx-react.git (mobx-react), https://github.com/mobxjs/mobx-react-lite.git (mobx-react-lite). This software contains the following license and notice below:
|
2063 |
+
|
2064 |
+
The MIT License (MIT)
|
2065 |
+
|
2066 |
+
Copyright (c) 2015 Michel Weststrate
|
2067 |
+
|
2068 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2069 |
+
of this software and associated documentation files (the "Software"), to deal
|
2070 |
+
in the Software without restriction, including without limitation the rights
|
2071 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2072 |
+
copies of the Software, and to permit persons to whom the Software is
|
2073 |
+
furnished to do so, subject to the following conditions:
|
2074 |
+
|
2075 |
+
The above copyright notice and this permission notice shall be included in all
|
2076 |
+
copies or substantial portions of the Software.
|
2077 |
+
|
2078 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2079 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2080 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2081 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2082 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2083 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2084 |
+
SOFTWARE.
|
2085 |
+
|
2086 |
+
-----
|
2087 |
+
|
2088 |
+
The following software may be included in this product: moment. A copy of the source code may be downloaded from https://github.com/moment/moment.git. This software contains the following license and notice below:
|
2089 |
+
|
2090 |
+
Copyright (c) JS Foundation and other contributors
|
2091 |
+
|
2092 |
+
Permission is hereby granted, free of charge, to any person
|
2093 |
+
obtaining a copy of this software and associated documentation
|
2094 |
+
files (the "Software"), to deal in the Software without
|
2095 |
+
restriction, including without limitation the rights to use,
|
2096 |
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2097 |
+
copies of the Software, and to permit persons to whom the
|
2098 |
+
Software is furnished to do so, subject to the following
|
2099 |
+
conditions:
|
2100 |
+
|
2101 |
+
The above copyright notice and this permission notice shall be
|
2102 |
+
included in all copies or substantial portions of the Software.
|
2103 |
+
|
2104 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
2105 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
2106 |
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
2107 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
2108 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
2109 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2110 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
2111 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
2112 |
+
|
2113 |
+
-----
|
2114 |
+
|
2115 |
+
The following software may be included in this product: moo. A copy of the source code may be downloaded from https://github.com/tjvr/moo.git. This software contains the following license and notice below:
|
2116 |
+
|
2117 |
+
BSD 3-Clause License
|
2118 |
+
|
2119 |
+
Copyright (c) 2017, Tim Radvan (tjvr)
|
2120 |
+
All rights reserved.
|
2121 |
+
|
2122 |
+
Redistribution and use in source and binary forms, with or without
|
2123 |
+
modification, are permitted provided that the following conditions are met:
|
2124 |
+
|
2125 |
+
* Redistributions of source code must retain the above copyright notice, this
|
2126 |
+
list of conditions and the following disclaimer.
|
2127 |
+
|
2128 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
2129 |
+
this list of conditions and the following disclaimer in the documentation
|
2130 |
+
and/or other materials provided with the distribution.
|
2131 |
+
|
2132 |
+
* Neither the name of the copyright holder nor the names of its
|
2133 |
+
contributors may be used to endorse or promote products derived from
|
2134 |
+
this software without specific prior written permission.
|
2135 |
+
|
2136 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
2137 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
2138 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
2139 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
2140 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
2141 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
2142 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
2143 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
2144 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
2145 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2146 |
+
|
2147 |
+
-----
|
2148 |
+
|
2149 |
+
The following software may be included in this product: nearley. A copy of the source code may be downloaded from https://github.com/hardmath123/nearley.git. This software contains the following license and notice below:
|
2150 |
+
|
2151 |
+
The MIT License (MIT)
|
2152 |
+
|
2153 |
+
Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019 Kartik Chandra, Tim Radvan
|
2154 |
+
|
2155 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2156 |
+
of this software and associated documentation files (the "Software"), to deal
|
2157 |
+
in the Software without restriction, including without limitation the rights
|
2158 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2159 |
+
copies of the Software, and to permit persons to whom the Software is
|
2160 |
+
furnished to do so, subject to the following conditions:
|
2161 |
+
|
2162 |
+
The above copyright notice and this permission notice shall be included in all
|
2163 |
+
copies or substantial portions of the Software.
|
2164 |
+
|
2165 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2166 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2167 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2168 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2169 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2170 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2171 |
+
SOFTWARE.
|
2172 |
+
|
2173 |
+
-----
|
2174 |
+
|
2175 |
+
The following software may be included in this product: node-fetch. A copy of the source code may be downloaded from https://github.com/bitinn/node-fetch.git (node-fetch), https://github.com/npm/node-fetch-npm.git (node-fetch-npm). This software contains the following license and notice below:
|
2176 |
+
|
2177 |
+
The MIT License (MIT)
|
2178 |
+
|
2179 |
+
Copyright (c) 2016 David Frank
|
2180 |
+
|
2181 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2182 |
+
of this software and associated documentation files (the "Software"), to deal
|
2183 |
+
in the Software without restriction, including without limitation the rights
|
2184 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2185 |
+
copies of the Software, and to permit persons to whom the Software is
|
2186 |
+
furnished to do so, subject to the following conditions:
|
2187 |
+
|
2188 |
+
The above copyright notice and this permission notice shall be included in all
|
2189 |
+
copies or substantial portions of the Software.
|
2190 |
+
|
2191 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2192 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2193 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2194 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2195 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2196 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2197 |
+
SOFTWARE.
|
2198 |
+
|
2199 |
+
-----
|
2200 |
+
|
2201 |
+
The following software may be included in this product: object-inspect. A copy of the source code may be downloaded from git://github.com/inspect-js/object-inspect.git. This software contains the following license and notice below:
|
2202 |
+
|
2203 |
+
MIT License
|
2204 |
+
|
2205 |
+
Copyright (c) 2013 James Halliday
|
2206 |
+
|
2207 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2208 |
+
of this software and associated documentation files (the "Software"), to deal
|
2209 |
+
in the Software without restriction, including without limitation the rights
|
2210 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2211 |
+
copies of the Software, and to permit persons to whom the Software is
|
2212 |
+
furnished to do so, subject to the following conditions:
|
2213 |
+
|
2214 |
+
The above copyright notice and this permission notice shall be included in all
|
2215 |
+
copies or substantial portions of the Software.
|
2216 |
+
|
2217 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2218 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2219 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2220 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2221 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2222 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2223 |
+
SOFTWARE.
|
2224 |
+
|
2225 |
+
-----
|
2226 |
+
|
2227 |
+
The following software may be included in this product: object-keys. A copy of the source code may be downloaded from git://github.com/ljharb/object-keys.git. This software contains the following license and notice below:
|
2228 |
+
|
2229 |
+
The MIT License (MIT)
|
2230 |
+
|
2231 |
+
Copyright (C) 2013 Jordan Harband
|
2232 |
+
|
2233 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2234 |
+
of this software and associated documentation files (the "Software"), to deal
|
2235 |
+
in the Software without restriction, including without limitation the rights
|
2236 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2237 |
+
copies of the Software, and to permit persons to whom the Software is
|
2238 |
+
furnished to do so, subject to the following conditions:
|
2239 |
+
|
2240 |
+
The above copyright notice and this permission notice shall be included in
|
2241 |
+
all copies or substantial portions of the Software.
|
2242 |
+
|
2243 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2244 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2245 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2246 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2247 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2248 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2249 |
+
THE SOFTWARE.
|
2250 |
+
|
2251 |
+
-----
|
2252 |
+
|
2253 |
+
The following software may be included in this product: querystringify, requires-port, url-parse. A copy of the source code may be downloaded from https://github.com/3rd-Eden/one-time.git (one-time), https://github.com/unshiftio/querystringify (querystringify), https://github.com/unshiftio/requires-port (requires-port), https://github.com/unshiftio/url-parse.git (url-parse). This software contains the following license and notice below:
|
2254 |
+
|
2255 |
+
The MIT License (MIT)
|
2256 |
+
|
2257 |
+
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
|
2258 |
+
|
2259 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2260 |
+
of this software and associated documentation files (the "Software"), to deal
|
2261 |
+
in the Software without restriction, including without limitation the rights
|
2262 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2263 |
+
copies of the Software, and to permit persons to whom the Software is
|
2264 |
+
furnished to do so, subject to the following conditions:
|
2265 |
+
|
2266 |
+
The above copyright notice and this permission notice shall be included in all
|
2267 |
+
copies or substantial portions of the Software.
|
2268 |
+
|
2269 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2270 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2271 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2272 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2273 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2274 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2275 |
+
SOFTWARE.
|
2276 |
+
|
2277 |
+
-----
|
2278 |
+
|
2279 |
+
The following software may be included in this product: parse5. A copy of the source code may be downloaded from git://github.com/inikulin/parse5.git (parse5), git://github.com/inikulin/parse5.git (parse5-htmlparser2-tree-adapter). This software contains the following license and notice below:
|
2280 |
+
|
2281 |
+
Copyright (c) 2013-2019 Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)
|
2282 |
+
|
2283 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2284 |
+
of this software and associated documentation files (the "Software"), to deal
|
2285 |
+
in the Software without restriction, including without limitation the rights
|
2286 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2287 |
+
copies of the Software, and to permit persons to whom the Software is
|
2288 |
+
furnished to do so, subject to the following conditions:
|
2289 |
+
|
2290 |
+
The above copyright notice and this permission notice shall be included in
|
2291 |
+
all copies or substantial portions of the Software.
|
2292 |
+
|
2293 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2294 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2295 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2296 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2297 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2298 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2299 |
+
THE SOFTWARE.
|
2300 |
+
|
2301 |
+
-----
|
2302 |
+
|
2303 |
+
The following software may be included in this product: perfect-scrollbar. A copy of the source code may be downloaded from https://github.com/mdbootstrap/perfect-scrollbar. This software contains the following license and notice below:
|
2304 |
+
|
2305 |
+
The MIT License (MIT) Copyright (c) 2012-2019 Hyunje Jun, MDBootstrap.com and other contributors
|
2306 |
+
|
2307 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
2308 |
+
this software and associated documentation files (the "Software"), to deal in
|
2309 |
+
the Software without restriction, including without limitation the rights to
|
2310 |
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
2311 |
+
of the Software, and to permit persons to whom the Software is furnished to do
|
2312 |
+
so, subject to the following conditions:
|
2313 |
+
|
2314 |
+
The above copyright notice and this permission notice shall be included in all
|
2315 |
+
copies or substantial portions of the Software.
|
2316 |
+
|
2317 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2318 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2319 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2320 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2321 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2322 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2323 |
+
SOFTWARE.
|
2324 |
+
|
2325 |
+
-----
|
2326 |
+
|
2327 |
+
The following software may be included in this product: performance-now. A copy of the source code may be downloaded from git://github.com/braveg1rl/performance-now.git. This software contains the following license and notice below:
|
2328 |
+
|
2329 |
+
Copyright (c) 2013 Braveg1rl
|
2330 |
+
|
2331 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2332 |
+
|
2333 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2334 |
+
|
2335 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2336 |
+
|
2337 |
+
-----
|
2338 |
+
|
2339 |
+
The following software may be included in this product: postscribe. A copy of the source code may be downloaded from git://github.com/krux/postscribe.git. This software contains the following license and notice below:
|
2340 |
+
|
2341 |
+
Copyright (c) 2016 Postscribe Authors and Contributors
|
2342 |
+
Copyright (c) 2016 Krux Digital, Inc.
|
2343 |
+
|
2344 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2345 |
+
of this software and associated documentation files (the "Software"), to
|
2346 |
+
deal in the Software without restriction, including without limitation the
|
2347 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
2348 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
2349 |
+
furnished to do so, subject to the following conditions:
|
2350 |
+
|
2351 |
+
The above copyright notice and this permission notice shall be included in
|
2352 |
+
all copies or substantial portions of the Software.
|
2353 |
+
|
2354 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2355 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2356 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
2357 |
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2358 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2359 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
2360 |
+
DEALINGS IN THE SOFTWARE.
|
2361 |
+
|
2362 |
+
-----
|
2363 |
+
|
2364 |
+
The following software may be included in this product: preact. A copy of the source code may be downloaded from https://github.com/preactjs/preact.git. This software contains the following license and notice below:
|
2365 |
+
|
2366 |
+
The MIT License (MIT)
|
2367 |
+
|
2368 |
+
Copyright (c) 2015-present Jason Miller
|
2369 |
+
|
2370 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2371 |
+
of this software and associated documentation files (the "Software"), to deal
|
2372 |
+
in the Software without restriction, including without limitation the rights
|
2373 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2374 |
+
copies of the Software, and to permit persons to whom the Software is
|
2375 |
+
furnished to do so, subject to the following conditions:
|
2376 |
+
|
2377 |
+
The above copyright notice and this permission notice shall be included in all
|
2378 |
+
copies or substantial portions of the Software.
|
2379 |
+
|
2380 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2381 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2382 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2383 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2384 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2385 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2386 |
+
SOFTWARE.
|
2387 |
+
|
2388 |
+
-----
|
2389 |
+
|
2390 |
+
The following software may be included in this product: prescribe. A copy of the source code may be downloaded from git://github.com/krux/prescribe.git. This software contains the following license and notice below:
|
2391 |
+
|
2392 |
+
Copyright (c) 2016 Prescribe Authors and Contributors
|
2393 |
+
Copyright (c) 2016 Krux Digital, Inc.
|
2394 |
+
|
2395 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2396 |
+
of this software and associated documentation files (the "Software"), to
|
2397 |
+
deal in the Software without restriction, including without limitation the
|
2398 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
2399 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
2400 |
+
furnished to do so, subject to the following conditions:
|
2401 |
+
|
2402 |
+
The above copyright notice and this permission notice shall be included in
|
2403 |
+
all copies or substantial portions of the Software.
|
2404 |
+
|
2405 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2406 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2407 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
2408 |
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2409 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2410 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
2411 |
+
DEALINGS IN THE SOFTWARE.
|
2412 |
+
|
2413 |
+
-----
|
2414 |
+
|
2415 |
+
The following software may be included in this product: process-nextick-args. A copy of the source code may be downloaded from https://github.com/calvinmetcalf/process-nextick-args.git. This software contains the following license and notice below:
|
2416 |
+
|
2417 |
+
# Copyright (c) 2015 Calvin Metcalf
|
2418 |
+
|
2419 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2420 |
+
of this software and associated documentation files (the "Software"), to deal
|
2421 |
+
in the Software without restriction, including without limitation the rights
|
2422 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2423 |
+
copies of the Software, and to permit persons to whom the Software is
|
2424 |
+
furnished to do so, subject to the following conditions:
|
2425 |
+
|
2426 |
+
The above copyright notice and this permission notice shall be included in all
|
2427 |
+
copies or substantial portions of the Software.
|
2428 |
+
|
2429 |
+
**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2430 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2431 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2432 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2433 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2434 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2435 |
+
SOFTWARE.**
|
2436 |
+
|
2437 |
+
-----
|
2438 |
+
|
2439 |
+
The following software may be included in this product: promise. A copy of the source code may be downloaded from https://github.com/then/promise.git. This software contains the following license and notice below:
|
2440 |
+
|
2441 |
+
Copyright (c) 2014 Forbes Lindesay
|
2442 |
+
|
2443 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2444 |
+
of this software and associated documentation files (the "Software"), to deal
|
2445 |
+
in the Software without restriction, including without limitation the rights
|
2446 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2447 |
+
copies of the Software, and to permit persons to whom the Software is
|
2448 |
+
furnished to do so, subject to the following conditions:
|
2449 |
+
|
2450 |
+
The above copyright notice and this permission notice shall be included in
|
2451 |
+
all copies or substantial portions of the Software.
|
2452 |
+
|
2453 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2454 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2455 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2456 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2457 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2458 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2459 |
+
THE SOFTWARE.
|
2460 |
+
|
2461 |
+
-----
|
2462 |
+
|
2463 |
+
The following software may be included in this product: prop-types-exact. A copy of the source code may be downloaded from git+https://github.com/airbnb/prop-types-exact.git. This software contains the following license and notice below:
|
2464 |
+
|
2465 |
+
MIT License
|
2466 |
+
|
2467 |
+
Copyright (c) 2017 Airbnb
|
2468 |
+
|
2469 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2470 |
+
of this software and associated documentation files (the "Software"), to deal
|
2471 |
+
in the Software without restriction, including without limitation the rights
|
2472 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2473 |
+
copies of the Software, and to permit persons to whom the Software is
|
2474 |
+
furnished to do so, subject to the following conditions:
|
2475 |
+
|
2476 |
+
The above copyright notice and this permission notice shall be included in all
|
2477 |
+
copies or substantial portions of the Software.
|
2478 |
+
|
2479 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2480 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2481 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2482 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2483 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2484 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2485 |
+
SOFTWARE.
|
2486 |
+
|
2487 |
+
-----
|
2488 |
+
|
2489 |
+
The following software may be included in this product: raf. A copy of the source code may be downloaded from git://github.com/chrisdickinson/raf.git. This software contains the following license and notice below:
|
2490 |
+
|
2491 |
+
Copyright 2013 Chris Dickinson <chris@neversaw.us>
|
2492 |
+
|
2493 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2494 |
+
|
2495 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2496 |
+
|
2497 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2498 |
+
|
2499 |
+
-----
|
2500 |
+
|
2501 |
+
The following software may be included in this product: randexp, ret. A copy of the source code may be downloaded from git://github.com/fent/randexp.js.git (randexp), git://github.com/fent/ret.js.git (ret). This software contains the following license and notice below:
|
2502 |
+
|
2503 |
+
Copyright (C) 2011 by Roly Fentanes
|
2504 |
+
|
2505 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2506 |
+
of this software and associated documentation files (the "Software"), to deal
|
2507 |
+
in the Software without restriction, including without limitation the rights
|
2508 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2509 |
+
copies of the Software, and to permit persons to whom the Software is
|
2510 |
+
furnished to do so, subject to the following conditions:
|
2511 |
+
|
2512 |
+
The above copyright notice and this permission notice shall be included in
|
2513 |
+
all copies or substantial portions of the Software.
|
2514 |
+
|
2515 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2516 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2517 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2518 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2519 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2520 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2521 |
+
THE SOFTWARE.
|
2522 |
+
|
2523 |
+
-----
|
2524 |
+
|
2525 |
+
The following software may be included in this product: rc-cascader, rc-select. A copy of the source code may be downloaded from https://github.com/react-component/cascader.git (rc-cascader), https://github.com/react-component/mention.git (rc-editor-mention), git@github.com:react-component/select.git (rc-select). This software contains the following license and notice below:
|
2526 |
+
|
2527 |
+
The MIT License (MIT)
|
2528 |
+
|
2529 |
+
Copyright (c) 2014-present alipay.com
|
2530 |
+
|
2531 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2532 |
+
|
2533 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2534 |
+
|
2535 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2536 |
+
|
2537 |
+
-----
|
2538 |
+
|
2539 |
+
The following software may be included in this product: rc-checkbox. A copy of the source code may be downloaded from git@github.com:react-component/checkbox.git. This software contains the following license and notice below:
|
2540 |
+
|
2541 |
+
The MIT License (MIT) Copyright (c) 2016 React Components
|
2542 |
+
|
2543 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2544 |
+
|
2545 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2546 |
+
|
2547 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2548 |
+
|
2549 |
+
-----
|
2550 |
+
|
2551 |
+
The following software may be included in this product: rc-dropdown, rc-slider, rc-tooltip, rc-trigger. A copy of the source code may be downloaded from git@github.com:react-component/dropdown.git (rc-dropdown), git@github.com:react-component/slider.git (rc-slider), git@github.com:react-component/tooltip.git (rc-tooltip), https://github.com/react-component/trigger.git (rc-trigger). This software contains the following license and notice below:
|
2552 |
+
|
2553 |
+
The MIT License (MIT)
|
2554 |
+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
|
2555 |
+
|
2556 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2557 |
+
of this software and associated documentation files (the "Software"), to deal
|
2558 |
+
in the Software without restriction, including without limitation the rights
|
2559 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2560 |
+
copies of the Software, and to permit persons to whom the Software is
|
2561 |
+
furnished to do so, subject to the following conditions:
|
2562 |
+
|
2563 |
+
The above copyright notice and this permission notice shall be included in
|
2564 |
+
all copies or substantial portions of the Software.
|
2565 |
+
|
2566 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
2567 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
2568 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
2569 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
2570 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
2571 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
2572 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2573 |
+
|
2574 |
+
-----
|
2575 |
+
|
2576 |
+
The following software may be included in this product: rc-field-form. A copy of the source code may be downloaded from https://github.com/react-component/field-form.git. This software contains the following license and notice below:
|
2577 |
+
|
2578 |
+
MIT License
|
2579 |
+
|
2580 |
+
Copyright (c) 2019-present react-component
|
2581 |
+
|
2582 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2583 |
+
of this software and associated documentation files (the "Software"), to deal
|
2584 |
+
in the Software without restriction, including without limitation the rights
|
2585 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2586 |
+
copies of the Software, and to permit persons to whom the Software is
|
2587 |
+
furnished to do so, subject to the following conditions:
|
2588 |
+
|
2589 |
+
The above copyright notice and this permission notice shall be included in all
|
2590 |
+
copies or substantial portions of the Software.
|
2591 |
+
|
2592 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2593 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2594 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2595 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2596 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2597 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2598 |
+
SOFTWARE.
|
2599 |
+
|
2600 |
+
-----
|
2601 |
+
|
2602 |
+
The following software may be included in this product: rc-mentions. A copy of the source code may be downloaded from git@github.com:react-component/mentions.git. This software contains the following license and notice below:
|
2603 |
+
|
2604 |
+
The MIT License (MIT)
|
2605 |
+
|
2606 |
+
Copyright (c) 2019-present alipay.com
|
2607 |
+
|
2608 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2609 |
+
|
2610 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2611 |
+
|
2612 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2613 |
+
|
2614 |
+
-----
|
2615 |
+
|
2616 |
+
The following software may be included in this product: rc-motion, rc-picker, rc-resize-observer, rc-textarea. A copy of the source code may be downloaded from git@github.com:react-component/motion.git (rc-motion), git@github.com:react-component/picker.git (rc-picker), git@github.com:react-component/resize-observer.git (rc-resize-observer), git@github.com:react-component/textarea.git (rc-textarea). This software contains the following license and notice below:
|
2617 |
+
|
2618 |
+
The MIT License (MIT)
|
2619 |
+
|
2620 |
+
Copyright (c) 2019-present afc163
|
2621 |
+
|
2622 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2623 |
+
|
2624 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2625 |
+
|
2626 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2627 |
+
|
2628 |
+
-----
|
2629 |
+
|
2630 |
+
The following software may be included in this product: rc-table. A copy of the source code may be downloaded from git@github.com:react-component/table.git. This software contains the following license and notice below:
|
2631 |
+
|
2632 |
+
MIT LICENSE
|
2633 |
+
|
2634 |
+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
|
2635 |
+
|
2636 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2637 |
+
|
2638 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
2639 |
+
|
2640 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2641 |
+
|
2642 |
+
-----
|
2643 |
+
|
2644 |
+
The following software may be included in this product: rc-tooltip. A copy of the source code may be downloaded from git@github.com:react-component/tooltip.git. This software contains the following license and notice below:
|
2645 |
+
|
2646 |
+
The MIT License (MIT)
|
2647 |
+
|
2648 |
+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
|
2649 |
+
|
2650 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2651 |
+
of this software and associated documentation files (the "Software"), to deal
|
2652 |
+
in the Software without restriction, including without limitation the rights
|
2653 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2654 |
+
copies of the Software, and to permit persons to whom the Software is
|
2655 |
+
furnished to do so, subject to the following conditions:
|
2656 |
+
|
2657 |
+
The above copyright notice and this permission notice shall be included in
|
2658 |
+
all copies or substantial portions of the Software.
|
2659 |
+
|
2660 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
2661 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
2662 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
2663 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
2664 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
2665 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
2666 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2667 |
+
|
2668 |
+
-----
|
2669 |
+
|
2670 |
+
The following software may be included in this product: rc-upload. A copy of the source code may be downloaded from git@github.com:react-component/upload.git. This software contains the following license and notice below:
|
2671 |
+
|
2672 |
+
The MIT License (MIT)
|
2673 |
+
|
2674 |
+
Copyright (c) 2016-present react-component
|
2675 |
+
|
2676 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2677 |
+
of this software and associated documentation files (the "Software"), to deal
|
2678 |
+
in the Software without restriction, including without limitation the rights
|
2679 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2680 |
+
copies of the Software, and to permit persons to whom the Software is
|
2681 |
+
furnished to do so, subject to the following conditions:
|
2682 |
+
|
2683 |
+
The above copyright notice and this permission notice shall be included in
|
2684 |
+
all copies or substantial portions of the Software.
|
2685 |
+
|
2686 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
2687 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
2688 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
2689 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
2690 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
2691 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
2692 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2693 |
+
|
2694 |
+
-----
|
2695 |
+
|
2696 |
+
The following software may be included in this product: rc-util. A copy of the source code may be downloaded from git@github.com:react-component/util.git. This software contains the following license and notice below:
|
2697 |
+
|
2698 |
+
The MIT License (MIT)
|
2699 |
+
|
2700 |
+
Copyright (c) 2014-present yiminghe
|
2701 |
+
Copyright (c) 2015-present Alipay.com, https://www.alipay.com/
|
2702 |
+
|
2703 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2704 |
+
of this software and associated documentation files (the "Software"), to deal
|
2705 |
+
in the Software without restriction, including without limitation the rights
|
2706 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2707 |
+
copies of the Software, and to permit persons to whom the Software is
|
2708 |
+
furnished to do so, subject to the following conditions:
|
2709 |
+
|
2710 |
+
The above copyright notice and this permission notice shall be included in
|
2711 |
+
all copies or substantial portions of the Software.
|
2712 |
+
|
2713 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
2714 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
2715 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
2716 |
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
2717 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
2718 |
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
2719 |
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
2720 |
+
|
2721 |
+
-----
|
2722 |
+
|
2723 |
+
The following software may be included in this product: react, react-dom, react-is, react-test-renderer, scheduler. A copy of the source code may be downloaded from git+https://github.com/facebook/react.git (react), git+https://github.com/facebook/react.git (react-dom), https://github.com/facebook/react.git (react-is), git+https://github.com/facebook/react.git (react-test-renderer), https://github.com/facebook/react.git (scheduler). This software contains the following license and notice below:
|
2724 |
+
|
2725 |
+
MIT License
|
2726 |
+
|
2727 |
+
Copyright (c) Facebook, Inc. and its affiliates.
|
2728 |
+
|
2729 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2730 |
+
of this software and associated documentation files (the "Software"), to deal
|
2731 |
+
in the Software without restriction, including without limitation the rights
|
2732 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2733 |
+
copies of the Software, and to permit persons to whom the Software is
|
2734 |
+
furnished to do so, subject to the following conditions:
|
2735 |
+
|
2736 |
+
The above copyright notice and this permission notice shall be included in all
|
2737 |
+
copies or substantial portions of the Software.
|
2738 |
+
|
2739 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2740 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2741 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2742 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2743 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2744 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2745 |
+
SOFTWARE.
|
2746 |
+
|
2747 |
+
-----
|
2748 |
+
|
2749 |
+
The following software may be included in this product: react-lifecycles-compat. A copy of the source code may be downloaded from https://github.com/reactjs/react-lifecycles-compat.git. This software contains the following license and notice below:
|
2750 |
+
|
2751 |
+
MIT License
|
2752 |
+
|
2753 |
+
Copyright (c) 2013-present, Facebook, Inc.
|
2754 |
+
|
2755 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2756 |
+
of this software and associated documentation files (the "Software"), to deal
|
2757 |
+
in the Software without restriction, including without limitation the rights
|
2758 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2759 |
+
copies of the Software, and to permit persons to whom the Software is
|
2760 |
+
furnished to do so, subject to the following conditions:
|
2761 |
+
|
2762 |
+
The above copyright notice and this permission notice shall be included in all
|
2763 |
+
copies or substantial portions of the Software.
|
2764 |
+
|
2765 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2766 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2767 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2768 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2769 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2770 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2771 |
+
SOFTWARE.
|
2772 |
+
|
2773 |
+
-----
|
2774 |
+
|
2775 |
+
The following software may be included in this product: readable-stream. A copy of the source code may be downloaded from git://github.com/nodejs/readable-stream. This software contains the following license and notice below:
|
2776 |
+
|
2777 |
+
Node.js is licensed for use as follows:
|
2778 |
+
|
2779 |
+
"""
|
2780 |
+
Copyright Node.js contributors. All rights reserved.
|
2781 |
+
|
2782 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2783 |
+
of this software and associated documentation files (the "Software"), to
|
2784 |
+
deal in the Software without restriction, including without limitation the
|
2785 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
2786 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
2787 |
+
furnished to do so, subject to the following conditions:
|
2788 |
+
|
2789 |
+
The above copyright notice and this permission notice shall be included in
|
2790 |
+
all copies or substantial portions of the Software.
|
2791 |
+
|
2792 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2793 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2794 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2795 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2796 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2797 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2798 |
+
IN THE SOFTWARE.
|
2799 |
+
"""
|
2800 |
+
|
2801 |
+
This license applies to parts of Node.js originating from the
|
2802 |
+
https://github.com/joyent/node repository:
|
2803 |
+
|
2804 |
+
"""
|
2805 |
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
2806 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2807 |
+
of this software and associated documentation files (the "Software"), to
|
2808 |
+
deal in the Software without restriction, including without limitation the
|
2809 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
2810 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
2811 |
+
furnished to do so, subject to the following conditions:
|
2812 |
+
|
2813 |
+
The above copyright notice and this permission notice shall be included in
|
2814 |
+
all copies or substantial portions of the Software.
|
2815 |
+
|
2816 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2817 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2818 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2819 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2820 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2821 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2822 |
+
IN THE SOFTWARE.
|
2823 |
+
"""
|
2824 |
+
|
2825 |
+
-----
|
2826 |
+
|
2827 |
+
The following software may be included in this product: readable-stream. A copy of the source code may be downloaded from git://github.com/isaacs/readable-stream. This software contains the following license and notice below:
|
2828 |
+
|
2829 |
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
2830 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2831 |
+
of this software and associated documentation files (the "Software"), to
|
2832 |
+
deal in the Software without restriction, including without limitation the
|
2833 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
2834 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
2835 |
+
furnished to do so, subject to the following conditions:
|
2836 |
+
|
2837 |
+
The above copyright notice and this permission notice shall be included in
|
2838 |
+
all copies or substantial portions of the Software.
|
2839 |
+
|
2840 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2841 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2842 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2843 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2844 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
2845 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
2846 |
+
IN THE SOFTWARE.
|
2847 |
+
|
2848 |
+
-----
|
2849 |
+
|
2850 |
+
The following software may be included in this product: resize-observer-polyfill. A copy of the source code may be downloaded from https://github.com/que-etc/resize-observer-polyfill.git. This software contains the following license and notice below:
|
2851 |
+
|
2852 |
+
The MIT License (MIT)
|
2853 |
+
|
2854 |
+
Copyright (c) 2016 Denis Rul
|
2855 |
+
|
2856 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2857 |
+
of this software and associated documentation files (the "Software"), to deal
|
2858 |
+
in the Software without restriction, including without limitation the rights
|
2859 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2860 |
+
copies of the Software, and to permit persons to whom the Software is
|
2861 |
+
furnished to do so, subject to the following conditions:
|
2862 |
+
|
2863 |
+
The above copyright notice and this permission notice shall be included in all
|
2864 |
+
copies or substantial portions of the Software.
|
2865 |
+
|
2866 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2867 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2868 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2869 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2870 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2871 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2872 |
+
SOFTWARE.
|
2873 |
+
|
2874 |
+
-----
|
2875 |
+
|
2876 |
+
The following software may be included in this product: resolve-pathname, value-equal. A copy of the source code may be downloaded from https://github.com/mjackson/resolve-pathname.git (resolve-pathname), https://github.com/mjackson/value-equal.git (value-equal). This software contains the following license and notice below:
|
2877 |
+
|
2878 |
+
MIT License
|
2879 |
+
|
2880 |
+
Copyright (c) Michael Jackson 2016-2018
|
2881 |
+
|
2882 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2883 |
+
of this software and associated documentation files (the "Software"), to deal
|
2884 |
+
in the Software without restriction, including without limitation the rights
|
2885 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2886 |
+
copies of the Software, and to permit persons to whom the Software is
|
2887 |
+
furnished to do so, subject to the following conditions:
|
2888 |
+
|
2889 |
+
The above copyright notice and this permission notice shall be included in all
|
2890 |
+
copies or substantial portions of the Software.
|
2891 |
+
|
2892 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2893 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2894 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2895 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2896 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2897 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2898 |
+
SOFTWARE.
|
2899 |
+
|
2900 |
+
-----
|
2901 |
+
|
2902 |
+
The following software may be included in this product: rst-selector-parser. A copy of the source code may be downloaded from https://github.com/aweary/rst-selector-parser. This software contains the following license and notice below:
|
2903 |
+
|
2904 |
+
Copyright (c) 2017, Gajus Kuizinas (http://gajus.com/)
|
2905 |
+
All rights reserved.
|
2906 |
+
|
2907 |
+
Redistribution and use in source and binary forms, with or without
|
2908 |
+
modification, are permitted provided that the following conditions are met:
|
2909 |
+
* Redistributions of source code must retain the above copyright
|
2910 |
+
notice, this list of conditions and the following disclaimer.
|
2911 |
+
* Redistributions in binary form must reproduce the above copyright
|
2912 |
+
notice, this list of conditions and the following disclaimer in the
|
2913 |
+
documentation and/or other materials provided with the distribution.
|
2914 |
+
* Neither the name of the Gajus Kuizinas (http://gajus.com/) nor the
|
2915 |
+
names of its contributors may be used to endorse or promote products
|
2916 |
+
derived from this software without specific prior written permission.
|
2917 |
+
|
2918 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
2919 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
2920 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
2921 |
+
DISCLAIMED. IN NO EVENT SHALL ANUARY BE LIABLE FOR ANY
|
2922 |
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
2923 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
2924 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
2925 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
2926 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
2927 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2928 |
+
|
2929 |
+
-----
|
2930 |
+
|
2931 |
+
The following software may be included in this product: safer-buffer. A copy of the source code may be downloaded from git+https://github.com/ChALkeR/safer-buffer.git. This software contains the following license and notice below:
|
2932 |
+
|
2933 |
+
MIT License
|
2934 |
+
|
2935 |
+
Copyright (c) 2018 Nikita Skovoroda <chalkerx@gmail.com>
|
2936 |
+
|
2937 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2938 |
+
of this software and associated documentation files (the "Software"), to deal
|
2939 |
+
in the Software without restriction, including without limitation the rights
|
2940 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2941 |
+
copies of the Software, and to permit persons to whom the Software is
|
2942 |
+
furnished to do so, subject to the following conditions:
|
2943 |
+
|
2944 |
+
The above copyright notice and this permission notice shall be included in all
|
2945 |
+
copies or substantial portions of the Software.
|
2946 |
+
|
2947 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2948 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2949 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2950 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2951 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2952 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2953 |
+
SOFTWARE.
|
2954 |
+
|
2955 |
+
-----
|
2956 |
+
|
2957 |
+
The following software may be included in this product: scroll-into-view-if-needed. A copy of the source code may be downloaded from git+https://github.com/stipsan/scroll-into-view-if-needed.git. This software contains the following license and notice below:
|
2958 |
+
|
2959 |
+
MIT License
|
2960 |
+
|
2961 |
+
Copyright (c) 2017 Stian Didriksen
|
2962 |
+
|
2963 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
2964 |
+
of this software and associated documentation files (the "Software"), to deal
|
2965 |
+
in the Software without restriction, including without limitation the rights
|
2966 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2967 |
+
copies of the Software, and to permit persons to whom the Software is
|
2968 |
+
furnished to do so, subject to the following conditions:
|
2969 |
+
|
2970 |
+
The above copyright notice and this permission notice shall be included in all
|
2971 |
+
copies or substantial portions of the Software.
|
2972 |
+
|
2973 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2974 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2975 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2976 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2977 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2978 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2979 |
+
SOFTWARE.
|
2980 |
+
|
2981 |
+
-----
|
2982 |
+
|
2983 |
+
The following software may be included in this product: setimmediate. A copy of the source code may be downloaded from https://github.com/YuzuJS/setImmediate.git. This software contains the following license and notice below:
|
2984 |
+
|
2985 |
+
Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola
|
2986 |
+
|
2987 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
2988 |
+
a copy of this software and associated documentation files (the
|
2989 |
+
"Software"), to deal in the Software without restriction, including
|
2990 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
2991 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
2992 |
+
permit persons to whom the Software is furnished to do so, subject to
|
2993 |
+
the following conditions:
|
2994 |
+
|
2995 |
+
The above copyright notice and this permission notice shall be
|
2996 |
+
included in all copies or substantial portions of the Software.
|
2997 |
+
|
2998 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
2999 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3000 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
3001 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
3002 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
3003 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
3004 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3005 |
+
|
3006 |
+
-----
|
3007 |
+
|
3008 |
+
The following software may be included in this product: shallowequal. A copy of the source code may be downloaded from https://github.com/dashed/shallowequal.git. This software contains the following license and notice below:
|
3009 |
+
|
3010 |
+
MIT License
|
3011 |
+
|
3012 |
+
Copyright (c) 2017 Alberto Leal <mailforalberto@gmail.com> (github.com/dashed)
|
3013 |
+
|
3014 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3015 |
+
of this software and associated documentation files (the "Software"), to deal
|
3016 |
+
in the Software without restriction, including without limitation the rights
|
3017 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
3018 |
+
copies of the Software, and to permit persons to whom the Software is
|
3019 |
+
furnished to do so, subject to the following conditions:
|
3020 |
+
|
3021 |
+
The above copyright notice and this permission notice shall be included in all
|
3022 |
+
copies or substantial portions of the Software.
|
3023 |
+
|
3024 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3025 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3026 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3027 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3028 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
3029 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3030 |
+
SOFTWARE.
|
3031 |
+
|
3032 |
+
-----
|
3033 |
+
|
3034 |
+
The following software may be included in this product: specificity. A copy of the source code may be downloaded from https://github.com/keeganstreet/specificity.git. This software contains the following license and notice below:
|
3035 |
+
|
3036 |
+
The MIT License (MIT)
|
3037 |
+
Copyright (c) 2016 Keegan Street and others
|
3038 |
+
|
3039 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
3040 |
+
|
3041 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
3042 |
+
|
3043 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3044 |
+
|
3045 |
+
-----
|
3046 |
+
|
3047 |
+
The following software may be included in this product: sprintf-js. A copy of the source code may be downloaded from https://github.com/alexei/sprintf.js.git. This software contains the following license and notice below:
|
3048 |
+
|
3049 |
+
Copyright (c) 2007-2014, Alexandru Marasteanu <hello [at) alexei (dot] ro>
|
3050 |
+
All rights reserved.
|
3051 |
+
|
3052 |
+
Redistribution and use in source and binary forms, with or without
|
3053 |
+
modification, are permitted provided that the following conditions are met:
|
3054 |
+
* Redistributions of source code must retain the above copyright
|
3055 |
+
notice, this list of conditions and the following disclaimer.
|
3056 |
+
* Redistributions in binary form must reproduce the above copyright
|
3057 |
+
notice, this list of conditions and the following disclaimer in the
|
3058 |
+
documentation and/or other materials provided with the distribution.
|
3059 |
+
* Neither the name of this software nor the names of its contributors may be
|
3060 |
+
used to endorse or promote products derived from this software without
|
3061 |
+
specific prior written permission.
|
3062 |
+
|
3063 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
3064 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
3065 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
3066 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
3067 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
3068 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
3069 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
3070 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
3071 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
3072 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
3073 |
+
|
3074 |
+
-----
|
3075 |
+
|
3076 |
+
The following software may be included in this product: sprintf-js. A copy of the source code may be downloaded from https://github.com/alexei/sprintf.js.git. This software contains the following license and notice below:
|
3077 |
+
|
3078 |
+
Copyright (c) 2007-present, Alexandru Mărășteanu <hello@alexei.ro>
|
3079 |
+
All rights reserved.
|
3080 |
+
|
3081 |
+
Redistribution and use in source and binary forms, with or without
|
3082 |
+
modification, are permitted provided that the following conditions are met:
|
3083 |
+
* Redistributions of source code must retain the above copyright
|
3084 |
+
notice, this list of conditions and the following disclaimer.
|
3085 |
+
* Redistributions in binary form must reproduce the above copyright
|
3086 |
+
notice, this list of conditions and the following disclaimer in the
|
3087 |
+
documentation and/or other materials provided with the distribution.
|
3088 |
+
* Neither the name of this software nor the names of its contributors may be
|
3089 |
+
used to endorse or promote products derived from this software without
|
3090 |
+
specific prior written permission.
|
3091 |
+
|
3092 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
3093 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
3094 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
3095 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
|
3096 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
3097 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
3098 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
3099 |
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
3100 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
3101 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
3102 |
+
|
3103 |
+
-----
|
3104 |
+
|
3105 |
+
The following software may be included in this product: string_decoder. A copy of the source code may be downloaded from git://github.com/nodejs/string_decoder.git. This software contains the following license and notice below:
|
3106 |
+
|
3107 |
+
Node.js is licensed for use as follows:
|
3108 |
+
|
3109 |
+
"""
|
3110 |
+
Copyright Node.js contributors. All rights reserved.
|
3111 |
+
|
3112 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3113 |
+
of this software and associated documentation files (the "Software"), to
|
3114 |
+
deal in the Software without restriction, including without limitation the
|
3115 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
3116 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
3117 |
+
furnished to do so, subject to the following conditions:
|
3118 |
+
|
3119 |
+
The above copyright notice and this permission notice shall be included in
|
3120 |
+
all copies or substantial portions of the Software.
|
3121 |
+
|
3122 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3123 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3124 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3125 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3126 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
3127 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
3128 |
+
IN THE SOFTWARE.
|
3129 |
+
"""
|
3130 |
+
|
3131 |
+
This license applies to parts of Node.js originating from the
|
3132 |
+
https://github.com/joyent/node repository:
|
3133 |
+
|
3134 |
+
"""
|
3135 |
+
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
|
3136 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3137 |
+
of this software and associated documentation files (the "Software"), to
|
3138 |
+
deal in the Software without restriction, including without limitation the
|
3139 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
3140 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
3141 |
+
furnished to do so, subject to the following conditions:
|
3142 |
+
|
3143 |
+
The above copyright notice and this permission notice shall be included in
|
3144 |
+
all copies or substantial portions of the Software.
|
3145 |
+
|
3146 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3147 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3148 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3149 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3150 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
3151 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
3152 |
+
IN THE SOFTWARE.
|
3153 |
+
"""
|
3154 |
+
|
3155 |
+
-----
|
3156 |
+
|
3157 |
+
The following software may be included in this product: string_decoder. A copy of the source code may be downloaded from git://github.com/rvagg/string_decoder.git. This software contains the following license and notice below:
|
3158 |
+
|
3159 |
+
Copyright Joyent, Inc. and other Node contributors.
|
3160 |
+
|
3161 |
+
Permission is hereby granted, free of charge, to any person obtaining a
|
3162 |
+
copy of this software and associated documentation files (the
|
3163 |
+
"Software"), to deal in the Software without restriction, including
|
3164 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
3165 |
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
3166 |
+
persons to whom the Software is furnished to do so, subject to the
|
3167 |
+
following conditions:
|
3168 |
+
|
3169 |
+
The above copyright notice and this permission notice shall be included
|
3170 |
+
in all copies or substantial portions of the Software.
|
3171 |
+
|
3172 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
3173 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3174 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
3175 |
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
3176 |
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
3177 |
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
3178 |
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
3179 |
+
|
3180 |
+
-----
|
3181 |
+
|
3182 |
+
The following software may be included in this product: string-convert. A copy of the source code may be downloaded from https://github.com/akiran/string-convert. This software contains the following license and notice below:
|
3183 |
+
|
3184 |
+
The MIT License (MIT)
|
3185 |
+
|
3186 |
+
Copyright (c) 2014 Kiran Abburi
|
3187 |
+
|
3188 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3189 |
+
of this software and associated documentation files (the "Software"), to deal
|
3190 |
+
in the Software without restriction, including without limitation the rights
|
3191 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
3192 |
+
copies of the Software, and to permit persons to whom the Software is
|
3193 |
+
furnished to do so, subject to the following conditions:
|
3194 |
+
|
3195 |
+
The above copyright notice and this permission notice shall be included in all
|
3196 |
+
copies or substantial portions of the Software.
|
3197 |
+
|
3198 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3199 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3200 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3201 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3202 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
3203 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3204 |
+
SOFTWARE.
|
3205 |
+
|
3206 |
+
-----
|
3207 |
+
|
3208 |
+
The following software may be included in this product: tslib. A copy of the source code may be downloaded from https://github.com/Microsoft/tslib.git. This software contains the following license and notice below:
|
3209 |
+
|
3210 |
+
Copyright (c) Microsoft Corporation.
|
3211 |
+
|
3212 |
+
Permission to use, copy, modify, and/or distribute this software for any
|
3213 |
+
purpose with or without fee is hereby granted.
|
3214 |
+
|
3215 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
3216 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
3217 |
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
3218 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
3219 |
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
3220 |
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
3221 |
+
PERFORMANCE OF THIS SOFTWARE.
|
3222 |
+
|
3223 |
+
-----
|
3224 |
+
|
3225 |
+
The following software may be included in this product: ua-parser-js. A copy of the source code may be downloaded from https://github.com/faisalman/ua-parser-js.git. This software contains the following license and notice below:
|
3226 |
+
|
3227 |
+
MIT License
|
3228 |
+
|
3229 |
+
Copyright (c) 2012-2021 Faisal Salman <<f@faisalman.com>>
|
3230 |
+
|
3231 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
3232 |
+
of this software and associated documentation files (the "Software"), to deal
|
3233 |
+
in the Software without restriction, including without limitation the rights
|
3234 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
3235 |
+
copies of the Software, and to permit persons to whom the Software is
|
3236 |
+
furnished to do so, subject to the following conditions:
|
3237 |
+
|
3238 |
+
The above copyright notice and this permission notice shall be included in all
|
3239 |
+
copies or substantial portions of the Software.
|
3240 |
+
|
3241 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3242 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3243 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3244 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3245 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
3246 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3247 |
+
SOFTWARE.
|
3248 |
+
|
3249 |
+
-----
|
3250 |
+
|
3251 |
+
The following software may be included in this product: util-deprecate. A copy of the source code may be downloaded from git://github.com/TooTallNate/util-deprecate.git. This software contains the following license and notice below:
|
3252 |
+
|
3253 |
+
(The MIT License)
|
3254 |
+
|
3255 |
+
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>
|
3256 |
+
|
3257 |
+
Permission is hereby granted, free of charge, to any person
|
3258 |
+
obtaining a copy of this software and associated documentation
|
3259 |
+
files (the "Software"), to deal in the Software without
|
3260 |
+
restriction, including without limitation the rights to use,
|
3261 |
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
3262 |
+
copies of the Software, and to permit persons to whom the
|
3263 |
+
Software is furnished to do so, subject to the following
|
3264 |
+
conditions:
|
3265 |
+
|
3266 |
+
The above copyright notice and this permission notice shall be
|
3267 |
+
included in all copies or substantial portions of the Software.
|
3268 |
+
|
3269 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
3270 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
3271 |
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
3272 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
3273 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
3274 |
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
3275 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
3276 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
3277 |
+
|
3278 |
+
-----
|
3279 |
+
|
3280 |
+
The following software may be included in this product: warning. A copy of the source code may be downloaded from https://github.com/r3dm/warning.git. This software contains the following license and notice below:
|
3281 |
+
|
3282 |
+
BSD License
|
3283 |
+
|
3284 |
+
For React software
|
3285 |
+
|
3286 |
+
Copyright (c) 2013-2015, Facebook, Inc.
|
3287 |
+
All rights reserved.
|
3288 |
+
|
3289 |
+
Redistribution and use in source and binary forms, with or without modification,
|
3290 |
+
are permitted provided that the following conditions are met:
|
3291 |
+
|
3292 |
+
* Redistributions of source code must retain the above copyright notice, this
|
3293 |
+
list of conditions and the following disclaimer.
|
3294 |
+
|
3295 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
3296 |
+
this list of conditions and the following disclaimer in the documentation
|
3297 |
+
and/or other materials provided with the distribution.
|
3298 |
+
|
3299 |
+
* Neither the name Facebook nor the names of its contributors may be used to
|
3300 |
+
endorse or promote products derived from this software without specific
|
3301 |
+
prior written permission.
|
3302 |
+
|
3303 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
3304 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
3305 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
3306 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
3307 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
3308 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
3309 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
3310 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
3311 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
3312 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
3313 |
+
|
3314 |
+
-----
|
3315 |
+
|
3316 |
+
The following software may be included in this product: whatwg-fetch. A copy of the source code may be downloaded from https://github.com/github/fetch.git. This software contains the following license and notice below:
|
3317 |
+
|
3318 |
+
Copyright (c) 2014-2016 GitHub, Inc.
|
3319 |
+
|
3320 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
3321 |
+
a copy of this software and associated documentation files (the
|
3322 |
+
"Software"), to deal in the Software without restriction, including
|
3323 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
3324 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
3325 |
+
permit persons to whom the Software is furnished to do so, subject to
|
3326 |
+
the following conditions:
|
3327 |
+
|
3328 |
+
The above copyright notice and this permission notice shall be
|
3329 |
+
included in all copies or substantial portions of the Software.
|
3330 |
+
|
3331 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
3332 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
3333 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
3334 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
3335 |
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
3336 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
3337 |
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
LICENSE_3RD_PARTY_PHP.md
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Project Licenses
|
2 |
+
This file was generated by the [PHP Legal Licenses](https://github.com/Comcast/php-legal-licenses) utility. It contains the name, version and commit sha, description, homepage, and license information for every dependency in this project.
|
3 |
+
|
4 |
+
## Dependencies
|
5 |
+
|
6 |
+
### devowl-wp/cache-invalidate (Version dev-develop | no sha)
|
7 |
+
Provide a single entry point to trigger cache invalidation of known caching plugins
|
8 |
+
Homepage: Not configured.
|
9 |
+
Licenses Used: GPL-3.0-or-later
|
10 |
+
Provide a single entry point to trigger cache invalidation of known caching plugins
|
11 |
+
Copyright (C) 2020 DevOwl
|
12 |
+
|
13 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
14 |
+
|
15 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
16 |
+
|
17 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
18 |
+
|
19 |
+
### devowl-wp/customize (Version dev-plugin/rcb | no sha)
|
20 |
+
Abstract utility for live preview (customize)
|
21 |
+
Homepage: Not configured.
|
22 |
+
Licenses Used: GPL-3.0-or-later
|
23 |
+
Abstract utility for live preview (customize)
|
24 |
+
Copyright (C) 2020 Matthias Günter
|
25 |
+
|
26 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
27 |
+
|
28 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
29 |
+
|
30 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
31 |
+
|
32 |
+
### devowl-wp/deliver-anonymous-asset (Version dev-chore/review-rtg | no sha)
|
33 |
+
Provide a functionality to deliver assets anonymous
|
34 |
+
Homepage: Not configured.
|
35 |
+
Licenses Used: GPL-3.0-or-later
|
36 |
+
Provide a single entry point to trigger cache invalidation of known caching plugins
|
37 |
+
Copyright (C) 2020 DevOwl
|
38 |
+
|
39 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
40 |
+
|
41 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
42 |
+
|
43 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
44 |
+
|
45 |
+
### devowl-wp/freemium (Version dev-plugin/rcb | no sha)
|
46 |
+
Make your plugin to a freemium plugin with predefined Envato support
|
47 |
+
Homepage: Not configured.
|
48 |
+
Licenses Used: GPL-3.0-or-later
|
49 |
+
Make your plugin to a freemium plugin with predefined Envato support
|
50 |
+
Copyright (C) 2020 devowl
|
51 |
+
|
52 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
53 |
+
|
54 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
55 |
+
|
56 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
57 |
+
|
58 |
+
### devowl-wp/multilingual (Version dev-feat/4wqqym/rcb/wpml | no sha)
|
59 |
+
Provide helper functionality for multilingual plugins like WPML and PolyLang
|
60 |
+
Homepage: Not configured.
|
61 |
+
Licenses Used: GPL-3.0-or-later
|
62 |
+
Provide helper functionality for multilingual plugins like WPML and PolyLang
|
63 |
+
Copyright (C) 2020 DevOwl
|
64 |
+
|
65 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
66 |
+
|
67 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
68 |
+
|
69 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
70 |
+
|
71 |
+
### devowl-wp/real-product-manager-wp-client (Version dev-develop | no sha)
|
72 |
+
A WordPress client for Real Product Manager
|
73 |
+
Homepage: Not configured.
|
74 |
+
Licenses Used: GPL-3.0-or-later
|
75 |
+
A WordPress client for Real Product Manager
|
76 |
+
Copyright (C) 2020 DevOwl
|
77 |
+
|
78 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
79 |
+
|
80 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
81 |
+
|
82 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
83 |
+
|
84 |
+
### devowl-wp/real-utils (Version dev-plugin/rcb | no sha)
|
85 |
+
Create cross-selling ads, about page, rating and newsletter input for WP Real plugins.
|
86 |
+
Homepage: Not configured.
|
87 |
+
Licenses Used: GPL-3.0-or-later
|
88 |
+
Create cross-selling ads, about page, rating and newsletter input for WP Real plugins.
|
89 |
+
Copyright (C) 2020 devowl.io GmbH
|
90 |
+
|
91 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
92 |
+
|
93 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
94 |
+
|
95 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
96 |
+
|
97 |
+
### devowl-wp/utils (Version dev-feat/multipackage | no sha)
|
98 |
+
Utility functionality for all your WordPress plugins
|
99 |
+
Homepage: Not configured.
|
100 |
+
Licenses Used: MIT
|
101 |
+
Organize your wordpress media library in a nice way with folders.
|
102 |
+
Copyright (C) 2020 devowl.io GmbH
|
103 |
+
|
104 |
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
|
105 |
+
|
106 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
107 |
+
|
108 |
+
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
|
109 |
+
|
110 |
+
### sabberworm/php-css-parser (Version 8.3.1 | d217848)
|
111 |
+
Parser for CSS Files written in PHP
|
112 |
+
Homepage: http://www.sabberworm.com/blog/2010/6/10/php-css-parser
|
113 |
+
Licenses Used: MIT
|
114 |
+
Full license text not found in dependency source.
|
115 |
+
|
README.txt
ADDED
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== WordPress Real Cookie Banner: GDPR (DSGVO) & ePrivacy Cookie Consent ===
|
2 |
+
Contributors: devowl, mguenter, jankarres
|
3 |
+
Tags: cookie banner, cookie consent, cookie plugin, cookie scanner, gdpr, dsgvo, eprivacy, eu cookie law, cookie policy, cookie, consent, consent management
|
4 |
+
Stable tag: trunk
|
5 |
+
Requires at least: 5.2
|
6 |
+
Requires PHP: 7.2.0
|
7 |
+
Tested up to: 5.8
|
8 |
+
License: GPLv3 or later
|
9 |
+
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
|
10 |
+
|
11 |
+
Obtain GDPR (DSGVO) and ePrivacy Directive compliant consents. Find services, cookies etc. and fill all legal information in your cookie banner. More than just a cookie notice!
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
**Cookie Banner and Consent Management for your WordPress website – easy to be legally compliant**
|
16 |
+
|
17 |
+
Obtain GDPR and ePrivacy Directive compliant consents. **Find services, cookies etc. and fill all legal information in your cookie banner.** More than just a cookie notice! Cookie plugin designed specifically for WordPress websites to simplify setup.
|
18 |
+
|
19 |
+
Real Cookie Banner is an cookie and consent management plugin. **Obtain consent to load services and set cookies for your visitors in accordance with the GDPR and ePrivacy Directive.** In addition, content blockers help you to be compliant even if your theme, plugin or content loads styles, scripts or iframes that would transfer personal data. **Start now with our guided-configuration and avoid legal risks!**
|
20 |
+
|
21 |
+
_Whether the use of the plugin leads to legally compliant data processing largely depends on whether the plugin is configured correctly for your use case. You yourself are responsible for a correct configuration._
|
22 |
+
|
23 |
+
=== Free Sandbox ===
|
24 |
+
|
25 |
+
You want to try Real Cookie Banner before installing? **Take a free sandbox** and play around!
|
26 |
+
|
27 |
+
[Create sandbox](https://try.devowl.io/?product=RCB)
|
28 |
+
|
29 |
+
=== Features of the cookie plugin ===
|
30 |
+
|
31 |
+
**Consent Management:** You can use Real Cookie Banner to store all technical and legal information about services and cookies to obtain informed consent. You can use 100+ service templates and 60+ content blocker templates to quickly and securely provide all the information you need.
|
32 |
+
|
33 |
+
**Content Blocker:** Themes, plugins and co. usually load scripts, styles and content that transfer personal data and set cookies before you have the consent of your visitors. You usually cannot control this by yourself. Content blockers make sure that these features are only executed after you have obtained consent.
|
34 |
+
|
35 |
+
**Customize design:** You can design the cookie banner according to your wishes. 20+ design templates and 200+ options give you the flexibility to customize the cookie banner perfectly to your needs. From colors and effects to texts, you can unleash your creativity! All changes are displayed in a live preview.
|
36 |
+
|
37 |
+
**Guided configuration:** After installation, the checklist will guide you through all steps to be able to set up Real Cookie Banner in a legally compliant manner. We also explain the legal basis of features and the legal consequences if you change settings. So, you can quickly and safely set up your cookie banner!
|
38 |
+
|
39 |
+
**Documentation of consents:** According to the GDPR, you have to prove that a visitor has consented to cookies and processing of personal data if he or she doubts this. We document consent completely and make it possible to trace the origin of the consent afterwards. You are on the safe side even in the worst case!
|
40 |
+
|
41 |
+
**Native in WordPress:** Real Cookie Banner is a cookie plugin specially designed for WordPress. It is fully installed in your WordPress as a native plugin. All consents are processed and stored on your server. Nothing is downloaded from a cloud in your visitor's browser, which avoids further legal issues.
|
42 |
+
|
43 |
+
You want a list of all features? _Get it by scrolling down!_
|
44 |
+
|
45 |
+
=== Supported Languages ===
|
46 |
+
|
47 |
+
**Real Cookie Banner is available in English and German.** More languages will be added soon! In the meantime, you can also customize and translate all the texts yourself.
|
48 |
+
|
49 |
+
=== All Features of Real Cookie Banner ===
|
50 |
+
|
51 |
+
_Some of the features listed below are only available in the [PRO version of Real Cookie Banner](https://devowl.io/go/real-cookie-banner?source=wordpress-org-description). They are marked with an asterisk._
|
52 |
+
|
53 |
+
**Beginner-friendly** _// solution for the cookie hassle – for everyone_
|
54 |
+
|
55 |
+
* **Guided configuration:** After installation, we will guide you through the setup step by step. With easy to understand explanations.
|
56 |
+
* **Checklist for potential legally compliant setup:** A checklist shows you all the steps to be able to set up your cookie banner in a legally compliant way.
|
57 |
+
* **Scan your website:** Automatically search your entire website. Find used services with templates and embedded external URLs effortlessly.
|
58 |
+
* **Free version available:** Start at no cost and pay only when you really need additional features.
|
59 |
+
* **Support (Live Chat and Email):** You have questions? We are here for you. Promised! (limited for users of the free version)
|
60 |
+
* **Fully translated:** WordPress plugin and all templates are translated in English and German.
|
61 |
+
|
62 |
+
**Consent Management** _// we take care of compliant consents_
|
63 |
+
|
64 |
+
* **Cookies and processing of personal data:** We obtain consents for you in accordance with the ePrivacy Directive and GDPR. For more than just cookies!
|
65 |
+
* **100+ service and 60+ content blocker templates*:** We’ve already collected all the necessary technical and legal stuff for 100+ popular services, so you can avoid the hassle.
|
66 |
+
* **Individual groups for services:** Make it easy for your visitors to opt-in by grouping services together. Automatically suggested groups for services with templates.
|
67 |
+
* **Technical specifications of HTTP cookies and cookie-like information:** You can store all necessary information about HTTP cookies, Local Storage, Session Storage, Flash Local Shared Object and IndexedDB.
|
68 |
+
* **Execution of opt-in and opt-out scripts:** After the consent or its revocation can be executed per service HTML/JavaScript code.
|
69 |
+
* **Shortcodes for all settings:** View history of consent and change or revoke consent. You can (and must legally) offer this with simple shortcodes anywhere on your website.
|
70 |
+
* **Youth protection according to GDPR:** We take care that also minors can give consents on your website according to Art. 8 GDPR. Without data protection violation!
|
71 |
+
* **Consent for data processing in the USA*:** The USA is considered as a country with an insufficient level of data protection in the EU. We obtain consents so that you can still use US-services like Google Analytics.
|
72 |
+
* **Hide cookie banner legally compliant:** Imprint and privacy policy must be accessible without cookie banner. On other pages, e.g. landing pages, conversation rates increase*. Works with us quite simply!
|
73 |
+
* **Automatically obtain of new consents:** You change something on the cookie banner? We will notify you automatically when you need to get a new consent!
|
74 |
+
* **Accepting all cookies for bots:** For more visibility in search engines, bots can automatically consent and see the full content of your website.
|
75 |
+
* **Use of “Do Not Track” header:** Don’t annoy your visitors who are already signaling that they don’t want to consent. You can respect the “Do Not Track” HTTP-header.
|
76 |
+
|
77 |
+
**Documentation** _// truly fully documented consents_
|
78 |
+
|
79 |
+
* **Documentation of consents with revision:** All services, its consents, service groups, settings and design customizations are saved. Fulfill the duty of proof according to GDPR!
|
80 |
+
* **Creation of consents afterwards traceable*:** View retrospectively how consent was obtained through an interactive visualization of the cookie banner or content blocker.
|
81 |
+
* **Statistics about consents*:** Necessarily documented information about the consents are aggregated for statistics. This allows you for example to extrapolate your data in Google Analytics.
|
82 |
+
|
83 |
+
**Content Blocker** _// load services only with consent_
|
84 |
+
|
85 |
+
* **Block already integrated link, script and iframe HTML tags:** Already included elements by your theme or plugins can be blocked based on the HTML tag. Works for every HTML element on initial load of your website!
|
86 |
+
* **URL blocking:** Elements that may only be loaded after consent can be blocked based on the URL. Works also for inline scripts and retina images.
|
87 |
+
* **Custom element blocking:** You can block elements based on custom defined rule e.g. via their CSS class. With an easy to understand and flexible syntax. Not only for software developers.
|
88 |
+
* **Inline style splitting:** Some page builders download files in inline styles for which you need consent. We split styles so that your website loads correctly while listening for consents.
|
89 |
+
* **Automatic video playback after consent:** If your visitor allows the loading of an external video only via a content blocker, he must start the video manually afterwards. We save him the click and start YouTube, Vimeo and more videos automatically.
|
90 |
+
* **Content Blocker connected with services:** Each content blocker is associated with one or more services. With it, content is automatically unblocked when consent is given in the cookie banner.
|
91 |
+
|
92 |
+
**Design** _// always fits perfectly into your website_
|
93 |
+
|
94 |
+
* **Cookie banner and content blocker layout:** You can customize the design of your cookie banner with more than 200 options*. So, it will fit perfectly with your corporate design!
|
95 |
+
* **Live preview of design and text changes:** All visual changes to your cookie banner will be displayed live on your website in the WordPress Customizer. Without annoying reloading!
|
96 |
+
* **20+ cookie banner design presets*:** Don’t waste your time tinkering with the design forever. Just use one of our templates. There is something for every taste!
|
97 |
+
|
98 |
+
**TCF Compatibility** _// obtain standardized consents_
|
99 |
+
|
100 |
+
* **TCF 2.0+ compatibility*:** [Transparency and Consent Framework (TCF)](https://iabeurope.eu/transparency-consent-framework/) is a standard of the European digital marketing industry association IAB Europe. It allows standardized consent to be obtained. We support the widely used standard TCF 2.0 and newer.
|
101 |
+
* **Configuration with user interface*:** TCF is mostly very technical and can be set up only with code. Not with us! You can configure all important features, vendors etc. in one interface with understandable explanations of the terms used in the standard.
|
102 |
+
* **Certified CMP:** Real Cookie Banner is a CMP certified by IAB Europe. You can be sure that we have fully and correctly implemented all the requirements of the standard. We also proactively inform you about violations due to incorrect configuration of your cookie banner.
|
103 |
+
|
104 |
+
**Special Features** _// made for professional users_
|
105 |
+
|
106 |
+
* **Geo-restriction*:** Cookie banners are not necessary for users from all countries. Internationally oriented websites can decide per country whether a cookie banner should be displayed. This way you avoid unnecessary distraction from your content!
|
107 |
+
* **Support for Google Tag Manager and Matomo Tag Manager*:** Load your tag manager in a privacy-friendly way only after consent. Then process consents directly in your tag manager as events (with fallback for visitors without consent for the tag manager).
|
108 |
+
* **Consent Forwarding*:** Forward a visitor’s consents and avoid multiple consents from a visitor on multiple websites of your company (with WordPress Multisites or multiple WordPress installations; forwarding as one-way sync or two-way sync of consents).
|
109 |
+
|
110 |
+
**Technical** _// perfection in detail – for WordPress_
|
111 |
+
|
112 |
+
* **Support for multilingual websites:** Your cookie banner also works in multilingual websites with [WPML](https://wpml.org/), [Polylang](https://polylang.pro/), [TranslatePress](https://translatepress.com/) and [Weglot](https://weglot.com/). We have built explicit integrations for these plugins.
|
113 |
+
* **Native solution in WordPress:** Real Cookie Banner is installed in your WordPress. Consents are processed and stored exclusively on your server. Nothing is downloaded from the cloud in the browser of your visitors!
|
114 |
+
* **PageSpeed Insights optimized:** Loading time of your website matters. Real Cookie Banner is optimized for PageSpeed Insights, Lighthouse and Web Vitals. You can achieve a PageSpeed Score of 100 with an active cookie banner.
|
115 |
+
* **Automatic deletion of 1st-party cookies:** In the event of an opt-out, 1st-party cookies can be automatically deleted on the client- and server-side to ensure due diligence.
|
116 |
+
* **Support for automatic flushing of all known page caches:** After a change to the cookie banner or content blocker, we automatically clear your page cache plugin. No more problems with outdated caches!
|
117 |
+
* **Anti-Ad-Blocker system:** Cookie banners are annoying and many people block them. We have implemented special mechanisms that make your cookie banner almost impossible to block. Because you should get your consents!
|
118 |
+
* **Import and export:** All settings and consents can be exported at any time. Use already defined settings in new websites and save time if you are an agency building many websites!
|
119 |
+
* **Support for WordPress Multisites:** You use a WordPress Mulisite? No problem! Real Cookie Banner also works with such a setup.
|
120 |
+
* **API for developers:** You want to extend Real Cookie Banner? We have documented WordPress actions & filters and our REST API for you.
|
121 |
+
|
122 |
+
=== Templates & Compatibility ===
|
123 |
+
|
124 |
+
**Real Cookie Banner can be used to collect consent for almost any tools, plugins and services in your WordPress website.** You can easily store the necessary legal and technical information for informed consent in a service and content blocker of the consent management.
|
125 |
+
|
126 |
+
We have verified that major Google and Facebook services, Hotjar, YouTube, Vimeo as well as popular WordPress plugins like Jetpack, Contact Form 7 or WooCommerce and many more are compatible.
|
127 |
+
|
128 |
+
**The PRO Version of Real Cookie Banner comes with 100+ service templates and 60+ content blocker templates.** These templates save you a lot of time by giving you all the relevant legal and technical information for a service to use it in accordance with the ePrivacy Directive and GDPR. Check out the [complete list of all services with templates](https://devowl.io/go/real-cookie-banner?source=wordpress-org-description#templates) on our website.
|
129 |
+
|
130 |
+
=== Full-featured cookie plugin and consent management for WordPress ===
|
131 |
+
|
132 |
+
Real Cookie Banner is a WordPress cookie plugin that enables you to obtain consent to load services and set cookies in accordance with the GDPR (DSGVO) and ePrivacy Directive (EU Cookie Law). In addition, we ensure for you that styles, scripts, iframes, etc. are only loaded when users give their consent with so-called Content Blockers. To be on the safe side, you should document all consents of your website to prove them in case of doubt. An automatic documentation of consents is also included in this plugin.
|
133 |
+
|
134 |
+
**(Why) do I need an opt-in cookie banner?**
|
135 |
+
|
136 |
+
Nearly all websites that target users from the EU require a cookie banner that obtains explicit consent (opt-in procedure) and documents the consent. It is practically impossible to operate a website without cookies and external services requiring consent, as otherwise you would have to go without many features and services such as Google Analytics, Google Fonts, YouTube videos, personal recommendations, etc.
|
137 |
+
|
138 |
+
Legally, the obligation is based on the ePrivacy Directive ([Directive 2009/136/EC](https://devowl.io/go/eu-directive-2009-136-ec)) Art. 66, which describes that the setting of cookies that are not strictly technically necessary requires the explicit consent of the user. The ePrivacy Directive has not yet been transposed into national law by a lot of EU countries, but according to current legal opinion, it must be applied nevertheless. In addition, you need consent for the processing of personal data according to [Art. 6 GDPR](https://gdpr-info.eu/art-6-gdpr/).
|
139 |
+
|
140 |
+
Some German users will have [§ 15 para. 3 TMG](https://www.gesetze-im-internet.de/tmg/__15.html) as the German solution to the cookie issue in mind. The paragraph assumes that consent is granted automatically if the user does not object (opt-out procedure). However, the CURIA clarified on October 1, 2019 in [case C-673/17](https://devowl.io/go/curia-c-673-17) that the German special way of an opt-out procedure is not in accordance with the ePrivacy Directive and since then, it must be assumed that only the opt-in procedure is permissible. This was also confirmed by the Federal Court of Justice for Germany on May 28, 2020 ([Case I ZR 7/16](https://devowl.io/de/go/bgh-i-zr-7-16) – Cookie Consent II).
|
141 |
+
|
142 |
+
Contrary to the assumption of many, the GDPR plays only a minor role with regard to cookies. Although it defines how personal data must be processed, it explicitly leaves the question of how to deal with cookies to the ePrivacy Directive. However, it does regulate the penalties if data protection violations are committed through the unauthorized transfer of personal data.
|
143 |
+
|
144 |
+
**What if I don't have an opt-in cookie banner?**
|
145 |
+
|
146 |
+
The [first warnings are already being sent out](https://www.anwalt.de/rechtstipps/dsgvo-abmahnung-wegen-rechtswidrigem-cookie-banner-und-tracking_160094.html) today because of the accusation of a data protection violation due to the illegal use of cookies. In this case, a cease-and-desist declaration and compensation will be demanded. At this point, it is advisable to seek legal advice in order to avoid falling into further legal traps.
|
147 |
+
|
148 |
+
A risk already exists today due to the CURIA decision of October 1, 2019 in [case C-673/17](https://devowl.io/go/curia-c-673-17). We assume that the number of warnings will increase as soon as the ePrivacy Directive is replaced by the ePrivacy Regulation (ePVO). At the latest then, the risk of a warning should no longer be taken. Using a cookie plugin can simply be the cheaper alternative.
|
149 |
+
|
150 |
+
**Why another cookie plugin for cookie consents?**
|
151 |
+
|
152 |
+
There are already widely used cookie banner solutions like Borlabs Cookie, Complianz, GDPR Cookie Consent, GDPR Cookie Compliance or Cookie Notice for GDPR & CCPA. In our point of view, many of these cookie plugins only partially implement the legal requirements or advised behavior, which bears a risk for website operators. Without a serious look at the law, you won’t know about it until you get a warning in your mailbox. In addition, most solutions are not so flexible and customizable that we would recommend using them on a professional website.
|
153 |
+
|
154 |
+
We have implemented a cookie consent banner that in our opinion meets the legal requirements, is very flexible and customizable, can be set up legally correct in only about an hour and solves many other problems. Through a market research and survey with WordPress users before we started the development of the cookie consent tool, we have identified many issues. We have tested the implemented cookie plugins intensively in user tests in practice so that we can offer you a comprehensive and intuitive solution.
|
155 |
+
|
156 |
+
=== Developer Friendly ===
|
157 |
+
|
158 |
+
You are a developer and want to write an add-on for Real Cookie Banner or make your plugin compatible with our cookie plugin? We are happy to help you!
|
159 |
+
|
160 |
+
**WordPress actions & filters and REST API**
|
161 |
+
|
162 |
+
Have a look at the [API documentation](https://devowl.io/wordpress-real-cookie-banner/developer-api/) on our website to learn more about how to write code that uses functions of Real Cookie Banner.
|
163 |
+
|
164 |
+
**Free Support**
|
165 |
+
|
166 |
+
We like to work with other WordPress developers. If you need assistants to use our product for your code projects or make your WordPress plugin compatible with Real Cookie Banner, just [open a support ticket](https://devowl.io/support/).
|
167 |
+
|
168 |
+
=== Get the PRO version of Real Cookie Banner ===
|
169 |
+
|
170 |
+
You will download the free version of this plugin, which contains **all core functions that allow you to load services and set cookies according to the GDPR and ePrivacy Directive.**
|
171 |
+
|
172 |
+
Our PRO version offers even more useful features and many cookie and content blocker templates, which not only make the cookie banner more flexible, but also save you a lot of time to set up the cookie banner in compliance with the law. [**Learn more about the PRO version.**](https://devowl.io/go/real-cookie-banner?source=wordpress-org-description)
|
173 |
+
|
174 |
+
|
175 |
+
== Installation ==
|
176 |
+
|
177 |
+
1. Go to your WordPress backend
|
178 |
+
2. Navigate to "Plugins" > "Add New"
|
179 |
+
3. Search for "WordPress Real Cookie Banner"
|
180 |
+
4. Install and activate the plugin
|
181 |
+
5. Go to "Cookies" in the left sidebar and start the setup of your cookie banner
|
182 |
+
|
183 |
+
== Frequently Asked Questions ==
|
184 |
+
|
185 |
+
= Is this plugin compatible with WordPress 5? =
|
186 |
+
**Yes, we support WordPress 5.2 or newer** and regularly update your Real Cookie Banner to support future versions.
|
187 |
+
|
188 |
+
= Where can I find documentation or support for the plugin? =
|
189 |
+
We offer a [knowledge base and fast support](https://devowl.io/support/) on our website. **Please feel free to open a support ticket if you have questions, issues or feedback about the plugin.** We love to make Real Cookie Banner better!
|
190 |
+
|
191 |
+
= Does Real Cookie Banner find all cookies on my website automatically? =
|
192 |
+
A cookie scanner could, if at all, only find cookies, but not legally assess the processing of personal data. Moreover, it is highly complex to find all cookies and most so-called cookie scanners do not find all cookies. We have explained [in detail why this is so in our knowledge base](https://devowl.io/knowledge-base/real-cookie-banner-cookie-scanner-finds-cookies-automatically/
|
193 |
+
).
|
194 |
+
|
195 |
+
Therefore, Real Cookie Banner does not have a cookie scanner. However, 100+ service templates and 60+ content blocker templates will help you set up the cookie banner easily.
|
196 |
+
|
197 |
+
= Is Real Cookie Banner free? =
|
198 |
+
**Yes, all core features of Real Cookie Banner are free** and you are able to create unlimited cookies and content blocker. But most of the cookie and content blocker templates that will save you many hours of research work are included only in the PRO version. You want more? [**Learn more about the PRO version.**](https://devowl.io/go/real-cookie-banner?source=wordpress-org-description)
|
199 |
+
|
200 |
+
= What is the difference between Real Cookie Banner and Real Cookie Banner PRO? =
|
201 |
+
The PRO Version offers you many additional features like Google Tag Manager and Matomo Tag Manager Support, consent for data processing in the USA after the end of the Privacy Shield, Consent Forwarding or 100+ service templates and 60+ content blocker templates. [**Learn more about the PRO version.**](https://devowl.io/go/real-cookie-banner?source=wordpress-org-description)
|
202 |
+
|
203 |
+
== Screenshots ==
|
204 |
+
|
205 |
+
1. Cookie & Consent Management
|
206 |
+
2. Content Blocker
|
207 |
+
3. Customize design
|
208 |
+
4. Guided configuration
|
209 |
+
5. Documentation of consents
|
210 |
+
6. Native solution in WordPress
|
211 |
+
|
212 |
+
== Changelog ==
|
213 |
+
|
214 |
+
You can view the changelog and release notes [here](https://devowlio.gitbook.io/changelogs/plugins/real-cookie-banner).
|
215 |
+
|
216 |
+
== Upgrade Notice ==
|
217 |
+
|
inc/Activator.php
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\AnonymousAssetBuilder;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\DeliverAnonymousAsset;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin;
|
8 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
9 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
10 |
+
use DevOwl\RealCookieBanner\presets\BlockerPresets;
|
11 |
+
use DevOwl\RealCookieBanner\presets\CookiePresets;
|
12 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
13 |
+
use DevOwl\RealCookieBanner\presets\Presets;
|
14 |
+
use DevOwl\RealCookieBanner\scanner\Persist;
|
15 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
16 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
17 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Activator as UtilsActivator;
|
18 |
+
// @codeCoverageIgnoreStart
|
19 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
20 |
+
// Avoid direct file request
|
21 |
+
// @codeCoverageIgnoreEnd
|
22 |
+
/**
|
23 |
+
* The activator class handles the plugin relevant activation hooks: Uninstall, activation,
|
24 |
+
* deactivation and installation. The "installation" means installing needed database tables.
|
25 |
+
*/
|
26 |
+
class Activator {
|
27 |
+
use UtilsProvider;
|
28 |
+
use UtilsActivator;
|
29 |
+
const OPTION_NAME_INSTALLATION_DATE = RCB_OPT_PREFIX . '-installation-date';
|
30 |
+
const OPTION_NAME_NEEDS_DEFAULT_CONTENT = RCB_OPT_PREFIX . '-needs-default-content';
|
31 |
+
/**
|
32 |
+
* Any plugin got deactivated / activated so let's recalculate the presets cache.
|
33 |
+
*/
|
34 |
+
public function anyPluginToggledState() {
|
35 |
+
(new \DevOwl\RealCookieBanner\presets\CookiePresets())->forceRegeneration();
|
36 |
+
(new \DevOwl\RealCookieBanner\presets\BlockerPresets())->forceRegeneration();
|
37 |
+
}
|
38 |
+
/**
|
39 |
+
* Method gets fired when the user activates the plugin.
|
40 |
+
*/
|
41 |
+
public function activate() {
|
42 |
+
// Your implementation...
|
43 |
+
}
|
44 |
+
/**
|
45 |
+
* Method gets fired when the user deactivates the plugin.
|
46 |
+
*/
|
47 |
+
public function deactivate() {
|
48 |
+
// Your implementation...
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* Add initial content after first installation. It also supports multiple languages (e.g. WPML and PolyLang).
|
52 |
+
*/
|
53 |
+
public function addInitialContent() {
|
54 |
+
// Only create in admin backend (e. g. PolyLang currentLanguage is not available in REST API requests)
|
55 |
+
if (!is_admin() && current_user_can(\DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY)) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
$compLanguage = \DevOwl\RealCookieBanner\Core::getInstance()->getCompLanguage();
|
59 |
+
$missingLanguages = \DevOwl\RealCookieBanner\comp\language\Hooks::getInstance()->getLanguagesWithoutEssentialGroup();
|
60 |
+
$defaultLanguage = $compLanguage->getDefaultLanguage();
|
61 |
+
$doCopyToOtherLanguages =
|
62 |
+
\count($missingLanguages) > 0 && !\in_array($defaultLanguage, $missingLanguages, \true);
|
63 |
+
if (
|
64 |
+
$doCopyToOtherLanguages &&
|
65 |
+
$compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin
|
66 |
+
) {
|
67 |
+
$compLanguage
|
68 |
+
->getSync()
|
69 |
+
->startCopyProcess()
|
70 |
+
->copyAll($missingLanguages);
|
71 |
+
// Reload page to avoid javascript errors when in config page
|
72 |
+
$configPage = \DevOwl\RealCookieBanner\Core::getInstance()->getConfigPage();
|
73 |
+
if ($configPage->isVisible()) {
|
74 |
+
wp_safe_redirect($configPage->getUrl());
|
75 |
+
exit();
|
76 |
+
}
|
77 |
+
} else {
|
78 |
+
// Initial content should be available in the current language
|
79 |
+
$tempTd = \DevOwl\RealCookieBanner\comp\language\Hooks::getInstance()->createTemporaryTextDomain();
|
80 |
+
// Create default groups
|
81 |
+
$createdDefaultGroup = \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->ensureEssentialGroupCreated();
|
82 |
+
// Create default cookies (RCB)
|
83 |
+
if ($createdDefaultGroup) {
|
84 |
+
(new \DevOwl\RealCookieBanner\presets\CookiePresets())->createFromPreset(
|
85 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REAL_COOKIE_BANNER,
|
86 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup(\true)->term_id
|
87 |
+
);
|
88 |
+
}
|
89 |
+
delete_site_option(self::OPTION_NAME_NEEDS_DEFAULT_CONTENT);
|
90 |
+
$tempTd->teardown();
|
91 |
+
}
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Detect first installation and conditionally create initial content.
|
95 |
+
*/
|
96 |
+
public function detectFirstInstallation() {
|
97 |
+
// Is it the first installation?
|
98 |
+
if (empty(get_option(self::OPTION_NAME_INSTALLATION_DATE))) {
|
99 |
+
// Default content needs to be inserted in `init` action, and can not ensured at this time (e. g. WP CLI activation)
|
100 |
+
add_site_option(self::OPTION_NAME_NEEDS_DEFAULT_CONTENT, \true);
|
101 |
+
// Add option initially of first installation date
|
102 |
+
add_option(self::OPTION_NAME_INSTALLATION_DATE, \gmdate('Y-m-d'));
|
103 |
+
}
|
104 |
+
}
|
105 |
+
/**
|
106 |
+
* Install tables, stored procedures or whatever in the database.
|
107 |
+
* This method is always called when the version bumps up or for
|
108 |
+
* the first initial activation.
|
109 |
+
*
|
110 |
+
* @param boolean $errorlevel If true throw errors
|
111 |
+
*/
|
112 |
+
public function dbDelta($errorlevel) {
|
113 |
+
global $wpdb;
|
114 |
+
// Retrigger presets regeneration (do this in init so all multilingual plugins are ready)
|
115 |
+
add_action(
|
116 |
+
'init',
|
117 |
+
function () {
|
118 |
+
(new \DevOwl\RealCookieBanner\presets\CookiePresets())->forceRegeneration();
|
119 |
+
(new \DevOwl\RealCookieBanner\presets\BlockerPresets())->forceRegeneration();
|
120 |
+
},
|
121 |
+
8
|
122 |
+
);
|
123 |
+
$this->detectFirstInstallation();
|
124 |
+
$max_index_length = $this->getMaxIndexLength();
|
125 |
+
// wp_rcb_revision
|
126 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME);
|
127 |
+
$charset_collate = $wpdb->get_charset_collate();
|
128 |
+
$sql = "CREATE TABLE {$table_name} (\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\n json_revision text NOT NULL,\n `hash` char(32) NOT NULL,\n created datetime NOT NULL,\n PRIMARY KEY (id),\n UNIQUE KEY `hash` (`hash`)\n ) {$charset_collate};";
|
129 |
+
dbDelta($sql);
|
130 |
+
if ($errorlevel) {
|
131 |
+
$wpdb->print_error();
|
132 |
+
}
|
133 |
+
// wp_rcb_stats
|
134 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\Stats::TABLE_NAME);
|
135 |
+
$sql = "CREATE TABLE {$table_name} (\n id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n context varchar(200) NOT NULL,\n `day` date NOT NULL,\n term_name varchar(70) NOT NULL,\n term_id bigint(20) UNSIGNED NOT NULL,\n accepted tinyint(1) NOT NULL,\n `count` int UNSIGNED,\n PRIMARY KEY (id),\n UNIQUE KEY `dayGroup` (`context`({$max_index_length}), `day`, `term_id`, `accepted`)\n ) {$charset_collate};";
|
136 |
+
dbDelta($sql);
|
137 |
+
if ($errorlevel) {
|
138 |
+
$wpdb->print_error();
|
139 |
+
}
|
140 |
+
// wp_rcb_revision_independent
|
141 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME_INDEPENDENT);
|
142 |
+
$sql = "CREATE TABLE {$table_name} (\n id mediumint(9) UNSIGNED NOT NULL AUTO_INCREMENT,\n json_revision text NOT NULL,\n `hash` char(32) NOT NULL,\n created datetime NOT NULL,\n PRIMARY KEY (id),\n UNIQUE KEY `hash` (`hash`)\n ) {$charset_collate};";
|
143 |
+
dbDelta($sql);
|
144 |
+
if ($errorlevel) {
|
145 |
+
$wpdb->print_error();
|
146 |
+
}
|
147 |
+
// wp_rcb_consent
|
148 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
149 |
+
$sql = "CREATE TABLE {$table_name} (\n id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n ipv4 int UNSIGNED,\n ipv6 binary(16),\n ipv4_hash char(64),\n ipv6_hash char(64),\n uuid char(36) NOT NULL,\n revision char(32) NOT NULL,\n revision_independent char(32) NOT NULL,\n previous_decision tinytext NOT NULL,\n decision_hash char(32) NOT NULL,\n decision tinytext NOT NULL,\n blocker bigint(20) UNSIGNED,\n button_clicked varchar(32) NOT NULL,\n context varchar(200) NOT NULL,\n viewport_width int UNSIGNED NOT NULL,\n viewport_height int UNSIGNED NOT NULL,\n referer tinytext NOT NULL,\n pure_referer tinytext NOT NULL,\n url_imprint tinytext NOT NULL,\n url_privacy_policy tinytext NOT NULL,\n dnt tinyint(1) UNSIGNED NOT NULL,\n custom_bypass varchar(50),\n created datetime NOT NULL,\n forwarded bigint(20) UNSIGNED,\n forwarded_blocker tinyint(1) NOT NULL,\n user_country varchar(5),\n tcf_string text,\n PRIMARY KEY (id)\n ) {$charset_collate};";
|
150 |
+
dbDelta($sql);
|
151 |
+
if ($errorlevel) {
|
152 |
+
$wpdb->print_error();
|
153 |
+
}
|
154 |
+
// wp_rcb_asset_seo_redirect (use own table name for backwards compatibility)
|
155 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
156 |
+
->getAnonymousAssetBuilder()
|
157 |
+
->dbDelta();
|
158 |
+
if ($errorlevel) {
|
159 |
+
$wpdb->print_error();
|
160 |
+
}
|
161 |
+
// wp_rcb_tcf*
|
162 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
163 |
+
->getTcfVendorListNormalizer()
|
164 |
+
->dbDelta();
|
165 |
+
if ($errorlevel) {
|
166 |
+
$wpdb->print_error();
|
167 |
+
}
|
168 |
+
// wp_p_queue
|
169 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
170 |
+
->getRealQueue()
|
171 |
+
->dbDelta();
|
172 |
+
if ($errorlevel) {
|
173 |
+
$wpdb->print_error();
|
174 |
+
}
|
175 |
+
// wp_rcb_presets
|
176 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\presets\Presets::TABLE_NAME);
|
177 |
+
$max_index_length_presets_identifier = $max_index_length - 70;
|
178 |
+
// subtract length of other varchar fields
|
179 |
+
$sql = "CREATE TABLE {$table_name} (\n id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n identifier varchar(200) NOT NULL,\n context varchar(50) NOT NULL,\n type varchar(20) NOT NULL,\n version int(11) NOT NULL,\n description tinytext,\n logoFile tinytext,\n name varchar (255),\n tags text,\n attributes_name varchar(200),\n disabled tinyint(1) NOT NULL,\n hidden tinyint(1) NOT NULL,\n recommended tinyint(1) NOT NULL,\n other_meta text,\n tier varchar(50),\n PRIMARY KEY (id),\n UNIQUE KEY `identifier` (`identifier`({$max_index_length_presets_identifier}), `context`, `type`)\n ) {$charset_collate};";
|
180 |
+
dbDelta($sql);
|
181 |
+
if ($errorlevel) {
|
182 |
+
$wpdb->print_error();
|
183 |
+
}
|
184 |
+
// wp_rcb_scan
|
185 |
+
// Mention: Some of the `NOT NULL` values can be interpreted as `NULL`, but due to the fact
|
186 |
+
// that it should be used for a `UNIQUE` key it must be handled like an empty string: https://stackoverflow.com/a/40767306/5506547
|
187 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\scanner\Persist::TABLE_NAME);
|
188 |
+
$max_index_length_site_entry = $max_index_length - (32 + 32 + 20 + 32);
|
189 |
+
// subtract length of other varchar fields
|
190 |
+
$sql = "CREATE TABLE {$table_name} (\n id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n preset varchar(200) NOT NULL,\n blocked_url tinytext,\n blocked_url_host tinytext,\n blocked_url_hash char(32) NOT NULL,\n markup longtext,\n markup_hash char(32),\n tag varchar(20) NOT NULL,\n post_id bigint(20),\n source_url tinytext NOT NULL,\n source_url_hash char(32) NOT NULL,\n ignored tinyint(1) NOT NULL,\n created datetime NOT NULL,\n PRIMARY KEY (id),\n UNIQUE KEY `site_entry` (`preset`({$max_index_length_site_entry}), `blocked_url_hash`, `source_url_hash`, `tag`, `markup_hash`)\n ) {$charset_collate};";
|
191 |
+
dbDelta($sql);
|
192 |
+
if ($errorlevel) {
|
193 |
+
$wpdb->print_error();
|
194 |
+
}
|
195 |
+
}
|
196 |
+
/**
|
197 |
+
* Uninstall our plugin (it does currently not remove any settings!).
|
198 |
+
*/
|
199 |
+
public static function uninstall() {
|
200 |
+
global $wpdb;
|
201 |
+
// Delete anonymous JavaScript files
|
202 |
+
$table_name =
|
203 |
+
$wpdb->prefix .
|
204 |
+
RCB_DB_PREFIX .
|
205 |
+
'_' .
|
206 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\AnonymousAssetBuilder::TABLE_NAME;
|
207 |
+
foreach (['banner', 'blocker'] as $handle) {
|
208 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\DeliverAnonymousAsset::uninstall(
|
209 |
+
$table_name,
|
210 |
+
\sprintf('%s-%s', RCB_SLUG, $handle),
|
211 |
+
['js']
|
212 |
+
);
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
inc/AdInitiator.php
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealUtils\AbstractInitiator;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Initiate real-utils functionality.
|
13 |
+
*/
|
14 |
+
class AdInitiator extends \DevOwl\RealCookieBanner\Vendor\DevOwl\RealUtils\AbstractInitiator {
|
15 |
+
use UtilsProvider;
|
16 |
+
/**
|
17 |
+
* Documented in AbstractInitiator.
|
18 |
+
*
|
19 |
+
* @codeCoverageIgnore
|
20 |
+
*/
|
21 |
+
public function getPluginBase() {
|
22 |
+
return $this;
|
23 |
+
}
|
24 |
+
/**
|
25 |
+
* Documented in AbstractInitiator.
|
26 |
+
*
|
27 |
+
* @codeCoverageIgnore
|
28 |
+
*/
|
29 |
+
public function getHeroButton() {
|
30 |
+
return [
|
31 |
+
__('Start configuration', RCB_TD),
|
32 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
33 |
+
->getConfigPage()
|
34 |
+
->getUrl()
|
35 |
+
];
|
36 |
+
}
|
37 |
+
/**
|
38 |
+
* Documented in AbstractInitiator.
|
39 |
+
*
|
40 |
+
* @codeCoverageIgnore
|
41 |
+
*/
|
42 |
+
public function getPluginAssets() {
|
43 |
+
return $this->getCore()->getAssets();
|
44 |
+
}
|
45 |
+
/**
|
46 |
+
* Documented in AbstractInitiator.
|
47 |
+
*
|
48 |
+
* @codeCoverageIgnore
|
49 |
+
*/
|
50 |
+
public function getRateLink() {
|
51 |
+
return 'https://devowl.io/go/wordpress-org/real-cookie-banner/rate';
|
52 |
+
}
|
53 |
+
/**
|
54 |
+
* Documented in AbstractInitiator.
|
55 |
+
*
|
56 |
+
* @codeCoverageIgnore
|
57 |
+
*/
|
58 |
+
public function getWelcomePageImageHeight() {
|
59 |
+
return 280;
|
60 |
+
}
|
61 |
+
/**
|
62 |
+
* Documented in AbstractInitiator.
|
63 |
+
*
|
64 |
+
* @codeCoverageIgnore
|
65 |
+
*/
|
66 |
+
public function getKeyFeatures() {
|
67 |
+
return [
|
68 |
+
[
|
69 |
+
'image' => $this->getAssetsUrl(__('key-features/presets.gif', RCB_TD)),
|
70 |
+
'title' => __('Consent Management', RCB_TD),
|
71 |
+
'description' => __(
|
72 |
+
'You can use Real Cookie Banner to store all technical and legal information about services and cookies to obtain informed consent. You can use 100+ service templates and 60+ content blocker templates to quickly and securely provide all the information you need.',
|
73 |
+
RCB_TD
|
74 |
+
)
|
75 |
+
],
|
76 |
+
[
|
77 |
+
'image' => $this->getAssetsUrl(__('key-features/content-blocker.gif', RCB_TD)),
|
78 |
+
'title' => __('Content Blocker', RCB_TD),
|
79 |
+
'description' => __(
|
80 |
+
'Themes, plugins and co. usually load scripts, styles and content that transfer personal data and set cookies before you have the consent of your visitors. You usually cannot control this by yourself. Content blockers make sure that these features are only executed after you have obtained consent.',
|
81 |
+
RCB_TD
|
82 |
+
)
|
83 |
+
],
|
84 |
+
[
|
85 |
+
'image' => $this->getAssetsUrl(__('key-features/customize-presets.gif', RCB_TD)),
|
86 |
+
'title' => __('Customize design', RCB_TD),
|
87 |
+
'description' => __(
|
88 |
+
'You can design the cookie banner according to your wishes. 20+ design templates and 200+ options give you the flexibility to customize the cookie banner perfectly to your needs. From colors and effects to texts, you can unleash your creativity! All changes are displayed in a live preview.',
|
89 |
+
RCB_TD
|
90 |
+
)
|
91 |
+
],
|
92 |
+
[
|
93 |
+
'image' => $this->getAssetsUrl(__('key-features/guided-configuration.gif', RCB_TD)),
|
94 |
+
'title' => __('Guided configuration', RCB_TD),
|
95 |
+
'description' => __(
|
96 |
+
'After installation, the checklist will guide you through all steps to be able to set up Real Cookie Banner in a legally compliant manner. We also explain the legal basis of features and the legal consequences if you change settings. So, you can quickly and safely set up your cookie banner!',
|
97 |
+
RCB_TD
|
98 |
+
)
|
99 |
+
],
|
100 |
+
[
|
101 |
+
'image' => $this->getAssetsUrl(__('key-features/list-of-consents.gif', RCB_TD)),
|
102 |
+
'title' => __('Documentation of consents', RCB_TD),
|
103 |
+
'description' => __(
|
104 |
+
'According to the GDPR, you have to prove that a visitor has consented to cookies and processing of personal data if he or she doubts this. We document consent completely and make it possible to trace the origin of the consent afterwards. You are on the safe side even in the worst case!',
|
105 |
+
RCB_TD
|
106 |
+
)
|
107 |
+
],
|
108 |
+
[
|
109 |
+
'image' => $this->getAssetsUrl(__('key-features/native-menu.gif', RCB_TD)),
|
110 |
+
'title' => __('Native in WordPress', RCB_TD),
|
111 |
+
'description' => __(
|
112 |
+
'Real Cookie Banner is a cookie plugin specially designed for WordPress. It is fully installed in your WordPress as a native plugin. All consents are processed and stored on your server. Nothing is downloaded from a cloud in your visitor\'s browser, which avoids further legal issues.',
|
113 |
+
RCB_TD
|
114 |
+
)
|
115 |
+
]
|
116 |
+
];
|
117 |
+
}
|
118 |
+
}
|
inc/Assets.php
ADDED
@@ -0,0 +1,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\CacheInvalidator;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\Assets as CustomizeAssets;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\DeliverAnonymousAsset;
|
8 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\Assets as FreemiumAssets;
|
9 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\Iso3166OneAlpha2;
|
10 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
11 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
12 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
13 |
+
use DevOwl\RealCookieBanner\settings\Consent;
|
14 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
15 |
+
use DevOwl\RealCookieBanner\settings\CountryBypass;
|
16 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
17 |
+
use DevOwl\RealCookieBanner\settings\General;
|
18 |
+
use DevOwl\RealCookieBanner\settings\ModalHints;
|
19 |
+
use DevOwl\RealCookieBanner\view\Blocker;
|
20 |
+
use DevOwl\RealCookieBanner\settings\TCF;
|
21 |
+
use DevOwl\RealCookieBanner\view\customize\banner\BasicLayout;
|
22 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Texts;
|
23 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\Core as RpmWpClientCore;
|
24 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\license\License;
|
25 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Assets as UtilsAssets;
|
26 |
+
// @codeCoverageIgnoreStart
|
27 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
28 |
+
// Avoid direct file request
|
29 |
+
// @codeCoverageIgnoreEnd
|
30 |
+
/**
|
31 |
+
* Asset management for frontend scripts and styles.
|
32 |
+
*/
|
33 |
+
class Assets {
|
34 |
+
use UtilsProvider;
|
35 |
+
use UtilsAssets {
|
36 |
+
localizeScript as utilsLocalizeScript;
|
37 |
+
}
|
38 |
+
use FreemiumAssets;
|
39 |
+
use CustomizeAssets;
|
40 |
+
/**
|
41 |
+
* Enqueue scripts and styles in login page.
|
42 |
+
*/
|
43 |
+
public static $TYPE_LOGIN = 'login_enqueue_scripts';
|
44 |
+
const TCF_STUB_PATH = '@iabtcf/stub/lib/stub.js';
|
45 |
+
/**
|
46 |
+
* See `DeliverAnonymousAsset`.
|
47 |
+
*/
|
48 |
+
public function createHashedAssets() {
|
49 |
+
$filePath = RCB_PATH . '/' . $this->getPublicFolder() . '%s.' . ($this->isPro() ? 'pro' : 'lite') . '.js';
|
50 |
+
$libraryFilePath = RCB_PATH . '/' . $this->getPublicFolder(\true) . '/%s';
|
51 |
+
$handleName = RCB_SLUG . '-%s';
|
52 |
+
$anonymousAssetsBuilder = \DevOwl\RealCookieBanner\Core::getInstance()->getAnonymousAssetBuilder();
|
53 |
+
$isTcf = \DevOwl\RealCookieBanner\settings\TCF::getInstance()->isActive();
|
54 |
+
$bannerName = $isTcf ? 'banner_tcf' : 'banner';
|
55 |
+
$blockerName = $isTcf ? 'blocker_tcf' : 'blocker';
|
56 |
+
$anonymousAssetsBuilder->build(
|
57 |
+
\sprintf($handleName, 'vendor-' . RCB_SLUG . '-' . $bannerName),
|
58 |
+
\sprintf($filePath, 'vendor-' . $bannerName),
|
59 |
+
'vendorBanner'
|
60 |
+
);
|
61 |
+
$anonymousAssetsBuilder->build(
|
62 |
+
\sprintf($handleName, 'vendor-' . RCB_SLUG . '-' . $blockerName),
|
63 |
+
\sprintf($filePath, 'vendor-' . $blockerName),
|
64 |
+
'vendorBlocker'
|
65 |
+
);
|
66 |
+
$anonymousAssetsBuilder->build(\sprintf($handleName, $bannerName), \sprintf($filePath, $bannerName), 'banner');
|
67 |
+
$anonymousAssetsBuilder->build(
|
68 |
+
\sprintf($handleName, $blockerName),
|
69 |
+
\sprintf($filePath, $blockerName),
|
70 |
+
'blocker'
|
71 |
+
);
|
72 |
+
if ($isTcf) {
|
73 |
+
$anonymousAssetsBuilder->build(
|
74 |
+
'iabtcf-stub',
|
75 |
+
\sprintf($libraryFilePath, self::TCF_STUB_PATH),
|
76 |
+
'iabtcf-stub'
|
77 |
+
);
|
78 |
+
}
|
79 |
+
}
|
80 |
+
/**
|
81 |
+
* Enqueue scripts and styles depending on the type. This function is called
|
82 |
+
* from both admin_enqueue_scripts and wp_enqueue_scripts. You can check the
|
83 |
+
* type through the $type parameter. In this function you can include your
|
84 |
+
* external libraries from src/public/lib, too.
|
85 |
+
*
|
86 |
+
* @param string $type The type (see utils Assets constants)
|
87 |
+
* @param string $hook_suffix The current admin page
|
88 |
+
*/
|
89 |
+
public function enqueue_scripts_and_styles($type, $hook_suffix = null) {
|
90 |
+
// Generally check if an entrypoint should be loaded
|
91 |
+
$core = \DevOwl\RealCookieBanner\Core::getInstance();
|
92 |
+
$banner = $core->getBanner();
|
93 |
+
$isConfigPage = $core->getConfigPage()->isVisible($hook_suffix);
|
94 |
+
$shouldLoadAssets = $banner->shouldLoadAssets($type);
|
95 |
+
$realUtils = RCB_ROOT_SLUG . '-real-utils-helper';
|
96 |
+
// Do not enqueue anything if not needed
|
97 |
+
if (!$isConfigPage && !\in_array($type, [self::$TYPE_CUSTOMIZE], \true) && !$shouldLoadAssets) {
|
98 |
+
// We need to enqueue real-utils helper always in backend to keep cross-selling intact
|
99 |
+
if ($type === self::$TYPE_ADMIN) {
|
100 |
+
$this->enqueueUtils();
|
101 |
+
wp_enqueue_script($realUtils);
|
102 |
+
wp_enqueue_style($realUtils);
|
103 |
+
}
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
// Your assets implementation here... See utils Assets for enqueue* methods
|
107 |
+
// $useNonMinifiedSources = $this->useNonMinifiedSources(); // Use this variable if you need to differ between minified or non minified sources
|
108 |
+
// Our utils package relies on jQuery, but this shouldn't be a problem as the most themes still use jQuery (might be replaced with https://github.com/github/fetch)
|
109 |
+
$scriptDeps = [];
|
110 |
+
// Mobx should not be loaded on any frontend page, but in customize preview (see `customize_banner.tsx`)
|
111 |
+
if ($type !== self::$TYPE_FRONTEND || is_customize_preview()) {
|
112 |
+
$this->enqueueReact();
|
113 |
+
$this->enqueueMobx();
|
114 |
+
\array_unshift(
|
115 |
+
$scriptDeps,
|
116 |
+
self::$HANDLE_REACT,
|
117 |
+
self::$HANDLE_REACT_DOM,
|
118 |
+
self::$HANDLE_MOBX,
|
119 |
+
'moment',
|
120 |
+
'wp-i18n',
|
121 |
+
'jquery'
|
122 |
+
);
|
123 |
+
// Enqueue external utils package
|
124 |
+
$handleUtils = $this->enqueueComposerScript('utils', $scriptDeps);
|
125 |
+
\array_unshift($scriptDeps, $handleUtils);
|
126 |
+
}
|
127 |
+
// Enqueue customize helpers and add the handle to our dependencies
|
128 |
+
$this->probablyEnqueueCustomizeHelpers($scriptDeps, $isConfigPage);
|
129 |
+
// When the banner should be shown, do not enqueue real utils
|
130 |
+
if (!$shouldLoadAssets) {
|
131 |
+
\array_push($scriptDeps, $realUtils);
|
132 |
+
}
|
133 |
+
// Enqueue plugin entry points
|
134 |
+
if ($isConfigPage) {
|
135 |
+
$handle = $this->enqueueAdminPage($scriptDeps);
|
136 |
+
} elseif ($type === self::$TYPE_CUSTOMIZE) {
|
137 |
+
$handle = $this->enqueueScript(
|
138 |
+
'customize',
|
139 |
+
[[$this->isPro(), 'customize.pro.js'], 'customize.lite.js'],
|
140 |
+
$scriptDeps
|
141 |
+
);
|
142 |
+
$this->enqueueStyle('customize', 'customize.css');
|
143 |
+
} elseif ($shouldLoadAssets) {
|
144 |
+
$handle = $this->enqueueBanner($scriptDeps);
|
145 |
+
// Enqueue blocker if enabled
|
146 |
+
if (
|
147 |
+
\DevOwl\RealCookieBanner\settings\General::getInstance()->isBlockerActive() &&
|
148 |
+
\in_array($type, [self::$TYPE_FRONTEND, self::$TYPE_LOGIN], \true)
|
149 |
+
) {
|
150 |
+
$this->enqueueBlocker(\array_merge($scriptDeps, [$handle]));
|
151 |
+
}
|
152 |
+
}
|
153 |
+
// Localize script with server-side variables
|
154 |
+
$this->anonymous_localize_script(
|
155 |
+
$handle,
|
156 |
+
'realCookieBanner',
|
157 |
+
$this->localizeScript($type),
|
158 |
+
!\in_array($type, [self::$TYPE_FRONTEND, self::$TYPE_LOGIN], \true) || is_customize_preview()
|
159 |
+
);
|
160 |
+
}
|
161 |
+
/**
|
162 |
+
* Enqueue admin page (currently only the config).
|
163 |
+
*
|
164 |
+
* @param string[] $scriptDeps
|
165 |
+
*/
|
166 |
+
public function enqueueAdminPage($scriptDeps) {
|
167 |
+
$useNonMinifiedSources = $this->useNonMinifiedSources();
|
168 |
+
\array_unshift($scriptDeps, 'wp-codemirror', 'jquery-ui-sortable');
|
169 |
+
// Enqueue code mirror to edit JavaScript files
|
170 |
+
$cm_settings['codeEditor'] = wp_enqueue_code_editor(['type' => 'text/html']);
|
171 |
+
wp_localize_script('jquery', 'cm_settings', $cm_settings);
|
172 |
+
// react-router-dom
|
173 |
+
\array_unshift(
|
174 |
+
$scriptDeps,
|
175 |
+
$this->enqueueLibraryScript(
|
176 |
+
'react-router-dom',
|
177 |
+
[
|
178 |
+
[$useNonMinifiedSources, 'react-router-dom/umd/react-router-dom.js'],
|
179 |
+
'react-router-dom/umd/react-router-dom.min.js'
|
180 |
+
],
|
181 |
+
[self::$HANDLE_REACT_DOM]
|
182 |
+
)
|
183 |
+
);
|
184 |
+
// @antv/g2
|
185 |
+
\array_unshift($scriptDeps, $this->enqueueLibraryScript('g2', '@antv/g2/dist/g2.min.js'));
|
186 |
+
// real-product-manager-wp-client (for licensing purposes)
|
187 |
+
\array_unshift(
|
188 |
+
$scriptDeps,
|
189 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\Core::getInstance()
|
190 |
+
->getAssets()
|
191 |
+
->enqueue($this)
|
192 |
+
);
|
193 |
+
$handle = $this->enqueueScript('admin', [[$this->isPro(), 'admin.pro.js'], 'admin.lite.js'], $scriptDeps);
|
194 |
+
$this->enqueueStyle('admin', 'admin.css');
|
195 |
+
return $handle;
|
196 |
+
}
|
197 |
+
/**
|
198 |
+
* Enqueue the banner.
|
199 |
+
*
|
200 |
+
* @param string[] $scriptDeps
|
201 |
+
*/
|
202 |
+
public function enqueueBanner($scriptDeps) {
|
203 |
+
// Only enqueue once
|
204 |
+
static $enqueued = \false;
|
205 |
+
if ($enqueued) {
|
206 |
+
return;
|
207 |
+
}
|
208 |
+
$enqueued = \true;
|
209 |
+
$useNonMinifiedSources = $this->useNonMinifiedSources();
|
210 |
+
$isTcf = \DevOwl\RealCookieBanner\settings\TCF::getInstance()->isActive();
|
211 |
+
$anonymousAssetsBuilder = \DevOwl\RealCookieBanner\Core::getInstance()->getAnonymousAssetBuilder();
|
212 |
+
// Enqueue IAB TCF stub
|
213 |
+
if ($isTcf) {
|
214 |
+
$handle = $this->enqueueLibraryScript('iabtcf-stub', self::TCF_STUB_PATH);
|
215 |
+
\array_unshift($scriptDeps, $handle);
|
216 |
+
if ($handle !== \false) {
|
217 |
+
$anonymousAssetsBuilder->ready('iabtcf-stub');
|
218 |
+
}
|
219 |
+
}
|
220 |
+
// Enqueue scripts in customize preview
|
221 |
+
if (is_customize_preview()) {
|
222 |
+
$handle = $this->enqueueScript(
|
223 |
+
'customize_banner',
|
224 |
+
[[$this->isPro(), 'customize_banner.pro.js'], 'customize_banner.lite.js'],
|
225 |
+
$scriptDeps
|
226 |
+
);
|
227 |
+
} else {
|
228 |
+
// Enqueue banner in frontend page (determine correct bundle depending on TCF status)
|
229 |
+
$handle = $this->enqueueScript(
|
230 |
+
$isTcf ? 'banner_tcf' : 'banner',
|
231 |
+
[[$isTcf, 'banner_tcf.pro.js'], [$this->isPro(), 'banner.pro.js'], 'banner.lite.js'],
|
232 |
+
$scriptDeps,
|
233 |
+
\false
|
234 |
+
);
|
235 |
+
// Modify the URL so it is obtained by a hashed root URL
|
236 |
+
if ($handle !== \false) {
|
237 |
+
$anonymousAssetsBuilder->ready('banner', !$useNonMinifiedSources);
|
238 |
+
$anonymousAssetsBuilder->ready('vendorBanner', !$useNonMinifiedSources);
|
239 |
+
// Populate `codeOnPageLoad`
|
240 |
+
add_action('wp_head', [\DevOwl\RealCookieBanner\Core::getInstance()->getBanner(), 'wp_head']);
|
241 |
+
}
|
242 |
+
}
|
243 |
+
// animate.css (only when animations are enabled)
|
244 |
+
$customize = \DevOwl\RealCookieBanner\Core::getInstance()
|
245 |
+
->getBanner()
|
246 |
+
->getCustomize();
|
247 |
+
$hasAnimations =
|
248 |
+
$customize->getSetting(\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_IN) !==
|
249 |
+
'none' ||
|
250 |
+
$customize->getSetting(
|
251 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT
|
252 |
+
) !== 'none';
|
253 |
+
if (is_customize_preview() || $hasAnimations) {
|
254 |
+
$this->enqueueLibraryStyle('animate-css', [
|
255 |
+
[$useNonMinifiedSources, 'animate.css/animate.css'],
|
256 |
+
'animate.css/animate.min.css'
|
257 |
+
]);
|
258 |
+
}
|
259 |
+
if ($handle !== \false && !is_customize_preview()) {
|
260 |
+
$excludeAssets = \DevOwl\RealCookieBanner\Core::getInstance()->getExcludeAssets();
|
261 |
+
$preloadJs = ['iabtcf-stub', $handle];
|
262 |
+
$preloadCss = ['animate-css'];
|
263 |
+
$advancedFeatures = [self::$ADVANCED_ENQUEUE_FEATURE_PRIORITY_QUEUE];
|
264 |
+
if (!$excludeAssets->hasFailureSupportPluginActive()) {
|
265 |
+
$advancedFeatures[] = self::$ADVANCED_ENQUEUE_FEATURE_DEFER;
|
266 |
+
$advancedFeatures[] = self::$ADVANCED_ENQUEUE_FEATURE_PRELOADING;
|
267 |
+
}
|
268 |
+
$this->enableAdvancedEnqueue($preloadJs, $advancedFeatures);
|
269 |
+
$this->enableAdvancedEnqueue($preloadCss, $advancedFeatures, 'style');
|
270 |
+
$excludeAssets->byHandle('js', $preloadJs);
|
271 |
+
$excludeAssets->byHandle('css', $preloadCss);
|
272 |
+
}
|
273 |
+
return $handle;
|
274 |
+
}
|
275 |
+
/**
|
276 |
+
* Enqueue the blocker.
|
277 |
+
*
|
278 |
+
* @param string[] $scriptDeps
|
279 |
+
*/
|
280 |
+
public function enqueueBlocker($scriptDeps) {
|
281 |
+
$useNonMinifiedSources = $this->useNonMinifiedSources();
|
282 |
+
$anonymousAssetsBuilder = \DevOwl\RealCookieBanner\Core::getInstance()->getAnonymousAssetBuilder();
|
283 |
+
$isTcf = \DevOwl\RealCookieBanner\settings\TCF::getInstance()->isActive();
|
284 |
+
$handleName = $isTcf ? 'blocker_tcf' : 'blocker';
|
285 |
+
$handle = $this->enqueueScript(
|
286 |
+
$handleName,
|
287 |
+
[[$isTcf, 'blocker_tcf.pro.js'], [$this->isPro(), 'blocker.pro.js'], 'blocker.lite.js'],
|
288 |
+
$scriptDeps
|
289 |
+
);
|
290 |
+
$anonymousAssetsBuilder->ready('blocker', !$useNonMinifiedSources);
|
291 |
+
$anonymousAssetsBuilder->ready('vendorBlocker', !$useNonMinifiedSources);
|
292 |
+
if ($handle !== \false) {
|
293 |
+
$this->enableDeferredEnqueue($handle);
|
294 |
+
$excludeAssets = \DevOwl\RealCookieBanner\Core::getInstance()->getExcludeAssets();
|
295 |
+
$excludeAssets->byHandle('js', [$handle]);
|
296 |
+
}
|
297 |
+
}
|
298 |
+
/**
|
299 |
+
* Localize the WordPress backend and frontend.
|
300 |
+
*
|
301 |
+
* @param string $context
|
302 |
+
* @return mixed
|
303 |
+
*/
|
304 |
+
public function localizeScript($context) {
|
305 |
+
$result = $this->utilsLocalizeScript($context);
|
306 |
+
// Add language to each REST query string (only non-defaults, because WPML automatically redirects for default `lang` parameter)
|
307 |
+
$compLanguage = \DevOwl\RealCookieBanner\Core::getInstance()->getCompLanguage();
|
308 |
+
if ($compLanguage->isActive()) {
|
309 |
+
$currentLanguage = $compLanguage->getCurrentLanguage();
|
310 |
+
$result['restQuery'][\DevOwl\RealCookieBanner\comp\language\Hooks::GET_QUERY_FORCE_LANG] = $currentLanguage;
|
311 |
+
}
|
312 |
+
return $result;
|
313 |
+
}
|
314 |
+
/**
|
315 |
+
* Localize the WordPress backend and frontend. If you want to provide URLs to the
|
316 |
+
* frontend you have to consider that some JS libraries do not support umlauts
|
317 |
+
* in their URI builder. For this you can use utils Assets#getAsciiUrl.
|
318 |
+
*
|
319 |
+
* Also, if you want to use the options typed in your frontend you should
|
320 |
+
* adjust the following file too: src/public/ts/store/option.tsx
|
321 |
+
*
|
322 |
+
* @param string $context
|
323 |
+
* @return array
|
324 |
+
*/
|
325 |
+
public function overrideLocalizeScript($context) {
|
326 |
+
global $_wp_admin_css_colors;
|
327 |
+
$result = [];
|
328 |
+
$core = \DevOwl\RealCookieBanner\Core::getInstance();
|
329 |
+
$banner = $core->getBanner();
|
330 |
+
$bannerCustomize = $banner->getCustomize();
|
331 |
+
$consentSettings = \DevOwl\RealCookieBanner\settings\Consent::getInstance();
|
332 |
+
$generalSettings = \DevOwl\RealCookieBanner\settings\General::getInstance();
|
333 |
+
$licenseActivation = $core
|
334 |
+
->getRpmInitiator()
|
335 |
+
->getPluginUpdater()
|
336 |
+
->getCurrentBlogLicense()
|
337 |
+
->getActivation();
|
338 |
+
$showLicenseFormImmediate = !$licenseActivation->hasInteractedWithFormOnce();
|
339 |
+
$isLicensed = !empty($licenseActivation->getCode());
|
340 |
+
$isDevLicense =
|
341 |
+
$licenseActivation->getInstallationType() ===
|
342 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\license\License::INSTALLATION_TYPE_DEVELOPMENT;
|
343 |
+
if ($context === self::$TYPE_ADMIN) {
|
344 |
+
$colorScheme = $_wp_admin_css_colors[get_user_option('admin_color')]->colors;
|
345 |
+
if (\count($colorScheme) < 4) {
|
346 |
+
// Backwards-compatibility: The "modern" color scheme has only three colors, but for all
|
347 |
+
// our graphs and charts we need at least 4
|
348 |
+
$colorScheme[] = $colorScheme[0];
|
349 |
+
}
|
350 |
+
$result = [
|
351 |
+
'showLicenseFormImmediate' => $showLicenseFormImmediate,
|
352 |
+
'showNoticeAnonymousScriptNotWritable' =>
|
353 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\DeliverAnonymousAsset::getContentDir() ===
|
354 |
+
\false,
|
355 |
+
'assetsUrl' => $core->getAdInitiator()->getAssetsUrl(),
|
356 |
+
'customizeBannerUrl' => $bannerCustomize->getUrl(),
|
357 |
+
'colorScheme' => $colorScheme,
|
358 |
+
'cachePlugins' => \DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\CacheInvalidator::getInstance()->getLabels(),
|
359 |
+
'modalHints' => \DevOwl\RealCookieBanner\settings\ModalHints::getInstance()->getAlreadySeen(),
|
360 |
+
'isDemoEnv' => \DevOwl\RealCookieBanner\DemoEnvironment::getInstance()->isDemoEnv(),
|
361 |
+
'isConfigProNoticeVisible' => $core->getConfigPage()->isProNoticeVisible(),
|
362 |
+
'activePlugins' => \DevOwl\RealCookieBanner\Utils::getActivePluginsMap(),
|
363 |
+
'iso3166OneAlpha2' => \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\Iso3166OneAlpha2::getSortedCodes(),
|
364 |
+
'predefinedCountryBypassLists' =>
|
365 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::PREDEFINED_COUNTRY_LISTS,
|
366 |
+
'defaultCookieGroupTexts' => \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getDefaultDescriptions(
|
367 |
+
\true
|
368 |
+
)
|
369 |
+
];
|
370 |
+
} elseif (is_customize_preview()) {
|
371 |
+
$result = \array_merge(
|
372 |
+
$bannerCustomize->localizeIds(),
|
373 |
+
$bannerCustomize->localizeValues(),
|
374 |
+
$bannerCustomize->localizeDefaultValues(),
|
375 |
+
[
|
376 |
+
'poweredByTexts' => $core
|
377 |
+
->getCompLanguage()
|
378 |
+
->translateArray(\DevOwl\RealCookieBanner\view\customize\banner\Texts::getPoweredByLinkTexts())
|
379 |
+
]
|
380 |
+
);
|
381 |
+
} elseif ($banner->shouldLoadAssets($context)) {
|
382 |
+
$result = $bannerCustomize->localizeValues();
|
383 |
+
$bannerCustomize->expandLocalizeValues($result);
|
384 |
+
}
|
385 |
+
if (\in_array($context, [self::$TYPE_ADMIN, self::$TYPE_CUSTOMIZE], \true)) {
|
386 |
+
/**
|
387 |
+
* Create customized hints for specific actions in frontend. Currently supported:
|
388 |
+
* `deleteCookieGroup`, `deleteCookie`, `export`, `dashboardTile`, `proDialog`. For detailed
|
389 |
+
* structure for this parameters please check out TypeScript typings in `types/otherOptions.tsx`.
|
390 |
+
*
|
391 |
+
* @hook RCB/Hints
|
392 |
+
* @param {array} $hints
|
393 |
+
* @return {array}
|
394 |
+
*/
|
395 |
+
$result['hints'] = apply_filters('RCB/Hints', [
|
396 |
+
'deleteCookieGroup' => [],
|
397 |
+
'deleteCookie' => [],
|
398 |
+
'export' => [],
|
399 |
+
'dashboardTile' => [],
|
400 |
+
'proDialog' => null
|
401 |
+
]);
|
402 |
+
}
|
403 |
+
return apply_filters(
|
404 |
+
'RCB/Localize',
|
405 |
+
\array_merge($result, $this->localizeFreemiumScript(), [
|
406 |
+
'hasDynamicPreDecisions' => has_filter('RCB/Consent/DynamicPreDecision'),
|
407 |
+
'isLicensed' => $isLicensed,
|
408 |
+
'isDevLicense' => $isDevLicense,
|
409 |
+
'multilingualSkipHTMLForTag' => $core->getCompLanguage()->getSkipHTMLForTag(),
|
410 |
+
'defaultLanguage' => $core->getCompLanguage()->getDefaultLanguage(),
|
411 |
+
'currentLanguage' => $core->getCompLanguage()->getCurrentLanguage(),
|
412 |
+
'context' => \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getContextVariablesString(),
|
413 |
+
'userConsentCookieName' => \DevOwl\RealCookieBanner\MyConsent::getInstance()->getCookieName(),
|
414 |
+
'revisionHash' => \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getCurrentHash(),
|
415 |
+
'isTcf' => \DevOwl\RealCookieBanner\settings\TCF::getInstance()->isActive(),
|
416 |
+
'isPreventPreDecision' => $banner->isPreventPreDecision(),
|
417 |
+
'isAcceptAllForBots' => $consentSettings->isAcceptAllForBots(),
|
418 |
+
'isRespectDoNotTrack' => $consentSettings->isRespectDoNotTrack(),
|
419 |
+
'isRefreshSiteAfterConsent' => $generalSettings->isRefreshSiteAfterConsent(),
|
420 |
+
'isEPrivacyUSA' => $consentSettings->isEPrivacyUSAEnabled(),
|
421 |
+
'isAgeNotice' => $consentSettings->isAgeNoticeEnabled(),
|
422 |
+
'setCookiesViaManager' => $generalSettings->getSetCookiesViaManager(),
|
423 |
+
'essentialGroup' => \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup()
|
424 |
+
->slug,
|
425 |
+
'groups' => $banner->localizeGroups(),
|
426 |
+
'blocker' => $core->getBlocker()->localize(),
|
427 |
+
'setVisualParentIfClassOfParent' =>
|
428 |
+
\DevOwl\RealCookieBanner\view\Blocker::SET_VISUAL_PARENT_IF_CLASS_OF_PARENT,
|
429 |
+
'bannerI18n' => $core->getCompLanguage()->translateArray([
|
430 |
+
'legalBasis' => __('Use on legal basis of', RCB_TD),
|
431 |
+
'legitimateInterest' => __('Legitimate interest', RCB_TD),
|
432 |
+
'consent' => __('Consent', RCB_TD),
|
433 |
+
'crawlerLinkAlert' => __(
|
434 |
+
'We have recognized that you are a crawler/bot. Only natural persons must consent to cookies and processing of personal data. Therefore, the link has no function for you.',
|
435 |
+
RCB_TD
|
436 |
+
),
|
437 |
+
'technicalCookieDefinition' => __('Technical cookie definition', RCB_TD),
|
438 |
+
'usesCookies' => __('Uses cookies', RCB_TD),
|
439 |
+
'cookieRefresh' => __('Cookie refresh', RCB_TD),
|
440 |
+
'usesNonCookieAccess' => __(
|
441 |
+
'Uses cookie-like information (LocalStorage, SessionStorage, IndexDB, etc.)',
|
442 |
+
RCB_TD
|
443 |
+
),
|
444 |
+
'host' => __('Host', RCB_TD),
|
445 |
+
'duration' => __('Duration', RCB_TD),
|
446 |
+
'durationUnit' => [
|
447 |
+
's' => __('second(s)', RCB_TD),
|
448 |
+
'm' => __('minute(s)', RCB_TD),
|
449 |
+
'h' => __('hour(s)', RCB_TD),
|
450 |
+
'd' => __('day(s)', RCB_TD),
|
451 |
+
'mo' => __('month(s)', RCB_TD),
|
452 |
+
'y' => __('year(s)', RCB_TD)
|
453 |
+
],
|
454 |
+
'type' => __('Type', RCB_TD),
|
455 |
+
'purpose' => __('Purpose', RCB_TD),
|
456 |
+
'headerTitlePrivacyPolicyHistory' => __('History of your privacy settings', RCB_TD),
|
457 |
+
'historyLabel' => __('Show consent from', RCB_TD),
|
458 |
+
'historySelectNone' => __('Not yet consented to', RCB_TD),
|
459 |
+
'close' => __('Close', RCB_TD),
|
460 |
+
'closeWithoutSaving' => __('Close without saving', RCB_TD),
|
461 |
+
\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER => __('Provider', RCB_TD),
|
462 |
+
\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY => __(
|
463 |
+
'Privacy Policy',
|
464 |
+
RCB_TD
|
465 |
+
),
|
466 |
+
// translators:
|
467 |
+
'ePrivacyNoteMore' => __('and %d more', RCB_TD),
|
468 |
+
'ePrivacyUSA' => __('US data processing', RCB_TD),
|
469 |
+
'yes' => __('Yes', RCB_TD),
|
470 |
+
'no' => __('No', RCB_TD),
|
471 |
+
'unknown' => __('Unknown', RCB_TD),
|
472 |
+
'none' => __('None', RCB_TD),
|
473 |
+
'noLicense' => __('No license activated - not for production use!', RCB_TD),
|
474 |
+
'devLicense' => __('Product license not for production use!', RCB_TD)
|
475 |
+
]),
|
476 |
+
'pageRequestUuid4' => $core->getPageRequestUuid4(),
|
477 |
+
'pageByIdUrl' => add_query_arg('page_id', '', home_url()),
|
478 |
+
'pageIdToPermalink' => $generalSettings->getPermalinkMap(),
|
479 |
+
'pageId' => get_post_type() === 'page' ? get_the_ID() : \false,
|
480 |
+
'pluginUrl' => $core->getPluginData('PluginURI')
|
481 |
+
]),
|
482 |
+
$context
|
483 |
+
);
|
484 |
+
}
|
485 |
+
/**
|
486 |
+
* Provide predefined links for `RCB/Hints` `dashboardTile`'s configuration.
|
487 |
+
*
|
488 |
+
* @param array $hints
|
489 |
+
*/
|
490 |
+
public function hints_dashboard_tile_predefined_links($hints) {
|
491 |
+
foreach ($hints['dashboardTile'] as &$tile) {
|
492 |
+
if (isset($tile['links'])) {
|
493 |
+
foreach ($tile['links'] as &$link) {
|
494 |
+
if ($link === 'learnAboutPro') {
|
495 |
+
$link = [
|
496 |
+
'link' => \sprintf('%s&feature=partner-dashboard-tile', RCB_PRO_VERSION),
|
497 |
+
'linkText' => __('Learn more', RCB_TD)
|
498 |
+
];
|
499 |
+
}
|
500 |
+
}
|
501 |
+
}
|
502 |
+
}
|
503 |
+
return $hints;
|
504 |
+
}
|
505 |
+
/*
|
506 |
+
* Enqueue blocker and banner in Login screen too, so reCaptcha forms or
|
507 |
+
* similar scripts can be blocked.
|
508 |
+
*/
|
509 |
+
public function login_enqueue_scripts() {
|
510 |
+
$this->enqueue_scripts_and_styles(self::$TYPE_LOGIN);
|
511 |
+
}
|
512 |
+
/*
|
513 |
+
* Enqueue our `rcb-scan` client-worker for `real-queue`.
|
514 |
+
*/
|
515 |
+
public function real_queue_enqueue_scripts($handle) {
|
516 |
+
$this->enqueueScript('queue', [[$this->isPro(), 'queue.pro.js'], 'queue.lite.js'], [$handle]);
|
517 |
+
}
|
518 |
+
}
|
inc/Cache.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\CacheInvalidator;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Automatically clear frontend cache when essential things got changed:
|
13 |
+
*
|
14 |
+
* - Settings
|
15 |
+
* - Customize
|
16 |
+
* - New consent revision
|
17 |
+
*/
|
18 |
+
class Cache {
|
19 |
+
use UtilsProvider;
|
20 |
+
/**
|
21 |
+
* Singleton instance.
|
22 |
+
*
|
23 |
+
* @var Cache
|
24 |
+
*/
|
25 |
+
private static $me = null;
|
26 |
+
/**
|
27 |
+
* C'tor.
|
28 |
+
*/
|
29 |
+
private function __construct() {
|
30 |
+
// Silence is golden.
|
31 |
+
}
|
32 |
+
/**
|
33 |
+
* When customize got updated, refresh cache.
|
34 |
+
*
|
35 |
+
* @param array $response
|
36 |
+
*/
|
37 |
+
public function customize_updated($response) {
|
38 |
+
$response['invalidate_cache'] = $this->invalidate();
|
39 |
+
return $response;
|
40 |
+
}
|
41 |
+
/**
|
42 |
+
* When settings got updated, refresh cache.
|
43 |
+
*
|
44 |
+
* @param WP_HTTP_Response $response
|
45 |
+
*/
|
46 |
+
public function settings_updated($response) {
|
47 |
+
$response->data['invalidate_cache'] = $this->invalidate();
|
48 |
+
return $response;
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* When a new consent got requested, refresh cache.
|
52 |
+
*
|
53 |
+
* @param array $result
|
54 |
+
*/
|
55 |
+
public function revision_hash($result) {
|
56 |
+
$result['invalidate_cache'] = $this->invalidate();
|
57 |
+
return $result;
|
58 |
+
}
|
59 |
+
/**
|
60 |
+
* Invalidate the cache with the help of `cache-invalidate` package.
|
61 |
+
*/
|
62 |
+
public function invalidate() {
|
63 |
+
return \DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\CacheInvalidator::getInstance()->invalidate();
|
64 |
+
}
|
65 |
+
/**
|
66 |
+
* Get singleton instance.
|
67 |
+
*
|
68 |
+
* @codeCoverageIgnore
|
69 |
+
*/
|
70 |
+
public static function getInstance() {
|
71 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\Cache()) : self::$me;
|
72 |
+
}
|
73 |
+
}
|
inc/Clear.php
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\HeadlessContentBlocker\Utils;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
8 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Clear server-side cookies like `http` cookies.
|
15 |
+
*/
|
16 |
+
class Clear {
|
17 |
+
use UtilsProvider;
|
18 |
+
/**
|
19 |
+
* Singleton instance.
|
20 |
+
*
|
21 |
+
* @var Clear
|
22 |
+
*/
|
23 |
+
private static $me = null;
|
24 |
+
/**
|
25 |
+
* C'tor.
|
26 |
+
*/
|
27 |
+
private function __construct() {
|
28 |
+
// Silence is golden.
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* Clear cookies by cookie ids.
|
32 |
+
*
|
33 |
+
* @param int[] $cookies
|
34 |
+
*/
|
35 |
+
public function byCookies($cookies) {
|
36 |
+
$result = [];
|
37 |
+
foreach (\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getOrdered() as $group) {
|
38 |
+
foreach (\DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered($group->term_id) as $cookie) {
|
39 |
+
foreach ($cookies as $cookieId) {
|
40 |
+
if ($cookie->ID === $cookieId) {
|
41 |
+
foreach (
|
42 |
+
$cookie->metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS]
|
43 |
+
as $def
|
44 |
+
) {
|
45 |
+
$result[$cookieId] = $this->byTechnicalDefinition($def);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
}
|
51 |
+
/**
|
52 |
+
* Opt-out to a specific cookie. You can use this action to server-side clear a specific
|
53 |
+
* cookie if it is not possible due to possible RCB limitations.
|
54 |
+
*
|
55 |
+
* @hook RCB/OptOut/ByCookies
|
56 |
+
* @param {int[]} $ids Opt out by cookie id (post type)
|
57 |
+
*/
|
58 |
+
do_action('RCB/OptOut/ByCookies', $cookies);
|
59 |
+
return $result;
|
60 |
+
}
|
61 |
+
/**
|
62 |
+
* Clear a cookie by technical definition.
|
63 |
+
*
|
64 |
+
* @param array $technicalDefinition
|
65 |
+
*/
|
66 |
+
public function byTechnicalDefinition($technicalDefinition) {
|
67 |
+
$result = [];
|
68 |
+
$type = $technicalDefinition['type'];
|
69 |
+
$name = $technicalDefinition['name'];
|
70 |
+
$host = $technicalDefinition['host'];
|
71 |
+
switch ($type) {
|
72 |
+
case 'http':
|
73 |
+
$result['http'] = $this->byHttpCookieName($name, $host);
|
74 |
+
break;
|
75 |
+
default:
|
76 |
+
break;
|
77 |
+
}
|
78 |
+
/**
|
79 |
+
* Opt-out to a specific technical definition (a cookie has more technical definitions).
|
80 |
+
* You can use this action to server-side clear a specific cookie if it is not possible
|
81 |
+
* due to possible RCB limitations.
|
82 |
+
*
|
83 |
+
* @hook RCB/OptOut/ByTechnicalDefinition
|
84 |
+
* @param {array} $technicalDefinition
|
85 |
+
*/
|
86 |
+
do_action('RCB/OptOut/ByTechnicalDefinition', $technicalDefinition);
|
87 |
+
return $result;
|
88 |
+
}
|
89 |
+
/**
|
90 |
+
* Unset a cookie from the same host by name.
|
91 |
+
*
|
92 |
+
* @param string $name
|
93 |
+
* @param string $host
|
94 |
+
* @see https://stackoverflow.com/a/19972329/5506547
|
95 |
+
*/
|
96 |
+
public function byHttpCookieName($name, $host) {
|
97 |
+
$result = [];
|
98 |
+
$pattern = \DevOwl\RealCookieBanner\Vendor\DevOwl\HeadlessContentBlocker\Utils::createRegexpPatternFromWildcardName(
|
99 |
+
$name
|
100 |
+
);
|
101 |
+
// Find by regexp
|
102 |
+
foreach (\array_keys($_COOKIE) as $key) {
|
103 |
+
\preg_match_all($pattern, $key, $matches, \PREG_SET_ORDER, 0);
|
104 |
+
if (!empty($matches)) {
|
105 |
+
unset($_COOKIE[$key]);
|
106 |
+
// unset for this page request
|
107 |
+
$result[$key] = \setcookie($key, null, -1, '/', $host);
|
108 |
+
// only 1st party is supported here
|
109 |
+
}
|
110 |
+
}
|
111 |
+
/**
|
112 |
+
* Opt-out to a specific HTTP cookie. You can use this action to server-side clear
|
113 |
+
* a specific cookie if it is not possible due to possible RCB limitations.
|
114 |
+
*
|
115 |
+
* @hook RCB/OptOut/ByHttpCookie
|
116 |
+
* @param {string} $name
|
117 |
+
* @param {string} $host
|
118 |
+
*/
|
119 |
+
do_action('RCB/OptOut/ByHttpCookie', $name, $host);
|
120 |
+
return $result;
|
121 |
+
}
|
122 |
+
/**
|
123 |
+
* Get singleton instance.
|
124 |
+
*
|
125 |
+
* @codeCoverageIgnore
|
126 |
+
*/
|
127 |
+
public static function getInstance() {
|
128 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\Clear()) : self::$me;
|
129 |
+
}
|
130 |
+
}
|
inc/Core.php
ADDED
@@ -0,0 +1,816 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\ExcludeAssets;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\AbstractCustomizePanel;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\Core as CustomizeCore;
|
8 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\AnonymousAssetBuilder;
|
9 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractLanguagePlugin;
|
10 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealQueue\Core as RealQueue;
|
11 |
+
use DevOwl\RealCookieBanner\base\Core as BaseCore;
|
12 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
13 |
+
use DevOwl\RealCookieBanner\comp\migration\DashboardTileMigrationMajor2;
|
14 |
+
use DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations;
|
15 |
+
use DevOwl\RealCookieBanner\lite\Core as LiteCore;
|
16 |
+
use DevOwl\RealCookieBanner\overrides\interfce\IOverrideCore;
|
17 |
+
use DevOwl\RealCookieBanner\presets\middleware\BlockerExistsMiddleware;
|
18 |
+
use DevOwl\RealCookieBanner\presets\middleware\CookieBlockerPresetIdsMiddleware;
|
19 |
+
use DevOwl\RealCookieBanner\presets\middleware\CookieExistsMiddleware;
|
20 |
+
use DevOwl\RealCookieBanner\presets\middleware\CookieManagerMiddleware;
|
21 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware;
|
22 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisableTechnicalHandlingThroughPluginMiddleware;
|
23 |
+
use DevOwl\RealCookieBanner\presets\middleware\ExtendsMiddleware;
|
24 |
+
use DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware;
|
25 |
+
use DevOwl\RealCookieBanner\presets\middleware\BlockerHostsOptionsMiddleware;
|
26 |
+
use DevOwl\RealCookieBanner\presets\middleware\CookiesDeactivateAutomaticContentBlockerCreationByNeedsMiddleware;
|
27 |
+
use DevOwl\RealCookieBanner\presets\middleware\CookieGroupNamesBackwardsCompatibleMiddleware;
|
28 |
+
use DevOwl\RealCookieBanner\rest\Presets;
|
29 |
+
use DevOwl\RealCookieBanner\rest\Config;
|
30 |
+
use DevOwl\RealCookieBanner\rest\Import;
|
31 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
32 |
+
use DevOwl\RealCookieBanner\view\Banner;
|
33 |
+
use DevOwl\RealCookieBanner\view\ConfigPage;
|
34 |
+
use DevOwl\RealCookieBanner\settings\General;
|
35 |
+
use DevOwl\RealCookieBanner\settings\Consent;
|
36 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
37 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
38 |
+
use DevOwl\RealCookieBanner\settings\Multisite;
|
39 |
+
use DevOwl\RealCookieBanner\presets\UpdateNotice;
|
40 |
+
use DevOwl\RealCookieBanner\rest\Consent as RestConsent;
|
41 |
+
use DevOwl\RealCookieBanner\rest\Stats as RestStats;
|
42 |
+
use DevOwl\RealCookieBanner\rest\Scanner as RestScanner;
|
43 |
+
use DevOwl\RealCookieBanner\scanner\AutomaticScanStarter;
|
44 |
+
use DevOwl\RealCookieBanner\scanner\Scanner;
|
45 |
+
use DevOwl\RealCookieBanner\settings\CountryBypass;
|
46 |
+
use DevOwl\RealCookieBanner\settings\ModalHints;
|
47 |
+
use DevOwl\RealCookieBanner\settings\Reset;
|
48 |
+
use DevOwl\RealCookieBanner\settings\TCF;
|
49 |
+
use DevOwl\RealCookieBanner\view\Blocker as ViewBlocker;
|
50 |
+
use DevOwl\RealCookieBanner\view\checklist\ActivateBanner;
|
51 |
+
use DevOwl\RealCookieBanner\view\checklist\AddCookie;
|
52 |
+
use DevOwl\RealCookieBanner\view\checklist\SaveSettings;
|
53 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Texts;
|
54 |
+
use DevOwl\RealCookieBanner\view\shortcode\LinkShortcode;
|
55 |
+
use DevOwl\RealCookieBanner\view\shortcode\PrintUuidShortcode;
|
56 |
+
use DevOwl\RealCookieBanner\view\Scanner as ViewScanner;
|
57 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealUtils\Core as RealUtilsCore;
|
58 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\TcfVendorListNormalize\TcfVendorListNormalizer;
|
59 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Service;
|
60 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\ServiceNoStore;
|
61 |
+
// @codeCoverageIgnoreStart
|
62 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
63 |
+
// Avoid direct file request
|
64 |
+
// @codeCoverageIgnoreEnd
|
65 |
+
/**
|
66 |
+
* Singleton core class which handles the main system for plugin. It includes
|
67 |
+
* registering of the autoload, all hooks (actions & filters) (see BaseCore class).
|
68 |
+
*/
|
69 |
+
class Core extends \DevOwl\RealCookieBanner\base\Core implements
|
70 |
+
\DevOwl\RealCookieBanner\overrides\interfce\IOverrideCore {
|
71 |
+
use LiteCore;
|
72 |
+
use CustomizeCore;
|
73 |
+
/**
|
74 |
+
* The minimal required capability so a user can manage cookies.
|
75 |
+
*/
|
76 |
+
const MANAGE_MIN_CAPABILITY = 'manage_options';
|
77 |
+
/**
|
78 |
+
* Singleton instance.
|
79 |
+
*
|
80 |
+
* @var Core
|
81 |
+
*/
|
82 |
+
private static $me = null;
|
83 |
+
/**
|
84 |
+
* The config page.
|
85 |
+
*
|
86 |
+
* @var ConfigPage
|
87 |
+
*/
|
88 |
+
private $configPage;
|
89 |
+
/**
|
90 |
+
* The banner.
|
91 |
+
*
|
92 |
+
* @var Banner
|
93 |
+
*/
|
94 |
+
private $banner;
|
95 |
+
/**
|
96 |
+
* The blocker.
|
97 |
+
*
|
98 |
+
* @var ViewBlocker
|
99 |
+
*/
|
100 |
+
private $blocker;
|
101 |
+
/**
|
102 |
+
* An unique id for this page request. This is e. g. needed for unique overlay id.
|
103 |
+
*
|
104 |
+
* @var string
|
105 |
+
*/
|
106 |
+
private $pageRequestUuid4;
|
107 |
+
/**
|
108 |
+
* See AbstractLanguagePlugin.
|
109 |
+
*
|
110 |
+
* @var AbstractLanguagePlugin
|
111 |
+
*/
|
112 |
+
private $compLanguage;
|
113 |
+
/**
|
114 |
+
* See AdInitiator.
|
115 |
+
*
|
116 |
+
* @var AdInitiator
|
117 |
+
*/
|
118 |
+
private $adInitiator;
|
119 |
+
/**
|
120 |
+
* See RpmInitiator.
|
121 |
+
*
|
122 |
+
* @var RpmInitiator
|
123 |
+
*/
|
124 |
+
private $rpmInitiator;
|
125 |
+
/**
|
126 |
+
* See AnonymousAssetBuilder.
|
127 |
+
*
|
128 |
+
* @var AnonymousAssetBuilder
|
129 |
+
*/
|
130 |
+
private $anonymousAssetBuilder;
|
131 |
+
/**
|
132 |
+
* See TcfVendorListNormalizer.
|
133 |
+
*
|
134 |
+
* @var TcfVendorListNormalizer
|
135 |
+
*/
|
136 |
+
private $tcfVendorListNormalizer;
|
137 |
+
/**
|
138 |
+
* See ExcludeAssets.
|
139 |
+
*
|
140 |
+
* @var ExcludeAssets
|
141 |
+
*/
|
142 |
+
private $excludeAssets;
|
143 |
+
/**
|
144 |
+
* See Scanner.
|
145 |
+
*
|
146 |
+
* @var Scanner
|
147 |
+
*/
|
148 |
+
private $scanner;
|
149 |
+
/**
|
150 |
+
* See RealQueue.
|
151 |
+
*
|
152 |
+
* @var RealQueue
|
153 |
+
*/
|
154 |
+
private $realQueue;
|
155 |
+
/**
|
156 |
+
* Application core constructor.
|
157 |
+
*/
|
158 |
+
protected function __construct() {
|
159 |
+
parent::__construct();
|
160 |
+
// Load no-namespace API functions
|
161 |
+
foreach (['services'] as $apiInclude) {
|
162 |
+
require_once RCB_PATH . '/inc/api/' . $apiInclude . '.php';
|
163 |
+
}
|
164 |
+
// The Uuid4 must start with a non-number character to work with CSS selectors
|
165 |
+
$this->pageRequestUuid4 = 'a' . wp_generate_uuid4();
|
166 |
+
$this->blocker = \DevOwl\RealCookieBanner\view\Blocker::instance();
|
167 |
+
$this->scanner = \DevOwl\RealCookieBanner\scanner\Scanner::instance();
|
168 |
+
$this->realQueue = new \DevOwl\RealCookieBanner\Vendor\DevOwl\RealQueue\Core($this);
|
169 |
+
$automaticScanStarter = \DevOwl\RealCookieBanner\scanner\AutomaticScanStarter::instance();
|
170 |
+
$presetsPluginIntegrations = \DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations::instance();
|
171 |
+
// Create multilingual instance
|
172 |
+
$path = untrailingslashit(plugin_dir_path(RCB_FILE)) . $this->getPluginData('DomainPath');
|
173 |
+
$mo = trailingslashit($path) . RCB_TD . '-%s.mo';
|
174 |
+
$this->compLanguage = \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractLanguagePlugin::determineImplementation(
|
175 |
+
RCB_TD,
|
176 |
+
$mo,
|
177 |
+
\DevOwl\RealCookieBanner\Localization::class
|
178 |
+
);
|
179 |
+
// Enable `no-store` for our relevant WP REST API endpoints
|
180 |
+
\DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\ServiceNoStore::hook(
|
181 |
+
'/' . \DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Service::getNamespace($this)
|
182 |
+
);
|
183 |
+
\DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\ServiceNoStore::hook('/wp/v2/rcb-');
|
184 |
+
// Custom Post Types
|
185 |
+
// Register preset middleware
|
186 |
+
$extendsMiddleware = new \DevOwl\RealCookieBanner\presets\middleware\ExtendsMiddleware();
|
187 |
+
$adoptTierFromClassNamespaceMiddleware = new \DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware();
|
188 |
+
$disablePresetByNeedsMiddleware = new \DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware();
|
189 |
+
add_filter('RCB/Presets/Cookies/Middleware', [$extendsMiddleware, 'middleware'], 1, 6);
|
190 |
+
add_filter(
|
191 |
+
'RCB/Presets/Cookies/Middleware',
|
192 |
+
[
|
193 |
+
new \DevOwl\RealCookieBanner\presets\middleware\DisableTechnicalHandlingThroughPluginMiddleware(),
|
194 |
+
'middleware'
|
195 |
+
],
|
196 |
+
1
|
197 |
+
);
|
198 |
+
add_filter('RCB/Presets/Cookies/Middleware', [
|
199 |
+
\DevOwl\RealCookieBanner\presets\middleware\CookieGroupNamesBackwardsCompatibleMiddleware::createMiddlewareStatisticStatics(),
|
200 |
+
'middleware'
|
201 |
+
]);
|
202 |
+
add_filter(
|
203 |
+
'RCB/Presets/Cookies/Middleware',
|
204 |
+
[new \DevOwl\RealCookieBanner\presets\middleware\CookieManagerMiddleware(), 'middleware'],
|
205 |
+
10,
|
206 |
+
2
|
207 |
+
);
|
208 |
+
add_filter(
|
209 |
+
'RCB/Presets/Cookies/Middleware',
|
210 |
+
[new \DevOwl\RealCookieBanner\presets\middleware\CookieExistsMiddleware(), 'middleware'],
|
211 |
+
9,
|
212 |
+
3
|
213 |
+
);
|
214 |
+
add_filter(
|
215 |
+
'RCB/Presets/Cookies/Middleware',
|
216 |
+
[new \DevOwl\RealCookieBanner\presets\middleware\CookieBlockerPresetIdsMiddleware(), 'middleware'],
|
217 |
+
10,
|
218 |
+
4
|
219 |
+
);
|
220 |
+
add_filter('RCB/Presets/Cookies/Middleware', [$adoptTierFromClassNamespaceMiddleware, 'middleware'], 10, 2);
|
221 |
+
add_filter('RCB/Presets/Cookies/Middleware', [$disablePresetByNeedsMiddleware, 'middleware'], 10, 2);
|
222 |
+
add_filter('RCB/Presets/Cookies/Middleware', [$presetsPluginIntegrations, 'middleware_cookies_recommended']);
|
223 |
+
add_filter('RCB/Presets/Cookies/Middleware', [
|
224 |
+
new \DevOwl\RealCookieBanner\presets\middleware\CookiesDeactivateAutomaticContentBlockerCreationByNeedsMiddleware(),
|
225 |
+
'middleware'
|
226 |
+
]);
|
227 |
+
add_filter('RCB/Presets/Blocker/Middleware', [$extendsMiddleware, 'middleware'], 1, 6);
|
228 |
+
add_filter(
|
229 |
+
'RCB/Presets/Blocker/Middleware',
|
230 |
+
[new \DevOwl\RealCookieBanner\presets\middleware\BlockerHostsOptionsMiddleware(), 'middleware'],
|
231 |
+
5,
|
232 |
+
5
|
233 |
+
);
|
234 |
+
add_filter(
|
235 |
+
'RCB/Presets/Blocker/Middleware',
|
236 |
+
[new \DevOwl\RealCookieBanner\presets\middleware\BlockerExistsMiddleware(), 'middleware'],
|
237 |
+
10,
|
238 |
+
4
|
239 |
+
);
|
240 |
+
add_filter('RCB/Presets/Blocker/Middleware', [$adoptTierFromClassNamespaceMiddleware, 'middleware'], 10, 2);
|
241 |
+
add_filter('RCB/Presets/Blocker/Middleware', [$disablePresetByNeedsMiddleware, 'middleware'], 10, 2);
|
242 |
+
add_filter('RCB/Presets/Blocker/Middleware', [$presetsPluginIntegrations, 'middleware_blocker_recommended']);
|
243 |
+
// Official Consent API
|
244 |
+
add_filter('Consent/Block/HTML', [$this->getBlocker(), 'replace']);
|
245 |
+
add_action('init', [$presetsPluginIntegrations, 'init']);
|
246 |
+
add_action('RCB/Presets/Active', [$presetsPluginIntegrations, 'presets_active'], 10, 4);
|
247 |
+
add_action('activated_plugin', [$this->getActivator(), 'anyPluginToggledState']);
|
248 |
+
add_action('deactivated_plugin', [$this->getActivator(), 'anyPluginToggledState']);
|
249 |
+
add_action('admin_init', [$automaticScanStarter, 'probablyAddClientJob']);
|
250 |
+
add_action('DevOwl/RealProductManager/LicenseActivation/StatusChanged/' . RCB_SLUG, [
|
251 |
+
$automaticScanStarter,
|
252 |
+
'probablyAddClientJob'
|
253 |
+
]);
|
254 |
+
add_action('admin_init', [\DevOwl\RealCookieBanner\settings\Cookie::getInstance(), 'register_cap']);
|
255 |
+
add_action('admin_init', [\DevOwl\RealCookieBanner\settings\Blocker::getInstance(), 'register_cap']);
|
256 |
+
add_action('admin_init', [$this, 'registerSettings'], 1);
|
257 |
+
add_action('rest_api_init', [$this, 'registerSettings'], 1);
|
258 |
+
add_action('plugins_loaded', [\DevOwl\RealCookieBanner\Localization::class, 'multilingual'], 1);
|
259 |
+
add_action('wp', [$this->getAssets(), 'createHashedAssets']);
|
260 |
+
add_action('login_init', [$this->getAssets(), 'createHashedAssets']);
|
261 |
+
add_action(
|
262 |
+
'plugins_loaded',
|
263 |
+
[$this->getBlocker(), 'registerOutputBuffer'],
|
264 |
+
\DevOwl\RealCookieBanner\view\Blocker::OB_START_PLUGINS_LOADED_PRIORITY
|
265 |
+
);
|
266 |
+
add_action('DevOwl/Utils/NewVersionInstallation/' . RCB_SLUG, [
|
267 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::class,
|
268 |
+
'new_version_installation_after_2_6_5'
|
269 |
+
]);
|
270 |
+
add_filter('RCB/Blocker/Enabled', [$this->getScanner(), 'force_blocker_enabled']);
|
271 |
+
add_filter('customize_save_response', [$this, 'customize_save_response'], 10, 1);
|
272 |
+
add_filter('option_' . \DevOwl\RealCookieBanner\settings\Consent::SETTING_COOKIE_DURATION, [
|
273 |
+
\DevOwl\RealCookieBanner\settings\Consent::getInstance(),
|
274 |
+
'option_cookie_duration'
|
275 |
+
]);
|
276 |
+
// Cache relevant hooks
|
277 |
+
add_filter('RCB/Customize/Updated', [\DevOwl\RealCookieBanner\Cache::getInstance(), 'customize_updated']);
|
278 |
+
add_filter('RCB/Settings/Updated', [\DevOwl\RealCookieBanner\Cache::getInstance(), 'settings_updated']);
|
279 |
+
add_filter('RCB/Settings/Updated', [
|
280 |
+
\DevOwl\RealCookieBanner\view\checklist\SaveSettings::class,
|
281 |
+
'settings_updated'
|
282 |
+
]);
|
283 |
+
add_filter(
|
284 |
+
'RCB/Settings/Updated',
|
285 |
+
[\DevOwl\RealCookieBanner\view\checklist\ActivateBanner::class, 'settings_updated'],
|
286 |
+
10,
|
287 |
+
2
|
288 |
+
);
|
289 |
+
add_filter('RCB/Revision/Hash', [\DevOwl\RealCookieBanner\Cache::getInstance(), 'revision_hash']);
|
290 |
+
add_action('DevOwl/RealProductManager/LicenseActivation/StatusChanged/' . RCB_SLUG, [
|
291 |
+
\DevOwl\RealCookieBanner\Cache::getInstance(),
|
292 |
+
'invalidate'
|
293 |
+
]);
|
294 |
+
// Compatibility hooks (Blocker)
|
295 |
+
add_filter('rocket_buffer', [$this->getBlocker(), 'replace'], 1);
|
296 |
+
// WP Rocket Lazy loading compatibility
|
297 |
+
add_filter('litespeed_buffer_before', [$this->getBlocker(), 'replace'], 1);
|
298 |
+
// LiteSpeed Cache
|
299 |
+
add_filter('litespeed_ccss_url', [$this->getBlocker(), 'modifyUrlToSkipContentBlocker']);
|
300 |
+
// LiteSpeed Cache Critical CSS
|
301 |
+
add_filter('litespeed_ucss_url', [$this->getBlocker(), 'modifyUrlToSkipContentBlocker']);
|
302 |
+
// LiteSpeed Cache Unique CSS
|
303 |
+
add_filter('us_grid_listing_post', [$this->getBlocker(), 'replace']);
|
304 |
+
// Impreza Lazy Loading posts
|
305 |
+
add_action(
|
306 |
+
'shutdown',
|
307 |
+
function () {
|
308 |
+
// [Theme Comp] Themify
|
309 |
+
if (has_action('shutdown', ['TFCache', 'tf_cache_end']) !== \false) {
|
310 |
+
echo $this->getBlocker()->replace(\ob_get_clean());
|
311 |
+
}
|
312 |
+
},
|
313 |
+
0
|
314 |
+
);
|
315 |
+
add_shortcode(\DevOwl\RealCookieBanner\view\shortcode\LinkShortcode::TAG, [
|
316 |
+
\DevOwl\RealCookieBanner\view\shortcode\LinkShortcode::class,
|
317 |
+
'render'
|
318 |
+
]);
|
319 |
+
add_shortcode(\DevOwl\RealCookieBanner\view\shortcode\PrintUuidShortcode::TAG, [
|
320 |
+
\DevOwl\RealCookieBanner\view\shortcode\PrintUuidShortcode::class,
|
321 |
+
'render'
|
322 |
+
]);
|
323 |
+
$this->adInitiator = new \DevOwl\RealCookieBanner\AdInitiator();
|
324 |
+
$this->adInitiator->start();
|
325 |
+
$this->rpmInitiator = new \DevOwl\RealCookieBanner\RpmInitiator();
|
326 |
+
$this->rpmInitiator->start();
|
327 |
+
$this->anonymousAssetBuilder = new \DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\AnonymousAssetBuilder(
|
328 |
+
$this->getTableName(
|
329 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\DeliverAnonymousAsset\AnonymousAssetBuilder::TABLE_NAME
|
330 |
+
),
|
331 |
+
RCB_OPT_PREFIX,
|
332 |
+
\true
|
333 |
+
);
|
334 |
+
$this->tcfVendorListNormalizer = new \DevOwl\RealCookieBanner\Vendor\DevOwl\TcfVendorListNormalize\TcfVendorListNormalizer(
|
335 |
+
RCB_DB_PREFIX,
|
336 |
+
\defined('DEVOWL_WP_DEV') && \constant('DEVOWL_WP_DEV')
|
337 |
+
? 'http://real_cookie_banner_backend:8000/1.0.0/tcf/gvl/'
|
338 |
+
: 'https://rcb.devowl.io/1.0.0/tcf/gvl/',
|
339 |
+
$this->getCompLanguage()
|
340 |
+
);
|
341 |
+
$this->getScanner()->probablyForceSitemaps();
|
342 |
+
$this->overrideConstructFreemium();
|
343 |
+
$this->overrideConstruct();
|
344 |
+
}
|
345 |
+
/**
|
346 |
+
* Define constants which relies on i18n localization loaded.
|
347 |
+
*/
|
348 |
+
public function i18n() {
|
349 |
+
parent::i18n();
|
350 |
+
// Internal hook; see CU-jbayae
|
351 |
+
$args = apply_filters('RCB/Misc/ProUrlArgs', ['partner' => null, 'aid' => null]);
|
352 |
+
// Check if affiliate Link is allowed (only when privacy policy got accepted)
|
353 |
+
$isLicensed = !empty(
|
354 |
+
$this->getRpmInitiator()
|
355 |
+
->getPluginUpdater()
|
356 |
+
->getCurrentBlogLicense()
|
357 |
+
->getActivation()
|
358 |
+
->getCode()
|
359 |
+
);
|
360 |
+
if (!$isLicensed) {
|
361 |
+
$args['aid'] = null;
|
362 |
+
}
|
363 |
+
$translatedUrl = __('https://devowl.io/go/real-cookie-banner?source=rcb-lite', RCB_TD);
|
364 |
+
$translatedUrl = add_query_arg($args, $translatedUrl);
|
365 |
+
\define('RCB_PRO_VERSION', $translatedUrl);
|
366 |
+
}
|
367 |
+
/**
|
368 |
+
* Register settings.
|
369 |
+
*/
|
370 |
+
public function registerSettings() {
|
371 |
+
\DevOwl\RealCookieBanner\settings\General::getInstance()->register();
|
372 |
+
\DevOwl\RealCookieBanner\settings\Consent::getInstance()->register();
|
373 |
+
\DevOwl\RealCookieBanner\settings\Multisite::getInstance()->register();
|
374 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance()->register();
|
375 |
+
\DevOwl\RealCookieBanner\settings\TCF::getInstance()->register();
|
376 |
+
$this->overrideRegisterSettings();
|
377 |
+
}
|
378 |
+
/**
|
379 |
+
* The init function is fired even the init hook of WordPress. If possible
|
380 |
+
* it should register all hooks to have them in one place.
|
381 |
+
*/
|
382 |
+
public function init() {
|
383 |
+
\DevOwl\RealCookieBanner\settings\Cookie::getInstance()->register();
|
384 |
+
\DevOwl\RealCookieBanner\settings\Blocker::getInstance()->register();
|
385 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->register();
|
386 |
+
$this->configPage = \DevOwl\RealCookieBanner\view\ConfigPage::instance();
|
387 |
+
$this->banner = \DevOwl\RealCookieBanner\view\Banner::instance();
|
388 |
+
$this->excludeAssets = new \DevOwl\RealCookieBanner\Vendor\DevOwl\CacheInvalidate\ExcludeAssets($this);
|
389 |
+
$presetsService = \DevOwl\RealCookieBanner\rest\Presets::instance();
|
390 |
+
$configService = \DevOwl\RealCookieBanner\rest\Config::instance();
|
391 |
+
$viewScanner = \DevOwl\RealCookieBanner\view\Scanner::instance();
|
392 |
+
$restScanner = \DevOwl\RealCookieBanner\rest\Scanner::instance();
|
393 |
+
// Register all your hooks here
|
394 |
+
add_action('rest_api_init', [$presetsService, 'rest_api_init']);
|
395 |
+
add_action('rest_api_init', [$configService, 'rest_api_init']);
|
396 |
+
add_action('rest_api_init', [\DevOwl\RealCookieBanner\rest\Consent::instance(), 'rest_api_init']);
|
397 |
+
add_action('rest_api_init', [\DevOwl\RealCookieBanner\rest\Stats::instance(), 'rest_api_init']);
|
398 |
+
add_action('rest_api_init', [$restScanner, 'rest_api_init']);
|
399 |
+
add_action('rest_api_init', [\DevOwl\RealCookieBanner\rest\Import::instance(), 'rest_api_init']);
|
400 |
+
add_action('admin_enqueue_scripts', [$this->getAssets(), 'admin_enqueue_scripts']);
|
401 |
+
add_action('wp_enqueue_scripts', [$this->getAssets(), 'wp_enqueue_scripts'], 0);
|
402 |
+
add_action('login_enqueue_scripts', [$this->getAssets(), 'login_enqueue_scripts'], 0);
|
403 |
+
add_action('DevOwl/RealQueue/Job/Label', [$this->getScanner(), 'real_queue_job_label'], 10, 3);
|
404 |
+
add_action('DevOwl/RealQueue/Job/Actions', [$this->getScanner(), 'real_queue_job_actions'], 10, 2);
|
405 |
+
add_action('DevOwl/RealQueue/Error/Description', [$this->getScanner(), 'real_queue_error_description'], 10, 3);
|
406 |
+
add_action('DevOwl/RealQueue/EnqueueScripts', [$this->getAssets(), 'real_queue_enqueue_scripts']);
|
407 |
+
add_action('DevOwl/RealQueue/Rest/Status/AdditionalData/rcb-scan-list', [
|
408 |
+
$restScanner,
|
409 |
+
'real_queue_additional_data_list'
|
410 |
+
]);
|
411 |
+
add_action('DevOwl/RealQueue/Rest/Status/AdditionalData/rcb-scan-notice', [
|
412 |
+
$restScanner,
|
413 |
+
'real_queue_additional_data_notice'
|
414 |
+
]);
|
415 |
+
add_action('admin_menu', [$this->getConfigPage(), 'admin_menu']);
|
416 |
+
add_filter(
|
417 |
+
'plugin_action_links_' . plugin_basename(RCB_FILE),
|
418 |
+
[$this->getConfigPage(), 'plugin_action_links'],
|
419 |
+
10,
|
420 |
+
2
|
421 |
+
);
|
422 |
+
add_action('customize_register', [$this->getBanner()->getCustomize(), 'customize_register']);
|
423 |
+
add_action('wp_footer', [$this->getBanner(), 'wp_footer']);
|
424 |
+
add_action('login_footer', [$this->getBanner(), 'wp_footer']);
|
425 |
+
add_action('admin_bar_menu', [$this->getBanner(), 'admin_bar_menu'], 100);
|
426 |
+
add_action('admin_bar_menu', [$viewScanner, 'admin_bar_menu'], 100);
|
427 |
+
add_action(
|
428 |
+
'save_post_' . \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
429 |
+
[\DevOwl\RealCookieBanner\view\checklist\AddCookie::class, 'save_post'],
|
430 |
+
10,
|
431 |
+
3
|
432 |
+
);
|
433 |
+
add_action(
|
434 |
+
'save_post_' . \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
435 |
+
[\DevOwl\RealCookieBanner\settings\Blocker::getInstance(), 'save_post'],
|
436 |
+
10,
|
437 |
+
3
|
438 |
+
);
|
439 |
+
add_action('save_post_' . \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME, [
|
440 |
+
\DevOwl\RealCookieBanner\Cache::getInstance(),
|
441 |
+
'invalidate'
|
442 |
+
]);
|
443 |
+
add_action(
|
444 |
+
'delete_' . \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME,
|
445 |
+
[\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance(), 'deleted'],
|
446 |
+
10,
|
447 |
+
4
|
448 |
+
);
|
449 |
+
add_action('edited_' . \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME, [
|
450 |
+
\DevOwl\RealCookieBanner\Stats::getInstance(),
|
451 |
+
'edited_group'
|
452 |
+
]);
|
453 |
+
add_action('deleted_post', [\DevOwl\RealCookieBanner\settings\Blocker::getInstance(), 'deleted_post']);
|
454 |
+
add_action('admin_notices', [new \DevOwl\RealCookieBanner\presets\UpdateNotice(), 'admin_notices']);
|
455 |
+
add_action('admin_notices', [$this->getConfigPage(), 'admin_notices_preinstalled_environment']);
|
456 |
+
add_action('admin_notices', [$this->getConfigPage(), 'admin_notices_ad_blocker']);
|
457 |
+
add_action('posts_where', [\DevOwl\RealCookieBanner\Utils::class, 'posts_where_find_in_set'], 10, 2);
|
458 |
+
add_action('post_updated', [$this->getScanner()->getOnChangeDetection(), 'post_updated'], 10, 3);
|
459 |
+
add_action('save_post', [$this->getScanner()->getOnChangeDetection(), 'save_post'], 10, 2);
|
460 |
+
add_action('delete_post', [$this->getScanner()->getOnChangeDetection(), 'delete_post'], 10);
|
461 |
+
add_action('wp_trash_post', [$this->getScanner()->getOnChangeDetection(), 'wp_trash_post']);
|
462 |
+
add_action('untrash_post', [$this->getScanner()->getOnChangeDetection(), 'wp_trash_post']);
|
463 |
+
add_filter('RCB/Hints', [$this->getAssets(), 'hints_dashboard_tile_predefined_links'], 100);
|
464 |
+
add_filter('rest_post_dispatch', [$configService, 'rest_post_dispatch'], 10, 3);
|
465 |
+
add_filter(
|
466 |
+
'rest_prepare_' . \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
467 |
+
[$presetsService, 'rest_prepare_presets'],
|
468 |
+
10,
|
469 |
+
2
|
470 |
+
);
|
471 |
+
add_filter(
|
472 |
+
'rest_prepare_' . \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
473 |
+
[$presetsService, 'rest_prepare_presets'],
|
474 |
+
10,
|
475 |
+
2
|
476 |
+
);
|
477 |
+
add_filter('RCB/Revision/Current', [
|
478 |
+
new \DevOwl\RealCookieBanner\comp\migration\DashboardTileMigrationMajor2(),
|
479 |
+
'revisionCurrent'
|
480 |
+
]);
|
481 |
+
add_filter('RCB/Revision/Current', [$this->getScanner()->getQuery(), 'revisionCurrent']);
|
482 |
+
add_filter('RCB/Revision/Array', [\DevOwl\RealCookieBanner\settings\Blocker::getInstance(), 'revisionArray']);
|
483 |
+
add_filter(
|
484 |
+
'RCB/Revision/BackwardsCompatibility',
|
485 |
+
[\DevOwl\RealCookieBanner\view\customize\banner\Texts::class, 'applyBlockerTextsBackwardsCompatibility'],
|
486 |
+
10,
|
487 |
+
2
|
488 |
+
);
|
489 |
+
// Multilingual
|
490 |
+
add_filter('rest_' . \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME . '_query', [
|
491 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
492 |
+
'rest_query'
|
493 |
+
]);
|
494 |
+
add_filter('rest_' . \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME . '_query', [
|
495 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
496 |
+
'rest_query'
|
497 |
+
]);
|
498 |
+
add_action('rest_api_init', [\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'rest_api_init'], 1);
|
499 |
+
add_filter('RCB/Hints', [\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'hints']);
|
500 |
+
add_filter('RCB/Query/Arguments', [
|
501 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
502 |
+
'queryArguments'
|
503 |
+
]);
|
504 |
+
add_filter(
|
505 |
+
'DevOwl/Multilingual/Copy/Meta/post/' . \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_COOKIES,
|
506 |
+
[\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'copy_blocker_cookies_meta'],
|
507 |
+
10,
|
508 |
+
4
|
509 |
+
);
|
510 |
+
add_filter(
|
511 |
+
'DevOwl/Multilingual/Copy/Meta/post/' . \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_TCF_VENDORS,
|
512 |
+
[\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'copy_blocker_cookies_meta'],
|
513 |
+
10,
|
514 |
+
4
|
515 |
+
);
|
516 |
+
add_filter('RCB/Revision/Option/' . \DevOwl\RealCookieBanner\settings\General::SETTING_IMPRINT_ID, [
|
517 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
518 |
+
'revisionOptionValue_pageId'
|
519 |
+
]);
|
520 |
+
add_filter('RCB/Revision/Option/' . \DevOwl\RealCookieBanner\settings\General::SETTING_PRIVACY_POLICY_ID, [
|
521 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
522 |
+
'revisionOptionValue_pageId'
|
523 |
+
]);
|
524 |
+
add_filter('RCB/Revision/Context', [\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'context']);
|
525 |
+
add_filter('RCB/Revision/Context/Translate', [
|
526 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
527 |
+
'contextTranslate'
|
528 |
+
]);
|
529 |
+
add_filter('RCB/Revision/Hash', [\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(), 'revisionHash']);
|
530 |
+
add_filter('RCB/Revision/NeedsRetrigger', [
|
531 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance(),
|
532 |
+
'revisionNeedsRetrigger'
|
533 |
+
]);
|
534 |
+
add_filter(
|
535 |
+
'RCB/Presets/Cookies',
|
536 |
+
[\DevOwl\RealCookieBanner\DemoEnvironment::getInstance(), 'cookiePresets'],
|
537 |
+
\PHP_INT_MAX
|
538 |
+
);
|
539 |
+
add_filter(
|
540 |
+
'RCB/Presets/Blocker',
|
541 |
+
[\DevOwl\RealCookieBanner\DemoEnvironment::getInstance(), 'blockerPresets'],
|
542 |
+
\PHP_INT_MAX
|
543 |
+
);
|
544 |
+
if ($this->getScanner()->isActive()) {
|
545 |
+
$this->getScanner()->reduceCurrentUserPermissions();
|
546 |
+
$this->getScanner()->bypassWebsiteBlockers();
|
547 |
+
add_action('shutdown', [$this->getScanner(), 'teardown']);
|
548 |
+
add_filter('show_admin_bar', '__return_false');
|
549 |
+
add_filter('RCB/Blocker/IsBlocked', [$this->getScanner(), 'is_blocked'], 20, 3);
|
550 |
+
add_filter(
|
551 |
+
'RCB/Blocker/InlineStyle/Rule/IsBlocked',
|
552 |
+
[$this->getScanner(), 'is_blocked_inline_style_rule'],
|
553 |
+
20,
|
554 |
+
2
|
555 |
+
);
|
556 |
+
add_filter('RCB/Blocker/InlineScript/IsBlocked', [$this->getScanner(), 'is_blocked_inline_script'], 20);
|
557 |
+
add_filter(
|
558 |
+
'RCB/Blocker/SelectorSyntax/IsBlocked',
|
559 |
+
[$this->getScanner(), 'is_blocked_selector_syntax'],
|
560 |
+
20,
|
561 |
+
2
|
562 |
+
);
|
563 |
+
add_filter('RCB/Blocker/IsBlocked/AllowMultiple', '__return_true');
|
564 |
+
add_filter('RCB/Blocker/ResolveBlockables', [$this->getScanner(), 'resolve_blockables'], 50);
|
565 |
+
}
|
566 |
+
// Allow to reset all available data and recreated
|
567 |
+
if (isset($_GET['rcb-reset-all']) && current_user_can('activate_plugins')) {
|
568 |
+
\DevOwl\RealCookieBanner\settings\Reset::getInstance()->all();
|
569 |
+
wp_safe_redirect($this->getConfigPage()->getUrl());
|
570 |
+
exit();
|
571 |
+
}
|
572 |
+
// Create default content
|
573 |
+
if (
|
574 |
+
$this->getConfigPage()->isVisible() &&
|
575 |
+
(get_site_option(\DevOwl\RealCookieBanner\Activator::OPTION_NAME_NEEDS_DEFAULT_CONTENT) ||
|
576 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup() === null ||
|
577 |
+
\count(
|
578 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::getInstance()->getLanguagesWithoutEssentialGroup()
|
579 |
+
) > 0)
|
580 |
+
) {
|
581 |
+
$this->getActivator()->addInitialContent();
|
582 |
+
}
|
583 |
+
$this->getBanner()
|
584 |
+
->getCustomize()
|
585 |
+
->enableOptionsAutoload();
|
586 |
+
\DevOwl\RealCookieBanner\settings\General::getInstance()->enableOptionsAutoload();
|
587 |
+
\DevOwl\RealCookieBanner\settings\Consent::getInstance()->enableOptionsAutoload();
|
588 |
+
\DevOwl\RealCookieBanner\settings\Multisite::getInstance()->enableOptionsAutoload();
|
589 |
+
\DevOwl\RealCookieBanner\settings\TCF::getInstance()->enableOptionsAutoload();
|
590 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance()->enableOptionsAutoload();
|
591 |
+
\DevOwl\RealCookieBanner\settings\ModalHints::getInstance()->enableOptionsAutoload();
|
592 |
+
// If we reached next thursday, update the GVL automatically
|
593 |
+
\DevOwl\RealCookieBanner\settings\TCF::getInstance()->probablyUpdateGvl();
|
594 |
+
// If we reached next sunday, update the country database automatically
|
595 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance()->probablyUpdateDatabase();
|
596 |
+
// If country bypass is active, add the filter so the frontend fetches the WP REST API and modify revision
|
597 |
+
if (\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance()->isActive()) {
|
598 |
+
add_action('RCB/Consent/Created', [
|
599 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(),
|
600 |
+
'consentCreated'
|
601 |
+
]);
|
602 |
+
add_filter(
|
603 |
+
'RCB/Consent/DynamicPreDecision',
|
604 |
+
[\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(), 'dynamicPredecision'],
|
605 |
+
10,
|
606 |
+
2
|
607 |
+
);
|
608 |
+
add_filter(
|
609 |
+
'RCB/Revision/Option/' .
|
610 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::SETTING_COUNTRY_BYPASS_COUNTRIES,
|
611 |
+
[
|
612 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(),
|
613 |
+
'revisionOptionCountriesExpandPredefinedLists'
|
614 |
+
]
|
615 |
+
);
|
616 |
+
add_filter('RCB/Revision/Array/Independent', [
|
617 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(),
|
618 |
+
'revisionArrayIndependent'
|
619 |
+
]);
|
620 |
+
}
|
621 |
+
$this->overrideInitCustomize();
|
622 |
+
$this->overrideInit();
|
623 |
+
}
|
624 |
+
/**
|
625 |
+
* Check if any plugin specific setting got changed in customize.
|
626 |
+
*
|
627 |
+
* @param array $response
|
628 |
+
*/
|
629 |
+
public function customize_save_response($response) {
|
630 |
+
if (
|
631 |
+
\DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\AbstractCustomizePanel::gotUpdated(
|
632 |
+
$response,
|
633 |
+
RCB_OPT_PREFIX
|
634 |
+
)
|
635 |
+
) {
|
636 |
+
/**
|
637 |
+
* Real Cookie Banner (Content Blocker, banner) got updated in the Customize.
|
638 |
+
*
|
639 |
+
* @hook RCB/Customize/Updated
|
640 |
+
* @param {array} $response
|
641 |
+
* @return {array}
|
642 |
+
*/
|
643 |
+
$response = apply_filters('RCB/Customize/Updated', $response);
|
644 |
+
}
|
645 |
+
return $response;
|
646 |
+
}
|
647 |
+
/**
|
648 |
+
* See filter RCB/Query/Arguments.
|
649 |
+
*
|
650 |
+
* @param array $arguments
|
651 |
+
* @param string $context
|
652 |
+
*/
|
653 |
+
public function queryArguments($arguments, $context) {
|
654 |
+
/**
|
655 |
+
* Modify arguments to `get_posts` and `get_terms`. This can be especially useful for WPML / PolyLang.
|
656 |
+
*
|
657 |
+
* @hook RCB/Query/Arguments
|
658 |
+
* @param {array} $arguments
|
659 |
+
* @param {string} $context
|
660 |
+
* @return {array}
|
661 |
+
*/
|
662 |
+
return apply_filters('RCB/Query/Arguments', \array_merge(['suppress_filters' => \false], $arguments), $context);
|
663 |
+
}
|
664 |
+
/**
|
665 |
+
* Return the base URL to assets specially for Real Cookie Banner.
|
666 |
+
*
|
667 |
+
* @param string $path
|
668 |
+
*/
|
669 |
+
public function getBaseAssetsUrl($path) {
|
670 |
+
return \DevOwl\RealCookieBanner\Vendor\DevOwl\RealUtils\Core::getInstance()->getBaseAssetsUrl(
|
671 |
+
'wp-real-cookie-banner/' . $path
|
672 |
+
);
|
673 |
+
}
|
674 |
+
/**
|
675 |
+
* Get config page.
|
676 |
+
*
|
677 |
+
* @codeCoverageIgnore
|
678 |
+
*/
|
679 |
+
public function getConfigPage() {
|
680 |
+
return $this->configPage;
|
681 |
+
}
|
682 |
+
/**
|
683 |
+
* Get banner.
|
684 |
+
*
|
685 |
+
* @codeCoverageIgnore
|
686 |
+
*/
|
687 |
+
public function getBanner() {
|
688 |
+
return $this->banner;
|
689 |
+
}
|
690 |
+
/**
|
691 |
+
* Get blocker.
|
692 |
+
*
|
693 |
+
* @codeCoverageIgnore
|
694 |
+
*/
|
695 |
+
public function getBlocker() {
|
696 |
+
return $this->blocker;
|
697 |
+
}
|
698 |
+
/**
|
699 |
+
* Get request uuid 4.
|
700 |
+
*
|
701 |
+
* @codeCoverageIgnore
|
702 |
+
*/
|
703 |
+
public function getPageRequestUuid4() {
|
704 |
+
return $this->pageRequestUuid4;
|
705 |
+
}
|
706 |
+
/**
|
707 |
+
* Get compatibility language class.
|
708 |
+
*
|
709 |
+
* @codeCoverageIgnore
|
710 |
+
*/
|
711 |
+
public function getCompLanguage() {
|
712 |
+
return $this->compLanguage;
|
713 |
+
}
|
714 |
+
/**
|
715 |
+
* Get ad initiator from `real-utils`.
|
716 |
+
*
|
717 |
+
* @codeCoverageIgnore
|
718 |
+
*/
|
719 |
+
public function getAdInitiator() {
|
720 |
+
return $this->adInitiator;
|
721 |
+
}
|
722 |
+
/**
|
723 |
+
* Get ad initiator from `real-product-manager-wp-client`.
|
724 |
+
*
|
725 |
+
* @codeCoverageIgnore
|
726 |
+
*/
|
727 |
+
public function getRpmInitiator() {
|
728 |
+
return $this->rpmInitiator;
|
729 |
+
}
|
730 |
+
/**
|
731 |
+
* Getter.
|
732 |
+
*
|
733 |
+
* @codeCoverageIgnore
|
734 |
+
*/
|
735 |
+
public function getAnonymousAssetBuilder() {
|
736 |
+
return $this->anonymousAssetBuilder;
|
737 |
+
}
|
738 |
+
/**
|
739 |
+
* Getter.
|
740 |
+
*
|
741 |
+
* @codeCoverageIgnore
|
742 |
+
*/
|
743 |
+
public function getTcfVendorListNormalizer() {
|
744 |
+
return $this->tcfVendorListNormalizer;
|
745 |
+
}
|
746 |
+
/**
|
747 |
+
* Getter.
|
748 |
+
*
|
749 |
+
* @codeCoverageIgnore
|
750 |
+
*/
|
751 |
+
public function getExcludeAssets() {
|
752 |
+
return $this->excludeAssets;
|
753 |
+
}
|
754 |
+
/**
|
755 |
+
* Getter.
|
756 |
+
*
|
757 |
+
* @codeCoverageIgnore
|
758 |
+
*/
|
759 |
+
public function getScanner() {
|
760 |
+
return $this->scanner;
|
761 |
+
}
|
762 |
+
/**
|
763 |
+
* Getter.
|
764 |
+
*
|
765 |
+
* @codeCoverageIgnore
|
766 |
+
*/
|
767 |
+
public function getRealQueue() {
|
768 |
+
return $this->realQueue;
|
769 |
+
}
|
770 |
+
/**
|
771 |
+
* Check if a license is active.
|
772 |
+
*/
|
773 |
+
public function isLicenseActive() {
|
774 |
+
return !empty(
|
775 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
776 |
+
->getRpmInitiator()
|
777 |
+
->getPluginUpdater()
|
778 |
+
->getCurrentBlogLicense()
|
779 |
+
->getActivation()
|
780 |
+
->getCode()
|
781 |
+
);
|
782 |
+
}
|
783 |
+
/**
|
784 |
+
* Get singleton core class.
|
785 |
+
*
|
786 |
+
* @return Core
|
787 |
+
*/
|
788 |
+
public static function getInstance() {
|
789 |
+
return !isset(self::$me) ? (self::$me = new \DevOwl\RealCookieBanner\Core()) : self::$me;
|
790 |
+
}
|
791 |
+
}
|
792 |
+
// Inherited from packages/utils/src/Service
|
793 |
+
/**
|
794 |
+
* See API docs.
|
795 |
+
*
|
796 |
+
* @api {get} /real-cookie-banner/v1/plugin Get plugin information
|
797 |
+
* @apiHeader {string} X-WP-Nonce
|
798 |
+
* @apiName GetPlugin
|
799 |
+
* @apiGroup Plugin
|
800 |
+
*
|
801 |
+
* @apiSuccessExample {json} Success-Response:
|
802 |
+
* {
|
803 |
+
* Name: "My plugin",
|
804 |
+
* PluginURI: "https://example.com/my-plugin",
|
805 |
+
* Version: "0.1.0",
|
806 |
+
* Description: "This plugin is doing something.",
|
807 |
+
* Author: "<a href="https://example.com">John Smith</a>",
|
808 |
+
* AuthorURI: "https://example.com",
|
809 |
+
* TextDomain: "my-plugin",
|
810 |
+
* DomainPath: "/languages",
|
811 |
+
* Network: false,
|
812 |
+
* Title: "<a href="https://example.com">My plugin</a>",
|
813 |
+
* AuthorName: "John Smith"
|
814 |
+
* }
|
815 |
+
* @apiVersion 1.0.0
|
816 |
+
*/
|
inc/DemoEnvironment.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\presets\BlockerPresets;
|
7 |
+
use DevOwl\RealCookieBanner\presets\CookiePresets;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Handle try.devowl.io specific settings, e. g. hide preset attributes.
|
14 |
+
*/
|
15 |
+
class DemoEnvironment {
|
16 |
+
use UtilsProvider;
|
17 |
+
/**
|
18 |
+
* Singleton instance.
|
19 |
+
*
|
20 |
+
* @var DemoEnvironment
|
21 |
+
*/
|
22 |
+
private static $me = null;
|
23 |
+
/**
|
24 |
+
* C'tor.
|
25 |
+
*/
|
26 |
+
private function __construct() {
|
27 |
+
// Silence is golden.
|
28 |
+
}
|
29 |
+
/**
|
30 |
+
* Remove all PRO cookie presets from demo environment.
|
31 |
+
*
|
32 |
+
* @param string[] $presets
|
33 |
+
*/
|
34 |
+
public function cookiePresets($presets) {
|
35 |
+
if ($this->isDemoEnv()) {
|
36 |
+
foreach ($presets as $key => $preset) {
|
37 |
+
if (!\in_array($key, \array_keys(\DevOwl\RealCookieBanner\presets\CookiePresets::CLASSES), \true)) {
|
38 |
+
$presets[$key] = \str_replace(
|
39 |
+
'DevOwl\\RealCookieBanner\\Vendor\\lite\\presets',
|
40 |
+
'DevOwl\\RealCookieBanner\\Vendor\\presets\\pro',
|
41 |
+
$preset
|
42 |
+
);
|
43 |
+
}
|
44 |
+
}
|
45 |
+
}
|
46 |
+
return $presets;
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* Remove all PRO blocker presets from demo environment.
|
50 |
+
*
|
51 |
+
* @param array $presets
|
52 |
+
*/
|
53 |
+
public function blockerPresets($presets) {
|
54 |
+
if ($this->isDemoEnv()) {
|
55 |
+
foreach ($presets as $key => &$preset) {
|
56 |
+
if (!\in_array($key, \array_keys(\DevOwl\RealCookieBanner\presets\BlockerPresets::CLASSES), \true)) {
|
57 |
+
$presets[$key] = \str_replace(
|
58 |
+
'DevOwl\\RealCookieBanner\\Vendor\\lite\\presets\\blocker',
|
59 |
+
'DevOwl\\RealCookieBanner\\Vendor\\presets\\pro\\blocker',
|
60 |
+
$preset
|
61 |
+
);
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
return $presets;
|
66 |
+
}
|
67 |
+
/**
|
68 |
+
* Checks if the current running WordPress instance is configured as sandbox
|
69 |
+
* because then some configurations are not allowed to change.
|
70 |
+
*/
|
71 |
+
public function isDemoEnv() {
|
72 |
+
return \defined('MATTHIASWEB_DEMO') && \constant('MATTHIASWEB_DEMO');
|
73 |
+
}
|
74 |
+
/**
|
75 |
+
* Get singleton instance.
|
76 |
+
*
|
77 |
+
* @codeCoverageIgnore
|
78 |
+
*/
|
79 |
+
public static function getInstance() {
|
80 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\DemoEnvironment()) : self::$me;
|
81 |
+
}
|
82 |
+
}
|
inc/IpHandler.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\settings\Consent;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Handle IPs hashed correctly depending on settings.
|
13 |
+
*/
|
14 |
+
class IpHandler {
|
15 |
+
use UtilsProvider;
|
16 |
+
const FLOODING_SECONDS = 60;
|
17 |
+
const FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS = 255;
|
18 |
+
/**
|
19 |
+
* Singleton instance.
|
20 |
+
*
|
21 |
+
* @var IpHandler
|
22 |
+
*/
|
23 |
+
private static $me = null;
|
24 |
+
/**
|
25 |
+
* C'tor.
|
26 |
+
*/
|
27 |
+
private function __construct() {
|
28 |
+
// Silence is golden.
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* Checks the current IP if it is already persisted, it avoids to
|
32 |
+
* flood the API all x seconds.
|
33 |
+
*
|
34 |
+
* @return boolean Returns true if you are allowed to create a new consent
|
35 |
+
*/
|
36 |
+
public function isFlooding() {
|
37 |
+
global $wpdb;
|
38 |
+
$ips = $this->persistIp();
|
39 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
40 |
+
/**
|
41 |
+
* IP flooding is implemented to forbid a new user consent by max requests to the API.
|
42 |
+
* Here you can modify the flooding seconds.
|
43 |
+
*
|
44 |
+
* @hook RCB/IpHandler/FloodingSeconds
|
45 |
+
* @param {int} $seconds
|
46 |
+
* @returns {int}
|
47 |
+
*/
|
48 |
+
$floodingSeconds = \intval(apply_filters('RCB/IpHandler/FloodingSeconds', self::FLOODING_SECONDS));
|
49 |
+
/**
|
50 |
+
* IP flooding is implemented to forbid a new user consent by max requests to the API.
|
51 |
+
* Here you can modify the maximum allowed entries within the given flooding seconds.
|
52 |
+
*
|
53 |
+
* @hook RCB/IpHandler/FloodingMaxEntries
|
54 |
+
* @param {int} $max
|
55 |
+
* @returns {int}
|
56 |
+
*/
|
57 |
+
$floodingMaxEntries = \intval(
|
58 |
+
apply_filters('RCB/IpHandler/FloodingMaxEntries', self::FLOODING_MAX_ENTRIES_IN_DEFINED_SECONDS)
|
59 |
+
);
|
60 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
61 |
+
$sql = \str_ireplace(
|
62 |
+
"= 'NULL'",
|
63 |
+
'IS NULL',
|
64 |
+
$wpdb->prepare(
|
65 |
+
"SELECT COUNT(*)\n FROM {$table_name}\n WHERE ipv4 = %d\n AND ipv6 = %s\n AND ipv4_hash = %s\n AND ipv6_hash = %s\n AND created > (NOW() - INTERVAL " .
|
66 |
+
$floodingSeconds .
|
67 |
+
' SECOND)',
|
68 |
+
$ips['ipv4'] === null ? 'NULL' : $ips['ipv4'],
|
69 |
+
$ips['ipv6'] === null ? 'NULL' : $ips['ipv6'],
|
70 |
+
$ips['ipv4_hash'] === null ? 'NULL' : $ips['ipv4_hash'],
|
71 |
+
$ips['ipv6_hash'] === null ? 'NULL' : $ips['ipv6_hash']
|
72 |
+
)
|
73 |
+
);
|
74 |
+
$result = $wpdb->get_var($sql);
|
75 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
76 |
+
$isFlooding = \intval($result) > $floodingMaxEntries;
|
77 |
+
/**
|
78 |
+
* IP flooding is implemented to forbid a new user consent by max requests to the API.
|
79 |
+
*
|
80 |
+
* @hook RCB/IpHandler/Flooding
|
81 |
+
* @param {boolean} isFlooding
|
82 |
+
* @returns {boolean}
|
83 |
+
*/
|
84 |
+
return \boolval(apply_filters('RCB/IpHandler/Flooding', $isFlooding));
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* Get persistable IP for database. It also respects IP settings.
|
88 |
+
* If the IP is not stored, we need to truncate the last IP block so it
|
89 |
+
* is annonymous.
|
90 |
+
*
|
91 |
+
* @see https://www.onlinemarketingrecht.de/2017/09/ip-adressen-anonymisieren-wann-wie-und-warum/
|
92 |
+
*/
|
93 |
+
public function persistIp() {
|
94 |
+
$saveIp = \DevOwl\RealCookieBanner\settings\Consent::getInstance()->isSaveIpEnabled();
|
95 |
+
$ip = $_SERVER['REMOTE_ADDR'];
|
96 |
+
$ipVersion = \strpos($ip, ':') === \false ? 4 : 6;
|
97 |
+
$ipDel = $ipVersion === 6 ? ':' : '.';
|
98 |
+
// Truncate plain IP for annonymous hashing
|
99 |
+
$truncateIp = \explode($ipDel, $ip);
|
100 |
+
\array_pop($truncateIp);
|
101 |
+
$truncateIp[] = 0;
|
102 |
+
$truncateIp = \join($ipDel, $truncateIp);
|
103 |
+
// Always use the truncated IP as hash
|
104 |
+
$hashIp = \DevOwl\RealCookieBanner\Utils::hash($truncateIp);
|
105 |
+
$result = ['ipv4' => null, 'ipv6' => null, 'ipv4_hash' => null, 'ipv6_hash' => null];
|
106 |
+
if ($ipVersion === 4) {
|
107 |
+
if ($saveIp) {
|
108 |
+
$result['ipv4'] = \ip2long($ip);
|
109 |
+
}
|
110 |
+
$result['ipv4_hash'] = $hashIp;
|
111 |
+
} else {
|
112 |
+
if ($saveIp) {
|
113 |
+
$result['ipv6'] = \inet_pton($ip);
|
114 |
+
}
|
115 |
+
$result['ipv6_hash'] = $hashIp;
|
116 |
+
}
|
117 |
+
return $result;
|
118 |
+
}
|
119 |
+
/**
|
120 |
+
* Get singleton instance.
|
121 |
+
*
|
122 |
+
* @codeCoverageIgnore
|
123 |
+
*/
|
124 |
+
public static function getInstance() {
|
125 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\IpHandler()) : self::$me;
|
126 |
+
}
|
127 |
+
}
|
inc/Localization.php
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\Sync;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Localization as UtilsLocalization;
|
8 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
9 |
+
use DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration;
|
10 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
11 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
12 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
13 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Legal;
|
14 |
+
// @codeCoverageIgnoreStart
|
15 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
16 |
+
// Avoid direct file request
|
17 |
+
// @codeCoverageIgnoreEnd
|
18 |
+
/**
|
19 |
+
* i18n management for backend and frontend.
|
20 |
+
*/
|
21 |
+
class Localization {
|
22 |
+
use UtilsProvider;
|
23 |
+
use UtilsLocalization;
|
24 |
+
/**
|
25 |
+
* Keys of array which should be not translated with `translateArray`.
|
26 |
+
*/
|
27 |
+
const COMMON_SKIP_KEYS = ['slug'];
|
28 |
+
/**
|
29 |
+
* Get the directory where the languages folder exists.
|
30 |
+
*
|
31 |
+
* @param string $type
|
32 |
+
* @return string[]
|
33 |
+
*/
|
34 |
+
protected function getPackageInfo($type) {
|
35 |
+
if ($type === \DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Localization::$PACKAGE_INFO_BACKEND) {
|
36 |
+
return [path_join(RCB_PATH, 'languages'), RCB_TD];
|
37 |
+
} else {
|
38 |
+
return [path_join(RCB_PATH, \DevOwl\RealCookieBanner\Assets::$PUBLIC_JSON_I18N), RCB_TD];
|
39 |
+
}
|
40 |
+
}
|
41 |
+
/**
|
42 |
+
* Make our plugin multilingual with the help of `AbstractSyncPlugin` and `Sync`!
|
43 |
+
* Also have a look at `BannerCustomize`, there are `LanguageDependingOption`'s.
|
44 |
+
*/
|
45 |
+
public static function multilingual() {
|
46 |
+
$compLanguage = \DevOwl\RealCookieBanner\Core::getInstance()->getCompLanguage();
|
47 |
+
$sync = new \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\Sync(
|
48 |
+
\array_merge(
|
49 |
+
[
|
50 |
+
\DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME =>
|
51 |
+
\DevOwl\RealCookieBanner\settings\Cookie::SYNC_OPTIONS,
|
52 |
+
\DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME =>
|
53 |
+
\DevOwl\RealCookieBanner\settings\Blocker::SYNC_OPTIONS
|
54 |
+
],
|
55 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->isPro()
|
56 |
+
? [
|
57 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::CPT_NAME =>
|
58 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::SYNC_OPTIONS
|
59 |
+
]
|
60 |
+
: []
|
61 |
+
),
|
62 |
+
[
|
63 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME =>
|
64 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_OPTIONS
|
65 |
+
],
|
66 |
+
$compLanguage
|
67 |
+
);
|
68 |
+
$compLanguage->setSync($sync);
|
69 |
+
$idsToCurrent = [
|
70 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Legal::SETTING_PRIVACY_POLICY,
|
71 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Legal::SETTING_IMPRINT
|
72 |
+
];
|
73 |
+
foreach ($idsToCurrent as $id) {
|
74 |
+
add_filter('DevOwl/Customize/LocalizedValue/' . $id, function ($value) use ($compLanguage) {
|
75 |
+
return $compLanguage->getCurrentPostId($value, \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME);
|
76 |
+
});
|
77 |
+
}
|
78 |
+
// Translate some meta fields when they get copied to the other language
|
79 |
+
if ($compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin) {
|
80 |
+
foreach (
|
81 |
+
[
|
82 |
+
\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER,
|
83 |
+
\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY
|
84 |
+
]
|
85 |
+
as $translateMetaKey
|
86 |
+
) {
|
87 |
+
add_filter('DevOwl/Multilingual/Copy/Meta/post/' . $translateMetaKey, [
|
88 |
+
$compLanguage,
|
89 |
+
'translateInputAndReturnValue'
|
90 |
+
]);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
inc/MyConsent.php
ADDED
@@ -0,0 +1,367 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\settings\Consent;
|
7 |
+
use DevOwl\RealCookieBanner\settings\General;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Handle consents of "me".
|
15 |
+
*/
|
16 |
+
class MyConsent {
|
17 |
+
use UtilsProvider;
|
18 |
+
const COOKIE_NAME_USER_PREFIX = 'real_cookie_banner';
|
19 |
+
/**
|
20 |
+
* Singleton instance.
|
21 |
+
*
|
22 |
+
* @var MyConsent
|
23 |
+
*/
|
24 |
+
private static $me = null;
|
25 |
+
private $cacheCurrentUser = null;
|
26 |
+
/**
|
27 |
+
* C'tor.
|
28 |
+
*/
|
29 |
+
private function __construct() {
|
30 |
+
// Silence is golden.
|
31 |
+
}
|
32 |
+
/**
|
33 |
+
* Persist an user consent to the database.
|
34 |
+
*
|
35 |
+
* @param array|string $consent A set of accepted cookie groups + cookies or a predefined set like `all` or `essentials` (see `UserConsent::validateConsent`)
|
36 |
+
* @param boolean $markAsDoNotTrack
|
37 |
+
* @param string $buttonClicked
|
38 |
+
* @param int $viewPortWidth
|
39 |
+
* @param int $viewPortHeight
|
40 |
+
* @param string $referer
|
41 |
+
* @param int $blocker If the consent came from a content blocker, mark this in our database
|
42 |
+
* @param int $forwarded The reference to the consent ID of the source website (only for forwarded consents)
|
43 |
+
* @param string $forwardedUuid The UUID reference of the source website
|
44 |
+
* @param boolean $forwardedBlocker Determine if forwarded consent came through a content blocker
|
45 |
+
* @param string $tcfString TCF compatibility; encoded TCF string (not the vendor string; `isForVendors = false`)
|
46 |
+
* @param string $customBypass Allows to set a custom bypass which causes the banner to be hidden (e.g. Geolocation)
|
47 |
+
* @return array The current used user
|
48 |
+
*/
|
49 |
+
public function persist(
|
50 |
+
$consent,
|
51 |
+
$markAsDoNotTrack,
|
52 |
+
$buttonClicked,
|
53 |
+
$viewPortWidth,
|
54 |
+
$viewPortHeight,
|
55 |
+
$referer,
|
56 |
+
$blocker = 0,
|
57 |
+
$forwarded = 0,
|
58 |
+
$forwardedUuid = null,
|
59 |
+
$forwardedBlocker = \false,
|
60 |
+
$tcfString = null,
|
61 |
+
$customBypass = null
|
62 |
+
) {
|
63 |
+
$args = \get_defined_vars();
|
64 |
+
global $wpdb;
|
65 |
+
$consent = \DevOwl\RealCookieBanner\UserConsent::getInstance()->validate($consent);
|
66 |
+
if (is_wp_error($consent)) {
|
67 |
+
return $consent;
|
68 |
+
}
|
69 |
+
$revision = \DevOwl\RealCookieBanner\settings\Revision::getInstance();
|
70 |
+
$currentHash = $revision->getCurrentHash();
|
71 |
+
$revisionHash = $revision->create(\true, \false)['hash'];
|
72 |
+
$customizeHash = $revision->createIndependent(\true)['hash'];
|
73 |
+
// Create the cookie on client-side with the latest requested consent hash instead of current real-time hash
|
74 |
+
// Why? So, the frontend can safely compare latest requested hash to user-consent hash
|
75 |
+
// What is true, cookie hash or database? I can promise, the database shows the consent hash!
|
76 |
+
$user = $this->ensureUser($currentHash, $forwardedUuid);
|
77 |
+
$consent_hash = \md5(\json_encode($consent));
|
78 |
+
$ips = \DevOwl\RealCookieBanner\IpHandler::getInstance()->persistIp();
|
79 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
80 |
+
$wpdb->query(
|
81 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
82 |
+
\str_ireplace(
|
83 |
+
"'NULL'",
|
84 |
+
'NULL',
|
85 |
+
$wpdb->prepare(
|
86 |
+
"INSERT IGNORE INTO {$table_name}\n (ipv4, ipv6, ipv4_hash, ipv6_hash, uuid, revision, revision_independent, previous_decision, decision, decision_hash, blocker, dnt, custom_bypass, button_clicked, context, viewport_width, viewport_height, referer, pure_referer, url_imprint, url_privacy_policy, forwarded, forwarded_blocker, tcf_string, created)\n VALUES\n (%d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %s, %d, %d, %s, %s, %s, %s, %s, %s, %s, %s)",
|
87 |
+
$ips['ipv4'] === null ? 'NULL' : $ips['ipv4'],
|
88 |
+
$ips['ipv6'] === null ? 'NULL' : $ips['ipv6'],
|
89 |
+
$ips['ipv4_hash'] === null ? 'NULL' : $ips['ipv4_hash'],
|
90 |
+
$ips['ipv6_hash'] === null ? 'NULL' : $ips['ipv6_hash'],
|
91 |
+
$user['uuid'],
|
92 |
+
$revisionHash,
|
93 |
+
$customizeHash,
|
94 |
+
\json_encode($user['decision'] === \false ? [] : $user['decision']),
|
95 |
+
\json_encode($consent),
|
96 |
+
$consent_hash,
|
97 |
+
$blocker > 0 ? $blocker : 'NULL',
|
98 |
+
$markAsDoNotTrack,
|
99 |
+
$customBypass === null ? 'NULL' : $customBypass,
|
100 |
+
$buttonClicked,
|
101 |
+
$revision->getContextVariablesString(),
|
102 |
+
$viewPortWidth,
|
103 |
+
$viewPortHeight,
|
104 |
+
$referer,
|
105 |
+
\DevOwl\RealCookieBanner\Utils::removeNonPermalinkQueryFromUrl($referer),
|
106 |
+
\DevOwl\RealCookieBanner\settings\General::getInstance()->getImprintPageUrl(),
|
107 |
+
\DevOwl\RealCookieBanner\settings\General::getInstance()->getPrivacyPolicyUrl(),
|
108 |
+
$forwarded > 0 ? $forwarded : 'NULL',
|
109 |
+
// %s used for 'NULL' transformation
|
110 |
+
$forwardedBlocker,
|
111 |
+
// %s used for 'NULL' transformation
|
112 |
+
$tcfString === null ? 'NULL' : $tcfString,
|
113 |
+
current_time('mysql')
|
114 |
+
)
|
115 |
+
)
|
116 |
+
);
|
117 |
+
$insertId = $wpdb->insert_id;
|
118 |
+
$this->setCookie($user['uuid'], $currentHash, $consent);
|
119 |
+
// Why $currentHash? See above
|
120 |
+
// Persist stats (only when not forwarded)
|
121 |
+
if ($forwarded === 0) {
|
122 |
+
\DevOwl\RealCookieBanner\Stats::getInstance()->persist($consent, $user['decision'], $user['created']);
|
123 |
+
}
|
124 |
+
$result = \array_merge($this->getCurrentUser(\true), ['updated' => \true, 'consent_id' => $insertId]);
|
125 |
+
/**
|
126 |
+
* An user has given a new consent.
|
127 |
+
*
|
128 |
+
* @hook RCB/Consent/Created
|
129 |
+
* @param {array} $result
|
130 |
+
* @param {array} $args Passed arguments to `MyConsent::persist` as map (since 2.0.0)
|
131 |
+
*/
|
132 |
+
do_action('RCB/Consent/Created', $result, $args);
|
133 |
+
return $result;
|
134 |
+
}
|
135 |
+
/**
|
136 |
+
* Ensures an user is connected with the current PHP session. In detail,
|
137 |
+
* it does the following:
|
138 |
+
*
|
139 |
+
* 1. If the user cookie is set, it gets the uuid and revision hash
|
140 |
+
* 2. If there is no user cookie, it will generate a uuid with current
|
141 |
+
* consent hash + set it as cookie
|
142 |
+
*
|
143 |
+
* @param string $revision Hash
|
144 |
+
* @param string $useUuid Force to use an existing UUID (useful for forwarded consents)
|
145 |
+
* @return array 'uuid', 'created', 'cookie_revision', 'consent_revision', 'decision', 'decision_hash'
|
146 |
+
*/
|
147 |
+
protected function ensureUser($revision, $useUuid = null) {
|
148 |
+
$cookieUser = $this->getCurrentUser();
|
149 |
+
// There isn't any consent from an user, create one
|
150 |
+
if ($cookieUser === \false) {
|
151 |
+
$uuid = empty($useUuid) ? $this->createUuid() : $useUuid;
|
152 |
+
$this->setCookie($uuid, $revision, []);
|
153 |
+
return [
|
154 |
+
'uuid' => $uuid,
|
155 |
+
'created' => mysql2date('c', current_time('mysql'), \false),
|
156 |
+
'cookie_revision' => $revision,
|
157 |
+
'consent_revision' => \false,
|
158 |
+
'decision' => \false,
|
159 |
+
'decision_hash' => \false
|
160 |
+
];
|
161 |
+
}
|
162 |
+
return $cookieUser;
|
163 |
+
}
|
164 |
+
/**
|
165 |
+
* Set or update the existing cookie to the latest revision. It also respect the fact, that
|
166 |
+
* cross-site cookies needs to be set with `SameSite=None` attribute.
|
167 |
+
*
|
168 |
+
* @param string $uuid
|
169 |
+
* @param string $revision
|
170 |
+
* @param array $consent
|
171 |
+
* @see https://developer.wordpress.org/reference/functions/wp_set_auth_cookie/
|
172 |
+
* @see https://stackoverflow.com/a/46971326/5506547
|
173 |
+
*/
|
174 |
+
public function setCookie($uuid = null, $revision = null, $consent = null) {
|
175 |
+
$cookieName = $this->getCookieName();
|
176 |
+
$doDelete = $uuid === null;
|
177 |
+
$cookieValue = $doDelete ? '' : "{$uuid}:{$revision}:" . \json_encode($consent);
|
178 |
+
$expire = $doDelete
|
179 |
+
? -1
|
180 |
+
: \time() +
|
181 |
+
\constant('DAY_IN_SECONDS') *
|
182 |
+
\DevOwl\RealCookieBanner\settings\Consent::getInstance()->getCookieDuration();
|
183 |
+
$result = \DevOwl\RealCookieBanner\Utils::setCookie(
|
184 |
+
$cookieName,
|
185 |
+
$cookieValue,
|
186 |
+
$expire,
|
187 |
+
\constant('COOKIEPATH'),
|
188 |
+
\constant('COOKIE_DOMAIN'),
|
189 |
+
is_ssl(),
|
190 |
+
\false,
|
191 |
+
'None'
|
192 |
+
);
|
193 |
+
if ($result) {
|
194 |
+
/**
|
195 |
+
* Real Cookie Banner saved the cookie which holds information about the user with
|
196 |
+
* UUID, revision and consent choices.
|
197 |
+
*
|
198 |
+
* @hook RCB/Consent/SetCookie
|
199 |
+
* @param {string} $cookieName
|
200 |
+
* @param {string} $cookieValue
|
201 |
+
* @param {boolean} $result Got the cookie successfully created?
|
202 |
+
* @param {boolean} $revoke `true` if the cookie should be deleted
|
203 |
+
* @param {string} $uuid
|
204 |
+
* @param {array}
|
205 |
+
* @since 2.0.0
|
206 |
+
*/
|
207 |
+
do_action('RCB/Consent/SetCookie', $cookieName, $cookieValue, $result, $doDelete, $uuid);
|
208 |
+
}
|
209 |
+
return $result;
|
210 |
+
}
|
211 |
+
/**
|
212 |
+
* Get's the current user from the cookie. The result will hold the unique
|
213 |
+
* user id and the accepted revision hash. This function is also ported to JS via `getUserDecision.tsx`.
|
214 |
+
*
|
215 |
+
* @param boolean $force
|
216 |
+
* @return array 'uuid', 'created', 'cookie_revision', 'consent_revision', 'decision', 'decision_in_cookie', 'decision_hash'
|
217 |
+
*/
|
218 |
+
public function getCurrentUser($force = \false) {
|
219 |
+
if ($this->cacheCurrentUser !== null && !$force) {
|
220 |
+
return $this->cacheCurrentUser;
|
221 |
+
}
|
222 |
+
// Cookie set?
|
223 |
+
$cookieName = $this->getCookieName();
|
224 |
+
if (!isset($_COOKIE[$cookieName])) {
|
225 |
+
return \false;
|
226 |
+
}
|
227 |
+
$parsed = $this->parseCookieValue($_COOKIE[$cookieName]);
|
228 |
+
if ($parsed === \false) {
|
229 |
+
return \false;
|
230 |
+
}
|
231 |
+
// Save in cache
|
232 |
+
$this->cacheCurrentUser = $parsed;
|
233 |
+
return $this->cacheCurrentUser;
|
234 |
+
}
|
235 |
+
/**
|
236 |
+
* Parse a consent from a given cookie value. The result will hold the unique
|
237 |
+
* user id and the accepted revision hash.
|
238 |
+
*
|
239 |
+
* @param string $value
|
240 |
+
* @return array 'uuid', 'created', 'cookie_revision', 'consent_revision', 'decision', 'decision_in_cookie', 'decision_hash'
|
241 |
+
*/
|
242 |
+
protected function parseCookieValue($value) {
|
243 |
+
global $wpdb;
|
244 |
+
// Cookie empty? (https://stackoverflow.com/a/32567915/5506547)
|
245 |
+
$result = \stripslashes($value);
|
246 |
+
if (empty($result)) {
|
247 |
+
return \false;
|
248 |
+
}
|
249 |
+
// Cookie scheme valid?
|
250 |
+
$result = \explode(':', $result, 3);
|
251 |
+
if (\count($result) !== 3) {
|
252 |
+
return \false;
|
253 |
+
}
|
254 |
+
$cookieDecision = \json_decode($result[2], ARRAY_A);
|
255 |
+
// Parse out data (${uuid}-${revision})
|
256 |
+
$uuid = $result[0];
|
257 |
+
$revision = $result[1];
|
258 |
+
// Check if any consent was ever set by this user
|
259 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
260 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
261 |
+
$result = $wpdb->get_row(
|
262 |
+
$wpdb->prepare(
|
263 |
+
"SELECT revision, revision_independent, decision, decision_hash, created\n FROM {$table_name}\n WHERE uuid = %s\n ORDER BY created DESC LIMIT 1",
|
264 |
+
$uuid
|
265 |
+
),
|
266 |
+
ARRAY_A
|
267 |
+
);
|
268 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
269 |
+
// No row found
|
270 |
+
if ($result === null) {
|
271 |
+
return \false;
|
272 |
+
}
|
273 |
+
return [
|
274 |
+
'uuid' => $uuid,
|
275 |
+
'created' => mysql2date('c', $result['created'], \false),
|
276 |
+
'cookie_revision' => $revision,
|
277 |
+
'consent_revision' => $result['revision'],
|
278 |
+
'consent_revision_independent' => $result['revision_independent'],
|
279 |
+
'decision' => \json_decode($result['decision'], ARRAY_A),
|
280 |
+
'decision_in_cookie' => $cookieDecision,
|
281 |
+
'decision_hash' => $result['decision_hash']
|
282 |
+
];
|
283 |
+
}
|
284 |
+
/**
|
285 |
+
* Create an unique id for the current user.
|
286 |
+
*/
|
287 |
+
protected function createUuid() {
|
288 |
+
// Read from existing cookies (context-depending)
|
289 |
+
foreach ($_COOKIE as $key => $value) {
|
290 |
+
if (\DevOwl\RealCookieBanner\Utils::startsWith($key, self::COOKIE_NAME_USER_PREFIX)) {
|
291 |
+
$parsed = $this->parseCookieValue($value);
|
292 |
+
if ($parsed !== \false) {
|
293 |
+
return $parsed['uuid'];
|
294 |
+
}
|
295 |
+
}
|
296 |
+
}
|
297 |
+
return wp_generate_uuid4();
|
298 |
+
}
|
299 |
+
/**
|
300 |
+
* Get the history of the current user.
|
301 |
+
*/
|
302 |
+
public function getCurrentHistory() {
|
303 |
+
global $wpdb;
|
304 |
+
$user = $this->getCurrentUser();
|
305 |
+
$result = [];
|
306 |
+
if ($user !== \false) {
|
307 |
+
// Read from database
|
308 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
309 |
+
$table_name_revision = $this->getTableName(\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME);
|
310 |
+
$table_name_revision_independent = $this->getTableName(
|
311 |
+
\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME_INDEPENDENT
|
312 |
+
);
|
313 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
314 |
+
$rows = $wpdb->get_results(
|
315 |
+
$wpdb->prepare(
|
316 |
+
"SELECT uc.id, uc.created, uc.decision, r.json_revision, ri.json_revision AS json_revision_independent, uc.dnt, uc.blocker, uc.forwarded, uc.tcf_string\n FROM {$table_name} uc\n INNER JOIN {$table_name_revision} r\n ON r.hash = uc.revision\n INNER JOIN {$table_name_revision_independent} ri\n ON ri.hash = uc.revision_independent\n WHERE uuid = %s\n ORDER BY uc.created DESC\n LIMIT 0, 100",
|
317 |
+
$user['uuid']
|
318 |
+
),
|
319 |
+
ARRAY_A
|
320 |
+
);
|
321 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
322 |
+
foreach ($rows as $row) {
|
323 |
+
$jsonRevision = \json_decode($row['json_revision'], ARRAY_A);
|
324 |
+
$jsonRevisionIndependent = \json_decode($row['json_revision_independent'], ARRAY_A);
|
325 |
+
$obj = [
|
326 |
+
'id' => \intval($row['id']),
|
327 |
+
'uuid' => $user['uuid'],
|
328 |
+
'isDoNotTrack' => \boolval($row['dnt']),
|
329 |
+
'isUnblock' => \boolval($row['blocker']),
|
330 |
+
'isForwarded' => $row['forwarded'] > 0,
|
331 |
+
'created' => mysql2date('c', $row['created'], \false),
|
332 |
+
'groups' => $jsonRevision['groups'],
|
333 |
+
'decision' => \json_decode($row['decision'], ARRAY_A),
|
334 |
+
// TCF compatibility
|
335 |
+
'tcf' => isset($jsonRevision['tcf'])
|
336 |
+
? [
|
337 |
+
'tcf' => $jsonRevision['tcf'],
|
338 |
+
'tcfMeta' => $jsonRevisionIndependent['tcfMeta'],
|
339 |
+
'tcfString' => $row['tcf_string']
|
340 |
+
]
|
341 |
+
: null
|
342 |
+
];
|
343 |
+
$result[] = $obj;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
return $result;
|
347 |
+
}
|
348 |
+
/**
|
349 |
+
* Get cookie name for the current page.
|
350 |
+
*/
|
351 |
+
public function getCookieName() {
|
352 |
+
$revision = \DevOwl\RealCookieBanner\settings\Revision::getInstance();
|
353 |
+
$implicitString = $revision->getContextVariablesString(\true);
|
354 |
+
$contextString = $revision->getContextVariablesString();
|
355 |
+
return self::COOKIE_NAME_USER_PREFIX .
|
356 |
+
(empty($implicitString) ? '' : '-' . $implicitString) .
|
357 |
+
(empty($contextString) ? '' : '-' . $contextString);
|
358 |
+
}
|
359 |
+
/**
|
360 |
+
* Get singleton instance.
|
361 |
+
*
|
362 |
+
* @codeCoverageIgnore
|
363 |
+
*/
|
364 |
+
public static function getInstance() {
|
365 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\MyConsent()) : self::$me;
|
366 |
+
}
|
367 |
+
}
|
inc/RpmInitiator.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\AbstractInitiator;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Initiate real-product-manager-wp-client functionality.
|
13 |
+
*/
|
14 |
+
class RpmInitiator extends \DevOwl\RealCookieBanner\Vendor\DevOwl\RealProductManagerWpClient\AbstractInitiator {
|
15 |
+
use UtilsProvider;
|
16 |
+
/**
|
17 |
+
* Documented in AbstractInitiator.
|
18 |
+
*
|
19 |
+
* @codeCoverageIgnore
|
20 |
+
*/
|
21 |
+
public function getPluginBase() {
|
22 |
+
return $this;
|
23 |
+
}
|
24 |
+
/**
|
25 |
+
* Documented in AbstractInitiator.
|
26 |
+
*
|
27 |
+
* @codeCoverageIgnore
|
28 |
+
*/
|
29 |
+
public function getProductAndVariant() {
|
30 |
+
return [1, $this->isPro() ? 1 : 2];
|
31 |
+
}
|
32 |
+
/**
|
33 |
+
* Documented in AbstractInitiator.
|
34 |
+
*
|
35 |
+
* @codeCoverageIgnore
|
36 |
+
*/
|
37 |
+
public function getPluginAssets() {
|
38 |
+
return $this->getCore()->getAssets();
|
39 |
+
}
|
40 |
+
/**
|
41 |
+
* Documented in AbstractInitiator.
|
42 |
+
*
|
43 |
+
* @codeCoverageIgnore
|
44 |
+
*/
|
45 |
+
public function getPrivacyPolicy() {
|
46 |
+
return 'https://devowl.io/privacy-policy';
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* Documented in AbstractInitiator.
|
50 |
+
*
|
51 |
+
* @codeCoverageIgnore
|
52 |
+
*/
|
53 |
+
public function isExternalUpdateEnabled() {
|
54 |
+
return $this->isPro();
|
55 |
+
}
|
56 |
+
/**
|
57 |
+
* Documented in AbstractInitiator.
|
58 |
+
*
|
59 |
+
* @codeCoverageIgnore
|
60 |
+
*/
|
61 |
+
public function isAdminNoticeLicenseVisible() {
|
62 |
+
return \DevOwl\RealCookieBanner\Core::getInstance()
|
63 |
+
->getConfigPage()
|
64 |
+
->isVisible();
|
65 |
+
}
|
66 |
+
/**
|
67 |
+
* Documented in AbstractInitiator.
|
68 |
+
*
|
69 |
+
* @codeCoverageIgnore
|
70 |
+
*/
|
71 |
+
public function isLocalAnnouncementVisible() {
|
72 |
+
return $this->isAdminNoticeLicenseVisible();
|
73 |
+
}
|
74 |
+
}
|
inc/Stats.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\lite\Stats as LiteStats;
|
7 |
+
use DevOwl\RealCookieBanner\overrides\interfce\IOverrideStats;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
9 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
10 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Consent stats handling. Most features are implemented in Pro override.
|
17 |
+
*/
|
18 |
+
class Stats implements \DevOwl\RealCookieBanner\overrides\interfce\IOverrideStats {
|
19 |
+
use UtilsProvider;
|
20 |
+
use LiteStats;
|
21 |
+
const TABLE_NAME = 'stats';
|
22 |
+
const STATS_ACCEPTED_TYPE_ALL = 2;
|
23 |
+
const STATS_ACCEPTED_TYPE_PARTIAL = 1;
|
24 |
+
const STATS_ACCEPTED_TYPE_NONE = 0;
|
25 |
+
const STATS_ACCEPTED_ALL_TYPES = [
|
26 |
+
self::STATS_ACCEPTED_TYPE_ALL,
|
27 |
+
self::STATS_ACCEPTED_TYPE_NONE,
|
28 |
+
self::STATS_ACCEPTED_TYPE_PARTIAL
|
29 |
+
];
|
30 |
+
/**
|
31 |
+
* Singleton instance.
|
32 |
+
*
|
33 |
+
* @var Stats
|
34 |
+
*/
|
35 |
+
private static $me = null;
|
36 |
+
/**
|
37 |
+
* C'tor.
|
38 |
+
*/
|
39 |
+
private function __construct() {
|
40 |
+
// Silence is golden.
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* Persist a new consent to a given group to the stats database table.
|
44 |
+
*
|
45 |
+
* @param array $consent
|
46 |
+
* @param array $previousConsent Do not count recurring users in stats
|
47 |
+
* @param string $previousCreated ISO string of previous consent
|
48 |
+
*/
|
49 |
+
public function persist($consent, $previousConsent, $previousCreated) {
|
50 |
+
global $wpdb;
|
51 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
52 |
+
$newConsentAcceptTypes = $this->calculateGroupAcceptTypes($consent);
|
53 |
+
$contextString = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getContextVariablesString();
|
54 |
+
$dayIso = mysql2date('Y-m-d', current_time('mysql'));
|
55 |
+
foreach ($newConsentAcceptTypes as $term_id => $accepted) {
|
56 |
+
$term_name = get_term($term_id)->name;
|
57 |
+
$wpdb->query(
|
58 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
59 |
+
$wpdb->prepare(
|
60 |
+
"INSERT INTO {$table_name}\n (`day`, `context`, `term_name`, `term_id`, `accepted`, `count`)\n VALUES\n (%s, %s, %s, %d, %d, 1)\n ON DUPLICATE KEY UPDATE `count` = `count` + 1",
|
61 |
+
$dayIso,
|
62 |
+
$contextString,
|
63 |
+
$term_name,
|
64 |
+
$term_id,
|
65 |
+
$accepted
|
66 |
+
)
|
67 |
+
);
|
68 |
+
// Also persist other accept-types so the stats are intact
|
69 |
+
foreach (\array_diff(self::STATS_ACCEPTED_ALL_TYPES, [$accepted]) as $missingAccepted) {
|
70 |
+
$wpdb->query(
|
71 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
72 |
+
$wpdb->prepare(
|
73 |
+
"INSERT IGNORE INTO {$table_name}\n (`day`, `context`, `term_name`, `term_id`, `accepted`, `count`)\n VALUES\n (%s, %s, %s, %d, %d, 0)",
|
74 |
+
$dayIso,
|
75 |
+
$contextString,
|
76 |
+
$term_name,
|
77 |
+
$term_id,
|
78 |
+
$missingAccepted
|
79 |
+
)
|
80 |
+
);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
// Subtract recurring users
|
84 |
+
if (\is_array($previousConsent) && !empty($previousConsent)) {
|
85 |
+
$previousConsentAcceptTypes = $this->calculateGroupAcceptTypes($previousConsent);
|
86 |
+
// Simply reduce by one each group / accept type because it still get's added above
|
87 |
+
// With this method, it is ensured that only differences are subtracted
|
88 |
+
foreach ($previousConsentAcceptTypes as $term_id => $accepted) {
|
89 |
+
$wpdb->query(
|
90 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
91 |
+
$wpdb->prepare(
|
92 |
+
"UPDATE {$table_name}\n SET `count` = `count` - 1\n WHERE `count` > 0\n AND context = %s\n AND day = %s\n AND term_id = %d\n AND accepted = %d",
|
93 |
+
$contextString,
|
94 |
+
mysql2date('Y-m-d', $previousCreated),
|
95 |
+
$term_id,
|
96 |
+
$accepted
|
97 |
+
)
|
98 |
+
);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Calculate the accept types for a given consent. It returns an array of keyed term id
|
104 |
+
* with accept type.
|
105 |
+
*
|
106 |
+
* @param array $consent
|
107 |
+
*/
|
108 |
+
private function calculateGroupAcceptTypes($consent) {
|
109 |
+
$result = [];
|
110 |
+
$groups = \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getOrdered();
|
111 |
+
foreach ($groups as $term) {
|
112 |
+
$term_id = $term->term_id;
|
113 |
+
$term_id_string = \strval($term->term_id);
|
114 |
+
if (!isset($consent[$term_id_string]) || \count($consent[$term_id_string]) === 0) {
|
115 |
+
$accepted = self::STATS_ACCEPTED_TYPE_NONE;
|
116 |
+
} else {
|
117 |
+
$allCount = \count(\DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered($term_id));
|
118 |
+
$accepted =
|
119 |
+
$allCount === \count($consent[$term_id_string])
|
120 |
+
? self::STATS_ACCEPTED_TYPE_ALL
|
121 |
+
: self::STATS_ACCEPTED_TYPE_PARTIAL;
|
122 |
+
}
|
123 |
+
$result[$term_id] = $accepted;
|
124 |
+
}
|
125 |
+
return $result;
|
126 |
+
}
|
127 |
+
/**
|
128 |
+
* Fires after a group got changed, let's update the plain name in database
|
129 |
+
* for future display when the group got deleted.
|
130 |
+
*
|
131 |
+
* @param int $term_id
|
132 |
+
*/
|
133 |
+
public function edited_group($term_id) {
|
134 |
+
global $wpdb;
|
135 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
136 |
+
$term_name = get_term($term_id)->name;
|
137 |
+
$wpdb->query(
|
138 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
139 |
+
$wpdb->prepare("UPDATE {$table_name} SET term_name = %s WHERE term_id = %d", $term_name, $term_id)
|
140 |
+
);
|
141 |
+
}
|
142 |
+
/**
|
143 |
+
* Get singleton instance.
|
144 |
+
*
|
145 |
+
* @codeCoverageIgnore
|
146 |
+
*/
|
147 |
+
public static function getInstance() {
|
148 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\Stats()) : self::$me;
|
149 |
+
}
|
150 |
+
}
|
inc/UserConsent.php
ADDED
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
7 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
9 |
+
use DevOwl\RealCookieBanner\view\Blocker;
|
10 |
+
use DevOwl\RealCookieBanner\view\shortcode\LinkShortcode;
|
11 |
+
use WP_Error;
|
12 |
+
// @codeCoverageIgnoreStart
|
13 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
14 |
+
// Avoid direct file request
|
15 |
+
// @codeCoverageIgnoreEnd
|
16 |
+
/**
|
17 |
+
* Handle consents of users.
|
18 |
+
*/
|
19 |
+
class UserConsent {
|
20 |
+
use UtilsProvider;
|
21 |
+
const TABLE_NAME = 'consent';
|
22 |
+
const CLICKABLE_BUTTONS = [
|
23 |
+
'none',
|
24 |
+
'main_all',
|
25 |
+
'main_essential',
|
26 |
+
'main_custom',
|
27 |
+
'ind_all',
|
28 |
+
'ind_essential',
|
29 |
+
'ind_custom',
|
30 |
+
\DevOwl\RealCookieBanner\view\shortcode\LinkShortcode::BUTTON_CLICKED_IDENTIFIER,
|
31 |
+
\DevOwl\RealCookieBanner\view\Blocker::BUTTON_CLICKED_IDENTIFIER
|
32 |
+
];
|
33 |
+
/**
|
34 |
+
* If you do not want to decode data like `revision` or `decision` to real objects (useful for CSV exports).
|
35 |
+
*/
|
36 |
+
const BY_CRITERIA_RESULT_TYPE_NO_DECODE = 'noDecode';
|
37 |
+
const BY_CRITERIA_RESULT_TYPE_JSON_DECODE = 'jsonDecode';
|
38 |
+
const BY_CRITERIA_RESULT_TYPE_COUNT = 'count';
|
39 |
+
const BY_CRITERIA_RESULT_TYPE_SQL_QUERY = 'sqlQuery';
|
40 |
+
/**
|
41 |
+
* Singleton instance.
|
42 |
+
*
|
43 |
+
* @var UserConsent
|
44 |
+
*/
|
45 |
+
private static $me = null;
|
46 |
+
/**
|
47 |
+
* C'tor.
|
48 |
+
*/
|
49 |
+
private function __construct() {
|
50 |
+
// Silence is golden.
|
51 |
+
}
|
52 |
+
/**
|
53 |
+
* Apply a custom decision (e.g. opt-out a single cookie in a cookie group) to a new
|
54 |
+
* consent. This is e.g. helpful if you are providing a Custom Bypass (e.g. Geolocation)
|
55 |
+
* and want to overtake an opt-out / opt-in from the previous consent.
|
56 |
+
*
|
57 |
+
* @param int $essentialGroupId
|
58 |
+
* @param array|string $previousConsent
|
59 |
+
* @param array|string $newConsent
|
60 |
+
* @param string $overtake Can be `opt-in` or `opt-out`
|
61 |
+
*/
|
62 |
+
public function applyCustomDecisionFromPreviousConsent($previousConsent, $newConsent, $overtake) {
|
63 |
+
$previousConsent = $this->validate($previousConsent);
|
64 |
+
$newConsent = $this->validate($newConsent);
|
65 |
+
if (is_wp_error($previousConsent) || is_wp_error($newConsent)) {
|
66 |
+
return $previousConsent;
|
67 |
+
}
|
68 |
+
$essentialGroupId = \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup()->term_id;
|
69 |
+
$allPreviousCookies = \DevOwl\RealCookieBanner\Utils::flatten($previousConsent);
|
70 |
+
$allCookies = \DevOwl\RealCookieBanner\Utils::flatten($this->validate('all'));
|
71 |
+
if ($overtake === 'opt-out') {
|
72 |
+
foreach ($newConsent as $group => $cookies) {
|
73 |
+
if (\intval($group) === $essentialGroupId) {
|
74 |
+
// Skip essentials as they need always be accepted
|
75 |
+
continue;
|
76 |
+
}
|
77 |
+
foreach ($cookies as $idx => $cookie) {
|
78 |
+
if (!\in_array($cookie, $allPreviousCookies, \true)) {
|
79 |
+
// Remove from our new consent, too
|
80 |
+
unset($newConsent[$group][$idx]);
|
81 |
+
$newConsent[$group] = \array_values($newConsent[$group]);
|
82 |
+
// Force to be numbered array
|
83 |
+
continue;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
}
|
87 |
+
} elseif ($overtake === 'opt-in') {
|
88 |
+
foreach ($previousConsent as $group => $cookies) {
|
89 |
+
if (\intval($group) === $essentialGroupId) {
|
90 |
+
// Skip essentials as they need always be accepted
|
91 |
+
continue;
|
92 |
+
}
|
93 |
+
foreach ($cookies as $cookie) {
|
94 |
+
if (!\in_array($cookie, $allCookies, \true)) {
|
95 |
+
// Does no longer exist, skip
|
96 |
+
continue;
|
97 |
+
}
|
98 |
+
$newConsent[$group][] = $cookie;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
return $newConsent;
|
103 |
+
}
|
104 |
+
/**
|
105 |
+
* Check if passed array is valid consent.
|
106 |
+
*
|
107 |
+
* @param array|string $consent
|
108 |
+
* @return array|WP_Error Sanitized consent array
|
109 |
+
*/
|
110 |
+
public function validate($consent) {
|
111 |
+
if (\is_array($consent)) {
|
112 |
+
foreach ($consent as $key => &$value) {
|
113 |
+
if (!\is_numeric($key) || !\is_array($value)) {
|
114 |
+
return new \WP_Error('rcb_user_consent_invalid');
|
115 |
+
}
|
116 |
+
foreach ($value as $cookieId) {
|
117 |
+
if (!\is_numeric($cookieId)) {
|
118 |
+
return new \WP_Error('rcb_user_consent_invalid');
|
119 |
+
}
|
120 |
+
}
|
121 |
+
$value = \array_map('intval', $value);
|
122 |
+
}
|
123 |
+
return $consent;
|
124 |
+
}
|
125 |
+
if (\is_string($consent)) {
|
126 |
+
// Automatically set cookies to "All"
|
127 |
+
$result = [];
|
128 |
+
foreach (
|
129 |
+
$consent === 'all'
|
130 |
+
? \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getOrdered()
|
131 |
+
: [\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup()]
|
132 |
+
as $group
|
133 |
+
) {
|
134 |
+
$result[$group->term_id] = \array_map(function ($cookie) {
|
135 |
+
return $cookie->ID;
|
136 |
+
}, \DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered($group->term_id));
|
137 |
+
}
|
138 |
+
return $result;
|
139 |
+
}
|
140 |
+
return new \WP_Error('rcb_user_consent_invalid');
|
141 |
+
}
|
142 |
+
/**
|
143 |
+
* Delete all available user consents with revisions and stats.
|
144 |
+
*
|
145 |
+
* @return boolean|array Array with deleted counts of the database tables
|
146 |
+
*/
|
147 |
+
public function purge() {
|
148 |
+
global $wpdb;
|
149 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
150 |
+
$table_name_revision = $this->getTableName(\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME);
|
151 |
+
$table_name_revision_independent = $this->getTableName(
|
152 |
+
\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME_INDEPENDENT
|
153 |
+
);
|
154 |
+
$table_name_stats = $this->getTableName(\DevOwl\RealCookieBanner\Stats::TABLE_NAME);
|
155 |
+
// The latest revision should not be deleted
|
156 |
+
$revisionHash = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getCurrentHash();
|
157 |
+
// phpcs:disable WordPress.DB
|
158 |
+
$consent = $wpdb->query("DELETE FROM {$table_name}");
|
159 |
+
$revision = $wpdb->query(
|
160 |
+
$wpdb->prepare("DELETE FROM {$table_name_revision} WHERE `hash` != %s", $revisionHash)
|
161 |
+
);
|
162 |
+
$revision_independent = $wpdb->query("DELETE FROM {$table_name_revision_independent}");
|
163 |
+
$stats = $wpdb->query("DELETE FROM {$table_name_stats}");
|
164 |
+
// phpcs:enable WordPress.DB
|
165 |
+
return [
|
166 |
+
'consent' => $consent,
|
167 |
+
'revision' => $revision,
|
168 |
+
'revision_independent' => $revision_independent,
|
169 |
+
'stats' => $stats
|
170 |
+
];
|
171 |
+
}
|
172 |
+
/**
|
173 |
+
* Fetch user consents by criteria.
|
174 |
+
*
|
175 |
+
* @param array $args 'uuid', 'ip', 'offset', 'perPage', 'from', 'to', 'pure_referer', 'context'
|
176 |
+
* @param string $returnType
|
177 |
+
*/
|
178 |
+
public function byCriteria($args, $returnType = self::BY_CRITERIA_RESULT_TYPE_JSON_DECODE) {
|
179 |
+
global $wpdb;
|
180 |
+
// Parse arguments
|
181 |
+
$args = \array_merge(
|
182 |
+
[
|
183 |
+
'uuid' => '',
|
184 |
+
'ip' => '',
|
185 |
+
'offset' => 0,
|
186 |
+
'perPage' => 10,
|
187 |
+
'from' => '',
|
188 |
+
'to' => '',
|
189 |
+
'pure_referer' => '',
|
190 |
+
'context'
|
191 |
+
],
|
192 |
+
$args
|
193 |
+
);
|
194 |
+
$ip = $args['ip'];
|
195 |
+
$uuid = $args['uuid'];
|
196 |
+
$limitOffset = $args['offset'];
|
197 |
+
$perPage = $args['perPage'];
|
198 |
+
$from = $args['from'];
|
199 |
+
$to = $args['to'];
|
200 |
+
$pure_referer = $args['pure_referer'];
|
201 |
+
$context = $args['context'];
|
202 |
+
// Prepare parameters
|
203 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\UserConsent::TABLE_NAME);
|
204 |
+
$table_name_revision = $this->getTableName(\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME);
|
205 |
+
$table_name_revision_independent = $this->getTableName(
|
206 |
+
\DevOwl\RealCookieBanner\settings\Revision::TABLE_NAME_INDEPENDENT
|
207 |
+
);
|
208 |
+
// Build WHERE statement for filtering
|
209 |
+
$where = [];
|
210 |
+
$where[] = empty($uuid) ? '1 = 1' : $wpdb->prepare('(c.uuid = %s)', $uuid);
|
211 |
+
$useIpv4 = \ip2long($ip);
|
212 |
+
$useIpv6 = \inet_pton($ip);
|
213 |
+
$hashIp = \DevOwl\RealCookieBanner\Utils::hash($ip);
|
214 |
+
$where[] = empty($ip)
|
215 |
+
? '1 = 1'
|
216 |
+
: $wpdb->prepare(
|
217 |
+
'(c.ipv4 = %d OR c.ipv6 = %s OR c.ipv4_hash = %s OR c.ipv6_hash = %s OR c.ipv4_hash = %s OR c.ipv6_hash = %s)',
|
218 |
+
$useIpv4 === \false ? 1 : $useIpv4,
|
219 |
+
$useIpv6 === \false ? 1 : $useIpv6,
|
220 |
+
$ip,
|
221 |
+
$ip,
|
222 |
+
// When the IP is entered plain, also respect hashed IPs
|
223 |
+
$hashIp,
|
224 |
+
$hashIp
|
225 |
+
);
|
226 |
+
$where[] = empty($pure_referer) ? '1 = 1' : $wpdb->prepare('c.pure_referer = %s', $pure_referer);
|
227 |
+
$where[] = !empty($from) && !empty($to) ? $wpdb->prepare('c.created BETWEEN %s AND %s', $from, $to) : '1 = 1';
|
228 |
+
$where[] = empty($context) ? '1 = 1' : $wpdb->prepare('c.context = %s', $context);
|
229 |
+
$fields = [
|
230 |
+
'c.id',
|
231 |
+
'c.ipv4',
|
232 |
+
'c.ipv6',
|
233 |
+
'c.ipv4_hash',
|
234 |
+
'c.ipv6_hash',
|
235 |
+
'c.uuid',
|
236 |
+
'c.previous_decision',
|
237 |
+
'c.decision',
|
238 |
+
'c.created',
|
239 |
+
'c.blocker',
|
240 |
+
'c.dnt',
|
241 |
+
'c.custom_bypass',
|
242 |
+
'c.user_country',
|
243 |
+
'c.button_clicked',
|
244 |
+
'c.context',
|
245 |
+
'c.viewport_width',
|
246 |
+
'c.viewport_height',
|
247 |
+
'c.referer as viewed_page',
|
248 |
+
'c.url_imprint',
|
249 |
+
'c.url_privacy_policy',
|
250 |
+
'c.forwarded',
|
251 |
+
'c.forwarded_blocker',
|
252 |
+
'c.tcf_string'
|
253 |
+
];
|
254 |
+
if ($returnType === self::BY_CRITERIA_RESULT_TYPE_SQL_QUERY) {
|
255 |
+
// For e.g. Export we need to export the complete revision as object
|
256 |
+
$fields[] = 'rev.json_revision AS revision';
|
257 |
+
$fields[] = 'revc.json_revision AS revision_independent';
|
258 |
+
} elseif ($returnType === self::BY_CRITERIA_RESULT_TYPE_COUNT) {
|
259 |
+
$fields = ['COUNT(*) AS cnt'];
|
260 |
+
} else {
|
261 |
+
// For all other implementations we should definitely lazy load the revision object via shortcode
|
262 |
+
$fields[] = 'rev.hash AS revision_hash';
|
263 |
+
$fields[] = 'revc.hash AS revision_independent_hash';
|
264 |
+
}
|
265 |
+
// Read data
|
266 |
+
// phpcs:disable WordPress.DB
|
267 |
+
$sql = $wpdb->prepare(
|
268 |
+
'SELECT ' .
|
269 |
+
\join(',', $fields) .
|
270 |
+
'
|
271 |
+
FROM ' .
|
272 |
+
$table_name .
|
273 |
+
' AS c INNER JOIN ' .
|
274 |
+
$table_name_revision .
|
275 |
+
' AS rev ON rev.hash = c.revision INNER JOIN ' .
|
276 |
+
$table_name_revision_independent .
|
277 |
+
' AS revc ON revc.hash = c.revision_independent WHERE ' .
|
278 |
+
\join(' AND ', $where) .
|
279 |
+
($returnType === self::BY_CRITERIA_RESULT_TYPE_COUNT ? '' : ' ORDER BY c.created DESC LIMIT %d, %d'),
|
280 |
+
$limitOffset,
|
281 |
+
$perPage
|
282 |
+
);
|
283 |
+
if ($returnType === self::BY_CRITERIA_RESULT_TYPE_SQL_QUERY) {
|
284 |
+
return $sql;
|
285 |
+
}
|
286 |
+
$results = $wpdb->get_results($sql);
|
287 |
+
// phpcs:enable WordPress.DB
|
288 |
+
if ($returnType === self::BY_CRITERIA_RESULT_TYPE_COUNT) {
|
289 |
+
return \intval($results[0]->cnt);
|
290 |
+
}
|
291 |
+
$this->castReadRows($results, $returnType === self::BY_CRITERIA_RESULT_TYPE_JSON_DECODE);
|
292 |
+
return $results;
|
293 |
+
}
|
294 |
+
/**
|
295 |
+
* Cast read rows from database to correct types.
|
296 |
+
*
|
297 |
+
* @param object[] $results
|
298 |
+
* @param boolean $jsonDecode Pass `false` if you do not want to decode data like `revision` or `decision` to real objects (useful for CSV exports)
|
299 |
+
*/
|
300 |
+
public function castReadRows(&$results, $jsonDecode = \true) {
|
301 |
+
$revisionHashes = [];
|
302 |
+
foreach ($results as &$row) {
|
303 |
+
$row->id = \intval($row->id);
|
304 |
+
$row->ipv4 = $row->ipv4 === '0' ? null : $row->ipv4;
|
305 |
+
$row->context = empty($row->context)
|
306 |
+
? ''
|
307 |
+
: \DevOwl\RealCookieBanner\settings\Revision::getInstance()->translateContextVariablesString(
|
308 |
+
$row->context
|
309 |
+
);
|
310 |
+
if ($jsonDecode) {
|
311 |
+
$row->previous_decision = \json_decode($row->previous_decision);
|
312 |
+
$row->decision = \json_decode($row->decision);
|
313 |
+
// Only populate decision_labels if we also decode the decision
|
314 |
+
$revisionHashes[] = $row->revision_hash;
|
315 |
+
}
|
316 |
+
$row->blocker = $row->blocker === null ? null : \intval($row->blocker);
|
317 |
+
$row->dnt = $row->dnt === '1';
|
318 |
+
$row->created = mysql2date('c', $row->created, \false);
|
319 |
+
$row->viewport_width = \intval($row->viewport_width);
|
320 |
+
$row->viewport_height = \intval($row->viewport_height);
|
321 |
+
$row->forwarded = $row->forwarded === null ? null : \intval($row->forwarded);
|
322 |
+
$row->forwarded_blocker = $row->forwarded_blocker === '1';
|
323 |
+
if ($row->ipv4 !== null) {
|
324 |
+
$row->ipv4 = \long2ip($row->ipv4);
|
325 |
+
}
|
326 |
+
if ($row->ipv6 !== null) {
|
327 |
+
$row->ipv6 = \inet_ntop($row->ipv6);
|
328 |
+
}
|
329 |
+
}
|
330 |
+
// Populate decision_labels so we can show the decision in table
|
331 |
+
if (\count($revisionHashes)) {
|
332 |
+
$revisionHashes = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getByHash($revisionHashes);
|
333 |
+
// Iterate all table items
|
334 |
+
foreach ($results as &$row) {
|
335 |
+
$decision = $row->decision;
|
336 |
+
$labels = [];
|
337 |
+
$groups = $revisionHashes[$row->revision_hash]['groups'];
|
338 |
+
// Iterate all decision groups
|
339 |
+
foreach ($decision as $groupId => $cookies) {
|
340 |
+
$cookiesCount = \count($cookies);
|
341 |
+
if ($cookiesCount > 0) {
|
342 |
+
// Iterate all available revision groups to find the decision group
|
343 |
+
foreach ($groups as $group) {
|
344 |
+
if ($group['id'] === \intval($groupId)) {
|
345 |
+
$name = $group['name'];
|
346 |
+
$itemsCount = \count($group['items']);
|
347 |
+
$labels[] =
|
348 |
+
$name .
|
349 |
+
($cookiesCount !== $itemsCount
|
350 |
+
? \sprintf(' (%d / %d)', $cookiesCount, $itemsCount)
|
351 |
+
: '');
|
352 |
+
break;
|
353 |
+
}
|
354 |
+
}
|
355 |
+
}
|
356 |
+
}
|
357 |
+
$row->decision_labels = $labels;
|
358 |
+
}
|
359 |
+
}
|
360 |
+
return $revisionHashes;
|
361 |
+
}
|
362 |
+
/**
|
363 |
+
* Get the total count of current consents.
|
364 |
+
*/
|
365 |
+
public function getCount() {
|
366 |
+
global $wpdb;
|
367 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
368 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
369 |
+
return \intval($wpdb->get_var("SELECT COUNT(*) FROM {$table_name}"));
|
370 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
371 |
+
}
|
372 |
+
/**
|
373 |
+
* Get all referer across all consents.
|
374 |
+
*
|
375 |
+
* @return string[]
|
376 |
+
*/
|
377 |
+
public function getReferer() {
|
378 |
+
global $wpdb;
|
379 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
380 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
381 |
+
return $wpdb->get_col("SELECT DISTINCT(pure_referer) FROM {$table_name} WHERE pure_referer <> ''");
|
382 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
383 |
+
}
|
384 |
+
/**
|
385 |
+
* Get singleton instance.
|
386 |
+
*
|
387 |
+
* @codeCoverageIgnore
|
388 |
+
*/
|
389 |
+
public static function getInstance() {
|
390 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\UserConsent()) : self::$me;
|
391 |
+
}
|
392 |
+
}
|
inc/Utils.php
ADDED
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner;
|
4 |
+
|
5 |
+
use RecursiveArrayIterator;
|
6 |
+
use RecursiveIteratorIterator;
|
7 |
+
use WP_Rewrite;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Utility helpers.
|
14 |
+
*/
|
15 |
+
class Utils {
|
16 |
+
/**
|
17 |
+
* nip.io
|
18 |
+
*/
|
19 |
+
const HOST_TYPE_MAIN = 'main';
|
20 |
+
/**
|
21 |
+
* .nip.io
|
22 |
+
*/
|
23 |
+
const HOST_TYPE_MAIN_WITH_ALL_SUBDOMAINS = 'main+subdomains';
|
24 |
+
/**
|
25 |
+
* feat.nip.io
|
26 |
+
*/
|
27 |
+
const HOST_TYPE_CURRENT = 'current';
|
28 |
+
/**
|
29 |
+
* https://feat.nip.io
|
30 |
+
*/
|
31 |
+
const HOST_TYPE_CURRENT_PROTOCOL = 'current+protocol';
|
32 |
+
/**
|
33 |
+
* .feat.nip.io
|
34 |
+
*/
|
35 |
+
const HOST_TYPE_CURRENT_WITH_ALL_SUBDOMAINS = 'current+subdomains';
|
36 |
+
const PREINSTALLED_ENV_IONOS = 'ionos';
|
37 |
+
/**
|
38 |
+
* Remove all query arguments not designed in our permalink structure.
|
39 |
+
*
|
40 |
+
* @param string $url
|
41 |
+
*/
|
42 |
+
public static function removeNonPermalinkQueryFromUrl($url) {
|
43 |
+
if (empty($url)) {
|
44 |
+
return '';
|
45 |
+
}
|
46 |
+
// No query argument, short circuit
|
47 |
+
if (\strpos($url, '?') === \false) {
|
48 |
+
return $url;
|
49 |
+
}
|
50 |
+
// Get arguments in requested URL (ported from `add_query_arg`)
|
51 |
+
list(, $query) = \explode('?', $url, 2);
|
52 |
+
wp_parse_str($query, $queryParameters);
|
53 |
+
// Get arguments in current permalink settings
|
54 |
+
$permalink_structure = get_option('permalink_structure');
|
55 |
+
$keepQueryParameters = [];
|
56 |
+
if (empty($permalink_structure)) {
|
57 |
+
$keepQueryParameters[] = 'p';
|
58 |
+
} elseif (\strpos($permalink_structure, '?') !== \false) {
|
59 |
+
\parse_str(\explode('?', $permalink_structure, 2)[1], $parsedStr);
|
60 |
+
$keepQueryParameters = \array_keys($parsedStr);
|
61 |
+
}
|
62 |
+
$removeQueryParameters = [];
|
63 |
+
foreach (\array_keys($queryParameters) as $queryParameter) {
|
64 |
+
if (!\in_array($queryParameter, $keepQueryParameters, \true)) {
|
65 |
+
$removeQueryParameters[] = $queryParameter;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
return remove_query_arg($removeQueryParameters, $url);
|
69 |
+
}
|
70 |
+
/**
|
71 |
+
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50).
|
72 |
+
* It is recommend to sort the weights ascending to speed up performance.
|
73 |
+
*
|
74 |
+
* @param array $weightedValues
|
75 |
+
* @see https://stackoverflow.com/questions/445235/generating-random-results-by-weight-in-php
|
76 |
+
*/
|
77 |
+
public static function getRandomWeightedElement($weightedValues) {
|
78 |
+
$rand = \mt_rand(1, (int) \array_sum($weightedValues));
|
79 |
+
foreach ($weightedValues as $key => $value) {
|
80 |
+
$rand -= $value;
|
81 |
+
if ($rand <= 0) {
|
82 |
+
return $key;
|
83 |
+
}
|
84 |
+
}
|
85 |
+
}
|
86 |
+
/**
|
87 |
+
* Get the IP address of the current request.
|
88 |
+
*/
|
89 |
+
public static function getIpAddress() {
|
90 |
+
if (isset($_SERVER['HTTP_X_REAL_IP'])) {
|
91 |
+
return sanitize_text_field(wp_unslash($_SERVER['HTTP_X_REAL_IP']));
|
92 |
+
} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
|
93 |
+
// `HTTP_X_FORWARDED_FOR` can contain multiple IPs
|
94 |
+
return (string) rest_is_ip_address(
|
95 |
+
\trim(\current(\preg_split('/,/', sanitize_text_field(wp_unslash($_SERVER['HTTP_X_FORWARDED_FOR'])))))
|
96 |
+
);
|
97 |
+
} elseif (isset($_SERVER['REMOTE_ADDR'])) {
|
98 |
+
return sanitize_text_field(wp_unslash($_SERVER['REMOTE_ADDR']));
|
99 |
+
}
|
100 |
+
return null;
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Flatten an array.
|
104 |
+
*
|
105 |
+
* @param array $array
|
106 |
+
* @see https://stackoverflow.com/a/1320259/5506547
|
107 |
+
*/
|
108 |
+
public static function flatten($array) {
|
109 |
+
$it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($array));
|
110 |
+
$result = [];
|
111 |
+
foreach ($it as $v) {
|
112 |
+
$result[] = $v;
|
113 |
+
}
|
114 |
+
return $result;
|
115 |
+
}
|
116 |
+
/**
|
117 |
+
* Check if the current installation is a preinstalled environment.
|
118 |
+
*
|
119 |
+
* @return string|false
|
120 |
+
*/
|
121 |
+
public static function isPreinstalledEnvironment() {
|
122 |
+
// IONOS
|
123 |
+
$mu_plugins = get_mu_plugins();
|
124 |
+
if (isset($mu_plugins['ionos-assistant.php'])) {
|
125 |
+
return self::PREINSTALLED_ENV_IONOS;
|
126 |
+
}
|
127 |
+
return \false;
|
128 |
+
}
|
129 |
+
/**
|
130 |
+
* Get the list of active plugins in a map: File => Name. This is needed for the config and the
|
131 |
+
* notice for `skip-if-active` attribute in cookie opt-in codes.
|
132 |
+
*
|
133 |
+
* @param boolean $includeSlugs
|
134 |
+
*/
|
135 |
+
public static function getActivePluginsMap($includeSlugs = \true) {
|
136 |
+
$result = [];
|
137 |
+
$plugins = get_option('active_plugins');
|
138 |
+
foreach ($plugins as $pluginFile) {
|
139 |
+
$result[$pluginFile] = get_plugin_data(\constant('WP_PLUGIN_DIR') . '/' . $pluginFile)['Name'];
|
140 |
+
if ($includeSlugs) {
|
141 |
+
$slug = \explode('/', $pluginFile)[0];
|
142 |
+
$result[$slug] = $result[$pluginFile];
|
143 |
+
}
|
144 |
+
}
|
145 |
+
return $result;
|
146 |
+
}
|
147 |
+
/**
|
148 |
+
* Checks if any of the given plugins is active. It supports also slugs.
|
149 |
+
*
|
150 |
+
* @param string|string[] $plugins
|
151 |
+
*/
|
152 |
+
public static function anyPluginActive($plugins) {
|
153 |
+
$plugins = \is_array($plugins) ? $plugins : \explode(',', $plugins);
|
154 |
+
return \in_array(\true, \array_map([self::class, 'isPluginActive'], $plugins), \true);
|
155 |
+
}
|
156 |
+
/**
|
157 |
+
* Check if a single plugin is active. It supports also slugs.
|
158 |
+
*
|
159 |
+
* @param string $plugin
|
160 |
+
*/
|
161 |
+
public static function isPluginActive($plugin) {
|
162 |
+
if (is_plugin_active($plugin)) {
|
163 |
+
return \true;
|
164 |
+
}
|
165 |
+
$activePluginSlugs = [];
|
166 |
+
foreach (get_option('active_plugins') as $activePlugin) {
|
167 |
+
$activePluginSlugs[] = \explode('/', $activePlugin)[0];
|
168 |
+
}
|
169 |
+
// Break early if we have already found the plugin
|
170 |
+
if (\in_array($plugin, $activePluginSlugs, \true)) {
|
171 |
+
return \true;
|
172 |
+
}
|
173 |
+
// Check multisite-wide by slug
|
174 |
+
if (is_multisite()) {
|
175 |
+
foreach (\array_keys(get_site_option('active_sitewide_plugins')) as $activePlugin) {
|
176 |
+
$activePluginSlugs[] = \explode('/', $activePlugin)[0];
|
177 |
+
}
|
178 |
+
return \in_array($plugin, $activePluginSlugs, \true);
|
179 |
+
}
|
180 |
+
return \false;
|
181 |
+
}
|
182 |
+
/**
|
183 |
+
* Support samesite cookie flag in both php 7.2 (current production) and php >= 7.3 (when we get there)
|
184 |
+
* From: https://github.com/GoogleChromeLabs/samesite-examples/blob/master/php.md and https://stackoverflow.com/a/46971326/2308553
|
185 |
+
*
|
186 |
+
* @see https://stackoverflow.com/a/59654832/5506547
|
187 |
+
* @see https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
188 |
+
* @param string $name
|
189 |
+
* @param string $value
|
190 |
+
* @param int $expire
|
191 |
+
* @param string $path
|
192 |
+
* @param string $domain
|
193 |
+
* @param boolean $secure
|
194 |
+
* @param boolean $httponly
|
195 |
+
* @param string $samesite
|
196 |
+
*/
|
197 |
+
public static function setCookie(
|
198 |
+
$name,
|
199 |
+
$value = '',
|
200 |
+
$expire = 0,
|
201 |
+
$path = '',
|
202 |
+
$domain = '',
|
203 |
+
$secure = \false,
|
204 |
+
$httponly = \false,
|
205 |
+
$samesite = ''
|
206 |
+
) {
|
207 |
+
if (\headers_sent()) {
|
208 |
+
return \false;
|
209 |
+
}
|
210 |
+
// Fix `$path`: It never should be empty
|
211 |
+
if (empty($path)) {
|
212 |
+
$path = '/';
|
213 |
+
}
|
214 |
+
/**
|
215 |
+
* Strictly disable setting a cookie.
|
216 |
+
*
|
217 |
+
* @hook RCB/SetCookie/Allow
|
218 |
+
* @param {boolean} $set
|
219 |
+
* @param {string} $cookieName
|
220 |
+
* @param {string} $cookieValue
|
221 |
+
* @param {number} $expire
|
222 |
+
* @param {string} $path
|
223 |
+
* @param {string} $domain
|
224 |
+
* @param {boolean} $secure
|
225 |
+
* @param {boolean} $httponly
|
226 |
+
* @param {string} $samesite
|
227 |
+
* @return boolean
|
228 |
+
* @since 2.0.0
|
229 |
+
*/
|
230 |
+
$allowed = apply_filters(
|
231 |
+
'RCB/SetCookie/Allow',
|
232 |
+
\true,
|
233 |
+
$name,
|
234 |
+
$value,
|
235 |
+
$expire,
|
236 |
+
$path,
|
237 |
+
$domain,
|
238 |
+
$secure,
|
239 |
+
$httponly,
|
240 |
+
$samesite
|
241 |
+
);
|
242 |
+
if (!$allowed) {
|
243 |
+
return \false;
|
244 |
+
}
|
245 |
+
/**
|
246 |
+
* Strictly disable setting a cookie for a given name.
|
247 |
+
*
|
248 |
+
* @hook RCB/SetCookie/Allow/$cookieName
|
249 |
+
* @param {boolean} $set
|
250 |
+
* @param {string} $cookieName
|
251 |
+
* @param {string} $cookieValue
|
252 |
+
* @param {number} $expire
|
253 |
+
* @param {string} $path
|
254 |
+
* @param {string} $domain
|
255 |
+
* @param {boolean} $secure
|
256 |
+
* @param {boolean} $httponly
|
257 |
+
* @param {string} $samesite
|
258 |
+
* @return boolean
|
259 |
+
* @since 2.0.0
|
260 |
+
*/
|
261 |
+
$allowed = apply_filters(
|
262 |
+
'RCB/SetCookie/Allow/' . $name,
|
263 |
+
\true,
|
264 |
+
$name,
|
265 |
+
$value,
|
266 |
+
$expire,
|
267 |
+
$path,
|
268 |
+
$domain,
|
269 |
+
$secure,
|
270 |
+
$httponly,
|
271 |
+
$samesite
|
272 |
+
);
|
273 |
+
if (!$allowed) {
|
274 |
+
return \false;
|
275 |
+
}
|
276 |
+
// Avoid warning : A cookie associated with a resource at URL was set with `SameSite=None` but without `Secure`.
|
277 |
+
// It has been blocked, as Chrome now only delivers cookies marked `SameSite=None` if they are also marked `Secure`.
|
278 |
+
// You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5633521622188032.
|
279 |
+
// See also https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
280 |
+
$defaultSameSite = 'Strict';
|
281 |
+
// supported in all browsers without any security warnings
|
282 |
+
$useSameSite = empty($samesite) ? $defaultSameSite : $samesite;
|
283 |
+
$useSameSite = \strtolower($useSameSite) === 'none' && !$secure ? $defaultSameSite : $useSameSite;
|
284 |
+
$result = \false;
|
285 |
+
if (\PHP_VERSION_ID < 70300) {
|
286 |
+
$result = \setcookie(
|
287 |
+
$name,
|
288 |
+
$value,
|
289 |
+
$expire,
|
290 |
+
"{$path}; samesite={$useSameSite}",
|
291 |
+
$domain,
|
292 |
+
$secure,
|
293 |
+
$httponly
|
294 |
+
);
|
295 |
+
} else {
|
296 |
+
$result = \setcookie($name, $value, [
|
297 |
+
'expires' => $expire,
|
298 |
+
'path' => $path,
|
299 |
+
'domain' => $domain,
|
300 |
+
'samesite' => $useSameSite,
|
301 |
+
'secure' => $secure,
|
302 |
+
'httponly' => $httponly
|
303 |
+
]);
|
304 |
+
}
|
305 |
+
// Set cookie immediately for this session https://stackoverflow.com/a/3230167/5506547
|
306 |
+
if ($result) {
|
307 |
+
$_COOKIE[$name] = $value;
|
308 |
+
}
|
309 |
+
return $result;
|
310 |
+
}
|
311 |
+
/**
|
312 |
+
* Hash a passed string. It uses PHP `hash` and md5 as fallback as `hash` is not
|
313 |
+
* available in all environments.
|
314 |
+
*
|
315 |
+
* @param string $data
|
316 |
+
*/
|
317 |
+
public static function hash($data) {
|
318 |
+
$data = \constant('NONCE_SALT') . $data;
|
319 |
+
if (\function_exists('hash')) {
|
320 |
+
return \hash('sha256', $data);
|
321 |
+
} else {
|
322 |
+
return \str_repeat('0', 32) . \md5($data);
|
323 |
+
}
|
324 |
+
}
|
325 |
+
/**
|
326 |
+
* Get a host URL for technical cookie definitions.
|
327 |
+
*
|
328 |
+
* @param string $type See class constants
|
329 |
+
* @see https://stackoverflow.com/a/6768831/5506547
|
330 |
+
*/
|
331 |
+
public static function host($type) {
|
332 |
+
$actual_link = home_url('', is_ssl() ? 'https' : 'http');
|
333 |
+
$parsed = \parse_url($actual_link);
|
334 |
+
$scheme = $parsed['scheme'];
|
335 |
+
$host = $parsed['host'];
|
336 |
+
switch ($type) {
|
337 |
+
case self::HOST_TYPE_MAIN:
|
338 |
+
return self::giveHost($host);
|
339 |
+
case self::HOST_TYPE_MAIN_WITH_ALL_SUBDOMAINS:
|
340 |
+
return '.' . self::giveHost($host);
|
341 |
+
case self::HOST_TYPE_CURRENT:
|
342 |
+
return $host;
|
343 |
+
case self::HOST_TYPE_CURRENT_PROTOCOL:
|
344 |
+
return $scheme . '://' . $host;
|
345 |
+
case self::HOST_TYPE_CURRENT_WITH_ALL_SUBDOMAINS:
|
346 |
+
return '.' . $host;
|
347 |
+
default:
|
348 |
+
return '';
|
349 |
+
}
|
350 |
+
}
|
351 |
+
/**
|
352 |
+
* Remove all subdomains from host string.
|
353 |
+
*
|
354 |
+
* @param string $host_with_subdomain
|
355 |
+
* @see https://stackoverflow.com/a/21809669/5506547
|
356 |
+
*/
|
357 |
+
public static function giveHost($host_with_subdomain) {
|
358 |
+
$array = \explode('.', $host_with_subdomain);
|
359 |
+
$domain = \array_key_exists(\count($array) - 2, $array) ? $array[\count($array) - 2] : '';
|
360 |
+
return (empty($domain) ? '' : $domain . '.') . $array[\count($array) - 1];
|
361 |
+
}
|
362 |
+
/**
|
363 |
+
* Check if a string starts with a given needle.
|
364 |
+
*
|
365 |
+
* @param string $haystack The string to search in
|
366 |
+
* @param string $needle The starting string
|
367 |
+
* @see https://stackoverflow.com/a/834355/5506547
|
368 |
+
*/
|
369 |
+
public static function startsWith($haystack, $needle) {
|
370 |
+
$length = \strlen($needle);
|
371 |
+
return \substr($haystack, 0, $length) === $needle;
|
372 |
+
}
|
373 |
+
/**
|
374 |
+
* Check if a string starts with a given needle.
|
375 |
+
*
|
376 |
+
* @param string $haystack The string to search in
|
377 |
+
* @param string $needle The starting string
|
378 |
+
* @see https://stackoverflow.com/a/834355/5506547
|
379 |
+
*/
|
380 |
+
public static function endsWith($haystack, $needle) {
|
381 |
+
$length = \strlen($needle);
|
382 |
+
if (!$length) {
|
383 |
+
return \true;
|
384 |
+
}
|
385 |
+
return \substr($haystack, -$length) === $needle;
|
386 |
+
}
|
387 |
+
/**
|
388 |
+
* Check if current page is frontend page of WordPress.
|
389 |
+
*/
|
390 |
+
public static function isFrontend() {
|
391 |
+
$isFrontend = !is_admin() && !wp_doing_cron() && !wp_doing_ajax() && !self::isCLI();
|
392 |
+
if ($isFrontend && self::isPageBuilder()) {
|
393 |
+
return \false;
|
394 |
+
}
|
395 |
+
// Check if REST API is coming from frontend
|
396 |
+
if (self::isRest()) {
|
397 |
+
$referer = wp_get_raw_referer();
|
398 |
+
// If we could not detect a referer, it should not be handled as frontend
|
399 |
+
if ($referer === \false) {
|
400 |
+
return \false;
|
401 |
+
}
|
402 |
+
// If referer is set, we can definitely check this by `/wp-admin` url part
|
403 |
+
$adminUrl = admin_url();
|
404 |
+
if (self::startsWith($referer, $adminUrl)) {
|
405 |
+
return \false;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
return $isFrontend;
|
409 |
+
}
|
410 |
+
/**
|
411 |
+
* Check if the current page request is a download.
|
412 |
+
*
|
413 |
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition
|
414 |
+
*/
|
415 |
+
public static function isDownload() {
|
416 |
+
foreach (\headers_list() as $line) {
|
417 |
+
$header = \strtolower($line);
|
418 |
+
if (
|
419 |
+
self::startsWith($header, 'content-disposition: attachment') ||
|
420 |
+
(self::startsWith($header, 'content-type: multipart/form-data') &&
|
421 |
+
\strpos($header, 'boundary') !== \false)
|
422 |
+
) {
|
423 |
+
return \true;
|
424 |
+
}
|
425 |
+
}
|
426 |
+
return \false;
|
427 |
+
}
|
428 |
+
/**
|
429 |
+
* Check if the current request is the editor of a page builder.
|
430 |
+
*/
|
431 |
+
public static function isPageBuilder() {
|
432 |
+
return isset($_GET['fl_builder']) ||
|
433 |
+
isset($_GET['nf_preview_form']) ||
|
434 |
+
isset($_GET['legacy-widget-preview']) ||
|
435 |
+
isset($_GET['et_fb']) ||
|
436 |
+
isset($_GET['tb-preview']) ||
|
437 |
+
isset($_GET['fb-edit']) ||
|
438 |
+
isset($_GET['builder_id']) ||
|
439 |
+
isset($_GET['elementor-preview']) ||
|
440 |
+
isset($_GET['us-builder']) ||
|
441 |
+
isset($_GET['tve']) ||
|
442 |
+
isset($_POST['cs_preview_time']);
|
443 |
+
}
|
444 |
+
/**
|
445 |
+
* Check if current request is coming from WP CLI.
|
446 |
+
*
|
447 |
+
* @see https://wordpress.stackexchange.com/a/226163/83335
|
448 |
+
*/
|
449 |
+
public static function isCLI() {
|
450 |
+
return \defined('WP_CLI') && \constant('WP_CLI');
|
451 |
+
}
|
452 |
+
/**
|
453 |
+
* Checks if the given page request is a page builder frontend. This is a continuous function
|
454 |
+
* and needs to be extended as needed.
|
455 |
+
*/
|
456 |
+
public static function isPageBuilderFrontend() {
|
457 |
+
if (isset($_GET['ct_builder'])) {
|
458 |
+
return 'oxygen';
|
459 |
+
}
|
460 |
+
return \false;
|
461 |
+
}
|
462 |
+
/**
|
463 |
+
* Checks if the current request is a WP REST API request.
|
464 |
+
*
|
465 |
+
* Case #1: After WP_REST_Request initialisation
|
466 |
+
* Case #2: Support "plain" permalink settings
|
467 |
+
* Case #3: It can happen that WP_Rewrite is not yet initialized,
|
468 |
+
* so do this (wp-settings.php)
|
469 |
+
* Case #4: URL Path begins with wp-json/ (your REST prefix)
|
470 |
+
* Also supports WP installations in subfolders
|
471 |
+
*
|
472 |
+
* @returns boolean
|
473 |
+
* @author matzeeable
|
474 |
+
* @see https://gist.github.com/matzeeable/dfd82239f48c2fedef25141e48c8dc30
|
475 |
+
*/
|
476 |
+
public static function isRest() {
|
477 |
+
if (
|
478 |
+
(\defined('REST_REQUEST') && \constant('REST_REQUEST')) ||
|
479 |
+
(isset($_GET['rest_route']) && \strpos(\trim($_GET['rest_route'], '\\/'), rest_get_url_prefix(), 0) === 0)
|
480 |
+
) {
|
481 |
+
return \true;
|
482 |
+
}
|
483 |
+
// (#3)
|
484 |
+
global $wp_rewrite;
|
485 |
+
if ($wp_rewrite === null) {
|
486 |
+
$wp_rewrite = new \WP_Rewrite();
|
487 |
+
}
|
488 |
+
// (#4)
|
489 |
+
$rest_url = wp_parse_url(trailingslashit(rest_url()));
|
490 |
+
$current_url = wp_parse_url(add_query_arg([]));
|
491 |
+
return \strpos($current_url['path'], $rest_url['path'], 0) === 0;
|
492 |
+
}
|
493 |
+
/**
|
494 |
+
* Check if current content type is the given mime type.
|
495 |
+
*
|
496 |
+
* @param string $mime
|
497 |
+
* @see https://stackoverflow.com/a/22479030/5506547
|
498 |
+
*/
|
499 |
+
public static function currentContentTypeIs($mime) {
|
500 |
+
$headers = \headers_list();
|
501 |
+
// get list of headers
|
502 |
+
foreach ($headers as $header) {
|
503 |
+
// iterate over that list of headers
|
504 |
+
if (\stripos($header, 'Content-Type') !== \false) {
|
505 |
+
// if the current header hasthe String "Content-Type" in it
|
506 |
+
$headerParts = \explode(':', $header);
|
507 |
+
// split the string, getting an array
|
508 |
+
$headerValue = \trim($headerParts[1]);
|
509 |
+
// take second part as value
|
510 |
+
if (\stripos($headerValue, $mime) !== \false) {
|
511 |
+
return \true;
|
512 |
+
}
|
513 |
+
}
|
514 |
+
}
|
515 |
+
return \false;
|
516 |
+
}
|
517 |
+
/**
|
518 |
+
* Allow `find_in_set` in `meta_query` compare functionality.
|
519 |
+
*
|
520 |
+
* @param array $where
|
521 |
+
* @param object $query
|
522 |
+
* @see https://gist.github.com/mikeschinkel/6402058
|
523 |
+
*/
|
524 |
+
public static function posts_where_find_in_set($where, $query) {
|
525 |
+
global $wpdb;
|
526 |
+
foreach ($query->meta_query->queries as $index => $meta_query) {
|
527 |
+
if (isset($meta_query['compare']) && 'find_in_set' === \strtolower($meta_query['compare'])) {
|
528 |
+
$postMetaTable = $wpdb->postmeta;
|
529 |
+
$metaKey = $meta_query['key'];
|
530 |
+
$metaValue = $meta_query['value'];
|
531 |
+
$regex =
|
532 |
+
"#\\([\n\r\\s]+({$postMetaTable}.meta_key = \\'" .
|
533 |
+
\preg_quote($metaKey) .
|
534 |
+
"\\') AND ({$postMetaTable}.meta_value) = (\\'" .
|
535 |
+
\preg_quote($metaValue) .
|
536 |
+
"\\')[\n\r\\s]+\\)#m";
|
537 |
+
$where = \preg_replace($regex, '($1 AND FIND_IN_SET($3, $2))', $where);
|
538 |
+
}
|
539 |
+
}
|
540 |
+
return $where;
|
541 |
+
}
|
542 |
+
/**
|
543 |
+
* Get the current requested URL.
|
544 |
+
*/
|
545 |
+
public static function getRequestUrl() {
|
546 |
+
$requested_url = is_ssl() ? 'https://' : 'http://';
|
547 |
+
$requested_url .= $_SERVER['HTTP_HOST'];
|
548 |
+
$requested_url .= $_SERVER['REQUEST_URI'];
|
549 |
+
return $requested_url;
|
550 |
+
}
|
551 |
+
}
|
inc/api/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// Silence is golden.
|
inc/api/services.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use DevOwl\RealCookieBanner\Core;
|
4 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
5 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
if (!\function_exists('wp_rcb_service_groups')) {
|
11 |
+
/**
|
12 |
+
* Get a list of all existing service groups.
|
13 |
+
*
|
14 |
+
* @since 2.3.0
|
15 |
+
*/
|
16 |
+
function wp_rcb_service_groups() {
|
17 |
+
return \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getOrdered();
|
18 |
+
}
|
19 |
+
}
|
20 |
+
if (!\function_exists('wp_rcb_services_by_group')) {
|
21 |
+
/**
|
22 |
+
* Get a list of all existing services within a group.
|
23 |
+
*
|
24 |
+
* Example: Get all available service groups and services
|
25 |
+
*
|
26 |
+
* <code>
|
27 |
+
* <?php
|
28 |
+
* if (function_exists('wp_rcb_service_groups')) {
|
29 |
+
* foreach (wp_rcb_service_groups() as $group) {
|
30 |
+
* foreach (wp_rcb_services_by_group($group->term_id) as $service) {
|
31 |
+
* printf(
|
32 |
+
* 'Group: %s, Service: %s Service-ID: %d<br />',
|
33 |
+
* $group->name,
|
34 |
+
* $service->post_title,
|
35 |
+
* $service->ID
|
36 |
+
* );
|
37 |
+
* }
|
38 |
+
* }
|
39 |
+
* }
|
40 |
+
* </code>
|
41 |
+
*
|
42 |
+
* @param int $group_id The `term_id` of the group
|
43 |
+
* @param string|string[] $post_status Pass `null` to read all existing
|
44 |
+
* @since 2.3.0
|
45 |
+
*/
|
46 |
+
function wp_rcb_services_by_group($group_id, $post_status = null) {
|
47 |
+
$query = [
|
48 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
49 |
+
'orderby' => ['menu_order' => 'ASC', 'ID' => 'DESC'],
|
50 |
+
'numberposts' => -1,
|
51 |
+
'nopaging' => \true
|
52 |
+
];
|
53 |
+
if ($post_status !== null) {
|
54 |
+
$query['post_status'] = $post_status;
|
55 |
+
}
|
56 |
+
return \DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered(
|
57 |
+
$group_id,
|
58 |
+
\false,
|
59 |
+
\get_posts(\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments($query, 'wp_rcb_services_by_group'))
|
60 |
+
);
|
61 |
+
}
|
62 |
+
}
|
inc/base/Core.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\base;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Core as UtilsCore;
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
/**
|
9 |
+
* Base class for the applications Core class.
|
10 |
+
*/
|
11 |
+
abstract class Core {
|
12 |
+
use UtilsProvider;
|
13 |
+
use UtilsCore;
|
14 |
+
/**
|
15 |
+
* The constructor handles the core startup mechanism.
|
16 |
+
*
|
17 |
+
* The constructor is protected because a factory method should only create
|
18 |
+
* a Core object.
|
19 |
+
*
|
20 |
+
* @codeCoverageIgnore
|
21 |
+
*/
|
22 |
+
protected function __construct() {
|
23 |
+
// Define lazy constants
|
24 |
+
\define('RCB_TD', $this->getPluginData('TextDomain'));
|
25 |
+
\define('RCB_VERSION', $this->getPluginData('Version'));
|
26 |
+
$this->construct();
|
27 |
+
}
|
28 |
+
}
|
inc/base/UtilsProvider.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\base;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\FreemiumProvider;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Base;
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
/**
|
10 |
+
* To make the composer package in packages/utils work we need to
|
11 |
+
* make the constant variables be passed to the High-Order class.
|
12 |
+
*
|
13 |
+
* Put this trait in all your classes! Note also not to use the
|
14 |
+
* below methods by your plugin, instead use direct access to the constant.
|
15 |
+
* It just is for composer packages which needs to access dynamically the plugin!
|
16 |
+
*/
|
17 |
+
trait UtilsProvider {
|
18 |
+
use Base;
|
19 |
+
use FreemiumProvider;
|
20 |
+
/**
|
21 |
+
* Get the prefix of this plugin so composer packages can dynamically
|
22 |
+
* build other constant values on it.
|
23 |
+
*
|
24 |
+
* @return string
|
25 |
+
* @codeCoverageIgnore It only returns a string with the constant prefix
|
26 |
+
*/
|
27 |
+
public function getPluginConstantPrefix() {
|
28 |
+
return 'RCB';
|
29 |
+
}
|
30 |
+
}
|
inc/base/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/base/others/cachebuster-lib.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* This file was automatically generated (Wed Nov 24 2021 13:38:36 GMT+0000 (Coordinated Universal Time)). */
|
3 |
+
return [
|
4 |
+
'animate.css' => '4.1.1',
|
5 |
+
'mobx' => '4.15.7',
|
6 |
+
'react' => '16.14.0',
|
7 |
+
'react-dom' => '16.14.0',
|
8 |
+
'react-router-dom' => '5.2.0'
|
9 |
+
];
|
inc/base/others/cachebuster.php
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* This file was automatically generated (Wed Nov 24 2021 13:38:36 GMT+0000 (Coordinated Universal Time)). */
|
3 |
+
return [
|
4 |
+
'src/public/dist/138.lite.js' => 'fe6fa5ac79ad7bd18be555f216398bfa',
|
5 |
+
'src/public/dist/152.lite.js' => '922fce25ae49cfef432fdb3793df5c32',
|
6 |
+
'src/public/dist/193.lite.js' => 'e99f1503fc289afe1c7064dd595299ee',
|
7 |
+
'src/public/dist/193.pro.js' => '15df24cec58ca429f337635970cf5977',
|
8 |
+
'src/public/dist/289.pro.js' => 'dcdd88a5ea7e22741cd14a215ab68a8a',
|
9 |
+
'src/public/dist/411.lite.js' => '0b9dbd0c4ea1e5075a2826de3d3badac',
|
10 |
+
'src/public/dist/411.pro.js' => '281b774d7ece3ace8d5b982a21a637dd',
|
11 |
+
'src/public/dist/440.lite.js' => '507b1d1d30a2155478e54f9c41e43d3b',
|
12 |
+
'src/public/dist/440.pro.js' => 'badf73a2c4dec1c055db004c0b24c6d3',
|
13 |
+
'src/public/dist/518.lite.js' => 'c7e599cabde9f399f6d9df414814fe7a',
|
14 |
+
'src/public/dist/518.pro.js' => '7aa4de66c2020bdcd8a4d14e762c97fb',
|
15 |
+
'src/public/dist/547.lite.js' => '030380837587826d29b31ab8bbe67567',
|
16 |
+
'src/public/dist/547.pro.js' => 'c97dabe193de340eda432383b4259af5',
|
17 |
+
'src/public/dist/602.pro.js' => '544221ae0869fdd60cb456a1e95d217a',
|
18 |
+
'src/public/dist/728.lite.js' => '68a96825de2ef34290003ba0ac5101a4',
|
19 |
+
'src/public/dist/728.pro.js' => '969665cf863f3355590c7ee8278ac41f',
|
20 |
+
'src/public/dist/77.pro.js' => '5908fcba70f31f08a6b6eda4720913cc',
|
21 |
+
'src/public/dist/795.lite.js' => 'f24c07d99365d028468d9a8eef40ca37',
|
22 |
+
'src/public/dist/795.pro.js' => '0f2c5c70d9be03caab24126e536c3c3d',
|
23 |
+
'src/public/dist/914.lite.js' => 'e58092e06d5f33173282b43d04705d56',
|
24 |
+
'src/public/dist/914.pro.js' => '182de60076ce6b7f80084a25543f0e63',
|
25 |
+
'src/public/dist/930.lite.js' => 'e6b8814f81b9410821d4df3896f4117f',
|
26 |
+
'src/public/dist/930.pro.js' => '74f8adcb98471d1b566df0ff382f7efd',
|
27 |
+
'src/public/dist/954.lite.js' => 'ee2cda44e2cd4c19a1f7288055efa5d0',
|
28 |
+
'src/public/dist/954.pro.js' => 'c39fe799c52c7690d66633725671963f',
|
29 |
+
'src/public/dist/admin.lite.js' => 'baccf43eaf7a74f549a10833b866ac30',
|
30 |
+
'src/public/dist/admin.pro.js' => '23d18df2c09b1ecbef76d0ff4abb2502',
|
31 |
+
'src/public/dist/banner_tcf.pro.js' => 'b01e3a3acacd361f6e790b2adb6441d2',
|
32 |
+
'src/public/dist/banner.lite.js' => '793d2fc11d02b0b3244d647e5978df69',
|
33 |
+
'src/public/dist/banner.pro.js' => 'adfc3263c227c3bfc502aa686bcbedc1',
|
34 |
+
'src/public/dist/blocker_tcf.pro.js' => '9d318991776de4f67ee0f38dcb274716',
|
35 |
+
'src/public/dist/blocker.lite.js' => 'c9fb1255fce4d842daa466609bcf798c',
|
36 |
+
'src/public/dist/blocker.pro.js' => 'd61d56712f31ed2e3b53cadad4865d03',
|
37 |
+
'src/public/dist/chunk-config-tab-blocker.lite.js' => '53e44fc3f42afa585805fc0ed9735253',
|
38 |
+
'src/public/dist/chunk-config-tab-blocker.pro.js' => 'edacaa3d23cbe8a4c9da26b793eb8e84',
|
39 |
+
'src/public/dist/chunk-config-tab-consent.lite.js' => 'd8d1519e929f3b7928dca98441afb9e4',
|
40 |
+
'src/public/dist/chunk-config-tab-consent.pro.js' => '8483170c4720d2715d2b5c967d815d96',
|
41 |
+
'src/public/dist/chunk-config-tab-cookies.lite.js' => '9b9602181c3c951737d34590eecdceff',
|
42 |
+
'src/public/dist/chunk-config-tab-cookies.pro.js' => '84e70cb7b00fc503567c782943401415',
|
43 |
+
'src/public/dist/chunk-config-tab-dashboard.lite.js' => '6f990a856b1bca56f4d280dcda8f3d74',
|
44 |
+
'src/public/dist/chunk-config-tab-dashboard.pro.js' => '51d49cb3607b80c4f511b70be2eca44f',
|
45 |
+
'src/public/dist/chunk-config-tab-import.lite.js' => '1e8194366e8b8f6b492a91e919afb929',
|
46 |
+
'src/public/dist/chunk-config-tab-import.pro.js' => '6a95b8f7c80ec7f056d51dc313b7ddb5',
|
47 |
+
'src/public/dist/chunk-config-tab-licensing.lite.js' => '969651dd760ae0294664466b3f956652',
|
48 |
+
'src/public/dist/chunk-config-tab-licensing.pro.js' => '19c66769b864455ee4ad20a3bcfab630',
|
49 |
+
'src/public/dist/chunk-config-tab-scanner.lite.js' => 'd9e0594df671e94ab946ad1d52466e27',
|
50 |
+
'src/public/dist/chunk-config-tab-scanner.pro.js' => 'cb8a98ece5bcb06817e409d0dd07a401',
|
51 |
+
'src/public/dist/chunk-config-tab-settings.lite.js' => 'd81f69ef3ec819dd370d29660ef5b63f',
|
52 |
+
'src/public/dist/chunk-config-tab-settings.pro.js' => '7d68860ce4255ddb3837479993900b08',
|
53 |
+
'src/public/dist/chunk-config-tab-tcf.lite.js' => 'eac6c5f524c9bfa2ee81660ee7da9866',
|
54 |
+
'src/public/dist/chunk-config-tab-tcf.pro.js' => '757d59fda76a74a5ab7d8bb729b05dec',
|
55 |
+
'src/public/dist/customize_banner.lite.js' => '87db82cb2ca15d10a47c4e97131e389b',
|
56 |
+
'src/public/dist/customize_banner.pro.js' => 'a7eb89bb5987acd97399ba001a5db565',
|
57 |
+
'src/public/dist/customize.lite.js' => 'cc60969719ae8a333ded2c491b6c589a',
|
58 |
+
'src/public/dist/customize.pro.js' => '78ff657096813ab547ff19c394bc14a4',
|
59 |
+
'src/public/dist/queue.lite.js' => '6a213f21af53538884cbbbc085ed6e16',
|
60 |
+
'src/public/dist/queue.pro.js' => '341d7af92e1be07f517f23cd763baa4e',
|
61 |
+
'src/public/dist/vendor-admin.lite.js' => '39ad8e4806179974b21988bb5f7823d3',
|
62 |
+
'src/public/dist/vendor-admin.pro.js' => 'e4d7c48ab48adbf7056011824e88d006',
|
63 |
+
'src/public/dist/vendor-banner_tcf.pro.js' => '44ef7e97d00f2d575d40cda9596e0d1a',
|
64 |
+
'src/public/dist/vendor-banner.lite.js' => '6b56c2a07344f2f55445929cc88e75c2',
|
65 |
+
'src/public/dist/vendor-banner.pro.js' => 'a3b9137f59aabdf00f528495073d5556',
|
66 |
+
'src/public/dist/vendor-customize_banner.lite.js' => '8aaa4bf7ccf71a1d570ae33d9423fa9c',
|
67 |
+
'src/public/dist/vendor-customize_banner.pro.js' => '91705307ca0f1cd4513922cb73d68720',
|
68 |
+
'src/public/dist/vendor-customize.lite.js' => 'cd523a3164ea3f8afd74b3ecb261f2a6',
|
69 |
+
'src/public/dist/vendor-customize.pro.js' => '4406bbe7ab9f8700ba0e26bb889376ca',
|
70 |
+
'src/public/dist/vendor-queue.lite.js' => 'd566217893d41da6fcdf2118ba9a2531',
|
71 |
+
'src/public/dist/vendor-queue.pro.js' => '4eda57705bf7359479f6751a9c1b7370',
|
72 |
+
'src/public/dist/admin.css' => 'a6ad3a44c23152166662a534376207a9',
|
73 |
+
'src/public/dist/customize.css' => '666b49b86d5b1da06db0d98ac80af099',
|
74 |
+
'src/public/dev/107.lite.js' => '0aa3290284023367a6bb3cf240fba90b',
|
75 |
+
'src/public/dev/177.lite.js' => '500ac97eb1a2546e9fef2e0ce48eeaf4',
|
76 |
+
'src/public/dev/177.pro.js' => 'f8b650fced529a86690e2fc4080e531e',
|
77 |
+
'src/public/dev/185.lite.js' => 'a2b43609b33cdd2ef7436174ae142e17',
|
78 |
+
'src/public/dev/185.pro.js' => '6555e02b38f06d3d1343f68277547107',
|
79 |
+
'src/public/dev/223.lite.js' => '8f474dcdca219c07226ac7db7be7f9cb',
|
80 |
+
'src/public/dev/223.pro.js' => '0bdfadec099bba4304b166cbb6d63bf8',
|
81 |
+
'src/public/dev/251.lite.js' => '5fbef3855a09d8bd5d3e8d1093accad7',
|
82 |
+
'src/public/dev/327.lite.js' => 'c6f174970a7ca5497293fbb6dc36e4bb',
|
83 |
+
'src/public/dev/327.pro.js' => '22c1bb9d33b284d7120724faab73f88d',
|
84 |
+
'src/public/dev/387.pro.js' => '8b80ee9477c7221171635b1b57d68f3c',
|
85 |
+
'src/public/dev/394.lite.js' => 'cd3171551063140f5b5171b20c59bc09',
|
86 |
+
'src/public/dev/394.pro.js' => '3d55eaf339aa6296976230ece6979777',
|
87 |
+
'src/public/dev/4.lite.js' => '11ee19fbd7df3c27c6466ce67d97c287',
|
88 |
+
'src/public/dev/4.pro.js' => 'e41a590814a721f65355b1db08a1da78',
|
89 |
+
'src/public/dev/413.lite.js' => 'a31b8076e0fae8c1fefe458a71014367',
|
90 |
+
'src/public/dev/413.pro.js' => '6613b6dd40b189493bc6f7cbffde69bb',
|
91 |
+
'src/public/dev/438.pro.js' => '11de053cc15ac076c34ed977d60b5555',
|
92 |
+
'src/public/dev/49.lite.js' => 'acb56bb37ee610dd8fdb1272fa41b2e1',
|
93 |
+
'src/public/dev/49.pro.js' => '22a76ac33bd8fff0c62c2dea66d56eb5',
|
94 |
+
'src/public/dev/574.lite.js' => '83abef008f7df466edfdacb2a8913763',
|
95 |
+
'src/public/dev/592.lite.js' => '3ead8b91ef44c9eddb680d334e373383',
|
96 |
+
'src/public/dev/592.pro.js' => 'a790b4f56c32cb1bdf45a0de66ff237a',
|
97 |
+
'src/public/dev/653.lite.js' => '7c6c0c19c4f542dcee8be897c4a2544c',
|
98 |
+
'src/public/dev/653.pro.js' => '763c643d44ed5083dae87d36bdb4745a',
|
99 |
+
'src/public/dev/664.pro.js' => 'c32f531b9fff74d384f934a2a7eaed00',
|
100 |
+
'src/public/dev/673.lite.js' => '36132d5a155b1a228c640a06bf334420',
|
101 |
+
'src/public/dev/673.pro.js' => '135c7e6e9f3f11b55de09a45387fdf1f',
|
102 |
+
'src/public/dev/761.lite.js' => '24f0933c8bd6e490ac65b958429d7595',
|
103 |
+
'src/public/dev/761.pro.js' => '7b4fe1c1b959d6de9e8f11d0472b2735',
|
104 |
+
'src/public/dev/78.pro.js' => 'adaac41bd6362be8b13fc4bb4f5a560e',
|
105 |
+
'src/public/dev/868.lite.js' => '1b1544806a04023fa1b7fb42abeb99f2',
|
106 |
+
'src/public/dev/868.pro.js' => '3dd05132fe294b025a10046c7cfae1fd',
|
107 |
+
'src/public/dev/admin.lite.js' => '07d500a1280a6787db98c653f00c8847',
|
108 |
+
'src/public/dev/admin.pro.js' => '53cb402a48f1ddaab0653d1f120c60cf',
|
109 |
+
'src/public/dev/banner_tcf.pro.js' => 'f93cb59272369eb2baf319fc1b9bfa0d',
|
110 |
+
'src/public/dev/banner.lite.js' => '2d72017aea1bb9ab4260df746fef1411',
|
111 |
+
'src/public/dev/banner.pro.js' => '17b5941b43ac6f7f089892babdf4d7cb',
|
112 |
+
'src/public/dev/blocker_tcf.pro.js' => '4809cb012985a28595b7cafa933309ed',
|
113 |
+
'src/public/dev/blocker.lite.js' => '4d67942eac910ac8f16cb12b4fc9c563',
|
114 |
+
'src/public/dev/blocker.pro.js' => '870bbbf3232f3d4623a059c047ddfbc0',
|
115 |
+
'src/public/dev/chunk-config-tab-blocker.lite.js' => 'e860eb681e1fb1ccc2d78dea30cf2820',
|
116 |
+
'src/public/dev/chunk-config-tab-blocker.pro.js' => 'e6928805e36d63bdde2bb907e778fb36',
|
117 |
+
'src/public/dev/chunk-config-tab-consent.lite.js' => '8fd307a2a1e78febb2e2a9987dcbb356',
|
118 |
+
'src/public/dev/chunk-config-tab-consent.pro.js' => 'a6a124a2657fa5a227d55ebd269d2a99',
|
119 |
+
'src/public/dev/chunk-config-tab-cookies.lite.js' => '105674a7c6867768ae314d52ce4b942e',
|
120 |
+
'src/public/dev/chunk-config-tab-cookies.pro.js' => 'e227a12587b510883873ce8f1392710a',
|
121 |
+
'src/public/dev/chunk-config-tab-dashboard.lite.js' => '9f6e3230964ec642f57843942cbcea07',
|
122 |
+
'src/public/dev/chunk-config-tab-dashboard.pro.js' => '87293fc7094ef113b899e8a73e7a45d3',
|
123 |
+
'src/public/dev/chunk-config-tab-import.lite.js' => '90739f782289ca0f572bd90525b9a854',
|
124 |
+
'src/public/dev/chunk-config-tab-import.pro.js' => 'c3bf75ed240f8b5ee5d7d4e686b4d249',
|
125 |
+
'src/public/dev/chunk-config-tab-licensing.lite.js' => '8973f14d6a207597eb94c4b275ade4bd',
|
126 |
+
'src/public/dev/chunk-config-tab-licensing.pro.js' => 'ef8aa165319102c83983c17192e7a15c',
|
127 |
+
'src/public/dev/chunk-config-tab-scanner.lite.js' => '2baeffbd3877266c51f0f5ead9d75ff3',
|
128 |
+
'src/public/dev/chunk-config-tab-scanner.pro.js' => 'c4a90b06e9f2624a9914000b9c839956',
|
129 |
+
'src/public/dev/chunk-config-tab-settings.lite.js' => '3aa5237352b0f03638c154bf3ee111dc',
|
130 |
+
'src/public/dev/chunk-config-tab-settings.pro.js' => 'b9d6baf49b082216f8dd198c64ca17e6',
|
131 |
+
'src/public/dev/chunk-config-tab-tcf.lite.js' => '01773a56690b52f311d3f855480eecee',
|
132 |
+
'src/public/dev/chunk-config-tab-tcf.pro.js' => '9d07b6c5e41ad19b9a3b91cb6b3dc959',
|
133 |
+
'src/public/dev/customize_banner.lite.js' => '853a4c0a58c77d5ab64ba271fcb4a498',
|
134 |
+
'src/public/dev/customize_banner.pro.js' => '1371f010cb6ed8a11142b73e463bb1d5',
|
135 |
+
'src/public/dev/customize.lite.js' => '6e9da1fe1c070f1f3c2c10d94bb7adbc',
|
136 |
+
'src/public/dev/customize.pro.js' => '409d663912b12b6f79ed2c3e6671c87b',
|
137 |
+
'src/public/dev/queue.lite.js' => 'e08758dc323b8440a8bf946a8b51308d',
|
138 |
+
'src/public/dev/queue.pro.js' => 'dc80ebb5255ec432e582804a61111148',
|
139 |
+
'src/public/dev/vendor-admin.lite.js' => '754ec48d73f3af11cb53829361bf5bc3',
|
140 |
+
'src/public/dev/vendor-admin.pro.js' => 'bd70e1bed37d0f7b76baed373c676a10',
|
141 |
+
'src/public/dev/vendor-banner_tcf.pro.js' => '3a3f1f226e9e5d68d8c903242de3fdbc',
|
142 |
+
'src/public/dev/vendor-banner.lite.js' => '8ce7d1cff50690ba43985d6170979d7d',
|
143 |
+
'src/public/dev/vendor-banner.pro.js' => '69d38f63893302adb3093045e45d019f',
|
144 |
+
'src/public/dev/vendor-customize_banner.lite.js' => '799632746ae38f1b33535ac33b3de41b',
|
145 |
+
'src/public/dev/vendor-customize_banner.pro.js' => '6332a5eaa3de3bd257879d4515d6f437',
|
146 |
+
'src/public/dev/vendor-customize.lite.js' => '7c77607076ab7881e837e1660560c6d9',
|
147 |
+
'src/public/dev/vendor-customize.pro.js' => '45b322e46ef5cf580b2c5f98e776a9f5',
|
148 |
+
'src/public/dev/vendor-queue.lite.js' => '92a4bd97c3e1dc655f4bc5ea3ccdf910',
|
149 |
+
'src/public/dev/vendor-queue.pro.js' => 'abc4cd3044946cf6796e3aec1693d8fd',
|
150 |
+
'src/public/dev/admin.css' => '458a941cf57f71f2740190993874f876',
|
151 |
+
'src/public/dev/customize.css' => '283fd0009908911ef11616f3c2447d86'
|
152 |
+
];
|
inc/base/others/fallback-already.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die('No script kiddies please!'); // Avoid direct file request
|
3 |
+
|
4 |
+
if (!function_exists('rcb_skip_already_admin_notice')) {
|
5 |
+
/**
|
6 |
+
* Show an admin notice to administrators when the plugin is already active.
|
7 |
+
*/
|
8 |
+
function rcb_skip_already_admin_notice() {
|
9 |
+
if (current_user_can('activate_plugins')) {
|
10 |
+
echo '<div class=\'notice notice-error\'>
|
11 |
+
<p>Currently multiple versions of the plugin <strong>Real Cookie Banner</strong> are active. Please deactivate all versions except the one you want to use.</p>' .
|
12 |
+
'</div>';
|
13 |
+
}
|
14 |
+
}
|
15 |
+
}
|
16 |
+
add_action('admin_notices', 'rcb_skip_already_admin_notice');
|
17 |
+
|
18 |
+
if (!function_exists('rcb_skip_already_deactivate_lite')) {
|
19 |
+
/**
|
20 |
+
* Automatically deactivate lite version when we try to activate the PRO version.
|
21 |
+
*/
|
22 |
+
function rcb_skip_already_deactivate_lite() {
|
23 |
+
// Avoid doing this in local stack as we do not have pro and lite difference in slug
|
24 |
+
if (defined('DEVOWL_WP_DEV') && constant('DEVOWL_WP_DEV') && $_SERVER['SERVER_PORT'] === strval(10000)) {
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
|
28 |
+
deactivate_plugins(RCB_SLUG_LITE . '/index.php');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
register_activation_hook(
|
32 |
+
constant('WP_PLUGIN_DIR') . DIRECTORY_SEPARATOR . RCB_SLUG_PRO . DIRECTORY_SEPARATOR . 'index.php',
|
33 |
+
'rcb_skip_already_deactivate_lite'
|
34 |
+
);
|
inc/base/others/fallback-php-version.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die('No script kiddies please!'); // Avoid direct file request
|
3 |
+
|
4 |
+
if (!function_exists('rcb_skip_php_admin_notice')) {
|
5 |
+
/**
|
6 |
+
* Show an admin notice to administrators when the minimum PHP version
|
7 |
+
* could not be reached. The error message is only in english available.
|
8 |
+
*/
|
9 |
+
function rcb_skip_php_admin_notice() {
|
10 |
+
if (current_user_can('activate_plugins')) {
|
11 |
+
$data = get_plugin_data(RCB_FILE, true, false);
|
12 |
+
echo '<div class=\'notice notice-error\'>
|
13 |
+
<p><strong>' .
|
14 |
+
$data['Name'] .
|
15 |
+
'</strong> could not be initialized because you need minimum PHP version ' .
|
16 |
+
RCB_MIN_PHP .
|
17 |
+
' ... you are running: ' .
|
18 |
+
phpversion() .
|
19 |
+
'.
|
20 |
+
</div>';
|
21 |
+
}
|
22 |
+
}
|
23 |
+
}
|
24 |
+
add_action('admin_notices', 'rcb_skip_php_admin_notice');
|
inc/base/others/fallback-rest-api.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die('No script kiddies please!'); // Avoid direct file request
|
3 |
+
|
4 |
+
if (!function_exists('rcb_skip_rest_admin_notice')) {
|
5 |
+
/**
|
6 |
+
* Show an admin notice to administrators when the minimum WP version
|
7 |
+
* could not be reached. The error message is only in english available.
|
8 |
+
*/
|
9 |
+
function rcb_skip_rest_admin_notice() {
|
10 |
+
if (current_user_can('activate_plugins')) {
|
11 |
+
$data = get_plugin_data(RCB_FILE, true, false);
|
12 |
+
global $wp_version;
|
13 |
+
echo '<div class=\'notice notice-error\'>
|
14 |
+
<p><strong>' .
|
15 |
+
$data['Name'] .
|
16 |
+
'</strong> could not be initialized because you are running WordPress < 4.7 (' .
|
17 |
+
$wp_version .
|
18 |
+
'). If WordPress < 4.7 the plugin needs another plugin <strong>WordPress REST API (Version 2)</strong> to provide needed functionality.
|
19 |
+
<a href="' .
|
20 |
+
admin_url('plugin-install.php?s=WordPress+REST+API+(Version+2)&tab=search&type=term') .
|
21 |
+
'">Show in plugin finder</a> or
|
22 |
+
<a href="' .
|
23 |
+
admin_url('plugin-install.php?tab=plugin-information&plugin=rest-api&TB_iframe=true') .
|
24 |
+
'">install plugin directly</a>.
|
25 |
+
</div>';
|
26 |
+
}
|
27 |
+
}
|
28 |
+
}
|
29 |
+
add_action('admin_notices', 'rcb_skip_rest_admin_notice');
|
inc/base/others/fallback-wp-version.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
defined('ABSPATH') or die('No script kiddies please!'); // Avoid direct file request
|
3 |
+
|
4 |
+
if (!function_exists('rcb_skip_wp_admin_notice')) {
|
5 |
+
/**
|
6 |
+
* Show an admin notice to administrators when the minimum WP version
|
7 |
+
* could not be reached. The error message is only in english available.
|
8 |
+
*/
|
9 |
+
function rcb_skip_wp_admin_notice() {
|
10 |
+
if (current_user_can('activate_plugins')) {
|
11 |
+
$data = get_plugin_data(RCB_FILE, true, false);
|
12 |
+
global $wp_version;
|
13 |
+
echo '<div class=\'notice notice-error\'>
|
14 |
+
<p><strong>' .
|
15 |
+
$data['Name'] .
|
16 |
+
'</strong> could not be initialized because you need minimum WordPress version ' .
|
17 |
+
RCB_MIN_WP .
|
18 |
+
' ... you are running: ' .
|
19 |
+
$wp_version .
|
20 |
+
'.
|
21 |
+
<a href="' .
|
22 |
+
admin_url('update-core.php') .
|
23 |
+
'">Update WordPress now.</a>
|
24 |
+
</div>';
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
add_action('admin_notices', 'rcb_skip_wp_admin_notice');
|
inc/base/others/index.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php // Silence is golden.
|
inc/base/others/start.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// We have now ensured that we are running the minimum PHP version.
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\Autoloader;
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// Check minimum WordPress version
|
11 |
+
global $wp_version;
|
12 |
+
if (\version_compare($wp_version, \RCB_MIN_WP, '>=')) {
|
13 |
+
$load_core = \false;
|
14 |
+
// Check minimum WordPress REST API
|
15 |
+
if (\version_compare($wp_version, '4.7.0', '>=')) {
|
16 |
+
$load_core = \true;
|
17 |
+
} else {
|
18 |
+
// Check WP REST API plugin is active
|
19 |
+
require_once \ABSPATH . 'wp-admin/includes/plugin.php';
|
20 |
+
$load_core = \is_plugin_active('rest-api/plugin.php');
|
21 |
+
}
|
22 |
+
// Load core
|
23 |
+
if ($load_core) {
|
24 |
+
// Composer autoload with prioritized PHP Scoper autoload
|
25 |
+
$composer_autoload_path = \path_join(\RCB_PATH, 'vendor/autoload.php');
|
26 |
+
$composer_scoper_autoload_path = \path_join(\RCB_PATH, 'vendor/scoper-autoload.php');
|
27 |
+
if (\file_exists($composer_scoper_autoload_path)) {
|
28 |
+
require_once $composer_scoper_autoload_path;
|
29 |
+
} elseif (\file_exists($composer_autoload_path)) {
|
30 |
+
require_once $composer_autoload_path;
|
31 |
+
}
|
32 |
+
new \DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\Autoloader('RCB');
|
33 |
+
// Do not start our plugin when we are uninstalling our plugin (just for registering autoloader)
|
34 |
+
if (!\defined('WP_UNINSTALL_PLUGIN') || !\constant('WP_UNINSTALL_PLUGIN')) {
|
35 |
+
\DevOwl\RealCookieBanner\Core::getInstance();
|
36 |
+
}
|
37 |
+
} else {
|
38 |
+
// WP REST API version not reached
|
39 |
+
require_once \RCB_INC . 'base/others/fallback-rest-api.php';
|
40 |
+
}
|
41 |
+
} else {
|
42 |
+
// Min WP version not reached
|
43 |
+
require_once \RCB_INC . 'base/others/fallback-wp-version.php';
|
44 |
+
}
|
inc/comp/PresetsPluginIntegrations.php
ADDED
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\comp;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\BlockerPresets;
|
6 |
+
use DevOwl\RealCookieBanner\presets\CookiePresets;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Provide native integrations to known plugins which are associated to a preset.
|
14 |
+
*
|
15 |
+
* Example: RankMath SEO: Deactivate Analytics preset when the "Install code" option is activated.
|
16 |
+
*/
|
17 |
+
class PresetsPluginIntegrations {
|
18 |
+
const SLUG_RANKMATH_SEO_PRO = 'seo-by-rank-math-pro';
|
19 |
+
const SLUG_RANKMATH_SEO_FREE = 'seo-by-rank-math';
|
20 |
+
const SLUG_ANALYTIFY_PRO = 'wp-analytify-pro';
|
21 |
+
const SLUG_ANALYTIFY_FREE = 'wp-analytify';
|
22 |
+
const SLUG_EXACTMETRICS_PRO = 'google-analytics-dashboard-for-wp-premium';
|
23 |
+
const SLUG_EXACTMETRICS_FREE = 'google-analytics-dashboard-for-wp';
|
24 |
+
const SLUG_MONSTERINSIGHTS_PRO = 'google-analytics-premium';
|
25 |
+
const SLUG_MONSTERINSIGHTS_FREE = 'google-analytics-for-wordpress';
|
26 |
+
const SLUG_GA_GOOGLE_ANALYTICS_PRO = 'ga-google-analytics-pro';
|
27 |
+
const SLUG_GA_GOOGLE_ANALYTICS_FREE = 'ga-google-analytics';
|
28 |
+
const SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_FREE = 'woocommerce-google-analytics-integration';
|
29 |
+
const SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO = 'woocommerce-google-analytics-pro';
|
30 |
+
const SLUG_WP_PIWIK = 'wp-piwik';
|
31 |
+
const SLUG_MATOMO_PLUGIN = 'matomo';
|
32 |
+
const OPTION_NAME_USERS_CAN_REGISTER = 'users_can_register';
|
33 |
+
const OPTION_NAME_RANK_MATH_GA = 'rank_math_google_analytic_options';
|
34 |
+
const OPTION_NAME_ANALYTIFY_AUTHENTICATION = 'wp-analytify-authentication';
|
35 |
+
const OPTION_NAME_ANALYTIFY_PROFILE = 'wp-analytify-profile';
|
36 |
+
const OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN = 'pa_google_token';
|
37 |
+
const OPTION_NAME_EXACTMETRICS_SITE_PROFILE = 'exactmetrics_site_profile';
|
38 |
+
const OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE = 'monsterinsights_site_profile';
|
39 |
+
const OPTION_NAME_GA_GOOGLE_ANALYTICS = 'gap_options';
|
40 |
+
const OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS = 'woocommerce_google_analytics_settings';
|
41 |
+
const OPTION_NAME_WP_PIWIK = 'wp-piwik_global-track_mode';
|
42 |
+
const OPTION_NAME_MATOMO_PLUGIN = 'matomo-global-option';
|
43 |
+
// Network options
|
44 |
+
const OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL = 'exactmetrics_network_profile';
|
45 |
+
const OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL = 'monsterinsights_network_profile';
|
46 |
+
const INVALIDATE_WHEN_OPTION_CHANGES = [
|
47 |
+
self::OPTION_NAME_USERS_CAN_REGISTER,
|
48 |
+
self::OPTION_NAME_RANK_MATH_GA,
|
49 |
+
self::OPTION_NAME_ANALYTIFY_AUTHENTICATION,
|
50 |
+
self::OPTION_NAME_ANALYTIFY_PROFILE,
|
51 |
+
self::OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN,
|
52 |
+
self::OPTION_NAME_EXACTMETRICS_SITE_PROFILE,
|
53 |
+
self::OPTION_NAME_MONSTERINSIGHTS_SITE_PROFILE,
|
54 |
+
self::OPTION_NAME_GA_GOOGLE_ANALYTICS,
|
55 |
+
self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS,
|
56 |
+
self::OPTION_NAME_WP_PIWIK,
|
57 |
+
self::OPTION_NAME_MATOMO_PLUGIN
|
58 |
+
];
|
59 |
+
const INVALIDATE_WHEN_SITE_OPTION_CHANGES = [
|
60 |
+
self::OPTION_NAME_EXACTMETRICS_NETWORK_PROFIL,
|
61 |
+
self::OPTION_NAME_MONSTERINSIGHTS_NETWORK_PROFIL
|
62 |
+
];
|
63 |
+
/**
|
64 |
+
* C'tor.
|
65 |
+
*
|
66 |
+
* @codeCoverageIgnore
|
67 |
+
*/
|
68 |
+
protected function __construct() {
|
69 |
+
// Silence is golden.
|
70 |
+
}
|
71 |
+
/**
|
72 |
+
* Initialize update hooks.
|
73 |
+
*/
|
74 |
+
public function init() {
|
75 |
+
$callback = [$this, 'invalidate'];
|
76 |
+
foreach (self::INVALIDATE_WHEN_OPTION_CHANGES as $optionName) {
|
77 |
+
add_action('update_option_' . $optionName, $callback);
|
78 |
+
add_action('add_option_' . $optionName, $callback);
|
79 |
+
add_action('delete_option_' . $optionName, $callback);
|
80 |
+
}
|
81 |
+
foreach (self::INVALIDATE_WHEN_SITE_OPTION_CHANGES as $optionName) {
|
82 |
+
add_action('update_site_option_' . $optionName, $callback);
|
83 |
+
add_action('add_site_option_' . $optionName, $callback);
|
84 |
+
add_action('delete_site_option_' . $optionName, $callback);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
/**
|
88 |
+
* Invalidate cookie and blocker presets.
|
89 |
+
*/
|
90 |
+
public function invalidate() {
|
91 |
+
(new \DevOwl\RealCookieBanner\presets\CookiePresets())->forceRegeneration();
|
92 |
+
(new \DevOwl\RealCookieBanner\presets\BlockerPresets())->forceRegeneration();
|
93 |
+
}
|
94 |
+
/**
|
95 |
+
* Automatically set the `recommended` attribute to `true` for some special cases.
|
96 |
+
*
|
97 |
+
* @param array $preset
|
98 |
+
*/
|
99 |
+
public function middleware_cookies_recommended(&$preset) {
|
100 |
+
switch ($preset['id']) {
|
101 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_USER_LOGIN:
|
102 |
+
$preset['recommended'] = get_option(self::OPTION_NAME_USERS_CAN_REGISTER) > 0;
|
103 |
+
break;
|
104 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CLOUDFLARE:
|
105 |
+
$preset['recommended'] =
|
106 |
+
isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP']);
|
107 |
+
break;
|
108 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_ESSENTIAL:
|
109 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_MARKETING:
|
110 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_PREFERENCES:
|
111 |
+
case \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_STATISTIC:
|
112 |
+
$preset['recommended'] = isset($header['x-middleton']);
|
113 |
+
break;
|
114 |
+
default:
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
return $preset;
|
118 |
+
}
|
119 |
+
/**
|
120 |
+
* Automatically set the `recommended` attribute to `true` for some special cases.
|
121 |
+
*
|
122 |
+
* @param array $preset
|
123 |
+
*/
|
124 |
+
public function middleware_blocker_recommended(&$preset) {
|
125 |
+
switch ($preset['id']) {
|
126 |
+
// Paste your exceptions here
|
127 |
+
default:
|
128 |
+
break;
|
129 |
+
}
|
130 |
+
return $preset;
|
131 |
+
}
|
132 |
+
/**
|
133 |
+
* Check multiple plugins for native integration.
|
134 |
+
*
|
135 |
+
* @param boolean $isActive
|
136 |
+
* @param string $plugin
|
137 |
+
* @param string $identifier
|
138 |
+
* @param string $type
|
139 |
+
*/
|
140 |
+
public function presets_active($isActive, $plugin, $identifier, $type) {
|
141 |
+
switch ($plugin) {
|
142 |
+
case self::SLUG_RANKMATH_SEO_PRO:
|
143 |
+
case self::SLUG_RANKMATH_SEO_FREE:
|
144 |
+
$option = get_option(self::OPTION_NAME_RANK_MATH_GA);
|
145 |
+
return \is_array($option) && isset($option['install_code']) && $option['install_code'];
|
146 |
+
case self::SLUG_ANALYTIFY_PRO:
|
147 |
+
case self::SLUG_ANALYTIFY_FREE:
|
148 |
+
$googleToken = get_option(self::OPTION_NAME_ANALYTIFY_GOOGLE_TOKEN);
|
149 |
+
$auth = get_option(self::OPTION_NAME_ANALYTIFY_AUTHENTICATION);
|
150 |
+
if (!empty($googleToken)) {
|
151 |
+
$profile = get_option(self::OPTION_NAME_ANALYTIFY_PROFILE);
|
152 |
+
return \is_array($profile) &&
|
153 |
+
isset($profile['install_ga_code']) &&
|
154 |
+
$profile['install_ga_code'] === 'on';
|
155 |
+
}
|
156 |
+
return \is_array($auth) && isset($auth['manual_ua_code']) && !empty($auth['manual_ua_code']);
|
157 |
+
case self::SLUG_EXACTMETRICS_PRO:
|
158 |
+
case self::SLUG_EXACTMETRICS_FREE:
|
159 |
+
return \function_exists('exactmetrics_get_ua') && !empty(exactmetrics_get_ua());
|
160 |
+
case self::SLUG_MONSTERINSIGHTS_PRO:
|
161 |
+
case self::SLUG_MONSTERINSIGHTS_FREE:
|
162 |
+
return \function_exists('monsterinsights_get_ua') && !empty(monsterinsights_get_ua());
|
163 |
+
case self::SLUG_GA_GOOGLE_ANALYTICS_PRO:
|
164 |
+
case self::SLUG_GA_GOOGLE_ANALYTICS_FREE:
|
165 |
+
if (!\function_exists('ga_google_analytics_options')) {
|
166 |
+
return \false;
|
167 |
+
}
|
168 |
+
$option = ga_google_analytics_options();
|
169 |
+
return \is_array($option) && isset($option['tracking_id']) && !empty($option['tracking_id']);
|
170 |
+
case self::SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_PRO:
|
171 |
+
case self::SLUG_WOOCOMMERCE_GOOGLE_ANALYTICS_FREE:
|
172 |
+
$option = get_option(self::OPTION_NAME_WOOCOMMERCE_GOOGLE_ANALYTICS);
|
173 |
+
if (!\is_array($option)) {
|
174 |
+
return \false;
|
175 |
+
}
|
176 |
+
return isset($option['ga_id'], $option['ga_standard_tracking_enabled']) &&
|
177 |
+
!empty($option['ga_id']) &&
|
178 |
+
$option['ga_standard_tracking_enabled'] !== 'no';
|
179 |
+
break;
|
180 |
+
case self::SLUG_WP_PIWIK:
|
181 |
+
return get_option(self::OPTION_NAME_WP_PIWIK) !== 'disabled';
|
182 |
+
case self::SLUG_MATOMO_PLUGIN:
|
183 |
+
$option = get_option(self::OPTION_NAME_MATOMO_PLUGIN);
|
184 |
+
if (!\is_array($option) || !isset($option['track_mode'])) {
|
185 |
+
return \false;
|
186 |
+
}
|
187 |
+
return $option['track_mode'] !== 'disabled';
|
188 |
+
default:
|
189 |
+
break;
|
190 |
+
}
|
191 |
+
return $isActive;
|
192 |
+
}
|
193 |
+
/**
|
194 |
+
* New instance.
|
195 |
+
*
|
196 |
+
* @codeCoverageIgnore
|
197 |
+
*/
|
198 |
+
public static function instance() {
|
199 |
+
return new \DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations();
|
200 |
+
}
|
201 |
+
}
|
inc/comp/RevisionContextDependingOption.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\comp;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
/**
|
11 |
+
* Make a given option context-depending. That means, reading a option by a unique name
|
12 |
+
* reads the value of the option from the revision context. This also works for write.
|
13 |
+
*
|
14 |
+
* Note: You need to refactor your `update_option_{option}` and `option_{option}`
|
15 |
+
* hooks to listen to all changes, perhaps with a startsWith().
|
16 |
+
*
|
17 |
+
* @see https://developer.wordpress.org/reference/hooks/option_option/
|
18 |
+
* @see https://developer.wordpress.org/reference/hooks/update_option_option/
|
19 |
+
*/
|
20 |
+
class RevisionContextDependingOption {
|
21 |
+
private $originalOptionName;
|
22 |
+
private $default;
|
23 |
+
/**
|
24 |
+
* C'tor.
|
25 |
+
*
|
26 |
+
* @param string $originalOptionName
|
27 |
+
* @param mixed $default
|
28 |
+
* @codeCoverageIgnore
|
29 |
+
*/
|
30 |
+
public function __construct($originalOptionName, $default) {
|
31 |
+
$this->originalOptionName = $originalOptionName;
|
32 |
+
$this->default = $default;
|
33 |
+
$this->hooks();
|
34 |
+
}
|
35 |
+
/**
|
36 |
+
* Initialize hooks.
|
37 |
+
*/
|
38 |
+
protected function hooks() {
|
39 |
+
add_filter('pre_option_' . $this->getOriginalOptionName(), [$this, 'pre_option'], 10, 2);
|
40 |
+
add_filter('pre_update_option_' . $this->getOriginalOptionName(), [$this, 'pre_update_option'], 10, 3);
|
41 |
+
}
|
42 |
+
/**
|
43 |
+
* Read from original value.
|
44 |
+
*
|
45 |
+
* @param mixed $pre_option
|
46 |
+
* @param string $option
|
47 |
+
*/
|
48 |
+
public function pre_option($pre_option, $option) {
|
49 |
+
$optionName = $this->getOptionName();
|
50 |
+
$original = $this->getOriginalOptionName();
|
51 |
+
if ($optionName === $option) {
|
52 |
+
// No context, skip this behavior
|
53 |
+
return $pre_option;
|
54 |
+
}
|
55 |
+
// Initially add option value with default to avoid `autoloading` issues
|
56 |
+
add_option($optionName, get_option($optionName, $this->getDefault()));
|
57 |
+
$value = get_option($optionName, $this->getDefault());
|
58 |
+
return apply_filters('option_' . $original, $value, $original);
|
59 |
+
}
|
60 |
+
/**
|
61 |
+
* Redirect the update of the context.
|
62 |
+
*
|
63 |
+
* @param mixed $value The new, unserialized option value.
|
64 |
+
* @param mixed $old_value The old option value.
|
65 |
+
* @param string $option Option name.
|
66 |
+
*/
|
67 |
+
public function pre_update_option($value, $old_value, $option) {
|
68 |
+
$optionName = $this->getOptionName();
|
69 |
+
if ($optionName === $option) {
|
70 |
+
// No context, skip this behavior
|
71 |
+
return $value;
|
72 |
+
}
|
73 |
+
update_option($optionName, $value);
|
74 |
+
// We do not want to update the original value
|
75 |
+
return $old_value;
|
76 |
+
}
|
77 |
+
/**
|
78 |
+
* Get option name for this context.
|
79 |
+
*/
|
80 |
+
protected function getOptionName() {
|
81 |
+
$context = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getContextVariablesString();
|
82 |
+
return $this->getOriginalOptionName() . (empty($context) ? '' : '-' . $context);
|
83 |
+
}
|
84 |
+
/**
|
85 |
+
* Get original option name.
|
86 |
+
*
|
87 |
+
* @codeCoverageIgnore
|
88 |
+
*/
|
89 |
+
public function getOriginalOptionName() {
|
90 |
+
return $this->originalOptionName;
|
91 |
+
}
|
92 |
+
/**
|
93 |
+
* Get default value.
|
94 |
+
*
|
95 |
+
* @codeCoverageIgnore
|
96 |
+
*/
|
97 |
+
public function getDefault() {
|
98 |
+
return $this->default;
|
99 |
+
}
|
100 |
+
}
|
inc/comp/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/comp/language/Hooks.php
ADDED
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\comp\language;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractOutputBufferPlugin;
|
6 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin;
|
7 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\TemporaryTextDomain;
|
8 |
+
use DevOwl\RealCookieBanner\Core;
|
9 |
+
use DevOwl\RealCookieBanner\Localization;
|
10 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
11 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
12 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
13 |
+
// @codeCoverageIgnoreStart
|
14 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
15 |
+
// Avoid direct file request
|
16 |
+
// @codeCoverageIgnoreEnd
|
17 |
+
/**
|
18 |
+
* Language specific action and filters for Real Cookie Banner.
|
19 |
+
*/
|
20 |
+
class Hooks {
|
21 |
+
const GET_QUERY_FORCE_LANG = RCB_OPT_PREFIX . 'ForceLang';
|
22 |
+
const TD_FORCED = RCB_TD . '-forced';
|
23 |
+
/**
|
24 |
+
* Singleton instance.
|
25 |
+
*
|
26 |
+
* @var Hooks
|
27 |
+
*/
|
28 |
+
private static $me = null;
|
29 |
+
/**
|
30 |
+
* Custom hints for multilingual.
|
31 |
+
*
|
32 |
+
* @param array $hints
|
33 |
+
*/
|
34 |
+
public function hints($hints) {
|
35 |
+
$compLanguage = $this->compInstance();
|
36 |
+
if ($compLanguage->isActive()) {
|
37 |
+
if ($compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin) {
|
38 |
+
$hints['deleteCookieGroup'][] = __(
|
39 |
+
'If you delete a service group, it will not be deleted in other languages.',
|
40 |
+
RCB_TD
|
41 |
+
);
|
42 |
+
$hints['deleteCookie'][] = __(
|
43 |
+
'If you delete a service, it will not be deleted in other languages.',
|
44 |
+
RCB_TD
|
45 |
+
);
|
46 |
+
}
|
47 |
+
$hints['export'][] = __('The export contains only data from the current language.', RCB_TD);
|
48 |
+
}
|
49 |
+
return $hints;
|
50 |
+
}
|
51 |
+
/**
|
52 |
+
* Query arguments `lang`.
|
53 |
+
*
|
54 |
+
* @param array $arguments
|
55 |
+
*/
|
56 |
+
public function queryArguments($arguments) {
|
57 |
+
if ($this->compInstance()->isActive() && empty($arguments['lang'])) {
|
58 |
+
$arguments['lang'] = $this->compInstance()->getCurrentLanguage();
|
59 |
+
}
|
60 |
+
return $arguments;
|
61 |
+
}
|
62 |
+
/**
|
63 |
+
* E. g. WPML is not correctly consuming the correct language in the WP REST API.
|
64 |
+
* When a `forceLang` parameter is queried, let's switch to this language programmatically.
|
65 |
+
*/
|
66 |
+
public function rest_api_init() {
|
67 |
+
if (isset($_GET[self::GET_QUERY_FORCE_LANG])) {
|
68 |
+
$this->compInstance()->switch($_GET[self::GET_QUERY_FORCE_LANG]);
|
69 |
+
}
|
70 |
+
$this->createTemporaryTextDomain();
|
71 |
+
}
|
72 |
+
/**
|
73 |
+
* Modify query for REST queries.
|
74 |
+
*
|
75 |
+
* @param array $args Key value array of query var to query value.
|
76 |
+
*/
|
77 |
+
public function rest_query($args) {
|
78 |
+
return \DevOwl\RealCookieBanner\Core::getInstance()->queryArguments($args, 'restQuery');
|
79 |
+
}
|
80 |
+
/**
|
81 |
+
* Create a temporary text domain of the current language.
|
82 |
+
*/
|
83 |
+
public function createTemporaryTextDomain() {
|
84 |
+
return \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\TemporaryTextDomain::fromPluginReceiver(
|
85 |
+
self::TD_FORCED,
|
86 |
+
RCB_TD,
|
87 |
+
\DevOwl\RealCookieBanner\Core::getInstance(),
|
88 |
+
$this->compInstance(),
|
89 |
+
\DevOwl\RealCookieBanner\Localization::class
|
90 |
+
);
|
91 |
+
}
|
92 |
+
/**
|
93 |
+
* Add the current language code as independent context.
|
94 |
+
*
|
95 |
+
* @param array $contexts
|
96 |
+
*/
|
97 |
+
public function context($contexts) {
|
98 |
+
if ($this->compInstance()->isActive()) {
|
99 |
+
$contexts['lang'] = $this->compInstance()->getCurrentLanguage();
|
100 |
+
}
|
101 |
+
return $contexts;
|
102 |
+
}
|
103 |
+
/**
|
104 |
+
* Translate language context to human readable form.
|
105 |
+
*
|
106 |
+
* @param string $context
|
107 |
+
*/
|
108 |
+
public function contextTranslate($context) {
|
109 |
+
return $this->compInstance()->isActive()
|
110 |
+
? \preg_replace_callback(
|
111 |
+
'/lang:([A-Za-z_]+)/m',
|
112 |
+
function ($m) {
|
113 |
+
$languageCode = $m[1];
|
114 |
+
$translatedName = $this->compInstance()->getTranslatedName($languageCode);
|
115 |
+
return __('Language', RCB_TD) . ': ' . (empty($translatedName) ? $languageCode : $translatedName);
|
116 |
+
},
|
117 |
+
$context,
|
118 |
+
1
|
119 |
+
)
|
120 |
+
: $context;
|
121 |
+
}
|
122 |
+
/**
|
123 |
+
* A new revision was requested, let's recreate also for other languages.
|
124 |
+
*
|
125 |
+
* @param array $result
|
126 |
+
*/
|
127 |
+
public function revisionHash($result) {
|
128 |
+
if ($this->compInstance()->isActive()) {
|
129 |
+
// Temporarily disable this filter
|
130 |
+
remove_filter('RCB/Revision/Hash', [$this, 'revisionHash']);
|
131 |
+
$currentLanguage = $result['revision']['lang'];
|
132 |
+
$result['additionalLangHashRecreation'] = [];
|
133 |
+
foreach ($this->compInstance()->getActiveLanguages() as $activeLanguage) {
|
134 |
+
if ($activeLanguage !== $currentLanguage) {
|
135 |
+
// Switch to that language context and recreate hash
|
136 |
+
$this->compInstance()->switch($activeLanguage);
|
137 |
+
$langRevision = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->create(\true);
|
138 |
+
$result['additionalLangHashRecreation'][$activeLanguage] = $langRevision;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
// Restore language back
|
142 |
+
$this->compInstance()->switch($currentLanguage);
|
143 |
+
// Enable filter again
|
144 |
+
add_filter('RCB/Revision/Hash', [$this, 'revisionHash']);
|
145 |
+
}
|
146 |
+
return $result;
|
147 |
+
}
|
148 |
+
/**
|
149 |
+
* Check if any of the other languages needs a revision retrigger. This is only relevant
|
150 |
+
* for output buffer multilingual plugins (e.g. TranslatePress).
|
151 |
+
*
|
152 |
+
* @param boolean $needs_retrigger
|
153 |
+
*/
|
154 |
+
public function revisionNeedsRetrigger($needs_retrigger) {
|
155 |
+
$compLanguage = $this->compInstance();
|
156 |
+
if (
|
157 |
+
$needs_retrigger === \false &&
|
158 |
+
$compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractOutputBufferPlugin
|
159 |
+
) {
|
160 |
+
$found = \false;
|
161 |
+
$compLanguage->iterateOtherLanguagesContext(function () use (&$found) {
|
162 |
+
$revision = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->getCurrent();
|
163 |
+
if ($revision['public_to_users'] !== $revision['calculated']) {
|
164 |
+
$found = \true;
|
165 |
+
}
|
166 |
+
});
|
167 |
+
return $found;
|
168 |
+
}
|
169 |
+
return $needs_retrigger;
|
170 |
+
}
|
171 |
+
/**
|
172 |
+
* Modify option value for imprint id so it gets correctly resolved to the current language post id.
|
173 |
+
*
|
174 |
+
* @param string $value
|
175 |
+
*/
|
176 |
+
public function revisionOptionValue_pageId($value) {
|
177 |
+
if ($this->compInstance()->isActive() && !empty($value) && \is_numeric($value)) {
|
178 |
+
return $this->compInstance()->getCurrentPostId($value, 'page');
|
179 |
+
}
|
180 |
+
return $value;
|
181 |
+
}
|
182 |
+
/**
|
183 |
+
* Modify content blocker `cookies` / `tcfVendors` meta field to match the translated post ids.
|
184 |
+
*
|
185 |
+
* @param string $meta_value
|
186 |
+
* @param int $from Object id of source language item
|
187 |
+
* @param int $to Object id of destination language item
|
188 |
+
* @param string $locale
|
189 |
+
*/
|
190 |
+
public function copy_blocker_cookies_meta($meta_value, $from, $to, $locale) {
|
191 |
+
if ($this->compInstance()->isActive() && !empty($meta_value)) {
|
192 |
+
$ids = [];
|
193 |
+
foreach (\explode(',', $meta_value) as $currentId) {
|
194 |
+
$translationId = $this->compInstance()->getCurrentPostId(
|
195 |
+
$currentId,
|
196 |
+
\DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
197 |
+
$locale
|
198 |
+
);
|
199 |
+
if ($translationId > 0 && \intval($translationId) !== \intval($currentId)) {
|
200 |
+
$ids[] = $translationId;
|
201 |
+
}
|
202 |
+
}
|
203 |
+
return \join(',', $ids);
|
204 |
+
}
|
205 |
+
return $meta_value;
|
206 |
+
}
|
207 |
+
/**
|
208 |
+
* Get all languages within a `AbstractSyncPlugin` (like WPML or PolyLang) which
|
209 |
+
* does currently not hold any essential group. This is necessary e.g. to copy
|
210 |
+
* content to newly added languages.
|
211 |
+
*/
|
212 |
+
public function getLanguagesWithoutEssentialGroup() {
|
213 |
+
$compLanguage = $this->compInstance();
|
214 |
+
if ($compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin) {
|
215 |
+
$result = [];
|
216 |
+
$compLanguage->iterateAllLanguagesContext(function ($locale) use (&$result) {
|
217 |
+
if (\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroupId() === null) {
|
218 |
+
$result[] = $locale;
|
219 |
+
}
|
220 |
+
});
|
221 |
+
return $result;
|
222 |
+
}
|
223 |
+
return [];
|
224 |
+
}
|
225 |
+
/**
|
226 |
+
* Get compatibility language instance.
|
227 |
+
*/
|
228 |
+
protected function compInstance() {
|
229 |
+
return \DevOwl\RealCookieBanner\Core::getInstance()->getCompLanguage();
|
230 |
+
}
|
231 |
+
/**
|
232 |
+
* Get singleton instance.
|
233 |
+
*
|
234 |
+
* @return Hooks
|
235 |
+
* @codeCoverageIgnore
|
236 |
+
*/
|
237 |
+
public static function getInstance() {
|
238 |
+
return self::$me === null ? (self::$me = new \DevOwl\RealCookieBanner\comp\language\Hooks()) : self::$me;
|
239 |
+
}
|
240 |
+
}
|
inc/comp/language/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/comp/migration/AbstractDashboardTileMigration.php
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\comp\migration;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Assets;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
use DevOwl\RealCookieBanner\Core;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Allow to define a list of migrations in our dashboard.
|
14 |
+
*/
|
15 |
+
abstract class AbstractDashboardTileMigration {
|
16 |
+
use UtilsProvider;
|
17 |
+
const OPTION_NAME_CLICKED_ACTIONS = RCB_OPT_PREFIX . '-migration-actions-clicked';
|
18 |
+
private $id;
|
19 |
+
/**
|
20 |
+
* A set of actions which can be made within this migration.
|
21 |
+
* See also `$this::addAction`.
|
22 |
+
*/
|
23 |
+
private $actions = [];
|
24 |
+
/**
|
25 |
+
* C'tor. Register your actions with `$this::addAction` here!
|
26 |
+
*/
|
27 |
+
public function __construct() {
|
28 |
+
$this->init();
|
29 |
+
}
|
30 |
+
/**
|
31 |
+
* Initialize hooks.
|
32 |
+
*/
|
33 |
+
protected function init() {
|
34 |
+
if (
|
35 |
+
$this->isActive() &&
|
36 |
+
!\DevOwl\RealCookieBanner\Core::getInstance()
|
37 |
+
->getConfigPage()
|
38 |
+
->isVisible()
|
39 |
+
) {
|
40 |
+
add_filter('RCB/Menu/ConfigPage/Attention', '__return_true');
|
41 |
+
}
|
42 |
+
// Allow to dismiss this via action
|
43 |
+
add_action('RCB/Migration/Dismiss/' . $this->getId(), [$this, 'dismiss']);
|
44 |
+
// Initially create this option
|
45 |
+
add_option(self::OPTION_NAME_CLICKED_ACTIONS, []);
|
46 |
+
}
|
47 |
+
/**
|
48 |
+
* Get a unique id for this migration.
|
49 |
+
*
|
50 |
+
* @return string
|
51 |
+
*/
|
52 |
+
abstract public function getId();
|
53 |
+
/**
|
54 |
+
* Get a headline for this migration.
|
55 |
+
*
|
56 |
+
* @return string
|
57 |
+
*/
|
58 |
+
abstract public function getHeadline();
|
59 |
+
/**
|
60 |
+
* Get a description for this migration.
|
61 |
+
*
|
62 |
+
* @return string
|
63 |
+
*/
|
64 |
+
abstract public function getDescription();
|
65 |
+
/**
|
66 |
+
* Check if this migration is active.
|
67 |
+
*
|
68 |
+
* @return boolean
|
69 |
+
*/
|
70 |
+
abstract public function isActive();
|
71 |
+
/**
|
72 |
+
* Dismiss this migration.
|
73 |
+
*
|
74 |
+
* @return boolean
|
75 |
+
*/
|
76 |
+
abstract public function dismiss();
|
77 |
+
/**
|
78 |
+
* Register a new action which can be made for this migration.
|
79 |
+
*
|
80 |
+
* Arguments:
|
81 |
+
* - `[linkText] (string)` Can be `null` to disable the link
|
82 |
+
* - `[confirmText] (string)` The user needs to confirm this migration with something like "Are you sure?"
|
83 |
+
* - `[callback] (callback|string)` Can be `null`, a callback which is executed when clicking the link or a direct URL
|
84 |
+
* - `[previewImage] (string)` Absolute URL to preview image
|
85 |
+
*
|
86 |
+
* @param string $id Unique action ID
|
87 |
+
* @param string $title
|
88 |
+
* @param string $description
|
89 |
+
* @param array $args Arguments, see above
|
90 |
+
*/
|
91 |
+
public function addAction($id, $title, $description, $args = []) {
|
92 |
+
$args = wp_parse_args($args, [
|
93 |
+
'linkText' => null,
|
94 |
+
'linkDisabled' => \false,
|
95 |
+
'confirmText' => null,
|
96 |
+
'callback' => null,
|
97 |
+
'previewImage' => null
|
98 |
+
]);
|
99 |
+
$this->actions[$id] = \array_merge(
|
100 |
+
[
|
101 |
+
'id' => $id,
|
102 |
+
'title' => $title,
|
103 |
+
'description' => $description,
|
104 |
+
'performed' => get_option(self::OPTION_NAME_CLICKED_ACTIONS, [])[$this->getId() . '-' . $id] ?? \false
|
105 |
+
],
|
106 |
+
$args
|
107 |
+
);
|
108 |
+
if (\is_callable($args['callback'])) {
|
109 |
+
add_filter('RCB/Migration/' . $this->getId() . '/' . $id, function ($result) use ($args, $id) {
|
110 |
+
$result = $args['callback']($result);
|
111 |
+
// Save that this action was performed by this user
|
112 |
+
if ($result['success']) {
|
113 |
+
$clickedActions = get_option(self::OPTION_NAME_CLICKED_ACTIONS, []);
|
114 |
+
$clickedActions[$this->getId() . '-' . $id] = mysql2date('c', current_time('mysql'), \false);
|
115 |
+
update_option(self::OPTION_NAME_CLICKED_ACTIONS, $clickedActions);
|
116 |
+
}
|
117 |
+
return $result;
|
118 |
+
});
|
119 |
+
}
|
120 |
+
return $this;
|
121 |
+
}
|
122 |
+
/**
|
123 |
+
* Get the migration as plain array so it can be consumed in the frontend.
|
124 |
+
*
|
125 |
+
* @param array $array
|
126 |
+
*/
|
127 |
+
public function revisionCurrent($array) {
|
128 |
+
if ($this->isActive()) {
|
129 |
+
$array['dashboardMigration'] = [
|
130 |
+
'id' => $this->getId(),
|
131 |
+
'headline' => $this->getHeadline(),
|
132 |
+
'description' => $this->getDescription(),
|
133 |
+
'actions' => $this->actions
|
134 |
+
];
|
135 |
+
}
|
136 |
+
return $array;
|
137 |
+
}
|
138 |
+
/**
|
139 |
+
* Get a config URL pointing to a given route (react-router).
|
140 |
+
*
|
141 |
+
* @param string $route
|
142 |
+
*/
|
143 |
+
public function getConfigUrl($route) {
|
144 |
+
$configUrl = \DevOwl\RealCookieBanner\Core::getInstance()
|
145 |
+
->getConfigPage()
|
146 |
+
->getUrl();
|
147 |
+
return \sprintf('%s#%s', $configUrl, $route);
|
148 |
+
}
|
149 |
+
/**
|
150 |
+
* Check if a given major version was previously installed.
|
151 |
+
*
|
152 |
+
* @param int $majorVersion
|
153 |
+
*/
|
154 |
+
public function hasMajorPreviouslyInstalled($majorVersion) {
|
155 |
+
return \array_search(
|
156 |
+
$majorVersion,
|
157 |
+
\array_map(
|
158 |
+
function ($v) {
|
159 |
+
return \intval(\explode('.', $v)[0]);
|
160 |
+
},
|
161 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
162 |
+
->getActivator()
|
163 |
+
->getPreviousDatabaseVersions()
|
164 |
+
),
|
165 |
+
\true
|
166 |
+
) !== \false;
|
167 |
+
}
|
168 |
+
/**
|
169 |
+
* Dismiss the migration by removing a major version from the previously installed versions.
|
170 |
+
*
|
171 |
+
* @param int $majorVersion
|
172 |
+
*/
|
173 |
+
public function removeMajorVersionFromPreviouslyInstalled($majorVersion) {
|
174 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
175 |
+
->getActivator()
|
176 |
+
->removePreviousPersistedVersions(function ($v) use ($majorVersion) {
|
177 |
+
return \intval(\explode('.', $v)[0]) !== $majorVersion;
|
178 |
+
});
|
179 |
+
}
|
180 |
+
/**
|
181 |
+
* Dismiss a migration by ID.
|
182 |
+
*
|
183 |
+
* @param string $migrationId
|
184 |
+
*/
|
185 |
+
public static function doDismiss($migrationId) {
|
186 |
+
/**
|
187 |
+
* Dismiss a migration by ID.
|
188 |
+
*
|
189 |
+
* @hook RCB/Migration/Dismiss/$migrationId
|
190 |
+
* @since 2.0.0
|
191 |
+
*/
|
192 |
+
do_action('RCB/Migration/Dismiss/' . $migrationId);
|
193 |
+
}
|
194 |
+
/**
|
195 |
+
* Start a given migration by ID.
|
196 |
+
*
|
197 |
+
* @param string $migrationId
|
198 |
+
* @param string $actionId
|
199 |
+
*/
|
200 |
+
public static function doAction($migrationId, $actionId) {
|
201 |
+
/**
|
202 |
+
* Start a given migration by ID and action ID.
|
203 |
+
*
|
204 |
+
* You can extend the `$result` with the additional properties:
|
205 |
+
*
|
206 |
+
* - `redirect`: Redirect to this URL after successful migration.
|
207 |
+
*
|
208 |
+
* @hook RCB/Migration/$migrationId/$actionId
|
209 |
+
* @param {array} $result
|
210 |
+
* @return {array|WP_Error}
|
211 |
+
* @since 2.0.0
|
212 |
+
*/
|
213 |
+
return apply_filters('RCB/Migration/' . $migrationId . '/' . $actionId, ['success' => \false]);
|
214 |
+
}
|
215 |
+
}
|
inc/comp/migration/DashboardTileMigrationMajor2.php
ADDED
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\comp\migration;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
8 |
+
use DevOwl\RealCookieBanner\Core;
|
9 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
10 |
+
use DevOwl\RealCookieBanner\settings\TCF;
|
11 |
+
use DevOwl\RealCookieBanner\settings\CountryBypass;
|
12 |
+
use DevOwl\RealCookieBanner\Utils;
|
13 |
+
use DevOwl\RealCookieBanner\view\BannerCustomize;
|
14 |
+
use DevOwl\RealCookieBanner\view\customize\banner\individual\Texts as IndividualTexts;
|
15 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Texts;
|
16 |
+
// @codeCoverageIgnoreStart
|
17 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
18 |
+
// Avoid direct file request
|
19 |
+
// @codeCoverageIgnoreEnd
|
20 |
+
/**
|
21 |
+
* Migration for Major version 2.
|
22 |
+
*
|
23 |
+
* @see https://app.clickup.com/t/g75t1p
|
24 |
+
*/
|
25 |
+
class DashboardTileMigrationMajor2 extends \DevOwl\RealCookieBanner\comp\migration\AbstractDashboardTileMigration {
|
26 |
+
const DELETE_LANGUAGES = ['de', 'en'];
|
27 |
+
const DELETE_OPTIONS_TEXTS = [
|
28 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_HEADLINE,
|
29 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DESCRIPTION,
|
30 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_EPRIVACY_USA,
|
31 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE,
|
32 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE_BLOCKER,
|
33 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_CONSENT_FORWARDING,
|
34 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ALL,
|
35 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ESSENTIALS,
|
36 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_INDIVIDUAL,
|
37 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_POWERED_BY_TEXT,
|
38 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_HEADLINE,
|
39 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LINK_SHOW_MISSING,
|
40 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LOAD_BUTTON,
|
41 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_ACCEPT_INFO,
|
42 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HEADLINE,
|
43 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_DESCRIPTION,
|
44 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SAVE,
|
45 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SHOW_MORE,
|
46 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HIDE_MORE
|
47 |
+
];
|
48 |
+
// Documented in AbstractDashboardTileMigration
|
49 |
+
public function __construct() {
|
50 |
+
parent::__construct();
|
51 |
+
$isTcfActive = \DevOwl\RealCookieBanner\settings\TCF::getInstance()->isActive();
|
52 |
+
$isCountryBypassActive = \DevOwl\RealCookieBanner\settings\CountryBypass::getInstance()->isActive();
|
53 |
+
$core = \DevOwl\RealCookieBanner\Core::getInstance();
|
54 |
+
if ($this->isActive()) {
|
55 |
+
add_filter('RCB/Presets/Banner', [$this, 'bannerPresets']);
|
56 |
+
}
|
57 |
+
$this->addAction(
|
58 |
+
'texts',
|
59 |
+
__('Updated texts (German, English)', RCB_TD),
|
60 |
+
\join(' ', [
|
61 |
+
__(
|
62 |
+
'We have adjusted the texts in the cookie banner and service groups (not in cookie/content blocker templates). The adjustments improve the legal security of your cookie banner, as the general purpose of the consent is now more clearly described, and we have added legal teachings. If you want to use the TCF compatibility, the previous texts are no longer permitted. You can let previous texts be overwritten by the new texts. All texts can be customized in the WordPress Customizer or in Services (Cookies). After applying the texts, be sure to verify if the new texts apply to your website!',
|
63 |
+
RCB_TD
|
64 |
+
),
|
65 |
+
\sprintf(
|
66 |
+
// translators:
|
67 |
+
__(
|
68 |
+
'Before you apply the new texts, you can %1$screate an export%2$s to backup the old texts.',
|
69 |
+
RCB_TD
|
70 |
+
),
|
71 |
+
'<a href="#/import">',
|
72 |
+
'</a>'
|
73 |
+
)
|
74 |
+
]),
|
75 |
+
[
|
76 |
+
'linkText' => __('Apply new texts', RCB_TD),
|
77 |
+
'confirmText' => __(
|
78 |
+
'Are you sure? All your current texts will be overwritten (this does not include service and content blocker texts!).',
|
79 |
+
RCB_TD
|
80 |
+
),
|
81 |
+
'callback' => [$this, 'applyNewTexts']
|
82 |
+
]
|
83 |
+
)
|
84 |
+
->addAction(
|
85 |
+
'tcf',
|
86 |
+
__('TCF Compatibility', RCB_TD),
|
87 |
+
__(
|
88 |
+
'You can now obtain consent according to the TCF standard from IAB Europe. You need this type of consent mostly when you work with big marketers, e.g. Google Adsense, so they can be sure that you have obtained consent from your visitors. If you turn on TCF compatibility, some features of Real Cookie Banner will change so that your cookie banner is compliant with the rules of the standard.',
|
89 |
+
RCB_TD
|
90 |
+
),
|
91 |
+
[
|
92 |
+
'linkText' => $isTcfActive ? __('Already enabled', RCB_TD) : __('Enable TCF compatibility', RCB_TD),
|
93 |
+
'linkDisabled' => $isTcfActive,
|
94 |
+
'callback' => $this->getConfigUrl('/settings/tcf'),
|
95 |
+
'previewImage' => $core->getBaseAssetsUrl(__('pro-modal/tcf-compatibility.png', RCB_TD))
|
96 |
+
]
|
97 |
+
)
|
98 |
+
->addAction(
|
99 |
+
'geo-restriction',
|
100 |
+
__('Geo-restriction', RCB_TD),
|
101 |
+
__(
|
102 |
+
'Cookie banners must be displayed only for users from certain countries. Real Cookie Banner can now detect which country your visitor comes from and depending on that decide whether to display a cookie banner. This way you don\'t annoy e.g. visitors from non EU countries.',
|
103 |
+
RCB_TD
|
104 |
+
),
|
105 |
+
[
|
106 |
+
'linkText' => $isCountryBypassActive
|
107 |
+
? __('Already enabled', RCB_TD)
|
108 |
+
: __('Enable Geo-restriction', RCB_TD),
|
109 |
+
'linkDisabled' => $isCountryBypassActive,
|
110 |
+
'callback' => $this->getConfigUrl('/settings/country-bypass'),
|
111 |
+
'previewImage' => $core->getBaseAssetsUrl(__('pro-modal/geo-restriction.png', RCB_TD))
|
112 |
+
]
|
113 |
+
)
|
114 |
+
->addAction(
|
115 |
+
'standard-design',
|
116 |
+
__('Standard banner design', RCB_TD),
|
117 |
+
__(
|
118 |
+
'We have added a new standard design for the cookie banner, which makes a more friendly and clean impression. If you are using the standard design so far, it\'s worth a look if the new one fits better to your website!',
|
119 |
+
RCB_TD
|
120 |
+
),
|
121 |
+
[
|
122 |
+
'linkText' => __('View new design', RCB_TD),
|
123 |
+
'callback' => add_query_arg(
|
124 |
+
[
|
125 |
+
'autofocus[panel]' => \DevOwl\RealCookieBanner\view\BannerCustomize::PANEL_MAIN,
|
126 |
+
'customAutofocus[rcb-presets]' => 1,
|
127 |
+
'return' => wp_get_raw_referer()
|
128 |
+
],
|
129 |
+
admin_url('customize.php')
|
130 |
+
)
|
131 |
+
]
|
132 |
+
);
|
133 |
+
}
|
134 |
+
/**
|
135 |
+
* Show a "NEW!" badge to the new standard presets.
|
136 |
+
*
|
137 |
+
* @param array $presets
|
138 |
+
*/
|
139 |
+
public function bannerPresets($presets) {
|
140 |
+
$badge = ['success', __('NEW!', RCB_TD)];
|
141 |
+
$presets['light']['tags'][] = $badge;
|
142 |
+
$presets['light-banner']['tags'][] = $badge;
|
143 |
+
return $presets;
|
144 |
+
}
|
145 |
+
/**
|
146 |
+
* Apply new customizer and groups texts and overwrite existing.
|
147 |
+
*
|
148 |
+
* @param array $result
|
149 |
+
*/
|
150 |
+
public function applyNewTexts($result) {
|
151 |
+
if (!is_wp_error($result)) {
|
152 |
+
$compLanguage = \DevOwl\RealCookieBanner\Core::getInstance()->getCompLanguage();
|
153 |
+
// Prepare a list of all languages so we can also consider `LanguageDependingOption` options
|
154 |
+
$suffixes = [];
|
155 |
+
if ($compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin) {
|
156 |
+
foreach ($compLanguage->getActiveLanguages() as $locale) {
|
157 |
+
foreach (self::DELETE_LANGUAGES as $langToDelete) {
|
158 |
+
if (\DevOwl\RealCookieBanner\Utils::startsWith(\strtolower($locale), $langToDelete)) {
|
159 |
+
$suffixes[] = '-' . $locale;
|
160 |
+
// See `LanguageDependingOption::getOptionName`
|
161 |
+
continue;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
// Delete customizer options
|
167 |
+
$deletedOptionsTexts = [];
|
168 |
+
foreach (self::DELETE_OPTIONS_TEXTS as $optionName) {
|
169 |
+
if (delete_option($optionName)) {
|
170 |
+
$deletedOptionsTexts[] = $optionName;
|
171 |
+
}
|
172 |
+
foreach ($suffixes as $suffix) {
|
173 |
+
$suffixOptionName = $optionName . $suffix;
|
174 |
+
if (delete_option($suffixOptionName)) {
|
175 |
+
$deletedOptionsTexts[] = $suffixOptionName;
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
// Update group texts
|
180 |
+
if ($compLanguage instanceof \DevOwl\RealCookieBanner\Vendor\DevOwl\Multilingual\AbstractSyncPlugin) {
|
181 |
+
// Only sync-plugins create clones of terms
|
182 |
+
$compLanguage->iterateAllLanguagesContext(function ($locale) {
|
183 |
+
$this->applyNewGroupTexts($locale);
|
184 |
+
});
|
185 |
+
} else {
|
186 |
+
$this->applyNewGroupTexts(get_locale());
|
187 |
+
}
|
188 |
+
$result['success'] = \true;
|
189 |
+
$result['deleted_options_texts'] = $deletedOptionsTexts;
|
190 |
+
$result['redirect'] = add_query_arg(
|
191 |
+
[
|
192 |
+
'autofocus[section]' => \DevOwl\RealCookieBanner\view\customize\banner\Texts::SECTION,
|
193 |
+
'return' => wp_get_raw_referer()
|
194 |
+
],
|
195 |
+
admin_url('customize.php')
|
196 |
+
);
|
197 |
+
}
|
198 |
+
return $result;
|
199 |
+
}
|
200 |
+
/**
|
201 |
+
* Upgrade the group texts.
|
202 |
+
*
|
203 |
+
* @param string $locale
|
204 |
+
*/
|
205 |
+
public function applyNewGroupTexts($locale) {
|
206 |
+
// Check if we have texts for this language
|
207 |
+
$found = \false;
|
208 |
+
foreach (self::DELETE_LANGUAGES as $langToDelete) {
|
209 |
+
if (\DevOwl\RealCookieBanner\Utils::startsWith(\strtolower($locale), $langToDelete)) {
|
210 |
+
$found = \true;
|
211 |
+
break;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
if (!$found) {
|
215 |
+
return;
|
216 |
+
}
|
217 |
+
// Update terms
|
218 |
+
$td = \DevOwl\RealCookieBanner\comp\language\Hooks::getInstance()->createTemporaryTextDomain();
|
219 |
+
$groupDescriptions = \DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getDefaultDescriptions();
|
220 |
+
$groupNames = [
|
221 |
+
'essential' => __('Essential', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
222 |
+
'functional' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
223 |
+
'statistics' => __('Statistics', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
224 |
+
'statistic' => __('Statistic', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
225 |
+
'marketing' => __('Marketing', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED)
|
226 |
+
];
|
227 |
+
foreach ($groupDescriptions as $type => $description) {
|
228 |
+
$name = $groupNames[$type] ?? null;
|
229 |
+
if (empty($name)) {
|
230 |
+
continue;
|
231 |
+
}
|
232 |
+
// Find term by name
|
233 |
+
$term = get_term_by('name', $name, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME);
|
234 |
+
if ($term === \false) {
|
235 |
+
continue;
|
236 |
+
}
|
237 |
+
$term = $term->term_id;
|
238 |
+
wp_update_term($term, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME, [
|
239 |
+
'description' => $description
|
240 |
+
]);
|
241 |
+
}
|
242 |
+
$td->teardown();
|
243 |
+
}
|
244 |
+
// Documented in AbstractDashboardTileMigration
|
245 |
+
public function getId() {
|
246 |
+
return 'v2';
|
247 |
+
}
|
248 |
+
// Documented in AbstractDashboardTileMigration
|
249 |
+
public function getHeadline() {
|
250 |
+
return __('Updates in v2.0: Make your cookie banner more safe!', RCB_TD);
|
251 |
+
}
|
252 |
+
// Documented in AbstractDashboardTileMigration
|
253 |
+
public function getDescription() {
|
254 |
+
return \sprintf(
|
255 |
+
// translators:
|
256 |
+
__(
|
257 |
+
'We have released a major update with Real Cookie Banner 2.0. Find out what\'s new in our %1$sblog article%2$s. <strong>You should definitely take a look at the following points, as we have adjusted the behavior of the cookie banner.</strong> All changes can be optionally activated or ignored. We will not change your cookie banner fundamentally without your consent.',
|
258 |
+
RCB_TD
|
259 |
+
),
|
260 |
+
\sprintf(
|
261 |
+
'<a href="%s" target="_blank">',
|
262 |
+
__('https://devowl.io/2021/real-cookie-banner-2-0-cookie-consent/', RCB_TD)
|
263 |
+
),
|
264 |
+
'</a>'
|
265 |
+
);
|
266 |
+
}
|
267 |
+
// Documented in AbstractDashboardTileMigration
|
268 |
+
public function isActive() {
|
269 |
+
return $this->hasMajorPreviouslyInstalled(1);
|
270 |
+
}
|
271 |
+
// Documented in AbstractDashboardTileMigration
|
272 |
+
public function dismiss() {
|
273 |
+
return $this->removeMajorVersionFromPreviouslyInstalled(1);
|
274 |
+
}
|
275 |
+
}
|
inc/comp/migration/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/import/Export.php
ADDED
@@ -0,0 +1,260 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\controls\Headline;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
use DevOwl\RealCookieBanner\Core;
|
8 |
+
use DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration;
|
9 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
10 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
11 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
12 |
+
use DevOwl\RealCookieBanner\settings\CountryBypass;
|
13 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
14 |
+
// @codeCoverageIgnoreStart
|
15 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
16 |
+
// Avoid direct file request
|
17 |
+
// @codeCoverageIgnoreEnd
|
18 |
+
/**
|
19 |
+
* Handle export data.
|
20 |
+
*/
|
21 |
+
class Export {
|
22 |
+
use UtilsProvider;
|
23 |
+
const RELEVANT_GROUP_TERM_KEYS = ['term_id', 'slug', 'name', 'description'];
|
24 |
+
const RELEVANT_COOKIE_POST_KEYS = ['ID', 'post_name', 'post_content', 'post_status', 'post_title', 'metas'];
|
25 |
+
const RELEVANT_BLOCKER_POST_KEYS = ['ID', 'post_name', 'post_content', 'post_status', 'post_title', 'metas'];
|
26 |
+
const RELEVANT_TCF_VENDOR_CONFIGURATION_POST_KEYS = ['ID', 'post_name', 'post_status', 'post_title', 'metas'];
|
27 |
+
const EXPORT_POST_STATI = ['publish', 'private', 'draft'];
|
28 |
+
private $data = [];
|
29 |
+
/**
|
30 |
+
* C'tor.
|
31 |
+
*/
|
32 |
+
private function __construct() {
|
33 |
+
// Silence is golden.
|
34 |
+
}
|
35 |
+
/**
|
36 |
+
* Append settings to the output of the export.
|
37 |
+
*/
|
38 |
+
public function appendSettings() {
|
39 |
+
// Deactivate some filters to the options does not get modified
|
40 |
+
remove_filter(
|
41 |
+
'RCB/Revision/Option/' . \DevOwl\RealCookieBanner\settings\CountryBypass::SETTING_COUNTRY_BYPASS_COUNTRIES,
|
42 |
+
[
|
43 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(),
|
44 |
+
'revisionOptionCountriesExpandPredefinedLists'
|
45 |
+
]
|
46 |
+
);
|
47 |
+
$this->data['settings'] = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->fromOptions();
|
48 |
+
add_filter(
|
49 |
+
'RCB/Revision/Option/' . \DevOwl\RealCookieBanner\settings\CountryBypass::SETTING_COUNTRY_BYPASS_COUNTRIES,
|
50 |
+
[
|
51 |
+
\DevOwl\RealCookieBanner\settings\CountryBypass::getInstance(),
|
52 |
+
'revisionOptionCountriesExpandPredefinedLists'
|
53 |
+
]
|
54 |
+
);
|
55 |
+
return $this;
|
56 |
+
}
|
57 |
+
/**
|
58 |
+
* Append cookie groups to the output of the export.
|
59 |
+
*/
|
60 |
+
public function appendCookieGroups() {
|
61 |
+
$this->data['cookieGroups'] = $this->getExportGroups();
|
62 |
+
return $this;
|
63 |
+
}
|
64 |
+
/**
|
65 |
+
* Append cookies to the output of the export.
|
66 |
+
*/
|
67 |
+
public function appendCookies() {
|
68 |
+
$groupsKnown = isset($this->data['cookieGroups']);
|
69 |
+
$groups = $groupsKnown ? $this->data['cookieGroups'] : $this->getExportGroups();
|
70 |
+
$this->data['cookies'] = $this->getExportCookies($groups);
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
/**
|
74 |
+
* Append content blocker to the output of the export.
|
75 |
+
*/
|
76 |
+
public function appendBlocker() {
|
77 |
+
$this->data['blocker'] = $this->getExportBlocker();
|
78 |
+
return $this;
|
79 |
+
}
|
80 |
+
/**
|
81 |
+
* Append TCF vendor configurations (if available) to the output of the export.
|
82 |
+
*/
|
83 |
+
public function appendTcfVendorConfigurations() {
|
84 |
+
$this->data['tcfVendorConfigurations'] = $this->getTcfVendorConfigurations();
|
85 |
+
return $this;
|
86 |
+
}
|
87 |
+
/**
|
88 |
+
* Append customize banner options to the output of the export.
|
89 |
+
*/
|
90 |
+
public function appendCustomizeBanner() {
|
91 |
+
$this->data['customizeBanner'] = \DevOwl\RealCookieBanner\Core::getInstance()
|
92 |
+
->getBanner()
|
93 |
+
->getCustomize()
|
94 |
+
->localizeValues([\DevOwl\RealCookieBanner\Vendor\DevOwl\Customize\controls\Headline::class])[
|
95 |
+
'customizeValuesBanner'
|
96 |
+
];
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
/**
|
100 |
+
* Get the exported data as array.
|
101 |
+
*
|
102 |
+
* @return array
|
103 |
+
*/
|
104 |
+
public function finish() {
|
105 |
+
return $this->data;
|
106 |
+
}
|
107 |
+
/**
|
108 |
+
* Get groups for export.
|
109 |
+
*/
|
110 |
+
protected function getExportGroups() {
|
111 |
+
$terms = get_terms(
|
112 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
113 |
+
[
|
114 |
+
'taxonomy' => \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME,
|
115 |
+
'orderby' => 'meta_value_num',
|
116 |
+
'order' => 'ASC',
|
117 |
+
'hide_empty' => \false,
|
118 |
+
'meta_query' => [['key' => 'order', 'type' => 'NUMERIC']]
|
119 |
+
],
|
120 |
+
'exportCookieGroups'
|
121 |
+
)
|
122 |
+
);
|
123 |
+
$result = [];
|
124 |
+
foreach ($terms as $term) {
|
125 |
+
// $meta = get_term_meta($term->term_id);
|
126 |
+
// Ignore meta as it can currently hold only the order and this is not exported
|
127 |
+
$rowResult = [];
|
128 |
+
foreach (self::RELEVANT_GROUP_TERM_KEYS as $key) {
|
129 |
+
$rowResult[$key] = $term->{$key};
|
130 |
+
}
|
131 |
+
$result[] = $rowResult;
|
132 |
+
}
|
133 |
+
return $result;
|
134 |
+
}
|
135 |
+
/**
|
136 |
+
* Get cookies for export.
|
137 |
+
*
|
138 |
+
* @param array $groups Result of getExportGroups()
|
139 |
+
* @param boolean $areGroupsKnown If false, all cookies gets put to an empty group
|
140 |
+
*/
|
141 |
+
protected function getExportCookies($groups) {
|
142 |
+
$result = [];
|
143 |
+
foreach ($groups as $group) {
|
144 |
+
$cookies = \DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered(
|
145 |
+
$group['term_id'],
|
146 |
+
\false,
|
147 |
+
get_posts(
|
148 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
149 |
+
[
|
150 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
151 |
+
'orderby' => ['menu_order' => 'ASC', 'ID' => 'DESC'],
|
152 |
+
'numberposts' => -1,
|
153 |
+
'nopaging' => \true,
|
154 |
+
'tax_query' => [
|
155 |
+
[
|
156 |
+
'taxonomy' => \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME,
|
157 |
+
'terms' => $group['term_id'],
|
158 |
+
'include_children' => \false
|
159 |
+
]
|
160 |
+
],
|
161 |
+
'post_status' => self::EXPORT_POST_STATI
|
162 |
+
],
|
163 |
+
'cookiesExport'
|
164 |
+
)
|
165 |
+
)
|
166 |
+
);
|
167 |
+
foreach ($cookies as $cookie) {
|
168 |
+
$rowResult = ['group' => $group['slug']];
|
169 |
+
foreach (self::RELEVANT_COOKIE_POST_KEYS as $key) {
|
170 |
+
$rowResult[$key] = $cookie->{$key};
|
171 |
+
}
|
172 |
+
$result[] = $rowResult;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
return $result;
|
176 |
+
}
|
177 |
+
/**
|
178 |
+
* Get blocker for export.
|
179 |
+
*/
|
180 |
+
protected function getExportBlocker() {
|
181 |
+
$posts = \DevOwl\RealCookieBanner\settings\Blocker::getInstance()->getOrdered(
|
182 |
+
\false,
|
183 |
+
get_posts(
|
184 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
185 |
+
[
|
186 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
187 |
+
'orderby' => ['ID' => 'DESC'],
|
188 |
+
'numberposts' => -1,
|
189 |
+
'nopaging' => \true,
|
190 |
+
'post_status' => self::EXPORT_POST_STATI
|
191 |
+
],
|
192 |
+
'blockerExport'
|
193 |
+
)
|
194 |
+
)
|
195 |
+
);
|
196 |
+
$result = [];
|
197 |
+
foreach ($posts as $post) {
|
198 |
+
$rowResult = [];
|
199 |
+
foreach (self::RELEVANT_BLOCKER_POST_KEYS as $key) {
|
200 |
+
$rowResult[$key] = $post->{$key};
|
201 |
+
// Cookies / TCF vendors should be resolved as post_name instead of ID
|
202 |
+
if ($key === 'metas') {
|
203 |
+
foreach (
|
204 |
+
[
|
205 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_COOKIES,
|
206 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_TCF_VENDORS
|
207 |
+
]
|
208 |
+
as $metaName
|
209 |
+
) {
|
210 |
+
foreach ($rowResult[$key][$metaName] as $cookieIdx => $cookieId) {
|
211 |
+
$rowResult[$key][$metaName][$cookieIdx] = get_post($cookieId)->post_name;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
}
|
216 |
+
$result[] = $rowResult;
|
217 |
+
}
|
218 |
+
return $result;
|
219 |
+
}
|
220 |
+
/**
|
221 |
+
* Get TCF vendor configurations for export.
|
222 |
+
*/
|
223 |
+
protected function getTcfVendorConfigurations() {
|
224 |
+
if (!$this->isPro()) {
|
225 |
+
return [];
|
226 |
+
}
|
227 |
+
$posts = \DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::getInstance()->getOrdered(
|
228 |
+
\false,
|
229 |
+
get_posts(
|
230 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
231 |
+
[
|
232 |
+
'post_type' => \DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::CPT_NAME,
|
233 |
+
'orderby' => ['ID' => 'DESC'],
|
234 |
+
'numberposts' => -1,
|
235 |
+
'nopaging' => \true,
|
236 |
+
'post_status' => self::EXPORT_POST_STATI
|
237 |
+
],
|
238 |
+
'tcfVendorConfigurationsExport'
|
239 |
+
)
|
240 |
+
)
|
241 |
+
);
|
242 |
+
$result = [];
|
243 |
+
foreach ($posts as $post) {
|
244 |
+
$rowResult = [];
|
245 |
+
foreach (self::RELEVANT_TCF_VENDOR_CONFIGURATION_POST_KEYS as $key) {
|
246 |
+
$rowResult[$key] = $post->{$key};
|
247 |
+
}
|
248 |
+
$result[] = $rowResult;
|
249 |
+
}
|
250 |
+
return $result;
|
251 |
+
}
|
252 |
+
/**
|
253 |
+
* Get singleton instance.
|
254 |
+
*
|
255 |
+
* @codeCoverageIgnore
|
256 |
+
*/
|
257 |
+
public static function instance() {
|
258 |
+
return new \DevOwl\RealCookieBanner\import\Export();
|
259 |
+
}
|
260 |
+
}
|
inc/import/ExportConsent.php
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\UserConsent;
|
7 |
+
use WP_Error;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Handle export consent data.
|
14 |
+
*/
|
15 |
+
class ExportConsent {
|
16 |
+
use UtilsProvider;
|
17 |
+
const EXPORT_CONSENT_OUTPUT_FILENAME = 'export-consents.csv';
|
18 |
+
const CSV_DELIMITER = "\t";
|
19 |
+
/**
|
20 |
+
* C'tor.
|
21 |
+
*/
|
22 |
+
private function __construct() {
|
23 |
+
// Silence is golden.
|
24 |
+
}
|
25 |
+
/**
|
26 |
+
* Export consents by given criteria.
|
27 |
+
*
|
28 |
+
* @param string $uuid
|
29 |
+
* @param string $from
|
30 |
+
* @param string $to
|
31 |
+
*/
|
32 |
+
public function downloadCsv($uuid, $from, $to) {
|
33 |
+
global $wpdb;
|
34 |
+
$userConsent = \DevOwl\RealCookieBanner\UserConsent::getInstance();
|
35 |
+
$count = $userConsent->getCount();
|
36 |
+
// @codeCoverageIgnoreStart
|
37 |
+
if (!\defined('PHPUNIT_FILE')) {
|
38 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
39 |
+
}
|
40 |
+
// @codeCoverageIgnoreEnd
|
41 |
+
// Pick up by UUID
|
42 |
+
if (!empty($uuid)) {
|
43 |
+
$sql = $userConsent->byCriteria(
|
44 |
+
['uuid' => $uuid, 'perPage' => $count],
|
45 |
+
\DevOwl\RealCookieBanner\UserConsent::BY_CRITERIA_RESULT_TYPE_SQL_QUERY
|
46 |
+
);
|
47 |
+
} elseif (isset($from, $to)) {
|
48 |
+
// Pick up by date range
|
49 |
+
$sql = $userConsent->byCriteria(
|
50 |
+
['from' => $from . ' 00:00:00', 'to' => $to . ' 23:59:59', 'perPage' => $count],
|
51 |
+
\DevOwl\RealCookieBanner\UserConsent::BY_CRITERIA_RESULT_TYPE_SQL_QUERY
|
52 |
+
);
|
53 |
+
} else {
|
54 |
+
return new \WP_Error('rest_rcb_data', __('Please provide a UUID or a date range.', RCB_TD));
|
55 |
+
}
|
56 |
+
// We need to fetch directly via `mysql(i)_` functions so we can use `mysql(i)_fetch_array` in a while-loop
|
57 |
+
$dbh = $wpdb->dbh;
|
58 |
+
$functionPrefix = $wpdb->use_mysqli ? 'mysqli' : 'mysql';
|
59 |
+
($result = \call_user_func($functionPrefix . '_query', $wpdb->dbh, $sql)) or
|
60 |
+
wp_die(\call_user_func($functionPrefix . '_error', $dbh));
|
61 |
+
$count = \call_user_func($functionPrefix . '_num_rows', $result);
|
62 |
+
if ($count === 0) {
|
63 |
+
// As this is a download, we can use `wp_die` to show an error message
|
64 |
+
wp_die(__('No consents found. Please navigate back and check your input.', RCB_TD));
|
65 |
+
}
|
66 |
+
// Output headers
|
67 |
+
\header('Content-Disposition: attachment; filename=' . self::EXPORT_CONSENT_OUTPUT_FILENAME);
|
68 |
+
\header('Content-Type: text/csv; charset=utf8');
|
69 |
+
// open the "output" stream, see http://www.php.net/manual/en/wrappers.php.php#refsect2-wrappers.php-unknown-unknown-unknown-descriptioq
|
70 |
+
// phpcs:disable WordPress.PHP.TypeCasts.BinaryFound
|
71 |
+
$f = \fopen('php://output', 'w');
|
72 |
+
\fwrite($f, '');
|
73 |
+
// write BOM
|
74 |
+
// phpcs:enable WordPress.PHP.TypeCasts.BinaryFound
|
75 |
+
// Output rows
|
76 |
+
$i = 0;
|
77 |
+
while ($line = \call_user_func($functionPrefix . '_fetch_array', $result, 1)) {
|
78 |
+
// Create headers
|
79 |
+
if ($i === 0) {
|
80 |
+
\fputcsv($f, \array_keys($line), self::CSV_DELIMITER);
|
81 |
+
}
|
82 |
+
$lines = [(object) \array_map([$this, 'convertToUTF8Charset'], $line)];
|
83 |
+
$userConsent->castReadRows($lines, \false);
|
84 |
+
\fputcsv($f, (array) $lines[0], self::CSV_DELIMITER);
|
85 |
+
$i++;
|
86 |
+
}
|
87 |
+
// Close (wp_die could not be used here because it generates unwanted output)
|
88 |
+
$wpdb->close();
|
89 |
+
die();
|
90 |
+
}
|
91 |
+
/**
|
92 |
+
* Convert string to UTF8 charset.
|
93 |
+
*
|
94 |
+
* @param string $string
|
95 |
+
* @see https://stackoverflow.com/questions/12488954/php-fputcsv-encoding
|
96 |
+
*/
|
97 |
+
public function convertToUTF8Charset($string) {
|
98 |
+
if (\function_exists('mb_detect_encoding')) {
|
99 |
+
$charset = \mb_detect_encoding($string);
|
100 |
+
return \mb_convert_encoding($string, 'UTF-8', $charset);
|
101 |
+
}
|
102 |
+
return $string;
|
103 |
+
}
|
104 |
+
/**
|
105 |
+
* Get singleton instance.
|
106 |
+
*
|
107 |
+
* @codeCoverageIgnore
|
108 |
+
*/
|
109 |
+
public static function instance() {
|
110 |
+
return new \DevOwl\RealCookieBanner\import\ExportConsent();
|
111 |
+
}
|
112 |
+
}
|
inc/import/Import.php
ADDED
@@ -0,0 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\import\ImportBlocker;
|
7 |
+
use DevOwl\RealCookieBanner\import\ImportCookies;
|
8 |
+
use DevOwl\RealCookieBanner\import\ImportCustomizeBanner;
|
9 |
+
use DevOwl\RealCookieBanner\import\ImportGroups;
|
10 |
+
use DevOwl\RealCookieBanner\import\ImportMessages;
|
11 |
+
use DevOwl\RealCookieBanner\import\ImportSettings;
|
12 |
+
// @codeCoverageIgnoreStart
|
13 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
14 |
+
// Avoid direct file request
|
15 |
+
// @codeCoverageIgnoreEnd
|
16 |
+
/**
|
17 |
+
* Allows to import a JSON string with specific options. If you want to learn more about the scheme,
|
18 |
+
* please have a look at the output of the export.
|
19 |
+
*/
|
20 |
+
class Import {
|
21 |
+
use UtilsProvider;
|
22 |
+
use ImportGroups;
|
23 |
+
use ImportSettings;
|
24 |
+
use ImportCookies;
|
25 |
+
use ImportBlocker;
|
26 |
+
use ImportTcfVendorConfigurations;
|
27 |
+
use ImportCustomizeBanner;
|
28 |
+
use ImportMessages;
|
29 |
+
const IMPORT_POST_STATI = ['keep', 'publish', 'private', 'draft'];
|
30 |
+
const COOKIE_CHECK_MANAGERS = [
|
31 |
+
['has_gtm', 'thisIsGoogleTagManager', 'Google Tag Manager'],
|
32 |
+
['has_mtm', 'thisIsMatomoTagManager', 'Matomo Tag Manager']
|
33 |
+
];
|
34 |
+
/**
|
35 |
+
* Default cookie group when it can not be assigned to one.
|
36 |
+
*
|
37 |
+
* @var int
|
38 |
+
*/
|
39 |
+
private $cookieGroup = null;
|
40 |
+
/**
|
41 |
+
* Force or "keep" a given post status.
|
42 |
+
*
|
43 |
+
* @var string
|
44 |
+
*/
|
45 |
+
private $cookieStatus = 'keep';
|
46 |
+
/**
|
47 |
+
* Skip already existing services.
|
48 |
+
*
|
49 |
+
* @var boolean
|
50 |
+
*/
|
51 |
+
private $cookieSkipExisting = \true;
|
52 |
+
/**
|
53 |
+
* Force or "keep" a given post status.
|
54 |
+
*
|
55 |
+
* @var string
|
56 |
+
*/
|
57 |
+
private $blockerStatus = 'keep';
|
58 |
+
/**
|
59 |
+
* Skip existing blocker.
|
60 |
+
*
|
61 |
+
* @var boolean
|
62 |
+
*/
|
63 |
+
private $blockerSkipExisting = \true;
|
64 |
+
/**
|
65 |
+
* Force or "keep" a given post status.
|
66 |
+
*
|
67 |
+
* @var string
|
68 |
+
*/
|
69 |
+
private $tcfVendorConfigurationStatus = 'keep';
|
70 |
+
/**
|
71 |
+
* The importing JSON as associative array.
|
72 |
+
*/
|
73 |
+
private $json = [];
|
74 |
+
/**
|
75 |
+
* Messages occured while importing.
|
76 |
+
*/
|
77 |
+
private $messages = [];
|
78 |
+
/**
|
79 |
+
* A map of post_name -> duplicate ID so it can be used for blocker import.
|
80 |
+
* E. g. if a new cookie is created through import, the new ID should be used instead
|
81 |
+
* of the defined one in `blocker`.
|
82 |
+
*/
|
83 |
+
protected $mapCookies = [];
|
84 |
+
/**
|
85 |
+
* A map of post_name -> duplicate ID so it can be used for blocker import.
|
86 |
+
* E. g. if a new TCF vendor configuration is created through import, the new ID should be used instead
|
87 |
+
* of the defined one in `blocker`.
|
88 |
+
*/
|
89 |
+
protected $mapTcfVendorConfigurations = [];
|
90 |
+
/**
|
91 |
+
* C'tor.
|
92 |
+
*
|
93 |
+
* @param array $json
|
94 |
+
*/
|
95 |
+
private function __construct($json) {
|
96 |
+
$this->json = $json;
|
97 |
+
}
|
98 |
+
/**
|
99 |
+
* Import all available settings in the passed JSON. This also respects the correct
|
100 |
+
* order of imports.
|
101 |
+
*/
|
102 |
+
public function import() {
|
103 |
+
$this->importSettings();
|
104 |
+
$this->importCookieGroups();
|
105 |
+
$this->importCookies();
|
106 |
+
$this->importTcfVendorConfigurations();
|
107 |
+
$this->importBlocker();
|
108 |
+
$this->importCustomizeBanner();
|
109 |
+
}
|
110 |
+
/**
|
111 |
+
* Import settings.
|
112 |
+
*/
|
113 |
+
public function importSettings() {
|
114 |
+
$json = $this->getJSON();
|
115 |
+
if (isset($json['settings'])) {
|
116 |
+
if (\is_array($json['settings'])) {
|
117 |
+
$this->doImportSettings($json['settings']);
|
118 |
+
} else {
|
119 |
+
$this->addMessageWrongUsageKey('settings');
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
/**
|
124 |
+
* Import cookie groups.
|
125 |
+
*/
|
126 |
+
public function importCookieGroups() {
|
127 |
+
$json = $this->getJSON();
|
128 |
+
if (isset($json['cookieGroups'])) {
|
129 |
+
if (\is_array($json['cookieGroups'])) {
|
130 |
+
$this->doImportCookieGroups($json['cookieGroups']);
|
131 |
+
} else {
|
132 |
+
$this->addMessageWrongUsageKey('cookieGroups');
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
/**
|
137 |
+
* Import cookies.
|
138 |
+
*/
|
139 |
+
public function importCookies() {
|
140 |
+
$json = $this->getJSON();
|
141 |
+
if (isset($json['cookies'])) {
|
142 |
+
if (\is_array($json['cookies'])) {
|
143 |
+
$this->doImportCookies($json['cookies']);
|
144 |
+
} else {
|
145 |
+
$this->addMessageWrongUsageKey('cookies');
|
146 |
+
}
|
147 |
+
}
|
148 |
+
}
|
149 |
+
/**
|
150 |
+
* Import content blocker.
|
151 |
+
*/
|
152 |
+
public function importBlocker() {
|
153 |
+
$json = $this->getJSON();
|
154 |
+
if (isset($json['blocker'])) {
|
155 |
+
if (\is_array($json['blocker'])) {
|
156 |
+
$this->doImportBlocker($json['blocker']);
|
157 |
+
} else {
|
158 |
+
$this->addMessageWrongUsageKey('blocker');
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
/**
|
163 |
+
* Import TCF Vendor configurations.
|
164 |
+
*/
|
165 |
+
public function importTcfVendorConfigurations() {
|
166 |
+
$json = $this->getJSON();
|
167 |
+
if (isset($json['tcfVendorConfigurations'])) {
|
168 |
+
if (\is_array($json['tcfVendorConfigurations'])) {
|
169 |
+
$this->doImportTcfVendorConfigurations($json['tcfVendorConfigurations']);
|
170 |
+
} else {
|
171 |
+
$this->addMessageWrongUsageKey('tcfVendorConfigurations');
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
175 |
+
/**
|
176 |
+
* Import customize banner settings.
|
177 |
+
*/
|
178 |
+
public function importCustomizeBanner() {
|
179 |
+
$json = $this->getJSON();
|
180 |
+
if (isset($json['customizeBanner'])) {
|
181 |
+
if (\is_array($json['customizeBanner'])) {
|
182 |
+
$this->doImportCustomizeBanner($json['customizeBanner']);
|
183 |
+
} else {
|
184 |
+
$this->addMessageWrongUsageKey('customizeBanner');
|
185 |
+
}
|
186 |
+
}
|
187 |
+
}
|
188 |
+
/**
|
189 |
+
* Add a message to the message container.
|
190 |
+
*
|
191 |
+
* @param string $message
|
192 |
+
* @param string $severity Can be: info, warning, error, success
|
193 |
+
* @param string $fix See `import.post.tsx`
|
194 |
+
* @param string $args See `import.post.tsx`
|
195 |
+
*/
|
196 |
+
protected function addMessage($message, $severity, $fix = null, $args = []) {
|
197 |
+
$this->getMessages()[] = \array_merge(['message' => $message, 'severity' => $severity, 'fix' => $fix], $args);
|
198 |
+
}
|
199 |
+
/**
|
200 |
+
* Set default cookie group.
|
201 |
+
*
|
202 |
+
* @param int $value
|
203 |
+
* @codeCoverageIgnore
|
204 |
+
*/
|
205 |
+
public function setCookieGroup($value) {
|
206 |
+
$this->cookieGroup = \intval($value);
|
207 |
+
}
|
208 |
+
/**
|
209 |
+
* Set service status.
|
210 |
+
*
|
211 |
+
* @param string $value
|
212 |
+
* @codeCoverageIgnore
|
213 |
+
*/
|
214 |
+
public function setCookieStatus($value) {
|
215 |
+
$this->cookieStatus = $value;
|
216 |
+
}
|
217 |
+
/**
|
218 |
+
* Set cookies to skip existing.
|
219 |
+
*
|
220 |
+
* @param boolean $value
|
221 |
+
* @codeCoverageIgnore
|
222 |
+
*/
|
223 |
+
public function setCookieSkipExisting($value) {
|
224 |
+
$this->cookieSkipExisting = $value;
|
225 |
+
}
|
226 |
+
/**
|
227 |
+
* Set blocker status.
|
228 |
+
*
|
229 |
+
* @param string $value
|
230 |
+
* @codeCoverageIgnore
|
231 |
+
*/
|
232 |
+
public function setBlockerStatus($value) {
|
233 |
+
$this->blockerStatus = $value;
|
234 |
+
}
|
235 |
+
/**
|
236 |
+
* Set blocker to skip existing.
|
237 |
+
*
|
238 |
+
* @param boolean $value
|
239 |
+
* @codeCoverageIgnore
|
240 |
+
*/
|
241 |
+
public function setBlockerSkipExisting($value) {
|
242 |
+
$this->blockerSkipExisting = $value;
|
243 |
+
}
|
244 |
+
/**
|
245 |
+
* Set TCF Vendor configuration status.
|
246 |
+
*
|
247 |
+
* @param string $value
|
248 |
+
* @codeCoverageIgnore
|
249 |
+
*/
|
250 |
+
public function setTcfVendorConfigurationStatus($value) {
|
251 |
+
$this->tcfVendorConfigurationStatus = $value;
|
252 |
+
}
|
253 |
+
/**
|
254 |
+
* Get cookie group.
|
255 |
+
*
|
256 |
+
* @codeCoverageIgnore
|
257 |
+
*/
|
258 |
+
public function getCookieGroup() {
|
259 |
+
return $this->cookieGroup;
|
260 |
+
}
|
261 |
+
/**
|
262 |
+
* Get cookie status.
|
263 |
+
*
|
264 |
+
* @codeCoverageIgnore
|
265 |
+
*/
|
266 |
+
public function getCookieStatus() {
|
267 |
+
return $this->cookieStatus;
|
268 |
+
}
|
269 |
+
/**
|
270 |
+
* Get cookie skip existing.
|
271 |
+
*
|
272 |
+
* @codeCoverageIgnore
|
273 |
+
*/
|
274 |
+
public function isCookieSkipExisting() {
|
275 |
+
return $this->cookieSkipExisting;
|
276 |
+
}
|
277 |
+
/**
|
278 |
+
* Get content blocker status.
|
279 |
+
*
|
280 |
+
* @codeCoverageIgnore
|
281 |
+
*/
|
282 |
+
public function getBlockerStatus() {
|
283 |
+
return $this->cookieStatus;
|
284 |
+
}
|
285 |
+
/**
|
286 |
+
* Get blocker skip existing.
|
287 |
+
*
|
288 |
+
* @codeCoverageIgnore
|
289 |
+
*/
|
290 |
+
public function isBlockerSkipExisting() {
|
291 |
+
return $this->blockerSkipExisting;
|
292 |
+
}
|
293 |
+
/**
|
294 |
+
* Get TCF Vendor configuration status.
|
295 |
+
*
|
296 |
+
* @codeCoverageIgnore
|
297 |
+
*/
|
298 |
+
public function getTcfVendorConfigurationStatus() {
|
299 |
+
return $this->tcfVendorConfigurationStatus;
|
300 |
+
}
|
301 |
+
/**
|
302 |
+
* Get happened messages.
|
303 |
+
*
|
304 |
+
* @codeCoverageIgnore
|
305 |
+
*/
|
306 |
+
public function &getMessages() {
|
307 |
+
return $this->messages;
|
308 |
+
}
|
309 |
+
/**
|
310 |
+
* Get JSON.
|
311 |
+
*
|
312 |
+
* @codeCoverageIgnore
|
313 |
+
*/
|
314 |
+
public function getJSON() {
|
315 |
+
return $this->json;
|
316 |
+
}
|
317 |
+
/**
|
318 |
+
* Get singleton instance.
|
319 |
+
*
|
320 |
+
* @param array $json
|
321 |
+
* @codeCoverageIgnore
|
322 |
+
*/
|
323 |
+
public static function instance($json) {
|
324 |
+
return new \DevOwl\RealCookieBanner\import\Import($json);
|
325 |
+
}
|
326 |
+
}
|
inc/import/ImportBlocker.php
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration;
|
6 |
+
use DevOwl\RealCookieBanner\presets\BlockerPresets;
|
7 |
+
use DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
9 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* Trait to handle the importer for content blocker in the `Import` class.
|
16 |
+
*/
|
17 |
+
trait ImportBlocker {
|
18 |
+
/**
|
19 |
+
* Import content blocker from JSON.
|
20 |
+
*
|
21 |
+
* @param array $blockers
|
22 |
+
*/
|
23 |
+
protected function doImportBlocker($blockers) {
|
24 |
+
$currentBlockers = \DevOwl\RealCookieBanner\import\Export::instance()
|
25 |
+
->appendBlocker()
|
26 |
+
->finish()['blocker'];
|
27 |
+
$blockerStatus = $this->getBlockerStatus();
|
28 |
+
foreach ($blockers as $index => $blocker) {
|
29 |
+
if (!$this->handleCorruptBlocker($blocker, $index)) {
|
30 |
+
continue;
|
31 |
+
}
|
32 |
+
// Collect data
|
33 |
+
$metas = $blocker['metas'];
|
34 |
+
$post_name = $blocker['post_name'];
|
35 |
+
$post_content = $blocker['post_content'];
|
36 |
+
$post_status = $blockerStatus === 'keep' ? $blocker['post_status'] : $blockerStatus;
|
37 |
+
$post_title = $blocker['post_title'];
|
38 |
+
$countAllAssociations = 0;
|
39 |
+
$associatedCount = 0;
|
40 |
+
if (\is_array($metas)) {
|
41 |
+
// Fix meta: hosts
|
42 |
+
if (isset($metas['hosts']) && \is_array($metas['hosts'])) {
|
43 |
+
$metas['hosts'] = \join("\n", $metas['hosts']);
|
44 |
+
}
|
45 |
+
// Fix meta: tcfVendors
|
46 |
+
if ($this->isPro() && isset($metas['tcfVendors']) && \is_array($metas['tcfVendors'])) {
|
47 |
+
$countAllAssociations += \count($metas['tcfVendors']);
|
48 |
+
$metas['tcfVendors'] = $this->correctAssociationIdsForBlocker(
|
49 |
+
$metas['tcfVendors'],
|
50 |
+
'mapTcfVendorConfigurations',
|
51 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::CPT_NAME
|
52 |
+
);
|
53 |
+
$associatedCount += \count($metas['tcfVendors']);
|
54 |
+
$metas['tcfVendors'] = \join(',', $metas['tcfVendors']);
|
55 |
+
}
|
56 |
+
// Fix meta: cookies
|
57 |
+
if (isset($metas['cookies']) && \is_array($metas['cookies'])) {
|
58 |
+
$countAllAssociations += \count($metas['cookies']);
|
59 |
+
$metas['cookies'] = $this->correctAssociationIdsForBlocker(
|
60 |
+
$metas['cookies'],
|
61 |
+
'mapCookies',
|
62 |
+
\DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME
|
63 |
+
);
|
64 |
+
$associatedCount += \count($metas['cookies']);
|
65 |
+
$metas['cookies'] = \join(',', $metas['cookies']);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
// Find current blocker with same post_name
|
69 |
+
$found = \false;
|
70 |
+
foreach ($currentBlockers as $currentBlocker) {
|
71 |
+
if ($currentBlocker['post_name'] === $post_name) {
|
72 |
+
$found = $currentBlocker;
|
73 |
+
break;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
// Check if this is a PRO template
|
77 |
+
if (
|
78 |
+
!$this->isPro() &&
|
79 |
+
isset($metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID]) &&
|
80 |
+
!empty($metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID])
|
81 |
+
) {
|
82 |
+
$presetWithAttributes = (new \DevOwl\RealCookieBanner\presets\BlockerPresets())->getWithAttributes(
|
83 |
+
$metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID]
|
84 |
+
);
|
85 |
+
if (
|
86 |
+
$presetWithAttributes === \false ||
|
87 |
+
$presetWithAttributes['tier'] !==
|
88 |
+
\DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware::TIER_FREE
|
89 |
+
) {
|
90 |
+
$this->addMessageCreateFailureImportingProInFreeVersion($post_title);
|
91 |
+
continue;
|
92 |
+
}
|
93 |
+
}
|
94 |
+
if ($this->isBlockerSkipExisting() && $found) {
|
95 |
+
$this->addMessageSkipExistingBlocker($post_name);
|
96 |
+
continue;
|
97 |
+
}
|
98 |
+
// Always create the entry
|
99 |
+
$create = wp_insert_post(
|
100 |
+
[
|
101 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
102 |
+
'post_content' => $post_content,
|
103 |
+
'post_title' => $post_title,
|
104 |
+
'post_status' => $post_status,
|
105 |
+
'meta_input' => $metas
|
106 |
+
],
|
107 |
+
\true
|
108 |
+
);
|
109 |
+
if (is_wp_error($create)) {
|
110 |
+
$this->addMessageCreateFailure($post_name, __('Content Blocker', RCB_TD), $create);
|
111 |
+
continue;
|
112 |
+
}
|
113 |
+
$this->probablyAddMessageDuplicateBlocker($found, $post_name, $found['ID'], $create);
|
114 |
+
$this->probablyAddMessageBlockerAssociation($countAllAssociations, $associatedCount, $post_title, $create);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
/**
|
118 |
+
* Fetch the correct cookie / TCF vendor ids for the meta.
|
119 |
+
*
|
120 |
+
* @param string[] $post_names
|
121 |
+
* @param string $mapName Can be `mapCookies` or `mapTcfVendorConfigurations`
|
122 |
+
* @param string $association_post_type
|
123 |
+
*/
|
124 |
+
protected function correctAssociationIdsForBlocker($post_names, $mapName, $association_post_type) {
|
125 |
+
global $wpdb;
|
126 |
+
$result = [];
|
127 |
+
foreach ($post_names as $post_name) {
|
128 |
+
// Check if it is an imported post
|
129 |
+
if (isset($this->{$mapName}[$post_name])) {
|
130 |
+
$result[] = $this->{$mapName}[$post_name];
|
131 |
+
} else {
|
132 |
+
$post = $wpdb->get_var(
|
133 |
+
$wpdb->prepare(
|
134 |
+
"SELECT ID FROM {$wpdb->posts} WHERE post_name = %s AND post_type = %s",
|
135 |
+
$post_name,
|
136 |
+
$association_post_type
|
137 |
+
)
|
138 |
+
);
|
139 |
+
if ($post) {
|
140 |
+
$result[] = get_post($post)->ID;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
return \array_map('intval', $result);
|
145 |
+
}
|
146 |
+
/**
|
147 |
+
* Check missing meta of passed blocker.
|
148 |
+
*
|
149 |
+
* @param array $blocker
|
150 |
+
* @param int $index
|
151 |
+
*/
|
152 |
+
protected function handleCorruptBlocker($blocker, $index) {
|
153 |
+
if (
|
154 |
+
!isset(
|
155 |
+
$blocker['metas'],
|
156 |
+
$blocker['post_name'],
|
157 |
+
$blocker['post_content'],
|
158 |
+
$blocker['post_status'],
|
159 |
+
$blocker['post_title']
|
160 |
+
)
|
161 |
+
) {
|
162 |
+
$this->addMessageMissingProperties(
|
163 |
+
$index,
|
164 |
+
__('Content Blocker', RCB_TD),
|
165 |
+
'ID, metas, post_content, post_name, post_status, post_title'
|
166 |
+
);
|
167 |
+
return \false;
|
168 |
+
}
|
169 |
+
return \true;
|
170 |
+
}
|
171 |
+
}
|
inc/import/ImportCookies.php
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\CookiePresets;
|
6 |
+
use DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware;
|
7 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
9 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
10 |
+
use WP_Term;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Trait to handle the importer for cookies in the `Import` class.
|
17 |
+
*/
|
18 |
+
trait ImportCookies {
|
19 |
+
/**
|
20 |
+
* Import cookies from JSON.
|
21 |
+
*
|
22 |
+
* @param array $cookies
|
23 |
+
*/
|
24 |
+
protected function doImportCookies($cookies) {
|
25 |
+
$currentCookies = \DevOwl\RealCookieBanner\import\Export::instance()
|
26 |
+
->appendCookies()
|
27 |
+
->finish()['cookies'];
|
28 |
+
$cookieStatus = $this->getCookieStatus();
|
29 |
+
$cookieGroup = $this->getCookieGroup();
|
30 |
+
$order = \count($currentCookies);
|
31 |
+
foreach ($cookies as $index => $cookie) {
|
32 |
+
if (!$this->handleCorruptCookie($cookie, $index)) {
|
33 |
+
continue;
|
34 |
+
}
|
35 |
+
// Collect data
|
36 |
+
$group = $cookieGroup;
|
37 |
+
$metas = $cookie['metas'];
|
38 |
+
$post_name = $cookie['post_name'];
|
39 |
+
$post_content = $cookie['post_content'];
|
40 |
+
$post_status = $cookieStatus === 'keep' ? $cookie['post_status'] : $cookieStatus;
|
41 |
+
$post_title = $cookie['post_title'];
|
42 |
+
// Do not import our RCB cookie as it is default created on all instances
|
43 |
+
if ($post_name === RCB_SLUG_LITE) {
|
44 |
+
continue;
|
45 |
+
}
|
46 |
+
// Check if group is set by import and check if exists
|
47 |
+
$groupNotFound = \false;
|
48 |
+
if (!empty($cookie['group'])) {
|
49 |
+
$term = get_term_by(
|
50 |
+
'slug',
|
51 |
+
$cookie['group'],
|
52 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME
|
53 |
+
);
|
54 |
+
if ($term instanceof \WP_Term) {
|
55 |
+
$group = $term->term_id;
|
56 |
+
} else {
|
57 |
+
$groupNotFound = \true;
|
58 |
+
}
|
59 |
+
}
|
60 |
+
// Save technical definitions as plain string in meta as WP 5.0 does not support that yet in REST API
|
61 |
+
if (isset($metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS])) {
|
62 |
+
$metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS] = \json_encode(
|
63 |
+
$metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS]
|
64 |
+
);
|
65 |
+
}
|
66 |
+
// Save code dynamics as plain string in meta as WP 5.0 does not support that yet in REST API
|
67 |
+
if (isset($metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_DYNAMICS])) {
|
68 |
+
$metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_DYNAMICS] = \json_encode(
|
69 |
+
$metas[\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_DYNAMICS]
|
70 |
+
);
|
71 |
+
}
|
72 |
+
// Find current cookie with same post_name
|
73 |
+
$found = \false;
|
74 |
+
foreach ($currentCookies as $currentCookie) {
|
75 |
+
if ($currentCookie['post_name'] === $post_name) {
|
76 |
+
$found = $currentCookie;
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
// Check if this is a PRO template
|
81 |
+
if (
|
82 |
+
!$this->isPro() &&
|
83 |
+
isset($metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID]) &&
|
84 |
+
!empty($metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID])
|
85 |
+
) {
|
86 |
+
$presetWithAttributes = (new \DevOwl\RealCookieBanner\presets\CookiePresets())->getWithAttributes(
|
87 |
+
$metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID]
|
88 |
+
);
|
89 |
+
if (
|
90 |
+
$presetWithAttributes === \false ||
|
91 |
+
$presetWithAttributes['tier'] !==
|
92 |
+
\DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware::TIER_FREE
|
93 |
+
) {
|
94 |
+
$this->addMessageCreateFailureImportingProInFreeVersion($post_title);
|
95 |
+
continue;
|
96 |
+
}
|
97 |
+
}
|
98 |
+
if ($this->isCookieSkipExisting() && $found) {
|
99 |
+
$this->addMessageSkipExistingCookie($post_name);
|
100 |
+
continue;
|
101 |
+
}
|
102 |
+
// Always create the entry
|
103 |
+
$create = wp_insert_post(
|
104 |
+
[
|
105 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
106 |
+
'post_content' => $post_content,
|
107 |
+
'post_title' => $post_title,
|
108 |
+
'post_status' => $post_status,
|
109 |
+
'menu_order' => $order,
|
110 |
+
'meta_input' => $metas
|
111 |
+
],
|
112 |
+
\true
|
113 |
+
);
|
114 |
+
if (is_wp_error($create)) {
|
115 |
+
$this->addMessageCreateFailure($post_title, __('Cookie', RCB_TD), $create);
|
116 |
+
} elseif ($this->handleCookieAssign($create, $group)) {
|
117 |
+
$order++;
|
118 |
+
$this->mapCookies[$post_name] = get_post($create)->ID;
|
119 |
+
$this->probablyAddMessageDuplicateCookie($found, $post_name, $group, $create);
|
120 |
+
$this->probablyAddMessageCookieGroupNotFound($groupNotFound, $post_title, $group, $create);
|
121 |
+
}
|
122 |
+
}
|
123 |
+
}
|
124 |
+
/**
|
125 |
+
* Assign a created cookie to a given group.
|
126 |
+
*
|
127 |
+
* @param int $postId
|
128 |
+
* @param int $groupId
|
129 |
+
*/
|
130 |
+
protected function handleCookieAssign($postId, $groupId) {
|
131 |
+
$assign = wp_set_object_terms($postId, $groupId, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME);
|
132 |
+
if (is_wp_error($assign)) {
|
133 |
+
$this->addMessageCookieAssignFailure($postId, $assign);
|
134 |
+
// Delete again
|
135 |
+
wp_delete_post($postId, \true);
|
136 |
+
return \false;
|
137 |
+
}
|
138 |
+
return \true;
|
139 |
+
}
|
140 |
+
/**
|
141 |
+
* Check missing meta of passed cookie.
|
142 |
+
*
|
143 |
+
* @param array $cookie
|
144 |
+
* @param int $index
|
145 |
+
*/
|
146 |
+
protected function handleCorruptCookie($cookie, $index) {
|
147 |
+
if (
|
148 |
+
!isset(
|
149 |
+
$cookie['group'],
|
150 |
+
$cookie['metas'],
|
151 |
+
$cookie['post_name'],
|
152 |
+
$cookie['post_content'],
|
153 |
+
$cookie['post_status'],
|
154 |
+
$cookie['post_title']
|
155 |
+
)
|
156 |
+
) {
|
157 |
+
$this->addMessageMissingProperties(
|
158 |
+
$index,
|
159 |
+
__('Cookie', RCB_TD),
|
160 |
+
'ID, group, metas, post_content, post_name, post_status, post_title'
|
161 |
+
);
|
162 |
+
return \false;
|
163 |
+
}
|
164 |
+
return \true;
|
165 |
+
}
|
166 |
+
}
|
inc/import/ImportCustomizeBanner.php
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\view\customize\banner\BasicLayout;
|
7 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Decision;
|
8 |
+
use DevOwl\RealCookieBanner\view\customize\banner\FooterDesign;
|
9 |
+
use DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign;
|
10 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Legal;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Trait to handle the importer for customize banner in the `Import` class.
|
17 |
+
*/
|
18 |
+
trait ImportCustomizeBanner {
|
19 |
+
/**
|
20 |
+
* Import customize banner settings from JSON.
|
21 |
+
*
|
22 |
+
* @param array $sections
|
23 |
+
*/
|
24 |
+
protected function doImportCustomizeBanner($sections) {
|
25 |
+
$ids = \DevOwl\RealCookieBanner\Core::getInstance()
|
26 |
+
->getBanner()
|
27 |
+
->getCustomize()
|
28 |
+
->localizeIds()['customizeIdsBanner']['settings'];
|
29 |
+
$availableSections = \array_keys($ids);
|
30 |
+
foreach ($sections as $section => $settings) {
|
31 |
+
if (!\is_array($settings)) {
|
32 |
+
$this->addMessageWrongUsageKey($section);
|
33 |
+
continue;
|
34 |
+
}
|
35 |
+
if (\in_array($section, $availableSections, \true)) {
|
36 |
+
$availableSettings = \array_keys($ids[$section]);
|
37 |
+
foreach ($settings as $key => $value) {
|
38 |
+
if (\in_array($key, $availableSettings, \true)) {
|
39 |
+
$optionName = $ids[$section][$key];
|
40 |
+
// Skip already persistent options with the same value
|
41 |
+
// phpcs:disable WordPress.PHP.StrictComparisons
|
42 |
+
if (get_option($optionName) == $value) {
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
// phpcs:enable WordPress.PHP.StrictComparisons
|
46 |
+
// Check for special cases and abort it
|
47 |
+
if (!$this->handleSepcialCustomizeBanner($optionName, $section, $key, $value)) {
|
48 |
+
continue;
|
49 |
+
}
|
50 |
+
// Handle update
|
51 |
+
if (!update_option($optionName, $value)) {
|
52 |
+
$this->addMessageUpdateOptionFailure($optionName);
|
53 |
+
}
|
54 |
+
} else {
|
55 |
+
$this->addMessageOptionOutdated($section . '.' . $key);
|
56 |
+
}
|
57 |
+
}
|
58 |
+
} else {
|
59 |
+
$this->addMessageOptionOutdated($section);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
/**
|
64 |
+
* Handle special cases for customize banner settings.
|
65 |
+
*
|
66 |
+
* @param string $optionName
|
67 |
+
* @param string $section
|
68 |
+
* @param mixed $setting
|
69 |
+
* @param string $value
|
70 |
+
*/
|
71 |
+
protected function handleSepcialCustomizeBanner($optionName, $section, $setting, $value) {
|
72 |
+
$onlyPro = \false;
|
73 |
+
switch ($optionName) {
|
74 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\Legal::SETTING_IMPRINT:
|
75 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\Legal::SETTING_PRIVACY_POLICY:
|
76 |
+
if ($value > 0 || !empty($value)) {
|
77 |
+
$this->addMessageOptionRelatesPageId(
|
78 |
+
$optionName === \DevOwl\RealCookieBanner\view\customize\banner\Legal::SETTING_PRIVACY_POLICY
|
79 |
+
? __('Privacy policy page', RCB_TD)
|
80 |
+
: __('Imprint page', RCB_TD),
|
81 |
+
$section . '.' . $setting
|
82 |
+
);
|
83 |
+
break;
|
84 |
+
}
|
85 |
+
return \true;
|
86 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO:
|
87 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_RETINA:
|
88 |
+
if (!empty($value)) {
|
89 |
+
$this->addMessageOptionRelatesMedia(
|
90 |
+
$optionName === \DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO
|
91 |
+
? __('Logo', RCB_TD)
|
92 |
+
: __('Logo (Retina)', RCB_TD),
|
93 |
+
$section . '.' . $setting
|
94 |
+
);
|
95 |
+
break;
|
96 |
+
}
|
97 |
+
return \true;
|
98 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_POWERED_BY_LINK:
|
99 |
+
if (!$this->isPro() && !$value) {
|
100 |
+
$onlyPro = \true;
|
101 |
+
break;
|
102 |
+
}
|
103 |
+
return \true;
|
104 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR:
|
105 |
+
if (!$this->isPro() && $value > 0) {
|
106 |
+
$onlyPro = \true;
|
107 |
+
break;
|
108 |
+
}
|
109 |
+
return \true;
|
110 |
+
case \DevOwl\RealCookieBanner\view\customize\banner\Decision::SETTING_GROUPS_FIRST_VIEW:
|
111 |
+
if (!$this->isPro() && $value === \true) {
|
112 |
+
$onlyPro = \true;
|
113 |
+
break;
|
114 |
+
}
|
115 |
+
return \true;
|
116 |
+
default:
|
117 |
+
return \true;
|
118 |
+
}
|
119 |
+
$this->probablyAddMessageSettingOnlyPro($onlyPro, $section . '.' . $setting);
|
120 |
+
return \false;
|
121 |
+
}
|
122 |
+
}
|
inc/import/ImportGroups.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
/**
|
11 |
+
* Trait to handle the importer for groups in the `Import` class.
|
12 |
+
*/
|
13 |
+
trait ImportGroups {
|
14 |
+
/**
|
15 |
+
* Import cookie groups from JSON.
|
16 |
+
*
|
17 |
+
* @param array $groups
|
18 |
+
*/
|
19 |
+
protected function doImportCookieGroups($groups) {
|
20 |
+
$currentGroups = \DevOwl\RealCookieBanner\import\Export::instance()
|
21 |
+
->appendCookieGroups()
|
22 |
+
->finish()['cookieGroups'];
|
23 |
+
$order = \count($currentGroups);
|
24 |
+
foreach ($groups as $index => $group) {
|
25 |
+
if (!$this->handleCorruptGroup($group, $index)) {
|
26 |
+
continue;
|
27 |
+
}
|
28 |
+
$slug = $group['slug'];
|
29 |
+
$name = $group['name'];
|
30 |
+
$description = $group['description'];
|
31 |
+
// Find current group with same slug
|
32 |
+
$found = \false;
|
33 |
+
foreach ($currentGroups as $currentGroup) {
|
34 |
+
if ($currentGroup['slug'] === $slug) {
|
35 |
+
$found = $currentGroup;
|
36 |
+
break;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
// We found existing group, just update...
|
40 |
+
if ($found !== \false) {
|
41 |
+
$this->handleGroupUpdate($slug, $found['term_id'], $name, $description);
|
42 |
+
} elseif ($this->handleGroupCreate($slug, $name, $description, $order)) {
|
43 |
+
$order++;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
/**
|
48 |
+
* Handle to update an existing group instead of creating a new one.
|
49 |
+
*
|
50 |
+
* @param string $slug
|
51 |
+
* @param int $term_id
|
52 |
+
* @param string $name
|
53 |
+
* @param string $description
|
54 |
+
*/
|
55 |
+
protected function handleGroupUpdate($slug, $term_id, $name, $description) {
|
56 |
+
$update = wp_update_term($term_id, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME, [
|
57 |
+
'name' => $name,
|
58 |
+
'description' => $description
|
59 |
+
]);
|
60 |
+
if (is_wp_error($update)) {
|
61 |
+
$this->addMessageCookieGroupUpdateFailure($name, $update);
|
62 |
+
} else {
|
63 |
+
$this->addMessageCookieGroupUpdatedInfo($name);
|
64 |
+
}
|
65 |
+
}
|
66 |
+
/**
|
67 |
+
* Handle to create a new group.
|
68 |
+
*
|
69 |
+
* @param string $slug
|
70 |
+
* @param string $name
|
71 |
+
* @param string $description
|
72 |
+
* @param int $order
|
73 |
+
*/
|
74 |
+
protected function handleGroupCreate($slug, $name, $description, $order) {
|
75 |
+
// Try to create
|
76 |
+
$create = wp_insert_term($name, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME, [
|
77 |
+
'name' => $name,
|
78 |
+
'description' => $description,
|
79 |
+
'slug' => $slug
|
80 |
+
]);
|
81 |
+
if (is_wp_error($create)) {
|
82 |
+
$this->addMessageCreateFailure($name, __('Service Group', RCB_TD), $create);
|
83 |
+
return \false;
|
84 |
+
} else {
|
85 |
+
update_term_meta(
|
86 |
+
$create['term_id'],
|
87 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_ORDER,
|
88 |
+
$order
|
89 |
+
);
|
90 |
+
return \true;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Check missing meta of passed group.
|
95 |
+
*
|
96 |
+
* @param array $group
|
97 |
+
* @param int $index
|
98 |
+
*/
|
99 |
+
protected function handleCorruptGroup($group, $index) {
|
100 |
+
if (!isset($group['slug'], $group['name'], $group['description'])) {
|
101 |
+
$this->addMessageMissingProperties($index, __('Service Group', RCB_TD), 'slug, name, description');
|
102 |
+
return \false;
|
103 |
+
}
|
104 |
+
return \true;
|
105 |
+
}
|
106 |
+
}
|
inc/import/ImportMessages.php
ADDED
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
6 |
+
use DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign;
|
7 |
+
use WP_Error;
|
8 |
+
use WP_Post;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Trait to handle messages output.
|
15 |
+
*/
|
16 |
+
trait ImportMessages {
|
17 |
+
/**
|
18 |
+
* A top-level cookie type has incorrect scheme.
|
19 |
+
*
|
20 |
+
* @param string $type
|
21 |
+
*/
|
22 |
+
protected function addMessageWrongUsageKey($type) {
|
23 |
+
// translators:
|
24 |
+
$this->addMessage(\sprintf(__('Please provide a valid <code>%s</code> key.', RCB_TD), $type), 'error');
|
25 |
+
}
|
26 |
+
/**
|
27 |
+
* A type definition is incorrect.
|
28 |
+
*
|
29 |
+
* @param int $index
|
30 |
+
* @param string $type
|
31 |
+
* @param string $properties
|
32 |
+
*/
|
33 |
+
protected function addMessageMissingProperties($index, $type, $properties) {
|
34 |
+
$this->addMessage(
|
35 |
+
\sprintf(
|
36 |
+
// translators:
|
37 |
+
__(
|
38 |
+
'The %1$s with index <code>%2$d</code> is missing. Required properties: <code>%3$s</code>. Skipped.',
|
39 |
+
RCB_TD
|
40 |
+
),
|
41 |
+
$type,
|
42 |
+
$index,
|
43 |
+
$properties
|
44 |
+
),
|
45 |
+
'error'
|
46 |
+
);
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* `wp_insert_post` failed for given type.
|
50 |
+
*
|
51 |
+
* @param string $post_title
|
52 |
+
* @param string $type
|
53 |
+
* @param WP_Error $error
|
54 |
+
*/
|
55 |
+
protected function addMessageCreateFailure($post_title, $type, $error) {
|
56 |
+
$this->addMessage(
|
57 |
+
\sprintf(
|
58 |
+
// translators:
|
59 |
+
__(
|
60 |
+
'%1$s <strong>%2$s</strong> could not be created due to the following error: <code>%3$s</code>. Skipped.',
|
61 |
+
RCB_TD
|
62 |
+
),
|
63 |
+
$type,
|
64 |
+
$post_title,
|
65 |
+
$error->get_error_message()
|
66 |
+
),
|
67 |
+
'error'
|
68 |
+
);
|
69 |
+
}
|
70 |
+
/**
|
71 |
+
* User is trying to import PRO template in free version.
|
72 |
+
*
|
73 |
+
* @param string $post_title
|
74 |
+
*/
|
75 |
+
protected function addMessageCreateFailureImportingProInFreeVersion($post_title) {
|
76 |
+
$this->addMessage(
|
77 |
+
\sprintf(
|
78 |
+
// translators:
|
79 |
+
__(
|
80 |
+
'<strong>%s</strong>: You are trying to import a template from Real Cookie Banner PRO, but here you are using the free version of the plugin. Please remove this service before exporting the services or use the PRO version on this website! Skipped.',
|
81 |
+
RCB_TD
|
82 |
+
),
|
83 |
+
$post_title
|
84 |
+
),
|
85 |
+
'error'
|
86 |
+
);
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Add message for non-associated cookies / TCF vendors.
|
90 |
+
*
|
91 |
+
* @param int $count
|
92 |
+
* @param int $associatedCount
|
93 |
+
* @param string $post_title
|
94 |
+
* @param int $blockerId
|
95 |
+
*/
|
96 |
+
protected function probablyAddMessageBlockerAssociation($count, $associatedCount, $post_title, $blockerId) {
|
97 |
+
if ($count !== $associatedCount) {
|
98 |
+
$this->addMessage(
|
99 |
+
\sprintf(
|
100 |
+
// translators:
|
101 |
+
__(
|
102 |
+
'The newly created content blocker <code>%s</code> could not correctly resolve some associated relationships.',
|
103 |
+
RCB_TD
|
104 |
+
),
|
105 |
+
$post_title
|
106 |
+
),
|
107 |
+
'warning',
|
108 |
+
'blocker',
|
109 |
+
['blocker' => $blockerId]
|
110 |
+
);
|
111 |
+
}
|
112 |
+
}
|
113 |
+
/**
|
114 |
+
* The cookie got not created because already exists.
|
115 |
+
*
|
116 |
+
* @param string $post_name
|
117 |
+
*/
|
118 |
+
protected function addMessageSkipExistingCookie($post_name) {
|
119 |
+
$this->addMessage(
|
120 |
+
\sprintf(
|
121 |
+
// translators:
|
122 |
+
__('The service <code>%s</code> already exists. Skipped.', RCB_TD),
|
123 |
+
$post_name
|
124 |
+
),
|
125 |
+
'info'
|
126 |
+
);
|
127 |
+
}
|
128 |
+
/**
|
129 |
+
* The content blocker got not created because already exists.
|
130 |
+
*
|
131 |
+
* @param string $post_name
|
132 |
+
*/
|
133 |
+
protected function addMessageSkipExistingBlocker($post_name) {
|
134 |
+
$this->addMessage(
|
135 |
+
\sprintf(
|
136 |
+
// translators:
|
137 |
+
__('The content blocker <code>%s</code> already exists. Skipped.', RCB_TD),
|
138 |
+
$post_name
|
139 |
+
),
|
140 |
+
'info'
|
141 |
+
);
|
142 |
+
}
|
143 |
+
/**
|
144 |
+
* The TCF vendor configuration got not created because already exists.
|
145 |
+
*
|
146 |
+
* @param int $vendorId
|
147 |
+
*/
|
148 |
+
protected function addMessageSkipExistingTcfVendorConfiguration($vendorId) {
|
149 |
+
$this->addMessage(
|
150 |
+
\sprintf(
|
151 |
+
// translators:
|
152 |
+
__('The TCF vendor configuration for vendor with ID <code>%s</code> already exists. Skipped.', RCB_TD),
|
153 |
+
$vendorId
|
154 |
+
),
|
155 |
+
'info'
|
156 |
+
);
|
157 |
+
}
|
158 |
+
/**
|
159 |
+
* The content blocker got duplicated.
|
160 |
+
*
|
161 |
+
* @param boolean|WP_Post $found
|
162 |
+
* @param string $post_name
|
163 |
+
* @param int $original
|
164 |
+
* @param int $duplicate
|
165 |
+
*/
|
166 |
+
protected function probablyAddMessageDuplicateBlocker($found, $post_name, $original, $duplicate) {
|
167 |
+
if ($found === \false) {
|
168 |
+
return;
|
169 |
+
}
|
170 |
+
// Add a message when a duplicate got created
|
171 |
+
$this->addMessage(
|
172 |
+
\sprintf(
|
173 |
+
// translators:
|
174 |
+
__(
|
175 |
+
'The content blocker <code>%s</code> already exists. A new content blocker has been created anyway.',
|
176 |
+
RCB_TD
|
177 |
+
),
|
178 |
+
$post_name
|
179 |
+
),
|
180 |
+
'warning',
|
181 |
+
'blockerDuplicate',
|
182 |
+
['blockerDuplicate' => ['original' => $original, 'duplicate' => $duplicate]]
|
183 |
+
);
|
184 |
+
}
|
185 |
+
/**
|
186 |
+
* The cookie got duplicated.
|
187 |
+
*
|
188 |
+
* @param boolean|WP_Post $found
|
189 |
+
* @param string $post_name
|
190 |
+
* @param int $group
|
191 |
+
* @param int $created
|
192 |
+
*/
|
193 |
+
protected function probablyAddMessageDuplicateCookie($found, $post_name, $group, $created) {
|
194 |
+
if ($found === \false) {
|
195 |
+
return;
|
196 |
+
}
|
197 |
+
$this->addMessage(
|
198 |
+
\sprintf(
|
199 |
+
// translators:
|
200 |
+
__('The service <code>%s</code> already exists. A new service has been created anyway.', RCB_TD),
|
201 |
+
$post_name
|
202 |
+
),
|
203 |
+
'warning',
|
204 |
+
'cookieDuplicate',
|
205 |
+
[
|
206 |
+
'cookieDuplicate' => [
|
207 |
+
'original' => [
|
208 |
+
get_the_terms($found['ID'], \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME)[0]
|
209 |
+
->term_id,
|
210 |
+
$found['ID']
|
211 |
+
],
|
212 |
+
'duplicate' => [$group, $created]
|
213 |
+
]
|
214 |
+
]
|
215 |
+
);
|
216 |
+
}
|
217 |
+
/**
|
218 |
+
* The cookie could not be associated to the given group, did fallback.
|
219 |
+
*
|
220 |
+
* @param boolean $groupNotFound
|
221 |
+
* @param string $post_title
|
222 |
+
* @param int $group
|
223 |
+
* @param int $created
|
224 |
+
*/
|
225 |
+
protected function probablyAddMessageCookieGroupNotFound($groupNotFound, $post_title, $group, $created) {
|
226 |
+
if ($groupNotFound) {
|
227 |
+
$this->addMessage(
|
228 |
+
\sprintf(
|
229 |
+
// translators:
|
230 |
+
__(
|
231 |
+
'The newly created service <code>%s</code> has been added to the fallback service group because the original service group could not be found.',
|
232 |
+
RCB_TD
|
233 |
+
),
|
234 |
+
$post_title
|
235 |
+
),
|
236 |
+
'warning',
|
237 |
+
'cookie',
|
238 |
+
['cookie' => [$group, $created]]
|
239 |
+
);
|
240 |
+
}
|
241 |
+
}
|
242 |
+
/**
|
243 |
+
* Cookie could not be assigned to cookie.
|
244 |
+
*
|
245 |
+
* @param int $postId
|
246 |
+
* @param WP_Error $error
|
247 |
+
*/
|
248 |
+
protected function addMessageCookieAssignFailure($postId, $error) {
|
249 |
+
$this->addMessage(
|
250 |
+
\sprintf(
|
251 |
+
// translators:
|
252 |
+
__(
|
253 |
+
'The service <strong>%1$s</strong> could not be assigned to the given group due to the following error: <code>%2$s</code>. Skipped.',
|
254 |
+
RCB_TD
|
255 |
+
),
|
256 |
+
get_the_title($postId),
|
257 |
+
$error->get_error_message()
|
258 |
+
),
|
259 |
+
'error'
|
260 |
+
);
|
261 |
+
}
|
262 |
+
/**
|
263 |
+
* Cookie group could not be updated.
|
264 |
+
*
|
265 |
+
* @param string $name
|
266 |
+
* @param WP_Error $error
|
267 |
+
*/
|
268 |
+
protected function addMessageCookieGroupUpdateFailure($name, $error) {
|
269 |
+
$this->addMessage(
|
270 |
+
\sprintf(
|
271 |
+
// translators:
|
272 |
+
__(
|
273 |
+
'The service group <strong>%1$s</strong> could not be updated due to the following error: <code>%2$s</code>. Skipped.',
|
274 |
+
RCB_TD
|
275 |
+
),
|
276 |
+
$name,
|
277 |
+
$error->get_error_message()
|
278 |
+
),
|
279 |
+
'error'
|
280 |
+
);
|
281 |
+
}
|
282 |
+
/**
|
283 |
+
* Cookie group is not created instead it was updated.
|
284 |
+
*
|
285 |
+
* @param string $name
|
286 |
+
*/
|
287 |
+
protected function addMessageCookieGroupUpdatedInfo($name) {
|
288 |
+
$this->addMessage(
|
289 |
+
\sprintf(
|
290 |
+
// translators:
|
291 |
+
__(
|
292 |
+
'The service group <strong>%s</strong> was not created. Instead, the existing one has been updated.',
|
293 |
+
RCB_TD
|
294 |
+
),
|
295 |
+
$name
|
296 |
+
),
|
297 |
+
'info'
|
298 |
+
);
|
299 |
+
}
|
300 |
+
/**
|
301 |
+
* A PRO-only setting can not be imported in lite.
|
302 |
+
*
|
303 |
+
* @param boolean $onlyPro
|
304 |
+
* @param string $key
|
305 |
+
*/
|
306 |
+
protected function probablyAddMessageSettingOnlyPro($onlyPro, $key) {
|
307 |
+
if ($onlyPro) {
|
308 |
+
$this->addMessage(
|
309 |
+
\sprintf(
|
310 |
+
// translators:
|
311 |
+
__('Setting/Option <code>%s</code> can only be imported in the PRO version. Skipped.', RCB_TD),
|
312 |
+
$key
|
313 |
+
),
|
314 |
+
'error'
|
315 |
+
);
|
316 |
+
}
|
317 |
+
}
|
318 |
+
/**
|
319 |
+
* `update_option` failured.
|
320 |
+
*
|
321 |
+
* @param string $optionName
|
322 |
+
*/
|
323 |
+
protected function addMessageUpdateOptionFailure($optionName) {
|
324 |
+
$this->addMessage(
|
325 |
+
\sprintf(
|
326 |
+
// translators:
|
327 |
+
__('Setting/Option <code>%s</code> could not be updated. Skipped.', RCB_TD),
|
328 |
+
$optionName
|
329 |
+
),
|
330 |
+
'error'
|
331 |
+
);
|
332 |
+
}
|
333 |
+
/**
|
334 |
+
* Option not related to RCB.
|
335 |
+
*
|
336 |
+
* @param string $key
|
337 |
+
*/
|
338 |
+
protected function addMessageOptionOutdated($key) {
|
339 |
+
$this->addMessage(
|
340 |
+
\sprintf(
|
341 |
+
// translators:
|
342 |
+
__('Settings/Options <code>%s</code> not found or obsolete. Skipped.', RCB_TD),
|
343 |
+
$key
|
344 |
+
),
|
345 |
+
'error'
|
346 |
+
);
|
347 |
+
}
|
348 |
+
/**
|
349 |
+
* An option relates to a page ID, it can never be imported.
|
350 |
+
*
|
351 |
+
* @param string $name
|
352 |
+
* @param string $key
|
353 |
+
*/
|
354 |
+
protected function addMessageOptionRelatesPageId($name, $key) {
|
355 |
+
$this->addMessage(
|
356 |
+
\sprintf(
|
357 |
+
// translators:
|
358 |
+
__(
|
359 |
+
'Setting/Option <strong>%1$s</strong> (key <code>%2$s</code>) cannot be imported because it refers to a page (ID). Skipped.',
|
360 |
+
RCB_TD
|
361 |
+
),
|
362 |
+
$name,
|
363 |
+
$key
|
364 |
+
),
|
365 |
+
'warning',
|
366 |
+
'settings',
|
367 |
+
['settingsTab' => '']
|
368 |
+
);
|
369 |
+
}
|
370 |
+
/**
|
371 |
+
* An option relates to a media, it can never be imported.
|
372 |
+
*
|
373 |
+
* @param string $name
|
374 |
+
* @param string $key
|
375 |
+
*/
|
376 |
+
protected function addMessageOptionRelatesMedia($name, $key) {
|
377 |
+
$this->addMessage(
|
378 |
+
\sprintf(
|
379 |
+
// translators:
|
380 |
+
__(
|
381 |
+
'Setting/Option <strong>%1$s</strong> (key <code>%2$s</code>) cannot be imported because it refers to a media URL/ID. Skipped.',
|
382 |
+
RCB_TD
|
383 |
+
),
|
384 |
+
$name,
|
385 |
+
$key
|
386 |
+
),
|
387 |
+
'warning',
|
388 |
+
'link',
|
389 |
+
[
|
390 |
+
'href' => admin_url(
|
391 |
+
'/customize.php?autofocus[control]=' .
|
392 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::HEADLINE_LOGO
|
393 |
+
)
|
394 |
+
]
|
395 |
+
);
|
396 |
+
}
|
397 |
+
/**
|
398 |
+
* Multisite options can not be imported due to reference issues.
|
399 |
+
*
|
400 |
+
* @param string $name
|
401 |
+
* @param string $key
|
402 |
+
*/
|
403 |
+
protected function addMessageOptionMultisite($name, $key) {
|
404 |
+
$this->addMessage(
|
405 |
+
\sprintf(
|
406 |
+
// translators:
|
407 |
+
__('Setting/Option <strong>%1$s</strong> (key <code>%2$s</code>) cannot be imported. Skipped.', RCB_TD),
|
408 |
+
$name,
|
409 |
+
$key
|
410 |
+
),
|
411 |
+
'warning',
|
412 |
+
'settings',
|
413 |
+
['settingsTab' => 'multisite']
|
414 |
+
);
|
415 |
+
}
|
416 |
+
}
|
inc/import/ImportSettings.php
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\CountryBypass;
|
6 |
+
use DevOwl\RealCookieBanner\settings\General;
|
7 |
+
use DevOwl\RealCookieBanner\settings\Multisite;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Revision;
|
9 |
+
use DevOwl\RealCookieBanner\settings\TCF;
|
10 |
+
use DevOwl\RealCookieBanner\Utils;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Trait to handle the importer for settings in the `Import` class.
|
17 |
+
*/
|
18 |
+
trait ImportSettings {
|
19 |
+
/**
|
20 |
+
* Import settings from JSON.
|
21 |
+
*
|
22 |
+
* @param array $settings
|
23 |
+
*/
|
24 |
+
protected function doImportSettings($settings) {
|
25 |
+
$availableOptions = \DevOwl\RealCookieBanner\settings\Revision::getInstance()->fromOptions(null, \false, \true);
|
26 |
+
$availableOptionKeys = \array_keys($availableOptions);
|
27 |
+
foreach ($settings as $key => $value) {
|
28 |
+
if (\in_array($key, $availableOptionKeys, \true)) {
|
29 |
+
$optionName = $availableOptions[$key];
|
30 |
+
// Skip already persistent options with the same value (no strict comparision)
|
31 |
+
// phpcs:disable WordPress.PHP.StrictComparisons
|
32 |
+
if (get_option($optionName) == $value) {
|
33 |
+
continue;
|
34 |
+
}
|
35 |
+
// phpcs:enable WordPress.PHP.StrictComparisons
|
36 |
+
// Check for special cases and abort it
|
37 |
+
if (!$this->handleSepcialSetting($optionName, $value, $key)) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
// Handle update
|
41 |
+
if (!update_option($optionName, $value)) {
|
42 |
+
$this->addMessageUpdateOptionFailure($optionName);
|
43 |
+
}
|
44 |
+
} else {
|
45 |
+
$this->addMessageOptionOutdated($key);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
/**
|
50 |
+
* Handle special cases for settings.
|
51 |
+
*
|
52 |
+
* @param string $optionName
|
53 |
+
* @param mixed $value
|
54 |
+
* @param string $key
|
55 |
+
*/
|
56 |
+
protected function handleSepcialSetting($optionName, $value, $key) {
|
57 |
+
$onlyPro = \false;
|
58 |
+
switch ($optionName) {
|
59 |
+
case \DevOwl\RealCookieBanner\settings\General::SETTING_IMPRINT_ID:
|
60 |
+
case \DevOwl\RealCookieBanner\settings\General::SETTING_PRIVACY_POLICY_ID:
|
61 |
+
case \DevOwl\RealCookieBanner\settings\General::SETTING_HIDE_PAGE_IDS:
|
62 |
+
if ($value > 0 || !empty($value)) {
|
63 |
+
$this->addMessageOptionRelatesPageId(
|
64 |
+
($optionName === \DevOwl\RealCookieBanner\settings\General::SETTING_PRIVACY_POLICY_ID
|
65 |
+
? __('Privacy policy page', RCB_TD)
|
66 |
+
: $optionName === \DevOwl\RealCookieBanner\settings\General::SETTING_IMPRINT_ID)
|
67 |
+
? __('Imprint page', RCB_TD)
|
68 |
+
: __('Hide on additional pages', RCB_TD),
|
69 |
+
$key
|
70 |
+
);
|
71 |
+
break;
|
72 |
+
}
|
73 |
+
return \true;
|
74 |
+
case \DevOwl\RealCookieBanner\settings\General::SETTING_SET_COOKIES_VIA_MANAGER:
|
75 |
+
if (!$this->isPro() && $value !== 'none') {
|
76 |
+
$onlyPro = \true;
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
return \true;
|
80 |
+
case \DevOwl\RealCookieBanner\settings\Multisite::SETTING_CONSENT_FORWARDING:
|
81 |
+
if (!$this->isPro() && $value === \true) {
|
82 |
+
$onlyPro = \true;
|
83 |
+
break;
|
84 |
+
}
|
85 |
+
return \true;
|
86 |
+
case \DevOwl\RealCookieBanner\settings\Multisite::SETTING_FORWARD_TO:
|
87 |
+
case \DevOwl\RealCookieBanner\settings\Multisite::SETTING_CROSS_DOMAINS:
|
88 |
+
if (!empty($value)) {
|
89 |
+
if ($this->isPro()) {
|
90 |
+
$this->addMessageOptionMultisite(
|
91 |
+
$optionName === \DevOwl\RealCookieBanner\settings\Multisite::SETTING_FORWARD_TO
|
92 |
+
? __('Forward to', RCB_TD)
|
93 |
+
: __('External \'Forward To\' endpoints', RCB_TD),
|
94 |
+
$key
|
95 |
+
);
|
96 |
+
} else {
|
97 |
+
$onlyPro = \true;
|
98 |
+
}
|
99 |
+
break;
|
100 |
+
}
|
101 |
+
return \true;
|
102 |
+
case \DevOwl\RealCookieBanner\settings\TCF::SETTING_TCF:
|
103 |
+
if ($value === \true) {
|
104 |
+
$this->addMessage(
|
105 |
+
\sprintf(
|
106 |
+
// translators:
|
107 |
+
__(
|
108 |
+
'Setting/Option <code>%1$s</code> (%2$s) cannot be imported because it needs explicit opt-in. Skipped.',
|
109 |
+
RCB_TD
|
110 |
+
),
|
111 |
+
$key,
|
112 |
+
__('enabling TCF-compatibility', RCB_TD)
|
113 |
+
),
|
114 |
+
'warning',
|
115 |
+
'settings',
|
116 |
+
['settingsTab' => 'tcf']
|
117 |
+
);
|
118 |
+
break;
|
119 |
+
}
|
120 |
+
return \true;
|
121 |
+
case \DevOwl\RealCookieBanner\settings\CountryBypass::SETTING_COUNTRY_BYPASS_ACTIVE:
|
122 |
+
if ($value === \true) {
|
123 |
+
$this->addMessage(
|
124 |
+
\sprintf(
|
125 |
+
// translators:
|
126 |
+
__(
|
127 |
+
'Setting/Option <code>%1$s</code> (%2$s) cannot be imported because it needs explicit opt-in. Skipped.',
|
128 |
+
RCB_TD
|
129 |
+
),
|
130 |
+
$key,
|
131 |
+
__('enabling geo-restriction', RCB_TD)
|
132 |
+
),
|
133 |
+
'warning',
|
134 |
+
'settings',
|
135 |
+
['settingsTab' => 'country-bypass']
|
136 |
+
);
|
137 |
+
break;
|
138 |
+
}
|
139 |
+
return \true;
|
140 |
+
default:
|
141 |
+
return \true;
|
142 |
+
}
|
143 |
+
$this->probablyAddMessageSettingOnlyPro($onlyPro, $key);
|
144 |
+
return \false;
|
145 |
+
}
|
146 |
+
}
|
inc/import/ImportTcfVendorConfigurations.php
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\import;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
/**
|
11 |
+
* Trait to handle the importer for TCF Vendor configurations in the `Import` class.
|
12 |
+
*/
|
13 |
+
trait ImportTcfVendorConfigurations {
|
14 |
+
/**
|
15 |
+
* Import TCF Vendor configurations from JSON.
|
16 |
+
*
|
17 |
+
* @param array $tcfVendorConfiguration
|
18 |
+
*/
|
19 |
+
protected function doImportTcfVendorConfigurations($tcfVendorConfiguration) {
|
20 |
+
if (!$this->isPro()) {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
$currentVendors = \DevOwl\RealCookieBanner\import\Export::instance()
|
24 |
+
->appendTcfVendorConfigurations()
|
25 |
+
->finish()['tcfVendorConfigurations'];
|
26 |
+
$tcfVendorConfigurationStatus = $this->getTcfVendorConfigurationStatus();
|
27 |
+
foreach ($tcfVendorConfiguration as $index => $tcfVendorConfiguration) {
|
28 |
+
if (!$this->handleCorruptTcfVendorConfiguration($tcfVendorConfiguration, $index)) {
|
29 |
+
continue;
|
30 |
+
}
|
31 |
+
// Collect data
|
32 |
+
$metas = $tcfVendorConfiguration['metas'];
|
33 |
+
$post_name = $tcfVendorConfiguration['post_name'];
|
34 |
+
$vendorId = \intval($metas['vendorId']);
|
35 |
+
$post_status =
|
36 |
+
$tcfVendorConfigurationStatus === 'keep'
|
37 |
+
? $tcfVendorConfiguration['post_status']
|
38 |
+
: $tcfVendorConfigurationStatus;
|
39 |
+
// Save restrictive purposes as plain string in meta as WP 5.0 does not support that yet in REST API
|
40 |
+
if (
|
41 |
+
isset(
|
42 |
+
$metas[
|
43 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::META_NAME_RESTRICTIVE_PURPOSES
|
44 |
+
]
|
45 |
+
)
|
46 |
+
) {
|
47 |
+
$metas[
|
48 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::META_NAME_RESTRICTIVE_PURPOSES
|
49 |
+
] = \json_encode(
|
50 |
+
$metas[
|
51 |
+
\DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::META_NAME_RESTRICTIVE_PURPOSES
|
52 |
+
]
|
53 |
+
);
|
54 |
+
}
|
55 |
+
// Find current blocker with same vendorId
|
56 |
+
$found = \false;
|
57 |
+
foreach ($currentVendors as $currentVendor) {
|
58 |
+
if ($currentVendor['metas']['vendorId'] === $vendorId) {
|
59 |
+
$found = $currentVendor;
|
60 |
+
break;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
// A TCF Vendor configuration can only exist once for each vendor
|
64 |
+
if ($found) {
|
65 |
+
$this->addMessageSkipExistingTcfVendorConfiguration($vendorId);
|
66 |
+
continue;
|
67 |
+
}
|
68 |
+
// Always create the entry
|
69 |
+
$create = wp_insert_post(
|
70 |
+
[
|
71 |
+
'post_type' => \DevOwl\RealCookieBanner\lite\settings\TcfVendorConfiguration::CPT_NAME,
|
72 |
+
'post_status' => $post_status,
|
73 |
+
'meta_input' => $metas
|
74 |
+
],
|
75 |
+
\true
|
76 |
+
);
|
77 |
+
if (is_wp_error($create)) {
|
78 |
+
$this->addMessageCreateFailure($vendorId, __('TCF Vendor', RCB_TD), $create);
|
79 |
+
continue;
|
80 |
+
} else {
|
81 |
+
$this->mapTcfVendorConfigurations[$post_name] = get_post($create)->ID;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
/**
|
86 |
+
* Check missing meta of passed configuration.
|
87 |
+
*
|
88 |
+
* @param array $tcfVendorConfiguration
|
89 |
+
* @param int $index
|
90 |
+
*/
|
91 |
+
protected function handleCorruptTcfVendorConfiguration($tcfVendorConfiguration, $index) {
|
92 |
+
if (
|
93 |
+
!isset($tcfVendorConfiguration['metas'], $tcfVendorConfiguration['post_status']) ||
|
94 |
+
!isset($tcfVendorConfiguration['metas']['vendorId'])
|
95 |
+
) {
|
96 |
+
$this->addMessageMissingProperties(
|
97 |
+
$index,
|
98 |
+
__('TCF Vendor configuration', RCB_TD),
|
99 |
+
'metas.[vendorId], post_status'
|
100 |
+
);
|
101 |
+
return \false;
|
102 |
+
}
|
103 |
+
return \true;
|
104 |
+
}
|
105 |
+
}
|
inc/import/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/overrides/interfce/IOverrideCore.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\ICore;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
interface IOverrideCore extends \DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\ICore {
|
11 |
+
/**
|
12 |
+
* Extend constructor.
|
13 |
+
*/
|
14 |
+
public function overrideConstruct();
|
15 |
+
/**
|
16 |
+
* Register additional settings.
|
17 |
+
*/
|
18 |
+
public function overrideRegisterSettings();
|
19 |
+
/**
|
20 |
+
* Additional init.
|
21 |
+
*/
|
22 |
+
public function overrideInit();
|
23 |
+
}
|
inc/overrides/interfce/IOverrideStats.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
interface IOverrideStats {
|
10 |
+
/**
|
11 |
+
* Get the main stats (e. g. use in bar chart).
|
12 |
+
*
|
13 |
+
* @param string $from
|
14 |
+
* @param string $to
|
15 |
+
* @param string $context
|
16 |
+
* @return array|WP_Error
|
17 |
+
*/
|
18 |
+
public function fetchMainStats($from, $to, $context);
|
19 |
+
/**
|
20 |
+
* Get the "Buttons clicked" stats (e. g. use in pie chart).
|
21 |
+
*
|
22 |
+
* @param string $from
|
23 |
+
* @param string $to
|
24 |
+
* @param string $context
|
25 |
+
* @return array|WP_Error
|
26 |
+
*/
|
27 |
+
public function fetchButtonsClickedStats($from, $to, $context);
|
28 |
+
/**
|
29 |
+
* Get the "Do not track" stats (e. g. use in pie chart) and other custom bypass.
|
30 |
+
* The result `none` is similar to "banner got shown to user".
|
31 |
+
*
|
32 |
+
* @param string $from
|
33 |
+
* @param string $to
|
34 |
+
* @param string $context
|
35 |
+
* @return array|WP_Error
|
36 |
+
*/
|
37 |
+
public function fetchCustomBypassStats($from, $to, $context);
|
38 |
+
}
|
inc/overrides/interfce/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/overrides/interfce/settings/IOverrideConsent.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
interface IOverrideConsent {
|
10 |
+
/**
|
11 |
+
* Initially add PRO-only options.
|
12 |
+
*/
|
13 |
+
public function overrideEnableOptionsAutoload();
|
14 |
+
/**
|
15 |
+
* Register PRO-only options.
|
16 |
+
*/
|
17 |
+
public function overrideRegister();
|
18 |
+
/**
|
19 |
+
* Check if ePrivacy hints for USA is enabled
|
20 |
+
*
|
21 |
+
* @return boolean
|
22 |
+
*/
|
23 |
+
public function isEPrivacyUSAEnabled();
|
24 |
+
}
|
inc/overrides/interfce/settings/IOverrideCountryBypass.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce\settings;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
interface IOverrideCountryBypass {
|
11 |
+
/**
|
12 |
+
* Initially add PRO-only options.
|
13 |
+
*/
|
14 |
+
public function overrideEnableOptionsAutoload();
|
15 |
+
/**
|
16 |
+
* Register PRO-only options.
|
17 |
+
*/
|
18 |
+
public function overrideRegister();
|
19 |
+
/**
|
20 |
+
* If we need to update the location database (scheduled), let's do this.
|
21 |
+
*/
|
22 |
+
public function probablyUpdateDatabase();
|
23 |
+
/**
|
24 |
+
* Update the IP database and persist to our own database.
|
25 |
+
*
|
26 |
+
* @param boolean $force Skip `isActive` check and download immediate
|
27 |
+
* @return true|WP_Error
|
28 |
+
*/
|
29 |
+
public function updateDatabase($force = \false);
|
30 |
+
/**
|
31 |
+
* Completely clear all database tables.
|
32 |
+
*/
|
33 |
+
public function clearDatabase();
|
34 |
+
/**
|
35 |
+
* Check if compatibility is enabled.
|
36 |
+
*
|
37 |
+
* @return boolean
|
38 |
+
*/
|
39 |
+
public function isActive();
|
40 |
+
/**
|
41 |
+
* Get the list of countries where the banner should be shown (ISO 3166-1 alpha2).
|
42 |
+
*
|
43 |
+
* @return string[]
|
44 |
+
*/
|
45 |
+
public function getCountries();
|
46 |
+
/**
|
47 |
+
* Get the type for the Country Bypass. Can be `all` or `essentials` (see class constants).
|
48 |
+
*
|
49 |
+
* @return string
|
50 |
+
*/
|
51 |
+
public function getType();
|
52 |
+
/**
|
53 |
+
* Check when the database got downloaded at latest.
|
54 |
+
*
|
55 |
+
* @return string|null
|
56 |
+
*/
|
57 |
+
public function getDatabaseDownloadTime();
|
58 |
+
}
|
inc/overrides/interfce/settings/IOverrideGeneral.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
interface IOverrideGeneral {
|
10 |
+
/**
|
11 |
+
* Initially add PRO-only options.
|
12 |
+
*/
|
13 |
+
public function overrideEnableOptionsAutoload();
|
14 |
+
/**
|
15 |
+
* Register PRO-only options.
|
16 |
+
*/
|
17 |
+
public function overrideRegister();
|
18 |
+
/**
|
19 |
+
* Get an array of hidden page ids (not imprint and privacy policy, there are own options!).
|
20 |
+
*
|
21 |
+
* @return int[]
|
22 |
+
*/
|
23 |
+
public function getAdditionalPageHideIds();
|
24 |
+
/**
|
25 |
+
* Get the option "Load services after consent via".
|
26 |
+
*
|
27 |
+
* @return string
|
28 |
+
*/
|
29 |
+
public function getSetCookiesViaManager();
|
30 |
+
}
|
inc/overrides/interfce/settings/IOverrideMultisite.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
interface IOverrideMultisite {
|
10 |
+
/**
|
11 |
+
* Initially add PRO-only options.
|
12 |
+
*/
|
13 |
+
public function overrideEnableOptionsAutoload();
|
14 |
+
/**
|
15 |
+
* Register PRO-only options.
|
16 |
+
*/
|
17 |
+
public function overrideRegister();
|
18 |
+
/**
|
19 |
+
* Check if consent is aggregated.
|
20 |
+
*
|
21 |
+
* @return boolean
|
22 |
+
*/
|
23 |
+
public function isConsentForwarding();
|
24 |
+
/**
|
25 |
+
* Get forward to URLs.
|
26 |
+
*
|
27 |
+
* @return string[]|false
|
28 |
+
*/
|
29 |
+
public function getForwardTo();
|
30 |
+
/**
|
31 |
+
* Get consent aggregation cross domains.
|
32 |
+
*
|
33 |
+
* @return string[]|false
|
34 |
+
*/
|
35 |
+
public function getCrossDomains();
|
36 |
+
}
|
inc/overrides/interfce/settings/IOverrideTCF.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\overrides\interfce\settings;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
interface IOverrideTCF {
|
11 |
+
/**
|
12 |
+
* Initially add PRO-only options.
|
13 |
+
*/
|
14 |
+
public function overrideEnableOptionsAutoload();
|
15 |
+
/**
|
16 |
+
* Register PRO-only options.
|
17 |
+
*/
|
18 |
+
public function overrideRegister();
|
19 |
+
/**
|
20 |
+
* If we need to update the GVL (scheduled), let's do this.
|
21 |
+
*/
|
22 |
+
public function probablyUpdateGvl();
|
23 |
+
/**
|
24 |
+
* Update the GVL `vendor-list` and persist to database.
|
25 |
+
*
|
26 |
+
* @param boolean $force Skip `isActive` check and download immediate
|
27 |
+
* @return true|WP_Error
|
28 |
+
*/
|
29 |
+
public function updateGvl($force = \false);
|
30 |
+
/**
|
31 |
+
* Completely clear all database tables for GVL.
|
32 |
+
*/
|
33 |
+
public function clearGvl();
|
34 |
+
/**
|
35 |
+
* Check if compatibility is enabled.
|
36 |
+
*
|
37 |
+
* @return boolean
|
38 |
+
*/
|
39 |
+
public function isActive();
|
40 |
+
/**
|
41 |
+
* Get publisher country code.
|
42 |
+
*
|
43 |
+
* @return string
|
44 |
+
*/
|
45 |
+
public function getPublisherCountryCode();
|
46 |
+
/**
|
47 |
+
* Check when the compatibility got enabled the first time.
|
48 |
+
*
|
49 |
+
* @return string|null
|
50 |
+
*/
|
51 |
+
public function getFirstAcceptedTime();
|
52 |
+
/**
|
53 |
+
* Check when the compatibility got enabled.
|
54 |
+
*
|
55 |
+
* @return string|null
|
56 |
+
*/
|
57 |
+
public function getAcceptedTime();
|
58 |
+
/**
|
59 |
+
* Check when the GVL got downloaded at latest.
|
60 |
+
*
|
61 |
+
* @return string|null
|
62 |
+
*/
|
63 |
+
public function getGvlDownloadTime();
|
64 |
+
/**
|
65 |
+
* Get scope of consent.
|
66 |
+
*
|
67 |
+
* @return string Can be `service`
|
68 |
+
*/
|
69 |
+
public function getScopeOfConsent();
|
70 |
+
}
|
inc/overrides/interfce/settings/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/overrides/lite/Core.php
ADDED
@@ -0,0 +1,672 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\DevOwl\Freemium\CoreLite;
|
6 |
+
use DevOwl\RealCookieBanner\lite\rest\Service;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
use DevOwl\RealCookieBanner\presets\pro\ActiveCampaignSiteTrackingPreset;
|
9 |
+
use DevOwl\RealCookieBanner\presets\pro\AddThisPreset;
|
10 |
+
use DevOwl\RealCookieBanner\presets\pro\AddToAnyPreset;
|
11 |
+
use DevOwl\RealCookieBanner\presets\pro\AdInserterPreset;
|
12 |
+
use DevOwl\RealCookieBanner\presets\pro\AdobeTypekitPreset;
|
13 |
+
use DevOwl\RealCookieBanner\presets\pro\AmazonAssociatesWidgetPreset;
|
14 |
+
use DevOwl\RealCookieBanner\presets\pro\AnalytifyPreset;
|
15 |
+
use DevOwl\RealCookieBanner\presets\pro\AnchorFmPreset;
|
16 |
+
use DevOwl\RealCookieBanner\presets\pro\AppleMusicPreset;
|
17 |
+
use DevOwl\RealCookieBanner\presets\pro\AwinLinkImageAdsPreset;
|
18 |
+
use DevOwl\RealCookieBanner\presets\pro\AwinPublisherMasterTagPreset;
|
19 |
+
use DevOwl\RealCookieBanner\presets\pro\BingAdsPreset;
|
20 |
+
use DevOwl\RealCookieBanner\presets\pro\BingMapsPreset;
|
21 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ActiveCampaignFormPreset;
|
22 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ActiveCampaignSiteTrackingPreset as BlockerActiveCampaignSiteTrackingPreset;
|
23 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AddThisPreset as BlockerAddThisPreset;
|
24 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AddToAnyPreset as BlockerAddToAnyPreset;
|
25 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AdInserterPreset as BlockerAdInserterPreset;
|
26 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AdobeTypekitPreset as BlockerAdobeTypekitPreset;
|
27 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AnalytifyPreset as BlockerAnalytifyPreset;
|
28 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AnchorFmPreset as BlockerAnchorFmPreset;
|
29 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AppleMusicPreset as BlockerAppleMusicPreset;
|
30 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AwinLinkImageAdsPreset as BlockerAwinLinkImageAdsPreset;
|
31 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\BingMapsPreset as BlockerBingMapsPreset;
|
32 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\BloomPreset as BlockerBloomPreset;
|
33 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\CalderaFormsPreset;
|
34 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\CalendlyPreset as BlockerCalendlyPreset;
|
35 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\CleverReachRecaptchaPreset;
|
36 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ContactForm7RecaptchaPreset;
|
37 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ConvertKitPreset as BlockerConvertKitPreset;
|
38 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\CustomFacebookFeedPreset as BlockerCustomFacebookFeedPreset;
|
39 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\CustomTwitterFeedPreset as BlockerCustomTwitterFeedPreset;
|
40 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\DailyMotionPreset as BlockerDailyMotionPreset;
|
41 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\DiscordWidgetPreset as BlockerDiscordWidgetPreset;
|
42 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ElementorFormsPreset;
|
43 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ExactMetricsPreset as BlockerExactMetricsPreset;
|
44 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookForWooCommercePreset as BlockerFacebookForWooCommercePreset;
|
45 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookLikePreset as BlockerFacebookLikePreset;
|
46 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPagePluginPreset as BlockerFacebookPagePluginPreset;
|
47 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPixelPreset as BlockerFacebookPixelPreset;
|
48 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPostPreset as BlockerFacebookPostPreset;
|
49 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FacebookSharePreset as BlockerFacebookSharePreset;
|
50 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FeedsForYoutubePreset as BlockerFeedsForYoutubePreset;
|
51 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FlickrPreset as BlockerFlickrPreset;
|
52 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FormidablePreset;
|
53 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FormMakerRecaptchaPreset;
|
54 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GAGoogleAnalytics4Preset as BlockerGAGoogleAnalytics4Preset;
|
55 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GAGoogleAnalyticsPreset as BlockerGAGoogleAnalyticsPreset;
|
56 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GetYourGuidePreset as BlockerGetYourGuidePreset;
|
57 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GiphyPreset as BlockerGiphyPreset;
|
58 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAnalytics4Preset as BlockerGoogleAnalytics4Preset;
|
59 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAnalyticsPreset as BlockerGoogleAnalyticsPreset;
|
60 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleMapsPreset as BlockerGoogleMapsPreset;
|
61 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleRecaptchaPreset as BlockerGoogleRecaptchaPreset;
|
62 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleTranslatePreset as BlockerGoogleTranslatePreset;
|
63 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleTrendsPreset as BlockerGoogleTrendsPreset;
|
64 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\HotjarPreset as BlockerHotjarPreset;
|
65 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ImgurPreset as BlockerImgurPreset;
|
66 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\InstagramPostPreset as BlockerInstagramPostPreset;
|
67 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\IntercomChatPreset as BlockerIntercomChatPreset;
|
68 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\IssuuPreset as BlockerIssuuPreset;
|
69 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\LinkedInAdsPreset as BlockerLinkedInAdsPreset;
|
70 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\LoomPreset as BlockerLoomPreset;
|
71 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MailchimpForWooCommercePreset as BlockerMailchimpForWooCommercePreset;
|
72 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MailerLitePreset as BlockerMailerLitePreset;
|
73 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MailPoetPreset as BlockerMailPoetPreset;
|
74 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MatomoIntegrationPluginPreset as BlockerMatomoIntegrationPluginPreset;
|
75 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MatomoPluginPreset as BlockerMatomoPluginPreset;
|
76 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MetricoolPreset as BlockerMetricoolPreset;
|
77 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MicrosoftClarityPreset as BlockerMicrosoftClarityPreset;
|
78 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MonsterInsightsPreset as BlockerMonsterInsightsPreset;
|
79 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MouseflowPreset as BlockerMouseflowPreset;
|
80 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MyCruiseExcursionPreset as BlockerMyCruiseExcursionPreset;
|
81 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MyFontsPreset as BlockerMyFontsPreset;
|
82 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\NinjaFormsPreset;
|
83 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\OpenStreetMapPreset as BlockerOpenStreetMapPreset;
|
84 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\PinterestPreset as BlockerPinterestPreset;
|
85 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\PinterestTagPreset as BlockerPinterestTagPreset;
|
86 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\PodigeePreset as BlockerPodigeePreset;
|
87 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\PopupMakerPreset as BlockerPopupMakerPreset;
|
88 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ProvenExpertWidgetPreset as BlockerProvenExpertWidgetPreset;
|
89 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\QuformRecaptchaPreset;
|
90 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\RankMathGAPreset as BlockerRankMathGAPreset;
|
91 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\RedditPreset as BlockerRedditPreset;
|
92 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\SendinbluePreset as BlockerSendinbluePreset;
|
93 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\SmashBalloonSocialPhotoFeedPreset as BlockerSmashBalloonSocialPhotoFeedPreset;
|
94 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\SoundCloudPreset as BlockerSoundCloudPreset;
|
95 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\SpotifyPreset as BlockerSpotifyPreset;
|
96 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TaboolaPreset as BlockerTaboolaPreset;
|
97 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TawkToChatPreset as BlockerTawkToChatPreset;
|
98 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ThriveLeadsPreset as BlockerThriveLeadsPreset;
|
99 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TidioChatPreset as BlockerTidioChatPreset;
|
100 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TikTokPreset as BlockerTikTokPreset;
|
101 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TwitterTweetPreset as BlockerTwitterTweetPreset;
|
102 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TypeformPreset as BlockerTypeformPreset;
|
103 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\UserlikePreset as BlockerUserlikePreset;
|
104 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\VGWortPreset as BlockerVGWortPreset;
|
105 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\VimeoPreset as BlockerVimeoPreset;
|
106 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\WooCommerceGoogleAnalytics4Preset as BlockerWooCommerceGoogleAnalytics4Preset;
|
107 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\WooCommerceGoogleAnalyticsPreset as BlockerWooCommerceGoogleAnalyticsPreset;
|
108 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\WPFormsPreset;
|
109 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\XingEventsPreset as BlockerXingEventsPreset;
|
110 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\YandexMetricaPreset as BlockerYandexMetricaPreset;
|
111 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ZendeskChatPreset as BlockerZendeskChatPreset;
|
112 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ZohoBookingsPreset as BlockerZohoBookingsPreset;
|
113 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ZohoFormsPreset as BlockerZohoFormsPreset;
|
114 |
+
use DevOwl\RealCookieBanner\presets\pro\BloomPreset;
|
115 |
+
use DevOwl\RealCookieBanner\presets\pro\CalendlyPreset;
|
116 |
+
use DevOwl\RealCookieBanner\presets\pro\CleanTalkSpamProtectPreset;
|
117 |
+
use DevOwl\RealCookieBanner\presets\pro\CloudflarePreset;
|
118 |
+
use DevOwl\RealCookieBanner\presets\pro\ConvertKitPreset;
|
119 |
+
use DevOwl\RealCookieBanner\presets\pro\CustomFacebookFeedPreset;
|
120 |
+
use DevOwl\RealCookieBanner\presets\pro\CustomTwitterFeedPreset;
|
121 |
+
use DevOwl\RealCookieBanner\presets\pro\DailyMotionPreset;
|
122 |
+
use DevOwl\RealCookieBanner\presets\pro\DiscordWidgetPreset;
|
123 |
+
use DevOwl\RealCookieBanner\presets\pro\ExactMetricsPreset;
|
124 |
+
use DevOwl\RealCookieBanner\presets\pro\EzoicEssentialPreset;
|
125 |
+
use DevOwl\RealCookieBanner\presets\pro\EzoicMarketingPreset;
|
126 |
+
use DevOwl\RealCookieBanner\presets\pro\EzoicPreferencesPreset;
|
127 |
+
use DevOwl\RealCookieBanner\presets\pro\EzoicStatisticPreset;
|
128 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookForWooCommercePreset;
|
129 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookLikePreset;
|
130 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookPagePluginPreset;
|
131 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookPixelPreset;
|
132 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookPostPreset;
|
133 |
+
use DevOwl\RealCookieBanner\presets\pro\FacebookSharePreset;
|
134 |
+
use DevOwl\RealCookieBanner\presets\pro\FeedsForYoutubePreset;
|
135 |
+
use DevOwl\RealCookieBanner\presets\pro\FlickrPreset;
|
136 |
+
use DevOwl\RealCookieBanner\presets\pro\FoundEePreset;
|
137 |
+
use DevOwl\RealCookieBanner\presets\pro\FreshchatPreset;
|
138 |
+
use DevOwl\RealCookieBanner\presets\pro\GAGoogleAnalytics4Preset;
|
139 |
+
use DevOwl\RealCookieBanner\presets\pro\GAGoogleAnalyticsPreset;
|
140 |
+
use DevOwl\RealCookieBanner\presets\pro\GetYourGuidePreset;
|
141 |
+
use DevOwl\RealCookieBanner\presets\pro\GiphyPreset;
|
142 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleAds;
|
143 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleAdSensePreset;
|
144 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleAnalytics4Preset;
|
145 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleAnalyticsPreset;
|
146 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleMapsPreset;
|
147 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleRecaptchaPreset;
|
148 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleTranslatePreset;
|
149 |
+
use DevOwl\RealCookieBanner\presets\pro\GoogleTrendsPreset;
|
150 |
+
use DevOwl\RealCookieBanner\presets\pro\GtmPreset;
|
151 |
+
use DevOwl\RealCookieBanner\presets\pro\HCaptchaPreset;
|
152 |
+
use DevOwl\RealCookieBanner\presets\pro\HelpCrunchChatPreset;
|
153 |
+
use DevOwl\RealCookieBanner\presets\pro\HelpScoutChatPreset;
|
154 |
+
use DevOwl\RealCookieBanner\presets\pro\HotjarPreset;
|
155 |
+
use DevOwl\RealCookieBanner\presets\pro\ImgurPreset;
|
156 |
+
use DevOwl\RealCookieBanner\presets\pro\InstagramPostPreset;
|
157 |
+
use DevOwl\RealCookieBanner\presets\pro\IntercomChatPreset;
|
158 |
+
use DevOwl\RealCookieBanner\presets\pro\IssuuPreset;
|
159 |
+
use DevOwl\RealCookieBanner\presets\pro\KlarnaCheckoutWooCommercePreset;
|
160 |
+
use DevOwl\RealCookieBanner\presets\pro\LinkedInAdsPreset;
|
161 |
+
use DevOwl\RealCookieBanner\presets\pro\LoomPreset;
|
162 |
+
use DevOwl\RealCookieBanner\presets\pro\LuckyOrangePreset;
|
163 |
+
use DevOwl\RealCookieBanner\presets\pro\MailchimpForWooCommercePreset;
|
164 |
+
use DevOwl\RealCookieBanner\presets\pro\MailerLitePreset;
|
165 |
+
use DevOwl\RealCookieBanner\presets\pro\MailPoetPreset;
|
166 |
+
use DevOwl\RealCookieBanner\presets\pro\MatomoIntegrationPluginPreset;
|
167 |
+
use DevOwl\RealCookieBanner\presets\pro\MatomoPluginPreset;
|
168 |
+
use DevOwl\RealCookieBanner\presets\pro\MatomoPreset;
|
169 |
+
use DevOwl\RealCookieBanner\presets\pro\MetricoolPreset;
|
170 |
+
use DevOwl\RealCookieBanner\presets\pro\MicrosoftClarityPreset;
|
171 |
+
use DevOwl\RealCookieBanner\presets\pro\MonsterInsightsPreset;
|
172 |
+
use DevOwl\RealCookieBanner\presets\pro\MouseflowPreset;
|
173 |
+
use DevOwl\RealCookieBanner\presets\pro\MtmPreset;
|
174 |
+
use DevOwl\RealCookieBanner\presets\pro\MyCruiseExcursionPreset;
|
175 |
+
use DevOwl\RealCookieBanner\presets\pro\MyFontsPreset;
|
176 |
+
use DevOwl\RealCookieBanner\presets\pro\OpenStreetMapPreset;
|
177 |
+
use DevOwl\RealCookieBanner\presets\pro\PaddleComPreset;
|
178 |
+
use DevOwl\RealCookieBanner\presets\pro\PinterestPreset;
|
179 |
+
use DevOwl\RealCookieBanner\presets\pro\PinterestTagPreset;
|
180 |
+
use DevOwl\RealCookieBanner\presets\pro\PodigeePreset;
|
181 |
+
use DevOwl\RealCookieBanner\presets\pro\PolyLangPreset;
|
182 |
+
use DevOwl\RealCookieBanner\presets\pro\PopupMakerPreset;
|
183 |
+
use DevOwl\RealCookieBanner\presets\pro\ProvenExpertWidgetPreset;
|
184 |
+
use DevOwl\RealCookieBanner\presets\pro\QuformPreset;
|
185 |
+
use DevOwl\RealCookieBanner\presets\pro\RankMathGAPreset;
|
186 |
+
use DevOwl\RealCookieBanner\presets\pro\ReamazeChatPreset;
|
187 |
+
use DevOwl\RealCookieBanner\presets\pro\RedditPreset;
|
188 |
+
use DevOwl\RealCookieBanner\presets\pro\SendinbluePreset;
|
189 |
+
use DevOwl\RealCookieBanner\presets\pro\SmashBalloonSocialPhotoFeedPreset;
|
190 |
+
use DevOwl\RealCookieBanner\presets\pro\SoundCloudPreset;
|
191 |
+
use DevOwl\RealCookieBanner\presets\pro\SpotifyPreset;
|
192 |
+
use DevOwl\RealCookieBanner\presets\pro\StripePreset;
|
193 |
+
use DevOwl\RealCookieBanner\presets\pro\TaboolaPreset;
|
194 |
+
use DevOwl\RealCookieBanner\presets\pro\TawkToChatPreset;
|
195 |
+
use DevOwl\RealCookieBanner\presets\pro\ThriveLeadsPreset;
|
196 |
+
use DevOwl\RealCookieBanner\presets\pro\TidioChatPreset;
|
197 |
+
use DevOwl\RealCookieBanner\presets\pro\TikTokPixelPreset;
|
198 |
+
use DevOwl\RealCookieBanner\presets\pro\TikTokPreset;
|
199 |
+
use DevOwl\RealCookieBanner\presets\pro\TranslatePressPreset;
|
200 |
+
use DevOwl\RealCookieBanner\presets\pro\TwitterTweetPreset;
|
201 |
+
use DevOwl\RealCookieBanner\presets\pro\TypeformPreset;
|
202 |
+
use DevOwl\RealCookieBanner\presets\pro\UltimateMemberPreset;
|
203 |
+
use DevOwl\RealCookieBanner\presets\pro\UserlikePreset;
|
204 |
+
use DevOwl\RealCookieBanner\presets\pro\VGWortPreset;
|
205 |
+
use DevOwl\RealCookieBanner\presets\pro\VimeoPreset;
|
206 |
+
use DevOwl\RealCookieBanner\presets\pro\WooCommerceGatewayStripePreset;
|
207 |
+
use DevOwl\RealCookieBanner\presets\pro\WooCommerceGoogleAnalytics4Preset;
|
208 |
+
use DevOwl\RealCookieBanner\presets\pro\WooCommerceGoogleAnalyticsPreset;
|
209 |
+
use DevOwl\RealCookieBanner\presets\pro\WooCommercePreset;
|
210 |
+
use DevOwl\RealCookieBanner\presets\pro\WordfencePreset;
|
211 |
+
use DevOwl\RealCookieBanner\presets\pro\WPMLPreset;
|
212 |
+
use DevOwl\RealCookieBanner\presets\pro\XingEventsPreset;
|
213 |
+
use DevOwl\RealCookieBanner\presets\pro\YandexMetricaPreset;
|
214 |
+
use DevOwl\RealCookieBanner\presets\pro\ZendeskChatPreset;
|
215 |
+
use DevOwl\RealCookieBanner\presets\pro\ZohoBookingsPreset;
|
216 |
+
use DevOwl\RealCookieBanner\presets\pro\ZohoFormsPreset;
|
217 |
+
// @codeCoverageIgnoreStart
|
218 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
219 |
+
// Avoid direct file request
|
220 |
+
// @codeCoverageIgnoreEnd
|
221 |
+
trait Core {
|
222 |
+
use CoreLite;
|
223 |
+
// Documented in IOverrideCore
|
224 |
+
public function overrideConstruct() {
|
225 |
+
add_filter('RCB/Presets/Cookies', [$this, 'createProCookiePresets']);
|
226 |
+
add_filter('RCB/Presets/Blocker', [$this, 'createProBlockerPresets']);
|
227 |
+
}
|
228 |
+
// Documented in IOverrideCore
|
229 |
+
public function overrideRegisterSettings() {
|
230 |
+
// Silence is golden.
|
231 |
+
}
|
232 |
+
// Documented in IOverrideCore
|
233 |
+
public function overrideInit() {
|
234 |
+
add_action('rest_api_init', [\DevOwl\RealCookieBanner\lite\rest\Service::instance(), 'rest_api_init']);
|
235 |
+
}
|
236 |
+
/**
|
237 |
+
* Create PRO-specific cookie presets.
|
238 |
+
*
|
239 |
+
* @param array $result
|
240 |
+
*/
|
241 |
+
public function createProCookiePresets($result) {
|
242 |
+
return \array_merge($result, [
|
243 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CLOUDFLARE =>
|
244 |
+
\DevOwl\RealCookieBanner\presets\pro\CloudflarePreset::class,
|
245 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::POLYLANG =>
|
246 |
+
\DevOwl\RealCookieBanner\presets\pro\PolyLangPreset::class,
|
247 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WPML =>
|
248 |
+
\DevOwl\RealCookieBanner\presets\pro\WPMLPreset::class,
|
249 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE =>
|
250 |
+
\DevOwl\RealCookieBanner\presets\pro\WooCommercePreset::class,
|
251 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ULTIMATE_MEMBER =>
|
252 |
+
\DevOwl\RealCookieBanner\presets\pro\UltimateMemberPreset::class,
|
253 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GTM =>
|
254 |
+
\DevOwl\RealCookieBanner\presets\pro\GtmPreset::class,
|
255 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MTM =>
|
256 |
+
\DevOwl\RealCookieBanner\presets\pro\MtmPreset::class,
|
257 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_MAPS =>
|
258 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleMapsPreset::class,
|
259 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_POST =>
|
260 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookPostPreset::class,
|
261 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::INSTAGRAM_POST =>
|
262 |
+
\DevOwl\RealCookieBanner\presets\pro\InstagramPostPreset::class,
|
263 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TWITTER_TWEET =>
|
264 |
+
\DevOwl\RealCookieBanner\presets\pro\TwitterTweetPreset::class,
|
265 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_RECAPTCHA =>
|
266 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleRecaptchaPreset::class,
|
267 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ANALYTICS =>
|
268 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleAnalyticsPreset::class,
|
269 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO =>
|
270 |
+
\DevOwl\RealCookieBanner\presets\pro\MatomoPreset::class,
|
271 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_AD_SENSE =>
|
272 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleAdSensePreset::class,
|
273 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ADS =>
|
274 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleAds::class,
|
275 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_PIXEL =>
|
276 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookPixelPreset::class,
|
277 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_LIKE =>
|
278 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookLikePreset::class,
|
279 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_SHARE =>
|
280 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookSharePreset::class,
|
281 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HOTJAR =>
|
282 |
+
\DevOwl\RealCookieBanner\presets\pro\HotjarPreset::class,
|
283 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AMAZON_ASSOCIATES_WIDGET =>
|
284 |
+
\DevOwl\RealCookieBanner\presets\pro\AmazonAssociatesWidgetPreset::class,
|
285 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::INTERCOM_CHAT =>
|
286 |
+
\DevOwl\RealCookieBanner\presets\pro\IntercomChatPreset::class,
|
287 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZENDESK_CHAT =>
|
288 |
+
\DevOwl\RealCookieBanner\presets\pro\ZendeskChatPreset::class,
|
289 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FRESHCHAT =>
|
290 |
+
\DevOwl\RealCookieBanner\presets\pro\FreshchatPreset::class,
|
291 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HELP_CRUNCH_CHAT =>
|
292 |
+
\DevOwl\RealCookieBanner\presets\pro\HelpCrunchChatPreset::class,
|
293 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HELP_SCOUT_CHAT =>
|
294 |
+
\DevOwl\RealCookieBanner\presets\pro\HelpScoutChatPreset::class,
|
295 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIDIO_CHAT =>
|
296 |
+
\DevOwl\RealCookieBanner\presets\pro\TidioChatPreset::class,
|
297 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TAWK_TO_CHAT =>
|
298 |
+
\DevOwl\RealCookieBanner\presets\pro\TawkToChatPreset::class,
|
299 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REAMAZE_CHAT =>
|
300 |
+
\DevOwl\RealCookieBanner\presets\pro\ReamazeChatPreset::class,
|
301 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PINTEREST =>
|
302 |
+
\DevOwl\RealCookieBanner\presets\pro\PinterestPreset::class,
|
303 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::IMGUR =>
|
304 |
+
\DevOwl\RealCookieBanner\presets\pro\ImgurPreset::class,
|
305 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_TRANSLATE =>
|
306 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleTranslatePreset::class,
|
307 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADOBE_TYPEKIT =>
|
308 |
+
\DevOwl\RealCookieBanner\presets\pro\AdobeTypekitPreset::class,
|
309 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_PAGE_PLUGIN =>
|
310 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookPagePluginPreset::class,
|
311 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FLICKR =>
|
312 |
+
\DevOwl\RealCookieBanner\presets\pro\FlickrPreset::class,
|
313 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::VG_WORT =>
|
314 |
+
\DevOwl\RealCookieBanner\presets\pro\VGWortPreset::class,
|
315 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PADDLE_COM =>
|
316 |
+
\DevOwl\RealCookieBanner\presets\pro\PaddleComPreset::class,
|
317 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ANALYTICS_4 =>
|
318 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleAnalytics4Preset::class,
|
319 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MICROSOFT_CLARITY =>
|
320 |
+
\DevOwl\RealCookieBanner\presets\pro\MicrosoftClarityPreset::class,
|
321 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_TRENDS =>
|
322 |
+
\DevOwl\RealCookieBanner\presets\pro\GoogleTrendsPreset::class,
|
323 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZOHO_BOOKINGS =>
|
324 |
+
\DevOwl\RealCookieBanner\presets\pro\ZohoBookingsPreset::class,
|
325 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZOHO_FORMS =>
|
326 |
+
\DevOwl\RealCookieBanner\presets\pro\ZohoFormsPreset::class,
|
327 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_TO_ANY =>
|
328 |
+
\DevOwl\RealCookieBanner\presets\pro\AddToAnyPreset::class,
|
329 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::APPLE_MUSIC =>
|
330 |
+
\DevOwl\RealCookieBanner\presets\pro\AppleMusicPreset::class,
|
331 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANCHOR_FM =>
|
332 |
+
\DevOwl\RealCookieBanner\presets\pro\AnchorFmPreset::class,
|
333 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SPOTIFY =>
|
334 |
+
\DevOwl\RealCookieBanner\presets\pro\SpotifyPreset::class,
|
335 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REDDIT =>
|
336 |
+
\DevOwl\RealCookieBanner\presets\pro\RedditPreset::class,
|
337 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIKTOK =>
|
338 |
+
\DevOwl\RealCookieBanner\presets\pro\TikTokPreset::class,
|
339 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BING_MAPS =>
|
340 |
+
\DevOwl\RealCookieBanner\presets\pro\BingMapsPreset::class,
|
341 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_THIS =>
|
342 |
+
\DevOwl\RealCookieBanner\presets\pro\AddThisPreset::class,
|
343 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ACTIVE_CAMPAIGN_SITE_TRACKING =>
|
344 |
+
\DevOwl\RealCookieBanner\presets\pro\ActiveCampaignSiteTrackingPreset::class,
|
345 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::DISCORD_WIDGET =>
|
346 |
+
\DevOwl\RealCookieBanner\presets\pro\DiscordWidgetPreset::class,
|
347 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MY_FONTS =>
|
348 |
+
\DevOwl\RealCookieBanner\presets\pro\MyFontsPreset::class,
|
349 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PROVEN_EXPERT_WIDGET =>
|
350 |
+
\DevOwl\RealCookieBanner\presets\pro\ProvenExpertWidgetPreset::class,
|
351 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::USERLIKE =>
|
352 |
+
\DevOwl\RealCookieBanner\presets\pro\UserlikePreset::class,
|
353 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MOUSEFLOW =>
|
354 |
+
\DevOwl\RealCookieBanner\presets\pro\MouseflowPreset::class,
|
355 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MONSTERINSIGHTS =>
|
356 |
+
\DevOwl\RealCookieBanner\presets\pro\MonsterInsightsPreset::class,
|
357 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GA_GOOGLE_ANALYTICS =>
|
358 |
+
\DevOwl\RealCookieBanner\presets\pro\GAGoogleAnalyticsPreset::class,
|
359 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GA_GOOGLE_ANALYTICS_4 =>
|
360 |
+
\DevOwl\RealCookieBanner\presets\pro\GAGoogleAnalytics4Preset::class,
|
361 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EXACT_METRICS =>
|
362 |
+
\DevOwl\RealCookieBanner\presets\pro\ExactMetricsPreset::class,
|
363 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANALYTIFY =>
|
364 |
+
\DevOwl\RealCookieBanner\presets\pro\AnalytifyPreset::class,
|
365 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE_GOOGLE_ANALYTICS =>
|
366 |
+
\DevOwl\RealCookieBanner\presets\pro\WooCommerceGoogleAnalyticsPreset::class,
|
367 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE_GOOGLE_ANALYTICS_4 =>
|
368 |
+
\DevOwl\RealCookieBanner\presets\pro\WooCommerceGoogleAnalytics4Preset::class,
|
369 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_FOR_WOOCOMMERCE =>
|
370 |
+
\DevOwl\RealCookieBanner\presets\pro\FacebookForWooCommercePreset::class,
|
371 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO_PLUGIN =>
|
372 |
+
\DevOwl\RealCookieBanner\presets\pro\MatomoPluginPreset::class,
|
373 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::STRIPE =>
|
374 |
+
\DevOwl\RealCookieBanner\presets\pro\StripePreset::class,
|
375 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE_GATEWAY_STRIPE =>
|
376 |
+
\DevOwl\RealCookieBanner\presets\pro\WooCommerceGatewayStripePreset::class,
|
377 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILCHIMP_FOR_WOOCOMMERCE =>
|
378 |
+
\DevOwl\RealCookieBanner\presets\pro\MailchimpForWooCommercePreset::class,
|
379 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LUCKY_ORANGE =>
|
380 |
+
\DevOwl\RealCookieBanner\presets\pro\LuckyOrangePreset::class,
|
381 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CUSTOM_FACEBOOK_FEED =>
|
382 |
+
\DevOwl\RealCookieBanner\presets\pro\CustomFacebookFeedPreset::class,
|
383 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CUSTOM_TWITTER_FEED =>
|
384 |
+
\DevOwl\RealCookieBanner\presets\pro\CustomTwitterFeedPreset::class,
|
385 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FEEDS_FOR_YOUTUBE =>
|
386 |
+
\DevOwl\RealCookieBanner\presets\pro\FeedsForYoutubePreset::class,
|
387 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILERLITE =>
|
388 |
+
\DevOwl\RealCookieBanner\presets\pro\MailerLitePreset::class,
|
389 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CLEANTALK_SPAM_PROTECT =>
|
390 |
+
\DevOwl\RealCookieBanner\presets\pro\CleanTalkSpamProtectPreset::class,
|
391 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDFENCE =>
|
392 |
+
\DevOwl\RealCookieBanner\presets\pro\WordfencePreset::class,
|
393 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TRANSLATEPRESS =>
|
394 |
+
\DevOwl\RealCookieBanner\presets\pro\TranslatePressPreset::class,
|
395 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ISSUU =>
|
396 |
+
\DevOwl\RealCookieBanner\presets\pro\IssuuPreset::class,
|
397 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::KLARNA_CHECKOUT_WOOCOMMERCE =>
|
398 |
+
\DevOwl\RealCookieBanner\presets\pro\KlarnaCheckoutWooCommercePreset::class,
|
399 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::QUFORM =>
|
400 |
+
\DevOwl\RealCookieBanner\presets\pro\QuformPreset::class,
|
401 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PINTEREST_TAG =>
|
402 |
+
\DevOwl\RealCookieBanner\presets\pro\PinterestTagPreset::class,
|
403 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HCAPTCHA =>
|
404 |
+
\DevOwl\RealCookieBanner\presets\pro\HCaptchaPreset::class,
|
405 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BING_ADS =>
|
406 |
+
\DevOwl\RealCookieBanner\presets\pro\BingAdsPreset::class,
|
407 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::YANDEX_METRICA =>
|
408 |
+
\DevOwl\RealCookieBanner\presets\pro\YandexMetricaPreset::class,
|
409 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FOUND_EE =>
|
410 |
+
\DevOwl\RealCookieBanner\presets\pro\FoundEePreset::class,
|
411 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BLOOM =>
|
412 |
+
\DevOwl\RealCookieBanner\presets\pro\BloomPreset::class,
|
413 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TYPEFORM =>
|
414 |
+
\DevOwl\RealCookieBanner\presets\pro\TypeformPreset::class,
|
415 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::RANKMATH_GA =>
|
416 |
+
\DevOwl\RealCookieBanner\presets\pro\RankMathGAPreset::class,
|
417 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::THRIVE_LEADS =>
|
418 |
+
\DevOwl\RealCookieBanner\presets\pro\ThriveLeadsPreset::class,
|
419 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::POPUP_MAKER =>
|
420 |
+
\DevOwl\RealCookieBanner\presets\pro\PopupMakerPreset::class,
|
421 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::METRICOOL =>
|
422 |
+
\DevOwl\RealCookieBanner\presets\pro\MetricoolPreset::class,
|
423 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_ESSENTIAL =>
|
424 |
+
\DevOwl\RealCookieBanner\presets\pro\EzoicEssentialPreset::class,
|
425 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_PREFERENCES =>
|
426 |
+
\DevOwl\RealCookieBanner\presets\pro\EzoicPreferencesPreset::class,
|
427 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_STATISTIC =>
|
428 |
+
\DevOwl\RealCookieBanner\presets\pro\EzoicStatisticPreset::class,
|
429 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EZOIC_MARKETING =>
|
430 |
+
\DevOwl\RealCookieBanner\presets\pro\EzoicMarketingPreset::class,
|
431 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SOUNDCLOUD =>
|
432 |
+
\DevOwl\RealCookieBanner\presets\pro\SoundCloudPreset::class,
|
433 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::VIMEO =>
|
434 |
+
\DevOwl\RealCookieBanner\presets\pro\VimeoPreset::class,
|
435 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::XING_EVENTS =>
|
436 |
+
\DevOwl\RealCookieBanner\presets\pro\XingEventsPreset::class,
|
437 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SENDINBLUE =>
|
438 |
+
\DevOwl\RealCookieBanner\presets\pro\SendinbluePreset::class,
|
439 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_LINK_AND_IMAGE_ADS =>
|
440 |
+
\DevOwl\RealCookieBanner\presets\pro\AwinLinkImageAdsPreset::class,
|
441 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_PUBLISHER_MASTERTAG =>
|
442 |
+
\DevOwl\RealCookieBanner\presets\pro\AwinPublisherMasterTagPreset::class,
|
443 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CONVERTKIT =>
|
444 |
+
\DevOwl\RealCookieBanner\presets\pro\ConvertKitPreset::class,
|
445 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO_INTEGRATION_PLUGIN =>
|
446 |
+
\DevOwl\RealCookieBanner\presets\pro\MatomoIntegrationPluginPreset::class,
|
447 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GETYOURGUIDE =>
|
448 |
+
\DevOwl\RealCookieBanner\presets\pro\GetYourGuidePreset::class,
|
449 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CALENDLY =>
|
450 |
+
\DevOwl\RealCookieBanner\presets\pro\CalendlyPreset::class,
|
451 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MY_CRUISE_EXCURSION =>
|
452 |
+
\DevOwl\RealCookieBanner\presets\pro\MyCruiseExcursionPreset::class,
|
453 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILPOET =>
|
454 |
+
\DevOwl\RealCookieBanner\presets\pro\MailPoetPreset::class,
|
455 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SMASH_BALLOON_SOCIAL_PHOTO_FEED =>
|
456 |
+
\DevOwl\RealCookieBanner\presets\pro\SmashBalloonSocialPhotoFeedPreset::class,
|
457 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PODIGEE =>
|
458 |
+
\DevOwl\RealCookieBanner\presets\pro\PodigeePreset::class,
|
459 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AD_INSERTER =>
|
460 |
+
\DevOwl\RealCookieBanner\presets\pro\AdInserterPreset::class,
|
461 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::DAILYMOTION =>
|
462 |
+
\DevOwl\RealCookieBanner\presets\pro\DailyMotionPreset::class,
|
463 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GIPHY =>
|
464 |
+
\DevOwl\RealCookieBanner\presets\pro\GiphyPreset::class,
|
465 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LINKEDIN_ADS =>
|
466 |
+
\DevOwl\RealCookieBanner\presets\pro\LinkedInAdsPreset::class,
|
467 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LOOM =>
|
468 |
+
\DevOwl\RealCookieBanner\presets\pro\LoomPreset::class,
|
469 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::OPEN_STREET_MAP =>
|
470 |
+
\DevOwl\RealCookieBanner\presets\pro\OpenStreetMapPreset::class,
|
471 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIKTOK_PIXEL =>
|
472 |
+
\DevOwl\RealCookieBanner\presets\pro\TikTokPixelPreset::class,
|
473 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TABOOLA =>
|
474 |
+
\DevOwl\RealCookieBanner\presets\pro\TaboolaPreset::class
|
475 |
+
]);
|
476 |
+
}
|
477 |
+
/**
|
478 |
+
* Create PRO-specific blocker presets.
|
479 |
+
*
|
480 |
+
* @param array $result
|
481 |
+
*/
|
482 |
+
public function createProBlockerPresets($result) {
|
483 |
+
return \array_merge($result, [
|
484 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PINTEREST =>
|
485 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\PinterestPreset::class,
|
486 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::IMGUR =>
|
487 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ImgurPreset::class,
|
488 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_TRANSLATE =>
|
489 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleTranslatePreset::class,
|
490 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_RECAPTCHA =>
|
491 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleRecaptchaPreset::class,
|
492 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADOBE_TYPEKIT =>
|
493 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AdobeTypekitPreset::class,
|
494 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_MAPS =>
|
495 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleMapsPreset::class,
|
496 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TWITTER_TWEET =>
|
497 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TwitterTweetPreset::class,
|
498 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FLICKR =>
|
499 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FlickrPreset::class,
|
500 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::INSTAGRAM_POST =>
|
501 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\InstagramPostPreset::class,
|
502 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_PAGE_PLUGIN =>
|
503 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPagePluginPreset::class,
|
504 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_SHARE =>
|
505 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookSharePreset::class,
|
506 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_LIKE =>
|
507 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookLikePreset::class,
|
508 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_POST =>
|
509 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPostPreset::class,
|
510 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CONTACT_FORM_7_RECAPTCHA =>
|
511 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ContactForm7RecaptchaPreset::class,
|
512 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FORM_MAKER_RECAPTCHA =>
|
513 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FormMakerRecaptchaPreset::class,
|
514 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CALDERA_FORMS_RECAPTCHA =>
|
515 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\CalderaFormsPreset::class,
|
516 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::NINJA_FORMS_RECAPTCHA =>
|
517 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\NinjaFormsPreset::class,
|
518 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WPFORMS_RECAPTCHA =>
|
519 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\WPFormsPreset::class,
|
520 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FORMIDABLE_RECAPTCHA =>
|
521 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FormidablePreset::class,
|
522 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::VG_WORT =>
|
523 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\VGWortPreset::class,
|
524 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_TRENDS =>
|
525 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleTrendsPreset::class,
|
526 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZOHO_BOOKINGS =>
|
527 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ZohoBookingsPreset::class,
|
528 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZOHO_FORMS =>
|
529 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ZohoFormsPreset::class,
|
530 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_TO_ANY =>
|
531 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AddToAnyPreset::class,
|
532 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::APPLE_MUSIC =>
|
533 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AppleMusicPreset::class,
|
534 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANCHOR_FM =>
|
535 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AnchorFmPreset::class,
|
536 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SPOTIFY =>
|
537 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\SpotifyPreset::class,
|
538 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REDDIT =>
|
539 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\RedditPreset::class,
|
540 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIKTOK =>
|
541 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TikTokPreset::class,
|
542 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BING_MAPS =>
|
543 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\BingMapsPreset::class,
|
544 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_THIS =>
|
545 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AddThisPreset::class,
|
546 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ACTIVE_CAMPAIGN_RECAPTCHA =>
|
547 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ActiveCampaignFormPreset::class,
|
548 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::DISCORD_WIDGET =>
|
549 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\DiscordWidgetPreset::class,
|
550 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_PIXEL =>
|
551 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookPixelPreset::class,
|
552 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MY_FONTS =>
|
553 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MyFontsPreset::class,
|
554 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PROVEN_EXPERT_WIDGET =>
|
555 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ProvenExpertWidgetPreset::class,
|
556 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ANALYTICS =>
|
557 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAnalyticsPreset::class,
|
558 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MONSTERINSIGHTS =>
|
559 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MonsterInsightsPreset::class,
|
560 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GA_GOOGLE_ANALYTICS =>
|
561 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GAGoogleAnalyticsPreset::class,
|
562 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::EXACT_METRICS =>
|
563 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ExactMetricsPreset::class,
|
564 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANALYTIFY =>
|
565 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AnalytifyPreset::class,
|
566 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE_GOOGLE_ANALYTICS =>
|
567 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\WooCommerceGoogleAnalyticsPreset::class,
|
568 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FACEBOOK_FOR_WOOCOMMERCE =>
|
569 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FacebookForWooCommercePreset::class,
|
570 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO_PLUGIN =>
|
571 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MatomoPluginPreset::class,
|
572 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILCHIMP_FOR_WOOCOMMERCE =>
|
573 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MailchimpForWooCommercePreset::class,
|
574 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CLEVERREACH_RECAPTCHA =>
|
575 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\CleverReachRecaptchaPreset::class,
|
576 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CUSTOM_FACEBOOK_FEED =>
|
577 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\CustomFacebookFeedPreset::class,
|
578 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CUSTOM_TWITTER_FEED =>
|
579 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\CustomTwitterFeedPreset::class,
|
580 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FEEDS_FOR_YOUTUBE =>
|
581 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FeedsForYoutubePreset::class,
|
582 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILERLITE =>
|
583 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MailerLitePreset::class,
|
584 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::QUFORM =>
|
585 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\QuformRecaptchaPreset::class,
|
586 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ISSUU =>
|
587 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\IssuuPreset::class,
|
588 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PINTEREST_TAG =>
|
589 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\PinterestTagPreset::class,
|
590 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::YANDEX_METRICA =>
|
591 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\YandexMetricaPreset::class,
|
592 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BLOOM =>
|
593 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\BloomPreset::class,
|
594 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TYPEFORM =>
|
595 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TypeformPreset::class,
|
596 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::RANKMATH_GA =>
|
597 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\RankMathGAPreset::class,
|
598 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::THRIVE_LEADS =>
|
599 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ThriveLeadsPreset::class,
|
600 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::POPUP_MAKER =>
|
601 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\PopupMakerPreset::class,
|
602 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::METRICOOL =>
|
603 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MetricoolPreset::class,
|
604 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SOUNDCLOUD =>
|
605 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\SoundCloudPreset::class,
|
606 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::VIMEO =>
|
607 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\VimeoPreset::class,
|
608 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::XING_EVENTS =>
|
609 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\XingEventsPreset::class,
|
610 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SENDINBLUE =>
|
611 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\SendinbluePreset::class,
|
612 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_LINK_AND_IMAGE_ADS =>
|
613 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AwinLinkImageAdsPreset::class,
|
614 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CONVERTKIT =>
|
615 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ConvertKitPreset::class,
|
616 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO_INTEGRATION_PLUGIN =>
|
617 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MatomoIntegrationPluginPreset::class,
|
618 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GETYOURGUIDE =>
|
619 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GetYourGuidePreset::class,
|
620 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::CALENDLY =>
|
621 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\CalendlyPreset::class,
|
622 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MY_CRUISE_EXCURSION =>
|
623 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MyCruiseExcursionPreset::class,
|
624 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MAILPOET =>
|
625 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MailPoetPreset::class,
|
626 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::SMASH_BALLOON_SOCIAL_PHOTO_FEED =>
|
627 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\SmashBalloonSocialPhotoFeedPreset::class,
|
628 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ACTIVE_CAMPAIGN_SITE_TRACKING =>
|
629 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ActiveCampaignSiteTrackingPreset::class,
|
630 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HOTJAR =>
|
631 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\HotjarPreset::class,
|
632 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::INTERCOM_CHAT =>
|
633 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\IntercomChatPreset::class,
|
634 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MICROSOFT_CLARITY =>
|
635 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MicrosoftClarityPreset::class,
|
636 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MOUSEFLOW =>
|
637 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MouseflowPreset::class,
|
638 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TAWK_TO_CHAT =>
|
639 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TawkToChatPreset::class,
|
640 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIDIO_CHAT =>
|
641 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TidioChatPreset::class,
|
642 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::USERLIKE =>
|
643 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\UserlikePreset::class,
|
644 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ZENDESK_CHAT =>
|
645 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ZendeskChatPreset::class,
|
646 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ANALYTICS_4 =>
|
647 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAnalytics4Preset::class,
|
648 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GA_GOOGLE_ANALYTICS_4 =>
|
649 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GAGoogleAnalytics4Preset::class,
|
650 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WOOCOMMERCE_GOOGLE_ANALYTICS_4 =>
|
651 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\WooCommerceGoogleAnalytics4Preset::class,
|
652 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PODIGEE =>
|
653 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\PodigeePreset::class,
|
654 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AD_INSERTER =>
|
655 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AdInserterPreset::class,
|
656 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::DAILYMOTION =>
|
657 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\DailyMotionPreset::class,
|
658 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GIPHY =>
|
659 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GiphyPreset::class,
|
660 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LINKEDIN_ADS =>
|
661 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\LinkedInAdsPreset::class,
|
662 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LOOM =>
|
663 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\LoomPreset::class,
|
664 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::OPEN_STREET_MAP =>
|
665 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\OpenStreetMapPreset::class,
|
666 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TABOOLA =>
|
667 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TaboolaPreset::class,
|
668 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ELEMENTOR_FORMS_RECAPTCHA =>
|
669 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ElementorFormsPreset::class
|
670 |
+
]);
|
671 |
+
}
|
672 |
+
}
|
inc/overrides/lite/Stats.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
trait Stats {
|
11 |
+
// Documented in IOverrideStats
|
12 |
+
public function fetchMainStats($from, $to, $context) {
|
13 |
+
return new \WP_Error(
|
14 |
+
'rest_rcb_lite',
|
15 |
+
__(
|
16 |
+
'You are not allowed to do this in the free version of Real Cookie Banner. Please upgrade to Real Cookie Banner PRO!',
|
17 |
+
RCB_TD
|
18 |
+
)
|
19 |
+
);
|
20 |
+
}
|
21 |
+
// Documented in IOverrideStats
|
22 |
+
public function fetchButtonsClickedStats($from, $to, $context) {
|
23 |
+
return new \WP_Error(
|
24 |
+
'rest_rcb_lite',
|
25 |
+
__(
|
26 |
+
'You are not allowed to do this in the free version of Real Cookie Banner. Please upgrade to Real Cookie Banner PRO!',
|
27 |
+
RCB_TD
|
28 |
+
)
|
29 |
+
);
|
30 |
+
}
|
31 |
+
// Documented in IOverrideStats
|
32 |
+
public function fetchCustomBypassStats($from, $to, $context) {
|
33 |
+
return new \WP_Error(
|
34 |
+
'rest_rcb_lite',
|
35 |
+
__(
|
36 |
+
'You are not allowed to do this in the free version of Real Cookie Banner. Please upgrade to Real Cookie Banner PRO!',
|
37 |
+
RCB_TD
|
38 |
+
)
|
39 |
+
);
|
40 |
+
}
|
41 |
+
}
|
inc/overrides/lite/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/overrides/lite/rest/Service.php
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\rest;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Service as UtilsService;
|
6 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
7 |
+
use DevOwl\RealCookieBanner\Core;
|
8 |
+
use WP_REST_Response;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Handle general lite REST services.
|
15 |
+
*/
|
16 |
+
class Service {
|
17 |
+
use UtilsProvider;
|
18 |
+
/**
|
19 |
+
* C'tor.
|
20 |
+
*/
|
21 |
+
private function __construct() {
|
22 |
+
// Silence is golden.
|
23 |
+
}
|
24 |
+
/**
|
25 |
+
* Register endpoints.
|
26 |
+
*/
|
27 |
+
public function rest_api_init() {
|
28 |
+
$namespace = \DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\Service::getNamespace($this);
|
29 |
+
register_rest_route($namespace, '/dismiss-config-page-pro-notice', [
|
30 |
+
'methods' => 'DELETE',
|
31 |
+
'callback' => [$this, 'routeDeleteConfigProNotice'],
|
32 |
+
'permission_callback' => [$this, 'permission_callback']
|
33 |
+
]);
|
34 |
+
}
|
35 |
+
/**
|
36 |
+
* Check if user is allowed to call this service requests.
|
37 |
+
*/
|
38 |
+
public function permission_callback() {
|
39 |
+
return current_user_can(\DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY);
|
40 |
+
}
|
41 |
+
/**
|
42 |
+
* See API docs.
|
43 |
+
*
|
44 |
+
* @api {delete} /real-cookie-banner/v1/lite/dismiss-config-page-pro-notice Dismiss config page pro notice for now
|
45 |
+
* @apiHeader {string} X-WP-Nonce
|
46 |
+
* @apiName DismissConfigProNotice
|
47 |
+
* @apiGroup Lite
|
48 |
+
* @apiPermission Lite only
|
49 |
+
* @apiVersion 1.0.0
|
50 |
+
*/
|
51 |
+
public function routeDeleteConfigProNotice() {
|
52 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
53 |
+
->getConfigPage()
|
54 |
+
->isProNoticeVisible(\true);
|
55 |
+
return new \WP_REST_Response(['success' => \true]);
|
56 |
+
}
|
57 |
+
/**
|
58 |
+
* New instance.
|
59 |
+
*/
|
60 |
+
public static function instance() {
|
61 |
+
return new \DevOwl\RealCookieBanner\lite\rest\Service();
|
62 |
+
}
|
63 |
+
}
|
inc/overrides/lite/rest/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/overrides/lite/settings/Consent.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
trait Consent {
|
10 |
+
// Documented in IOverrideGeneral
|
11 |
+
public function overrideEnableOptionsAutoload() {
|
12 |
+
// Silence is golden.
|
13 |
+
}
|
14 |
+
// Documented in IOverrideConsent
|
15 |
+
public function overrideRegister() {
|
16 |
+
// Silence is golden.
|
17 |
+
}
|
18 |
+
// Documented in IOverrideConsent
|
19 |
+
public function isEPrivacyUSAEnabled() {
|
20 |
+
return \false;
|
21 |
+
}
|
22 |
+
}
|
inc/overrides/lite/settings/CountryBypass.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\settings;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
trait CountryBypass {
|
11 |
+
// Documented in IOverrideGeneral
|
12 |
+
public function overrideEnableOptionsAutoload() {
|
13 |
+
// Silence is golden.
|
14 |
+
}
|
15 |
+
// Documented in IOverrideCountryBypass
|
16 |
+
public function overrideRegister() {
|
17 |
+
// Silence is golden.
|
18 |
+
}
|
19 |
+
// Documented in IOverrideCountryBypass
|
20 |
+
public function probablyUpdateDatabase() {
|
21 |
+
// Silence is golden.
|
22 |
+
}
|
23 |
+
// Documented in IOverrideCountryBypass
|
24 |
+
public function updateDatabase($force = \false) {
|
25 |
+
return new \WP_Error(
|
26 |
+
'rcb_update_country_bypass_needs_pro',
|
27 |
+
__('This functionality is only available in the PRO version.', RCB_TD),
|
28 |
+
['status' => 500]
|
29 |
+
);
|
30 |
+
}
|
31 |
+
// Documented in IOverrideCountryBypass
|
32 |
+
public function clearDatabase() {
|
33 |
+
// Silence is golden.
|
34 |
+
}
|
35 |
+
// Documented in IOverrideCountryBypass
|
36 |
+
public function isActive() {
|
37 |
+
return \false;
|
38 |
+
}
|
39 |
+
// Documented in IOverrideCountryBypass
|
40 |
+
public function getCountries() {
|
41 |
+
return [];
|
42 |
+
}
|
43 |
+
// Documented in IOverrideCountryBypass
|
44 |
+
public function getType() {
|
45 |
+
return null;
|
46 |
+
}
|
47 |
+
// Documented in IOverrideCountryBypass
|
48 |
+
public function getDatabaseDownloadTime() {
|
49 |
+
return '';
|
50 |
+
}
|
51 |
+
}
|
inc/overrides/lite/settings/General.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
trait General {
|
10 |
+
// Documented in IOverrideGeneral
|
11 |
+
public function overrideEnableOptionsAutoload() {
|
12 |
+
// Silence is golden.
|
13 |
+
}
|
14 |
+
// Documented in IOverrideGeneral
|
15 |
+
public function overrideRegister() {
|
16 |
+
// Silence is golden.
|
17 |
+
}
|
18 |
+
// Documented in IOverrideGeneral
|
19 |
+
public function getAdditionalPageHideIds() {
|
20 |
+
return [];
|
21 |
+
}
|
22 |
+
// Documented in IOverrideGeneral
|
23 |
+
public function getSetCookiesViaManager() {
|
24 |
+
return 'none';
|
25 |
+
}
|
26 |
+
}
|
inc/overrides/lite/settings/Multisite.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\settings;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
trait Multisite {
|
10 |
+
// Documented in IOverrideGeneral
|
11 |
+
public function overrideEnableOptionsAutoload() {
|
12 |
+
// Silence is golden.
|
13 |
+
}
|
14 |
+
// Documented in IOverrideMultisite
|
15 |
+
public function overrideRegister() {
|
16 |
+
// Silence is golden.
|
17 |
+
}
|
18 |
+
// Documented in IOverrideMultisite
|
19 |
+
public function isConsentForwarding() {
|
20 |
+
return \false;
|
21 |
+
}
|
22 |
+
// Documented in IOverrideMultisite
|
23 |
+
public function getForwardTo() {
|
24 |
+
return $this->isConsentForwarding();
|
25 |
+
}
|
26 |
+
// Documented in IOverrideMultisite
|
27 |
+
public function getCrossDomains() {
|
28 |
+
return $this->isConsentForwarding();
|
29 |
+
}
|
30 |
+
}
|
inc/overrides/lite/settings/TCF.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\lite\settings;
|
4 |
+
|
5 |
+
use WP_Error;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
trait TCF {
|
11 |
+
// Documented in IOverrideGeneral
|
12 |
+
public function overrideEnableOptionsAutoload() {
|
13 |
+
// Silence is golden.
|
14 |
+
}
|
15 |
+
// Documented in IOverrideTCF
|
16 |
+
public function overrideRegister() {
|
17 |
+
// Silence is golden.
|
18 |
+
}
|
19 |
+
// Documented in IOverrideTCF
|
20 |
+
public function probablyUpdateGvl() {
|
21 |
+
// Silence is golden.
|
22 |
+
}
|
23 |
+
// Documented in IOverrideTCF
|
24 |
+
public function updateGvl($force = \false) {
|
25 |
+
return new \WP_Error(
|
26 |
+
'rcb_update_gvl_needs_pro',
|
27 |
+
__('This functionality is only available in the PRO version.', RCB_TD),
|
28 |
+
['status' => 500]
|
29 |
+
);
|
30 |
+
}
|
31 |
+
/**
|
32 |
+
* Completely clear all database tables for GVL.
|
33 |
+
*/
|
34 |
+
public function clearGvl() {
|
35 |
+
// Silence is golden.
|
36 |
+
}
|
37 |
+
// Documented in IOverrideTCF
|
38 |
+
public function clear() {
|
39 |
+
// Silence is golden.
|
40 |
+
}
|
41 |
+
// Documented in IOverrideTCF
|
42 |
+
public function isActive() {
|
43 |
+
return \false;
|
44 |
+
}
|
45 |
+
// Documented in IOverrideTCF
|
46 |
+
public function getPublisherCountryCode() {
|
47 |
+
return '';
|
48 |
+
}
|
49 |
+
// Documented in IOverrideTCF
|
50 |
+
public function getFirstAcceptedTime() {
|
51 |
+
return '';
|
52 |
+
}
|
53 |
+
// Documented in IOverrideTCF
|
54 |
+
public function getAcceptedTime() {
|
55 |
+
return '';
|
56 |
+
}
|
57 |
+
// Documented in IOverrideTCF
|
58 |
+
public function getGvlDownloadTime() {
|
59 |
+
return '';
|
60 |
+
}
|
61 |
+
// Documented in IOverrideTCF
|
62 |
+
public function getScopeOfConsent() {
|
63 |
+
return null;
|
64 |
+
}
|
65 |
+
}
|
inc/overrides/lite/settings/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/presets/AbstractBlockerPreset.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
abstract class AbstractBlockerPreset {
|
11 |
+
use UtilsProvider;
|
12 |
+
const KNOWN_CDNS = ['cdnjs.cloudflare.com', 'jsdelivr.net', 'unpkg.com'];
|
13 |
+
/**
|
14 |
+
* Common preset options.
|
15 |
+
*
|
16 |
+
* @return array
|
17 |
+
*/
|
18 |
+
abstract public function common();
|
19 |
+
/**
|
20 |
+
* Get a `mailto:` link for the admin email. This can be especially useful for contact forms.
|
21 |
+
*/
|
22 |
+
public function getAdminEmailLink() {
|
23 |
+
return \sprintf('<a href="mailto:%1$s" target="_blank">%1$s</a>', get_bloginfo('admin_email'));
|
24 |
+
}
|
25 |
+
/**
|
26 |
+
* Iterate all known CDNs and return an array for blocking hosts. You do not need to include
|
27 |
+
* the wildcard symbol `*` as it is automatically created.
|
28 |
+
*
|
29 |
+
* @param string $filename
|
30 |
+
*/
|
31 |
+
public function createHostsForCdn($filename) {
|
32 |
+
$result = [];
|
33 |
+
foreach (self::KNOWN_CDNS as $cdn) {
|
34 |
+
$result[] = \sprintf('*%s*%s*', $cdn, $filename);
|
35 |
+
}
|
36 |
+
return $result;
|
37 |
+
}
|
38 |
+
}
|
inc/presets/AbstractCookiePreset.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
// @codeCoverageIgnoreStart
|
7 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
8 |
+
// Avoid direct file request
|
9 |
+
// @codeCoverageIgnoreEnd
|
10 |
+
/**
|
11 |
+
* Presets can depend on multiple factors like multilingual and manager.
|
12 |
+
*/
|
13 |
+
abstract class AbstractCookiePreset {
|
14 |
+
use UtilsProvider;
|
15 |
+
/**
|
16 |
+
* Common preset options.
|
17 |
+
*
|
18 |
+
* @return array
|
19 |
+
*/
|
20 |
+
abstract public function common();
|
21 |
+
/**
|
22 |
+
* Get all manager-relevant options for no manager.
|
23 |
+
*
|
24 |
+
* @return array|boolean
|
25 |
+
*/
|
26 |
+
abstract public function managerNone();
|
27 |
+
/**
|
28 |
+
* Get all manager-relevant options for Google Tag Manager.
|
29 |
+
*
|
30 |
+
* @return array|boolean
|
31 |
+
*/
|
32 |
+
abstract public function managerGtm();
|
33 |
+
/**
|
34 |
+
* Get all manager-relevant options for Matomo Tag Manager.
|
35 |
+
*
|
36 |
+
* @return array|boolean
|
37 |
+
*/
|
38 |
+
abstract public function managerMtm();
|
39 |
+
}
|
inc/presets/BannerPresets.php
ADDED
@@ -0,0 +1,1921 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign;
|
8 |
+
use DevOwl\RealCookieBanner\view\customize\banner\BasicLayout;
|
9 |
+
use DevOwl\RealCookieBanner\view\customize\banner\individual\Group;
|
10 |
+
use DevOwl\RealCookieBanner\view\customize\banner\individual\Texts as IndividualTexts;
|
11 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Legal;
|
12 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Texts;
|
13 |
+
use ReflectionClass;
|
14 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Design;
|
15 |
+
use DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign;
|
16 |
+
use DevOwl\RealCookieBanner\view\customize\banner\BodyDesign;
|
17 |
+
use DevOwl\RealCookieBanner\view\customize\banner\FooterDesign;
|
18 |
+
use DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton;
|
19 |
+
use DevOwl\RealCookieBanner\view\customize\banner\individual\Layout;
|
20 |
+
use DevOwl\RealCookieBanner\view\customize\banner\Decision;
|
21 |
+
// @codeCoverageIgnoreStart
|
22 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
23 |
+
// Avoid direct file request
|
24 |
+
// @codeCoverageIgnoreEnd
|
25 |
+
/**
|
26 |
+
* Predefined presets for cookie banner.
|
27 |
+
*/
|
28 |
+
class BannerPresets {
|
29 |
+
use UtilsProvider;
|
30 |
+
/**
|
31 |
+
* Get all available presets.
|
32 |
+
*/
|
33 |
+
public function get() {
|
34 |
+
/**
|
35 |
+
* Filters available presets for cookie banner customize.
|
36 |
+
*
|
37 |
+
* @hook RCB/Presets/Banner
|
38 |
+
* @param {array} $presets All available presets
|
39 |
+
* @returns {array}
|
40 |
+
*/
|
41 |
+
return apply_filters('RCB/Presets/Banner', [
|
42 |
+
'light' => [
|
43 |
+
'name' => __('Light Dialog', RCB_TD),
|
44 |
+
'description' => __('Standard design for the cookie consent as a dialog.', RCB_TD),
|
45 |
+
'settings' => []
|
46 |
+
],
|
47 |
+
'light-banner' => [
|
48 |
+
'name' => __('Light Banner', RCB_TD),
|
49 |
+
'description' => __('Standard design for the cookie consent as a banner.', RCB_TD),
|
50 |
+
'settings' => [
|
51 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
52 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
53 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY => \false,
|
54 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
55 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => 0,
|
56 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 17,
|
57 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_INHERIT_BANNER_MAX_WIDTH => \false
|
58 |
+
]
|
59 |
+
],
|
60 |
+
'dark' => [
|
61 |
+
'name' => __('Dark Dialog', RCB_TD),
|
62 |
+
'description' => __('Standard design for the cookie consent as a dialog in dark mode.', RCB_TD),
|
63 |
+
'needsPro' => \true,
|
64 |
+
'settings' => \array_merge(
|
65 |
+
[
|
66 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_COLOR_BG => '#222222',
|
67 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#f9f9f9',
|
68 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#ffffff',
|
69 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
70 |
+
'#191919',
|
71 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
72 |
+
'#2d2d2d',
|
73 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
74 |
+
'#ffffff',
|
75 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
76 |
+
'#067070',
|
77 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
78 |
+
'#333333',
|
79 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
80 |
+
'#ffffff',
|
81 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
82 |
+
'#067d7d',
|
83 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
84 |
+
'#969696',
|
85 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
86 |
+
'#d3d3d3',
|
87 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#141414',
|
88 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#969696',
|
89 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
90 |
+
'#d3d3d3',
|
91 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_COLOR =>
|
92 |
+
'#0f0f0f',
|
93 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
94 |
+
'#2d2d2d',
|
95 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
96 |
+
'#333333',
|
97 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
98 |
+
'#424242',
|
99 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
100 |
+
'#ffffff',
|
101 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
102 |
+
'#ffffff',
|
103 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
104 |
+
'#969696',
|
105 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
106 |
+
'#d3d3d3',
|
107 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#2d2d2d',
|
108 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
109 |
+
'#ffffff',
|
110 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
111 |
+
'#067d7d',
|
112 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
113 |
+
'#333333',
|
114 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
115 |
+
'#ffffff',
|
116 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
117 |
+
'#067070'
|
118 |
+
],
|
119 |
+
$this->isPro()
|
120 |
+
? [
|
121 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BG =>
|
122 |
+
'#222222',
|
123 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ACTIVE_BG =>
|
124 |
+
'#2d2d2d',
|
125 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_HOVER_BG =>
|
126 |
+
'#2d2d2d',
|
127 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BORDER_COLOR =>
|
128 |
+
'#2d2d2d',
|
129 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_TITLE_FONT_COLOR =>
|
130 |
+
'#f9f9f9'
|
131 |
+
]
|
132 |
+
: []
|
133 |
+
)
|
134 |
+
],
|
135 |
+
'dark-banner' => [
|
136 |
+
'name' => __('Dark Banner', RCB_TD),
|
137 |
+
'description' => __('Standard design for the cookie consent as a banner in dark mode.', RCB_TD),
|
138 |
+
'needsPro' => \true,
|
139 |
+
'settings' => \array_merge(
|
140 |
+
[
|
141 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
142 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
143 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY => \false,
|
144 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_COLOR_BG => '#222222',
|
145 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
146 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#f9f9f9',
|
147 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => 0,
|
148 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 17,
|
149 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#ffffff',
|
150 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
151 |
+
'#191919',
|
152 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
153 |
+
'#2d2d2d',
|
154 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
155 |
+
'#ffffff',
|
156 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
157 |
+
'#067070',
|
158 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
159 |
+
'#333333',
|
160 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
161 |
+
'#ffffff',
|
162 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
163 |
+
'#067d7d',
|
164 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
165 |
+
'#969696',
|
166 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
167 |
+
'#d3d3d3',
|
168 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#141414',
|
169 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#969696',
|
170 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
171 |
+
'#d3d3d3',
|
172 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_COLOR =>
|
173 |
+
'#0f0f0f',
|
174 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_INHERIT_BANNER_MAX_WIDTH => \false,
|
175 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
176 |
+
'#2d2d2d',
|
177 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
178 |
+
'#333333',
|
179 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
180 |
+
'#424242',
|
181 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
182 |
+
'#ffffff',
|
183 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
184 |
+
'#ffffff',
|
185 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
186 |
+
'#969696',
|
187 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
188 |
+
'#d3d3d3',
|
189 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#2d2d2d',
|
190 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
191 |
+
'#ffffff',
|
192 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
193 |
+
'#067d7d',
|
194 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
195 |
+
'#333333',
|
196 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
197 |
+
'#ffffff',
|
198 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
199 |
+
'#067070'
|
200 |
+
],
|
201 |
+
$this->isPro()
|
202 |
+
? [
|
203 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BG =>
|
204 |
+
'#222222',
|
205 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ACTIVE_BG =>
|
206 |
+
'#2d2d2d',
|
207 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_HOVER_BG =>
|
208 |
+
'#2d2d2d',
|
209 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BORDER_COLOR =>
|
210 |
+
'#2d2d2d',
|
211 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_TITLE_FONT_COLOR =>
|
212 |
+
'#f9f9f9'
|
213 |
+
]
|
214 |
+
: []
|
215 |
+
)
|
216 |
+
],
|
217 |
+
'divi-dialog' => [
|
218 |
+
'name' => __('Divi Dialog', RCB_TD),
|
219 |
+
'description' => __('Optimized design for the standard Divi theme as a consent dialog.', RCB_TD),
|
220 |
+
'needsPro' => \true,
|
221 |
+
'settings' => \array_merge(
|
222 |
+
[
|
223 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
224 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 2,
|
225 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => 2,
|
226 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 3,
|
227 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#666666',
|
228 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
229 |
+
19,
|
230 |
+
20,
|
231 |
+
17,
|
232 |
+
20
|
233 |
+
],
|
234 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 26,
|
235 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
236 |
+
'#e2e2e2',
|
237 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
238 |
+
'#2ea3f2',
|
239 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
240 |
+
'#2ea3f2',
|
241 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
242 |
+
'#2ea3f2',
|
243 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
244 |
+
'#2993d9',
|
245 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_INHERIT_BG => \true,
|
246 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 1,
|
247 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_COLOR =>
|
248 |
+
'#e2e2e2',
|
249 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
250 |
+
'#2b2b2b',
|
251 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DIALOG_MAX_WIDTH => 825,
|
252 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
253 |
+
'#2ea3f2',
|
254 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
255 |
+
'#2993d9'
|
256 |
+
],
|
257 |
+
$this->isPro()
|
258 |
+
? [
|
259 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
260 |
+
'#2ea3f2'
|
261 |
+
]
|
262 |
+
: []
|
263 |
+
)
|
264 |
+
],
|
265 |
+
'divi-banner' => [
|
266 |
+
'name' => __('Divi Banner', RCB_TD),
|
267 |
+
'description' => __('Optimized design for the standard Divi theme as a consent banner.', RCB_TD),
|
268 |
+
'needsPro' => \true,
|
269 |
+
'settings' => \array_merge(
|
270 |
+
[
|
271 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY => \false,
|
272 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
273 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 2,
|
274 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
275 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
276 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_INHERIT_FAMILY => \true,
|
277 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -3,
|
278 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 2,
|
279 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#666666',
|
280 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
281 |
+
21,
|
282 |
+
20,
|
283 |
+
19,
|
284 |
+
20
|
285 |
+
],
|
286 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 26,
|
287 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
288 |
+
'#e2e2e2',
|
289 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
290 |
+
'#2ea3f2',
|
291 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
292 |
+
'#2ea3f2',
|
293 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
294 |
+
'#2ea3f2',
|
295 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
296 |
+
'#2993d9',
|
297 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_INHERIT_BG => \true,
|
298 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
299 |
+
17,
|
300 |
+
20,
|
301 |
+
21,
|
302 |
+
20
|
303 |
+
],
|
304 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 1,
|
305 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_COLOR =>
|
306 |
+
'#e2e2e2',
|
307 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
308 |
+
'#2b2b2b',
|
309 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DIALOG_MAX_WIDTH => 825,
|
310 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
311 |
+
'#2ea3f2',
|
312 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
313 |
+
'#2993d9'
|
314 |
+
],
|
315 |
+
$this->isPro()
|
316 |
+
? [
|
317 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
318 |
+
'#2ea3f2'
|
319 |
+
]
|
320 |
+
: []
|
321 |
+
)
|
322 |
+
],
|
323 |
+
'astra-dialog' => [
|
324 |
+
'name' => __('Astra Dialog', RCB_TD),
|
325 |
+
'description' => __('Optimized design for the standard Astra theme as a consent dialog.', RCB_TD),
|
326 |
+
'needsPro' => \true,
|
327 |
+
'settings' => \array_merge(
|
328 |
+
[
|
329 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
330 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 1,
|
331 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#3a3a3a',
|
332 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 81,
|
333 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 15,
|
334 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 2,
|
335 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
336 |
+
19,
|
337 |
+
30,
|
338 |
+
17,
|
339 |
+
30
|
340 |
+
],
|
341 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 21,
|
342 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
343 |
+
'#f5f5f5',
|
344 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 30, 20, 30],
|
345 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
346 |
+
'#0274be',
|
347 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
348 |
+
'#0274be',
|
349 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
350 |
+
'#0274be',
|
351 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
352 |
+
'#0264a6',
|
353 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
354 |
+
'#3a3a3a',
|
355 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
356 |
+
'#141414',
|
357 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f5f5f5',
|
358 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
359 |
+
19,
|
360 |
+
30,
|
361 |
+
21,
|
362 |
+
30
|
363 |
+
],
|
364 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#3a3a3a',
|
365 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
366 |
+
'#141414',
|
367 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
368 |
+
'#c6c6c6',
|
369 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
370 |
+
'#0274be',
|
371 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
372 |
+
'#0264a6',
|
373 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
374 |
+
20,
|
375 |
+
20,
|
376 |
+
20,
|
377 |
+
20
|
378 |
+
],
|
379 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 0,
|
380 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
381 |
+
'#c6c6c6'
|
382 |
+
],
|
383 |
+
$this->isPro()
|
384 |
+
? [
|
385 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
386 |
+
'#0274be'
|
387 |
+
]
|
388 |
+
: []
|
389 |
+
)
|
390 |
+
],
|
391 |
+
'astra-banner' => [
|
392 |
+
'name' => __('Astra Banner', RCB_TD),
|
393 |
+
'description' => __('Optimized design for the standard Astra theme as a consent banner.', RCB_TD),
|
394 |
+
'needsPro' => \true,
|
395 |
+
'settings' => \array_merge(
|
396 |
+
[
|
397 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_INHERIT_BANNER_MAX_WIDTH => \false,
|
398 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
399 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
400 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
401 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 1,
|
402 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY => \false,
|
403 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#3a3a3a',
|
404 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 81,
|
405 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
406 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 15,
|
407 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 2,
|
408 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
409 |
+
19,
|
410 |
+
30,
|
411 |
+
17,
|
412 |
+
30
|
413 |
+
],
|
414 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 21,
|
415 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
416 |
+
'#f5f5f5',
|
417 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 30, 20, 30],
|
418 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
419 |
+
'#0274be',
|
420 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
421 |
+
'#0274be',
|
422 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
423 |
+
'#0274be',
|
424 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
425 |
+
'#0264a6',
|
426 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
427 |
+
'#3a3a3a',
|
428 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
429 |
+
'#141414',
|
430 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f5f5f5',
|
431 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
432 |
+
19,
|
433 |
+
30,
|
434 |
+
21,
|
435 |
+
30
|
436 |
+
],
|
437 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#3a3a3a',
|
438 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
439 |
+
'#141414',
|
440 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_BANNER_MAX_WIDTH => 950,
|
441 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
442 |
+
'#c6c6c6',
|
443 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
444 |
+
'#0274be',
|
445 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
446 |
+
'#0264a6',
|
447 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
448 |
+
20,
|
449 |
+
20,
|
450 |
+
20,
|
451 |
+
20
|
452 |
+
],
|
453 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 0,
|
454 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
455 |
+
'#c6c6c6'
|
456 |
+
],
|
457 |
+
$this->isPro()
|
458 |
+
? [
|
459 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
460 |
+
'#0274be'
|
461 |
+
]
|
462 |
+
: []
|
463 |
+
)
|
464 |
+
],
|
465 |
+
'avada-dialog' => [
|
466 |
+
'name' => __('Avada Dialog', RCB_TD),
|
467 |
+
'description' => __('Optimized design for the standard Avada theme as a consent dialog.', RCB_TD),
|
468 |
+
'needsPro' => \true,
|
469 |
+
'settings' => \array_merge(
|
470 |
+
[
|
471 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
472 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
473 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#212934',
|
474 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 57,
|
475 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 16,
|
476 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#4a4e57',
|
477 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_INHERIT_FAMILY => \true,
|
478 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 2,
|
479 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#6d6d6d',
|
480 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
481 |
+
17,
|
482 |
+
30,
|
483 |
+
15,
|
484 |
+
30
|
485 |
+
],
|
486 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 26,
|
487 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 30, 20, 30],
|
488 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
489 |
+
'#65bc7b',
|
490 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
491 |
+
'#65bc7b',
|
492 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_PADDING => [
|
493 |
+
12,
|
494 |
+
10,
|
495 |
+
12,
|
496 |
+
10
|
497 |
+
],
|
498 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
499 |
+
'#65bc7b',
|
500 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
501 |
+
'#58a36b',
|
502 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
503 |
+
10,
|
504 |
+
5,
|
505 |
+
10,
|
506 |
+
5
|
507 |
+
],
|
508 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
509 |
+
10,
|
510 |
+
5,
|
511 |
+
0,
|
512 |
+
5
|
513 |
+
],
|
514 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
515 |
+
'#212934',
|
516 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
517 |
+
'#080a0d',
|
518 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#1d242d',
|
519 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
520 |
+
25,
|
521 |
+
30,
|
522 |
+
25,
|
523 |
+
30
|
524 |
+
],
|
525 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#d2d3d5',
|
526 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
527 |
+
'#ffffff',
|
528 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DIALOG_MAX_WIDTH => 885,
|
529 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
530 |
+
'#efefef',
|
531 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
532 |
+
'#e5e5e5',
|
533 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
534 |
+
'#65bc7b',
|
535 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
536 |
+
'#65bc7b',
|
537 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
538 |
+
'#e5e5e5',
|
539 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
540 |
+
10,
|
541 |
+
10,
|
542 |
+
10,
|
543 |
+
10
|
544 |
+
]
|
545 |
+
],
|
546 |
+
$this->isPro()
|
547 |
+
? [
|
548 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
549 |
+
'#65bc7b'
|
550 |
+
]
|
551 |
+
: []
|
552 |
+
)
|
553 |
+
],
|
554 |
+
'avada-banner' => [
|
555 |
+
'name' => __('Avada Banner', RCB_TD),
|
556 |
+
'description' => __('Optimized design for the standard Avada theme as a consent banner.', RCB_TD),
|
557 |
+
'needsPro' => \true,
|
558 |
+
'settings' => \array_merge(
|
559 |
+
[
|
560 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
561 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
562 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
563 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY => \false,
|
564 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#212934',
|
565 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 57,
|
566 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
567 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 16,
|
568 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#4a4e57',
|
569 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_INHERIT_FAMILY => \true,
|
570 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 2,
|
571 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#6d6d6d',
|
572 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
573 |
+
17,
|
574 |
+
30,
|
575 |
+
15,
|
576 |
+
30
|
577 |
+
],
|
578 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 26,
|
579 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 30, 20, 30],
|
580 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
581 |
+
'#65bc7b',
|
582 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
583 |
+
'#65bc7b',
|
584 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_PADDING => [
|
585 |
+
12,
|
586 |
+
10,
|
587 |
+
12,
|
588 |
+
10
|
589 |
+
],
|
590 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
591 |
+
'#65bc7b',
|
592 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
593 |
+
'#58a36b',
|
594 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
595 |
+
10,
|
596 |
+
5,
|
597 |
+
10,
|
598 |
+
5
|
599 |
+
],
|
600 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
601 |
+
10,
|
602 |
+
5,
|
603 |
+
0,
|
604 |
+
5
|
605 |
+
],
|
606 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_SIZE => 16,
|
607 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
608 |
+
'#212934',
|
609 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
610 |
+
'#080a0d',
|
611 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#1d242d',
|
612 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
613 |
+
25,
|
614 |
+
30,
|
615 |
+
25,
|
616 |
+
30
|
617 |
+
],
|
618 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#d2d3d5',
|
619 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
620 |
+
'#ffffff',
|
621 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DIALOG_MAX_WIDTH => 885,
|
622 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
623 |
+
'#efefef',
|
624 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
625 |
+
'#e5e5e5',
|
626 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
627 |
+
'#65bc7b',
|
628 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
629 |
+
'#65bc7b',
|
630 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
631 |
+
'#e5e5e5',
|
632 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
633 |
+
10,
|
634 |
+
10,
|
635 |
+
10,
|
636 |
+
10
|
637 |
+
]
|
638 |
+
],
|
639 |
+
$this->isPro()
|
640 |
+
? [
|
641 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
642 |
+
'#65bc7b'
|
643 |
+
]
|
644 |
+
: []
|
645 |
+
)
|
646 |
+
],
|
647 |
+
'clean' => [
|
648 |
+
'name' => __('Clean Dialog', RCB_TD),
|
649 |
+
'description' => __('Clean design which suits perfect to themes without many colors.', RCB_TD),
|
650 |
+
'needsPro' => \true,
|
651 |
+
'settings' => \array_merge(
|
652 |
+
[
|
653 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 9,
|
654 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 50,
|
655 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 4,
|
656 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_LINK_TEXT_DECORATION => 'none',
|
657 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => 4,
|
658 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 27,
|
659 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#6b6b6b',
|
660 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
661 |
+
20,
|
662 |
+
20,
|
663 |
+
10,
|
664 |
+
20
|
665 |
+
],
|
666 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 15,
|
667 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'bold',
|
668 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_WIDTH => 0,
|
669 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
670 |
+
'#000000',
|
671 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
672 |
+
'#000000',
|
673 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
674 |
+
'#000000',
|
675 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
676 |
+
'#262626',
|
677 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_INHERIT_BG => \true,
|
678 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [7, 20, 11, 20],
|
679 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 1,
|
680 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
681 |
+
'#000000',
|
682 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
683 |
+
'#000000',
|
684 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
685 |
+
'#000000',
|
686 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
687 |
+
0,
|
688 |
+
0,
|
689 |
+
10,
|
690 |
+
0
|
691 |
+
],
|
692 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 0
|
693 |
+
],
|
694 |
+
$this->isPro()
|
695 |
+
? [
|
696 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
697 |
+
'#000000'
|
698 |
+
]
|
699 |
+
: []
|
700 |
+
)
|
701 |
+
],
|
702 |
+
'clean-green' => [
|
703 |
+
'name' => __('Clean Green', RCB_TD),
|
704 |
+
'description' => __('Professional request to agree to the cookies.', RCB_TD),
|
705 |
+
'needsPro' => \true,
|
706 |
+
'settings' => \array_merge(
|
707 |
+
[
|
708 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 3,
|
709 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_ENABLED => \false,
|
710 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_INHERIT_BG => \false,
|
711 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BG => '#f4f7f4',
|
712 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MAX_HEIGHT => 53,
|
713 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MARGIN => [
|
714 |
+
5,
|
715 |
+
20,
|
716 |
+
5,
|
717 |
+
5
|
718 |
+
],
|
719 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 18,
|
720 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#576a76',
|
721 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'bold',
|
722 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_WIDTH => 0,
|
723 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 20, 20, 20],
|
724 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_INHERIT_FONT_SIZE => \false,
|
725 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_INHERIT_FONT_SIZE => \false,
|
726 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
727 |
+
'#566a76',
|
728 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
729 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
730 |
+
'#566a76',
|
731 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_SIZE => \true,
|
732 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_SIZE => 13,
|
733 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_COLOR => \true,
|
734 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_COLOR =>
|
735 |
+
'#000000',
|
736 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
737 |
+
'#007f50',
|
738 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
739 |
+
'#576a76',
|
740 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
741 |
+
10,
|
742 |
+
10,
|
743 |
+
10,
|
744 |
+
10
|
745 |
+
],
|
746 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
747 |
+
5,
|
748 |
+
5,
|
749 |
+
0,
|
750 |
+
5
|
751 |
+
],
|
752 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
753 |
+
'#54595f',
|
754 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
755 |
+
'#000000',
|
756 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f4f7f4',
|
757 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_SIZE => 12,
|
758 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#54595f',
|
759 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
760 |
+
'#000000',
|
761 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
762 |
+
'#f4f7f4',
|
763 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_WIDTH => 2,
|
764 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
765 |
+
'#576a76',
|
766 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
767 |
+
'#37a97e',
|
768 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
769 |
+
'#37a97e',
|
770 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
771 |
+
20,
|
772 |
+
20,
|
773 |
+
20,
|
774 |
+
20
|
775 |
+
],
|
776 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 1,
|
777 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 2,
|
778 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_SIZE => 15,
|
779 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_WEIGHT =>
|
780 |
+
'bold',
|
781 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
782 |
+
'#576a76',
|
783 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_FONT_SIZE => 13,
|
784 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
785 |
+
'#000000',
|
786 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
787 |
+
'#54595f',
|
788 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
789 |
+
'#000000',
|
790 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
791 |
+
10,
|
792 |
+
10,
|
793 |
+
10,
|
794 |
+
10
|
795 |
+
],
|
796 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 15
|
797 |
+
],
|
798 |
+
$this->isPro()
|
799 |
+
? [
|
800 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
801 |
+
'#007f50'
|
802 |
+
]
|
803 |
+
: []
|
804 |
+
)
|
805 |
+
],
|
806 |
+
'clean-red' => [
|
807 |
+
'name' => __('Clean Red', RCB_TD),
|
808 |
+
'description' => __('Professional request to agree to the cookies.', RCB_TD),
|
809 |
+
'needsPro' => \true,
|
810 |
+
'settings' => \array_merge(
|
811 |
+
[
|
812 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 3,
|
813 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
814 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 3,
|
815 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BORDER_COLOR => '#ff0000',
|
816 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 14,
|
817 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_ENABLED => \false,
|
818 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -2,
|
819 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 9,
|
820 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#2b2b2b',
|
821 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_INHERIT_BG => \false,
|
822 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BG => '#f5f5f5',
|
823 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MAX_HEIGHT => 85,
|
824 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MARGIN => [
|
825 |
+
5,
|
826 |
+
20,
|
827 |
+
5,
|
828 |
+
5
|
829 |
+
],
|
830 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 18,
|
831 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#576a76',
|
832 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 20, 20, 20],
|
833 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_INHERIT_FONT_SIZE => \false,
|
834 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
835 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_INHERIT_FONT_SIZE => \false,
|
836 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
837 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
838 |
+
'#54595f',
|
839 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
840 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
841 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
842 |
+
'#566a76',
|
843 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_SIZE => \true,
|
844 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_SIZE => 13,
|
845 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_COLOR =>
|
846 |
+
'#54595f',
|
847 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
848 |
+
'#ae1424',
|
849 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
850 |
+
'#686868',
|
851 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
852 |
+
'#f4f7f4',
|
853 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 15,
|
854 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
855 |
+
'#686868',
|
856 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
857 |
+
'#60b239',
|
858 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
859 |
+
'#686868',
|
860 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
861 |
+
'#ffffff',
|
862 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
863 |
+
'#59a535',
|
864 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
865 |
+
5,
|
866 |
+
5,
|
867 |
+
0,
|
868 |
+
5
|
869 |
+
],
|
870 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
871 |
+
'#686868',
|
872 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
873 |
+
'#000000',
|
874 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f5f5f5',
|
875 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
876 |
+
15,
|
877 |
+
20,
|
878 |
+
17,
|
879 |
+
20
|
880 |
+
],
|
881 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_SIZE => 12,
|
882 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#54595f',
|
883 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
884 |
+
'#000000',
|
885 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
886 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_WIDTH => 2,
|
887 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
888 |
+
'#ae1424',
|
889 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
890 |
+
'#ae1424',
|
891 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
892 |
+
20,
|
893 |
+
20,
|
894 |
+
20,
|
895 |
+
20
|
896 |
+
],
|
897 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 1,
|
898 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 2,
|
899 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_SIZE => 15,
|
900 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_WEIGHT =>
|
901 |
+
'bold',
|
902 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
903 |
+
'#54595f',
|
904 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_FONT_SIZE => 13,
|
905 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
906 |
+
'#000000',
|
907 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
908 |
+
'#54595f',
|
909 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
910 |
+
'#000000',
|
911 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#f4f7f4',
|
912 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 15,
|
913 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
914 |
+
'#54595f',
|
915 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 1,
|
916 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
917 |
+
'#54595f',
|
918 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
919 |
+
'#686868',
|
920 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
921 |
+
'#ffffff',
|
922 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
923 |
+
'#686868'
|
924 |
+
],
|
925 |
+
$this->isPro()
|
926 |
+
? [
|
927 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
928 |
+
'#ae1424'
|
929 |
+
]
|
930 |
+
: []
|
931 |
+
)
|
932 |
+
],
|
933 |
+
'red-contrast' => [
|
934 |
+
'name' => __('Red Contrast', RCB_TD),
|
935 |
+
'description' => __('Emotionally colorful play of red-black-white.', RCB_TD),
|
936 |
+
//'needsPro' => true,
|
937 |
+
'settings' => \array_merge(
|
938 |
+
[
|
939 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
940 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
941 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#212934',
|
942 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 57,
|
943 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 0,
|
944 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Decision::SETTING_GROUPS_FIRST_VIEW => \true,
|
945 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Decision::SETTING_SAVE_BUTTON =>
|
946 |
+
'afterChangeAll',
|
947 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
948 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#4a4e57',
|
949 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
950 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 62,
|
951 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#6d6d6d',
|
952 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
953 |
+
17,
|
954 |
+
30,
|
955 |
+
15,
|
956 |
+
30
|
957 |
+
],
|
958 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 26,
|
959 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 30, 20, 30],
|
960 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
961 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
962 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
963 |
+
'#9b0103',
|
964 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
965 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
966 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
967 |
+
'#65bc7b',
|
968 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_PADDING => [
|
969 |
+
12,
|
970 |
+
10,
|
971 |
+
12,
|
972 |
+
10
|
973 |
+
],
|
974 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
975 |
+
'#9b0103',
|
976 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
977 |
+
'#9b0103',
|
978 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
979 |
+
10,
|
980 |
+
5,
|
981 |
+
10,
|
982 |
+
5
|
983 |
+
],
|
984 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
985 |
+
'#ffffff',
|
986 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
987 |
+
'#9b0103',
|
988 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 3,
|
989 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
990 |
+
'#9b0103',
|
991 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
992 |
+
'#ffffff',
|
993 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
994 |
+
'#9b0103',
|
995 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
996 |
+
'#9b0103',
|
997 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
998 |
+
10,
|
999 |
+
5,
|
1000 |
+
0,
|
1001 |
+
5
|
1002 |
+
],
|
1003 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_SIZE => 16,
|
1004 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
1005 |
+
'#212934',
|
1006 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1007 |
+
'#080a0d',
|
1008 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#1d242d',
|
1009 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1010 |
+
25,
|
1011 |
+
30,
|
1012 |
+
25,
|
1013 |
+
30
|
1014 |
+
],
|
1015 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#d2d3d5',
|
1016 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1017 |
+
'#ffffff',
|
1018 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
1019 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
1020 |
+
'#efefef',
|
1021 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
1022 |
+
'#e5e5e5',
|
1023 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1024 |
+
'#9b0103',
|
1025 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1026 |
+
'#9b0103',
|
1027 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 3,
|
1028 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#ffffff',
|
1029 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1030 |
+
'#9b0103',
|
1031 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 3,
|
1032 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1033 |
+
'#9b0103',
|
1034 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1035 |
+
'#ffffff',
|
1036 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1037 |
+
'#9b0103',
|
1038 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1039 |
+
'#9b0103'
|
1040 |
+
],
|
1041 |
+
$this->isPro()
|
1042 |
+
? [
|
1043 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1044 |
+
'#9b0103'
|
1045 |
+
]
|
1046 |
+
: []
|
1047 |
+
)
|
1048 |
+
],
|
1049 |
+
'gold-in-the-dark' => [
|
1050 |
+
'name' => __('Gold in the Dark', RCB_TD),
|
1051 |
+
'description' => __('Dark mode design with a clear accent.', RCB_TD),
|
1052 |
+
'needsPro' => \true,
|
1053 |
+
'settings' => \array_merge(
|
1054 |
+
[
|
1055 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
1056 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
1057 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
1058 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
1059 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 59,
|
1060 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_COLOR_BG => '#222222',
|
1061 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
1062 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 14,
|
1063 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#f9f9f9',
|
1064 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
1065 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 17,
|
1066 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#0a0a0a',
|
1067 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
1068 |
+
17,
|
1069 |
+
10,
|
1070 |
+
15,
|
1071 |
+
10
|
1072 |
+
],
|
1073 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 17,
|
1074 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#f9f9f9',
|
1075 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'lighter',
|
1076 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
1077 |
+
'#424242',
|
1078 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [15, 10, 10, 10],
|
1079 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
1080 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_INHERIT_FONT_SIZE => \false,
|
1081 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1082 |
+
'#b58d00',
|
1083 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
1084 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_WIDTH => 0,
|
1085 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 0,
|
1086 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1087 |
+
'#056363',
|
1088 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1089 |
+
'#b58d00',
|
1090 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_COLOR =>
|
1091 |
+
'#000000',
|
1092 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_SIZE => 15,
|
1093 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1094 |
+
'#936900',
|
1095 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
1096 |
+
5,
|
1097 |
+
5,
|
1098 |
+
5,
|
1099 |
+
5
|
1100 |
+
],
|
1101 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1102 |
+
'#222222',
|
1103 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 13,
|
1104 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1105 |
+
'#b58d00',
|
1106 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 1,
|
1107 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
1108 |
+
'#b58d00',
|
1109 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1110 |
+
'#222222',
|
1111 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1112 |
+
'#ffffff',
|
1113 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
1114 |
+
'#b58d00',
|
1115 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_SIZE => 13,
|
1116 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
1117 |
+
'#969696',
|
1118 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1119 |
+
'#d3d3d3',
|
1120 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_POWERED_BY_LINK => \false,
|
1121 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#141414',
|
1122 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1123 |
+
15,
|
1124 |
+
10,
|
1125 |
+
17,
|
1126 |
+
10
|
1127 |
+
],
|
1128 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_SIZE => 13,
|
1129 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#969696',
|
1130 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1131 |
+
'#d3d3d3',
|
1132 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_COLOR =>
|
1133 |
+
'#424242',
|
1134 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_COLOR =>
|
1135 |
+
'#f9f9f9',
|
1136 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1137 |
+
'#b58d00',
|
1138 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1139 |
+
'#b58d00',
|
1140 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 0,
|
1141 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
1142 |
+
'#424242',
|
1143 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_SIZE => 15,
|
1144 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_WEIGHT =>
|
1145 |
+
'bolder',
|
1146 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
1147 |
+
'#ffffff',
|
1148 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_FONT_SIZE => 13,
|
1149 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
1150 |
+
'#ffffff',
|
1151 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
1152 |
+
'#969696',
|
1153 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
1154 |
+
'#d3d3d3',
|
1155 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
1156 |
+
5,
|
1157 |
+
5,
|
1158 |
+
5,
|
1159 |
+
5
|
1160 |
+
],
|
1161 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#222222',
|
1162 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 14,
|
1163 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1164 |
+
'#b58d00',
|
1165 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 1,
|
1166 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1167 |
+
'#b58d00',
|
1168 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1169 |
+
'#222222',
|
1170 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1171 |
+
'#ffffff',
|
1172 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1173 |
+
'#b58d00'
|
1174 |
+
],
|
1175 |
+
$this->isPro()
|
1176 |
+
? [
|
1177 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_PADDING => [
|
1178 |
+
5,
|
1179 |
+
5,
|
1180 |
+
5,
|
1181 |
+
5
|
1182 |
+
],
|
1183 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1184 |
+
'#b58d00',
|
1185 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BG =>
|
1186 |
+
'#222222',
|
1187 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ACTIVE_BG =>
|
1188 |
+
'#2b2b2b',
|
1189 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_HOVER_BG =>
|
1190 |
+
'#2b2b2b',
|
1191 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BORDER_WIDTH => 0,
|
1192 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BORDER_COLOR =>
|
1193 |
+
'#1c1c1c',
|
1194 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_TITLE_FONT_COLOR =>
|
1195 |
+
'#ffffff'
|
1196 |
+
]
|
1197 |
+
: []
|
1198 |
+
)
|
1199 |
+
],
|
1200 |
+
'gold-zen' => [
|
1201 |
+
'name' => __('Gold Zen', RCB_TD),
|
1202 |
+
'description' => __('Bright appearance with gold-green accent.', RCB_TD),
|
1203 |
+
'needsPro' => \true,
|
1204 |
+
'settings' => \array_merge(
|
1205 |
+
[
|
1206 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_TYPE => 'banner',
|
1207 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_MAX_WIDTH => 400,
|
1208 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BANNER_MAX_WIDTH => 750,
|
1209 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 3,
|
1210 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_IN => 'fadeInUp',
|
1211 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
1212 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 0,
|
1213 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_TEXT_ALIGN => 'left',
|
1214 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_LINK_TEXT_DECORATION => 'none',
|
1215 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 16,
|
1216 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#000302',
|
1217 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
1218 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 3,
|
1219 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#416a59',
|
1220 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
1221 |
+
20,
|
1222 |
+
20,
|
1223 |
+
15,
|
1224 |
+
20
|
1225 |
+
],
|
1226 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MAX_HEIGHT => 70,
|
1227 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_POSITION => 'above',
|
1228 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 23,
|
1229 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#000302',
|
1230 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_WIDTH => 0,
|
1231 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
1232 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
1233 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1234 |
+
'#000302',
|
1235 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_WIDTH => 150,
|
1236 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1237 |
+
'#000302',
|
1238 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_SIZE => 14,
|
1239 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_COLOR =>
|
1240 |
+
'#718093',
|
1241 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1242 |
+
'#916704',
|
1243 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_SIZE => 17,
|
1244 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_COLOR =>
|
1245 |
+
'#ffffff',
|
1246 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BORDER_WIDTH => 0,
|
1247 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BORDER_COLOR =>
|
1248 |
+
'#ba910b',
|
1249 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1250 |
+
'#e5b720',
|
1251 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BORDER_COLOR =>
|
1252 |
+
'#e5b720',
|
1253 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
1254 |
+
5,
|
1255 |
+
5,
|
1256 |
+
5,
|
1257 |
+
5
|
1258 |
+
],
|
1259 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1260 |
+
'#ffffff',
|
1261 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 13,
|
1262 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1263 |
+
'#416a59',
|
1264 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 1,
|
1265 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
1266 |
+
'#416a59',
|
1267 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1268 |
+
'#ffffff',
|
1269 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1270 |
+
'#5b8172',
|
1271 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
1272 |
+
'#5b8172',
|
1273 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_SIZE => 13,
|
1274 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
1275 |
+
'#718093',
|
1276 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1277 |
+
'#718093',
|
1278 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#416a59',
|
1279 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1280 |
+
15,
|
1281 |
+
20,
|
1282 |
+
17,
|
1283 |
+
20
|
1284 |
+
],
|
1285 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#ffffff',
|
1286 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1287 |
+
'#cccccc',
|
1288 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
1289 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DIALOG_MAX_WIDTH => 750,
|
1290 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_INHERIT_BANNER_MAX_WIDTH => \false,
|
1291 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_BANNER_MAX_WIDTH => 975,
|
1292 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Layout::SETTING_DESCRIPTION_TEXT_ALIGN =>
|
1293 |
+
'justify',
|
1294 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
1295 |
+
'#416a59',
|
1296 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1297 |
+
'#416a59',
|
1298 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1299 |
+
'#416a59',
|
1300 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 3,
|
1301 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
1302 |
+
'#000302',
|
1303 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
1304 |
+
'#000302',
|
1305 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
1306 |
+
2,
|
1307 |
+
2,
|
1308 |
+
2,
|
1309 |
+
2
|
1310 |
+
],
|
1311 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#ffffff',
|
1312 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 15,
|
1313 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1314 |
+
'#000302',
|
1315 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_WEIGHT =>
|
1316 |
+
'bold',
|
1317 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1318 |
+
'#273c75',
|
1319 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1320 |
+
'#ffffff',
|
1321 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1322 |
+
'#000302',
|
1323 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1324 |
+
'#5b8172'
|
1325 |
+
],
|
1326 |
+
$this->isPro()
|
1327 |
+
? [
|
1328 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1329 |
+
'#ba910b'
|
1330 |
+
]
|
1331 |
+
: []
|
1332 |
+
)
|
1333 |
+
],
|
1334 |
+
'business-green' => [
|
1335 |
+
'name' => __('Business Green', RCB_TD),
|
1336 |
+
'description' => __('Professional request to agree to the cookies.', RCB_TD),
|
1337 |
+
'needsPro' => \true,
|
1338 |
+
'settings' => \array_merge(
|
1339 |
+
[
|
1340 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 3,
|
1341 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
1342 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 3,
|
1343 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 14,
|
1344 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_ENABLED => \false,
|
1345 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
1346 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 9,
|
1347 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#2b2b2b',
|
1348 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_INHERIT_BG => \false,
|
1349 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BG => '#f4f7f4',
|
1350 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MAX_HEIGHT => 53,
|
1351 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MARGIN => [
|
1352 |
+
5,
|
1353 |
+
20,
|
1354 |
+
5,
|
1355 |
+
5
|
1356 |
+
],
|
1357 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 18,
|
1358 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#576a76',
|
1359 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'bold',
|
1360 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_WIDTH => 0,
|
1361 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [20, 20, 20, 20],
|
1362 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_INHERIT_FONT_SIZE => \false,
|
1363 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
1364 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_INHERIT_FONT_SIZE => \false,
|
1365 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
1366 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1367 |
+
'#566a76',
|
1368 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
1369 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
1370 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1371 |
+
'#566a76',
|
1372 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_SIZE => \true,
|
1373 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_SIZE => 13,
|
1374 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_COLOR => \true,
|
1375 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_FONT_COLOR =>
|
1376 |
+
'#000000',
|
1377 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1378 |
+
'#007c63',
|
1379 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_SIZE => 15,
|
1380 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_COLOR =>
|
1381 |
+
'#ffffff',
|
1382 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1383 |
+
'#576a76',
|
1384 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_FONT_COLOR =>
|
1385 |
+
'#ffffff',
|
1386 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1387 |
+
'#f4f7f4',
|
1388 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 15,
|
1389 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1390 |
+
'#007767',
|
1391 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
1392 |
+
'#60b239',
|
1393 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1394 |
+
'#d7e4ed',
|
1395 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1396 |
+
'#007c63',
|
1397 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
1398 |
+
'#59a535',
|
1399 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_PADDING => [
|
1400 |
+
5,
|
1401 |
+
5,
|
1402 |
+
0,
|
1403 |
+
5
|
1404 |
+
],
|
1405 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
1406 |
+
'#1d8bc6',
|
1407 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1408 |
+
'#000000',
|
1409 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_POWERED_BY_LINK => \false,
|
1410 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f4f7f4',
|
1411 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1412 |
+
15,
|
1413 |
+
20,
|
1414 |
+
17,
|
1415 |
+
20
|
1416 |
+
],
|
1417 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_SIZE => 12,
|
1418 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#1d8bc6',
|
1419 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1420 |
+
'#000000',
|
1421 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
1422 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
1423 |
+
'#f4f7f4',
|
1424 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_WIDTH => 2,
|
1425 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
1426 |
+
'#576a76',
|
1427 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1428 |
+
'#007767',
|
1429 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1430 |
+
'#007767',
|
1431 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
1432 |
+
20,
|
1433 |
+
20,
|
1434 |
+
20,
|
1435 |
+
20
|
1436 |
+
],
|
1437 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 1,
|
1438 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 2,
|
1439 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_SIZE => 15,
|
1440 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_WEIGHT =>
|
1441 |
+
'bold',
|
1442 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
1443 |
+
'#576a76',
|
1444 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_FONT_SIZE => 13,
|
1445 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
1446 |
+
'#000000',
|
1447 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
1448 |
+
'#1d8bc6',
|
1449 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
1450 |
+
'#000000',
|
1451 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#f4f7f4',
|
1452 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 15,
|
1453 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1454 |
+
'#007767',
|
1455 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 1,
|
1456 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1457 |
+
'#007767',
|
1458 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1459 |
+
'#d8e4ed',
|
1460 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1461 |
+
'#007767',
|
1462 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1463 |
+
'#007767'
|
1464 |
+
],
|
1465 |
+
$this->isPro()
|
1466 |
+
? [
|
1467 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1468 |
+
'#007c63'
|
1469 |
+
]
|
1470 |
+
: []
|
1471 |
+
)
|
1472 |
+
],
|
1473 |
+
'business-as-usual' => [
|
1474 |
+
'name' => __('Business as usual', RCB_TD),
|
1475 |
+
'description' => __('Unobtrusive, clear and directly visible to everyone.', RCB_TD),
|
1476 |
+
'needsPro' => \true,
|
1477 |
+
'settings' => \array_merge(
|
1478 |
+
[
|
1479 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
1480 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
1481 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_IN => 'fadeIn',
|
1482 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_ANIMATION_OUT => 'fadeOut',
|
1483 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
1484 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 72,
|
1485 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 0,
|
1486 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 14,
|
1487 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#939598',
|
1488 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_ENABLED => \false,
|
1489 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
1490 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 9,
|
1491 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#2b2b2b',
|
1492 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_POSITION => 'above',
|
1493 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#13293e',
|
1494 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'bolder',
|
1495 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
1496 |
+
'#ebebeb',
|
1497 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
1498 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
1499 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1500 |
+
'#f5a418',
|
1501 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
1502 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1503 |
+
'#f5a418',
|
1504 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_COLOR => \true,
|
1505 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1506 |
+
'#13293e',
|
1507 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1508 |
+
'#17324f',
|
1509 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
1510 |
+
5,
|
1511 |
+
5,
|
1512 |
+
5,
|
1513 |
+
5
|
1514 |
+
],
|
1515 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1516 |
+
'#ffffff',
|
1517 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 14,
|
1518 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1519 |
+
'#13293e',
|
1520 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 1,
|
1521 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
1522 |
+
'#13293e',
|
1523 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1524 |
+
'#ffffff',
|
1525 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1526 |
+
'#17324f',
|
1527 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
1528 |
+
'#17324f',
|
1529 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_SIZE => 12,
|
1530 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1531 |
+
'#9c9e9f',
|
1532 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f4f4f4',
|
1533 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1534 |
+
15,
|
1535 |
+
20,
|
1536 |
+
17,
|
1537 |
+
20
|
1538 |
+
],
|
1539 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_SIZE => 12,
|
1540 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1541 |
+
'#9c9e9f',
|
1542 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
1543 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BG =>
|
1544 |
+
'#ebebeb',
|
1545 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_WIDTH => 0,
|
1546 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1547 |
+
'#13293e',
|
1548 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1549 |
+
'#13293e',
|
1550 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 0,
|
1551 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_COLOR =>
|
1552 |
+
'#ebebeb',
|
1553 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
1554 |
+
'#939598',
|
1555 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_FONT_SIZE => 12,
|
1556 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
1557 |
+
'#939598',
|
1558 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
1559 |
+
'#939598',
|
1560 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
1561 |
+
5,
|
1562 |
+
5,
|
1563 |
+
5,
|
1564 |
+
5
|
1565 |
+
],
|
1566 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#ffffff',
|
1567 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 14,
|
1568 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1569 |
+
'#13293e',
|
1570 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 1,
|
1571 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1572 |
+
'#f5a418',
|
1573 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1574 |
+
'#ffffff',
|
1575 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1576 |
+
'#ffb433',
|
1577 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1578 |
+
'#ffb433'
|
1579 |
+
],
|
1580 |
+
$this->isPro()
|
1581 |
+
? [
|
1582 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1583 |
+
'#13293e'
|
1584 |
+
]
|
1585 |
+
: []
|
1586 |
+
)
|
1587 |
+
],
|
1588 |
+
'creative-minimal' => [
|
1589 |
+
'name' => __('Creative Minimal', RCB_TD),
|
1590 |
+
'description' => __('Design as clear and minimalist as possible.', RCB_TD),
|
1591 |
+
'needsPro' => \true,
|
1592 |
+
'settings' => \array_merge(
|
1593 |
+
[
|
1594 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 0,
|
1595 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
1596 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#ffffff',
|
1597 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG_ALPHA => 28,
|
1598 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 0,
|
1599 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Decision::SETTING_GROUPS_FIRST_VIEW => \true,
|
1600 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Decision::SETTING_SAVE_BUTTON =>
|
1601 |
+
'afterChangeAll',
|
1602 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_COLOR_BG => '#000a1e',
|
1603 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_COLOR => '#f9f9fa',
|
1604 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_ENABLED => \false,
|
1605 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => -1,
|
1606 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 9,
|
1607 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#2b2b2b',
|
1608 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [0, 10, 0, 10],
|
1609 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 10,
|
1610 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_COLOR => '#000a1e',
|
1611 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_WIDTH => 0,
|
1612 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_BOTTOM_BORDER_COLOR =>
|
1613 |
+
'#000a1e',
|
1614 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [30, 15, 0, 15],
|
1615 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
1616 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1617 |
+
'#f9f9fa',
|
1618 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_ACTIVE => \false,
|
1619 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_WIDTH => 36,
|
1620 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
1621 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1622 |
+
'#67bf3d',
|
1623 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_INHERIT_FONT_COLOR => \true,
|
1624 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1625 |
+
'#f9f9fa',
|
1626 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_COLOR =>
|
1627 |
+
'#000a1e',
|
1628 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_FONT_WEIGHT =>
|
1629 |
+
'bolder',
|
1630 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BORDER_COLOR =>
|
1631 |
+
'#000a1e',
|
1632 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1633 |
+
'#707780',
|
1634 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BORDER_COLOR =>
|
1635 |
+
'#000a1e',
|
1636 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
1637 |
+
10,
|
1638 |
+
5,
|
1639 |
+
10,
|
1640 |
+
5
|
1641 |
+
],
|
1642 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1643 |
+
'#020b1d',
|
1644 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 14,
|
1645 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1646 |
+
'#ffffff',
|
1647 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 1,
|
1648 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_COLOR =>
|
1649 |
+
'#ffffff',
|
1650 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1651 |
+
'#ffffff',
|
1652 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1653 |
+
'#020b1d',
|
1654 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BORDER_COLOR =>
|
1655 |
+
'#ffffff',
|
1656 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_FONT_COLOR =>
|
1657 |
+
'#707780',
|
1658 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_INDIVIDUAL_HOVER_FONT_COLOR =>
|
1659 |
+
'#7c7c7c',
|
1660 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_INHERIT_BG => \true,
|
1661 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f4f4f4',
|
1662 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [
|
1663 |
+
20,
|
1664 |
+
20,
|
1665 |
+
40,
|
1666 |
+
20
|
1667 |
+
],
|
1668 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_FONT_COLOR => '#707780',
|
1669 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_HOVER_FONT_COLOR =>
|
1670 |
+
'#7c7c7c',
|
1671 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_TOP_BORDER_WIDTH => 0,
|
1672 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_WIDTH => 0,
|
1673 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_COLOR =>
|
1674 |
+
'#7c7c7c',
|
1675 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1676 |
+
'#ffffff',
|
1677 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1678 |
+
'#000a1e',
|
1679 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
1680 |
+
20,
|
1681 |
+
15,
|
1682 |
+
20,
|
1683 |
+
15
|
1684 |
+
],
|
1685 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 0,
|
1686 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 0,
|
1687 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_FONT_WEIGHT =>
|
1688 |
+
'bolder',
|
1689 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_HEADLINE_COLOR =>
|
1690 |
+
'#f9f9fa',
|
1691 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_DESCRIPTION_COLOR =>
|
1692 |
+
'#f9f9fa',
|
1693 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_COLOR =>
|
1694 |
+
'#f9f9fa',
|
1695 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_LINK_HOVER_COLOR =>
|
1696 |
+
'#7c7c7c',
|
1697 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_TYPE => 'link',
|
1698 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
1699 |
+
5,
|
1700 |
+
5,
|
1701 |
+
5,
|
1702 |
+
5
|
1703 |
+
],
|
1704 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#ffffff',
|
1705 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 14,
|
1706 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1707 |
+
'#ffffff',
|
1708 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 3,
|
1709 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_COLOR =>
|
1710 |
+
'#60b239',
|
1711 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1712 |
+
'#ffffff',
|
1713 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1714 |
+
'#7c7c7c',
|
1715 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BORDER_COLOR =>
|
1716 |
+
'#59a535'
|
1717 |
+
],
|
1718 |
+
$this->isPro()
|
1719 |
+
? [
|
1720 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1721 |
+
'#ffffff',
|
1722 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BG =>
|
1723 |
+
'#000a1e',
|
1724 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ACTIVE_BG =>
|
1725 |
+
'#000a1e',
|
1726 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_HOVER_BG =>
|
1727 |
+
'#000719',
|
1728 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_BORDER_WIDTH => 0,
|
1729 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_TITLE_FONT_COLOR =>
|
1730 |
+
'#ffffff'
|
1731 |
+
]
|
1732 |
+
: []
|
1733 |
+
)
|
1734 |
+
],
|
1735 |
+
'simple-black-white' => [
|
1736 |
+
'name' => __('Simple Black-White', RCB_TD),
|
1737 |
+
'description' => __('Make it easy with just two colors.', RCB_TD),
|
1738 |
+
'needsPro' => \true,
|
1739 |
+
'settings' => \array_merge(
|
1740 |
+
[
|
1741 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_DIALOG_BORDER_RADIUS => 10,
|
1742 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_BORDER_RADIUS => 0,
|
1743 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BG => '#0a0a0a',
|
1744 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::SETTING_OVERLAY_BLUR => 5,
|
1745 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_LINK_TEXT_DECORATION => 'none',
|
1746 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_FONT_SIZE => 14,
|
1747 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_OFFSET_Y => 4,
|
1748 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_BLUR_RADIUS => 27,
|
1749 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Design::SETTING_BOX_SHADOW_COLOR => '#6b6b6b',
|
1750 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_PADDING => [
|
1751 |
+
15,
|
1752 |
+
20,
|
1753 |
+
15,
|
1754 |
+
20
|
1755 |
+
],
|
1756 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MAX_HEIGHT => 47,
|
1757 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_LOGO_MARGIN => [
|
1758 |
+
5,
|
1759 |
+
5,
|
1760 |
+
5,
|
1761 |
+
0
|
1762 |
+
],
|
1763 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_SIZE => 15,
|
1764 |
+
\DevOwl\RealCookieBanner\view\customize\banner\HeaderDesign::SETTING_FONT_WEIGHT => 'bold',
|
1765 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_PADDING => [10, 20, 0, 20],
|
1766 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DESCRIPTION_FONT_SIZE => 14,
|
1767 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_FONT_SIZE => 14,
|
1768 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_DOTTED_GROUPS_BULLET_COLOR =>
|
1769 |
+
'#000000',
|
1770 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_HEIGHT => 3,
|
1771 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_TEACHINGS_SEPARATOR_COLOR =>
|
1772 |
+
'#000000',
|
1773 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_BG =>
|
1774 |
+
'#000000',
|
1775 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ALL_HOVER_BG =>
|
1776 |
+
'#282828',
|
1777 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_PADDING => [
|
1778 |
+
5,
|
1779 |
+
5,
|
1780 |
+
5,
|
1781 |
+
5
|
1782 |
+
],
|
1783 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BG =>
|
1784 |
+
'#ffffff',
|
1785 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_SIZE => 14,
|
1786 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_FONT_COLOR =>
|
1787 |
+
'#000000',
|
1788 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_BORDER_WIDTH => 1,
|
1789 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_BG =>
|
1790 |
+
'#000000',
|
1791 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BodyDesign::SETTING_BUTTON_ACCEPT_ESSENTIALS_HOVER_FONT_COLOR =>
|
1792 |
+
'#ffffff',
|
1793 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_POWERED_BY_LINK => \false,
|
1794 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_INHERIT_BG => \true,
|
1795 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_BG => '#f4f4f4',
|
1796 |
+
\DevOwl\RealCookieBanner\view\customize\banner\FooterDesign::SETTING_PADDING => [7, 20, 11, 20],
|
1797 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_BORDER_COLOR =>
|
1798 |
+
'#000000',
|
1799 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BG =>
|
1800 |
+
'#000000',
|
1801 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_CHECKBOX_ACTIVE_BORDER_COLOR =>
|
1802 |
+
'#000000',
|
1803 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_PADDING => [
|
1804 |
+
0,
|
1805 |
+
0,
|
1806 |
+
10,
|
1807 |
+
0
|
1808 |
+
],
|
1809 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_RADIUS => 3,
|
1810 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::SETTING_GROUP_BORDER_WIDTH => 0,
|
1811 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_PADDING => [
|
1812 |
+
5,
|
1813 |
+
5,
|
1814 |
+
5,
|
1815 |
+
5
|
1816 |
+
],
|
1817 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BG => '#ffffff',
|
1818 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_SIZE => 14,
|
1819 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_FONT_COLOR =>
|
1820 |
+
'#000000',
|
1821 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_BORDER_WIDTH => 3,
|
1822 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_BG =>
|
1823 |
+
'#000000',
|
1824 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\SaveButton::SETTING_HOVER_FONT_COLOR =>
|
1825 |
+
'#ffffff'
|
1826 |
+
],
|
1827 |
+
$this->isPro()
|
1828 |
+
? [
|
1829 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::SETTING_STACKS_ARROW_COLOR =>
|
1830 |
+
'#000000'
|
1831 |
+
]
|
1832 |
+
: []
|
1833 |
+
)
|
1834 |
+
]
|
1835 |
+
]);
|
1836 |
+
}
|
1837 |
+
/**
|
1838 |
+
* Default values so the presets only override a set of settings.
|
1839 |
+
*/
|
1840 |
+
public function defaults() {
|
1841 |
+
$sectionArgs = \DevOwl\RealCookieBanner\Core::getInstance()
|
1842 |
+
->getBanner()
|
1843 |
+
->getCustomize()
|
1844 |
+
->getSections();
|
1845 |
+
$defaults = [];
|
1846 |
+
foreach ($sectionArgs as $sectionId => $section) {
|
1847 |
+
// Legal and texts should be ignored as they are not really "styles" and preset-relevant
|
1848 |
+
if (
|
1849 |
+
\in_array(
|
1850 |
+
$sectionId,
|
1851 |
+
[
|
1852 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Legal::SECTION,
|
1853 |
+
\DevOwl\RealCookieBanner\view\customize\banner\Texts::SECTION,
|
1854 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SECTION
|
1855 |
+
],
|
1856 |
+
\true
|
1857 |
+
)
|
1858 |
+
) {
|
1859 |
+
continue;
|
1860 |
+
}
|
1861 |
+
foreach ($section['controls'] as $controlId => $control) {
|
1862 |
+
$setting = isset($control['setting']) ? $control['setting'] : null;
|
1863 |
+
if (isset($setting)) {
|
1864 |
+
$defaults[$controlId] = isset($setting['default']) ? $setting['default'] : \false;
|
1865 |
+
}
|
1866 |
+
}
|
1867 |
+
}
|
1868 |
+
return $defaults;
|
1869 |
+
}
|
1870 |
+
/**
|
1871 |
+
* Return PHP constant names. This is meant to be so on frontend a PHP code can be
|
1872 |
+
* generated for a preset easily.
|
1873 |
+
*/
|
1874 |
+
public function constants() {
|
1875 |
+
return \array_merge(
|
1876 |
+
$this->constantsFromFolder(
|
1877 |
+
RCB_INC . 'view/customize/banner/*.php',
|
1878 |
+
\DevOwl\RealCookieBanner\view\customize\banner\BasicLayout::class
|
1879 |
+
),
|
1880 |
+
$this->constantsFromFolder(
|
1881 |
+
RCB_INC . 'view/customize/banner/individual/*.php',
|
1882 |
+
\DevOwl\RealCookieBanner\view\customize\banner\individual\Group::class
|
1883 |
+
),
|
1884 |
+
$this->isPro()
|
1885 |
+
? $this->constantsFromFolder(
|
1886 |
+
RCB_INC . 'overrides/pro/view/customize/banner/*.php',
|
1887 |
+
\DevOwl\RealCookieBanner\lite\view\customize\banner\TcfBodyDesign::class
|
1888 |
+
)
|
1889 |
+
: []
|
1890 |
+
);
|
1891 |
+
}
|
1892 |
+
/**
|
1893 |
+
* Does not support recursive folders.
|
1894 |
+
*
|
1895 |
+
* @param string $glob
|
1896 |
+
* @param string $baseClass
|
1897 |
+
*/
|
1898 |
+
protected function constantsFromFolder($glob, $baseClass) {
|
1899 |
+
$result = [];
|
1900 |
+
$classFiles = \glob($glob);
|
1901 |
+
foreach ($classFiles as $classPath) {
|
1902 |
+
// Get full qualified name for the class
|
1903 |
+
$className = \explode('.', \basename($classPath))[0];
|
1904 |
+
if ($className === 'index') {
|
1905 |
+
continue;
|
1906 |
+
}
|
1907 |
+
$fq = \explode('\\', $baseClass);
|
1908 |
+
\array_pop($fq);
|
1909 |
+
\array_push($fq, $className);
|
1910 |
+
$fq = \join('\\', $fq);
|
1911 |
+
// Iterate all SETTING_ constants
|
1912 |
+
$reflection = new \ReflectionClass($fq);
|
1913 |
+
foreach ($reflection->getConstants() as $constant => $value) {
|
1914 |
+
if (\substr($constant, 0, 8) === 'SETTING_') {
|
1915 |
+
$result[$value] = '\\' . $fq . '::' . $constant;
|
1916 |
+
}
|
1917 |
+
}
|
1918 |
+
}
|
1919 |
+
return $result;
|
1920 |
+
}
|
1921 |
+
}
|
inc/presets/BlockerPresets.php
ADDED
@@ -0,0 +1,277 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\FontAwesomePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\GravatarPreset;
|
9 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\GoogleFontsPreset;
|
10 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\YoutubePreset;
|
11 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\JetPackSiteStatsPreset;
|
12 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\JetPackCommentsPreset;
|
13 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\WordPressCommentsPreset;
|
14 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\WordPressEmojisPreset;
|
15 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\WordPressPluginEmbed;
|
16 |
+
use DevOwl\RealCookieBanner\presets\free\blocker\WordPressUserLoginPreset;
|
17 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AmazonAssociatesWidgetPreset;
|
18 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\AwinPublisherMasterTagPreset;
|
19 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\BingAdsPreset;
|
20 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FoundEePreset;
|
21 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\FreshchatPreset;
|
22 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAdsensePreset;
|
23 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAdsPreset;
|
24 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\GtmPreset;
|
25 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\HCaptchaPreset;
|
26 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\HelpCrunchChatPreset;
|
27 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\HelpScoutChatPreset;
|
28 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\LuckyOrangePreset;
|
29 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MatomoPreset;
|
30 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\MtmPreset;
|
31 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\PaddleComPreset;
|
32 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\ReamazeChatPreset;
|
33 |
+
use DevOwl\RealCookieBanner\presets\pro\blocker\TikTokPixelPreset;
|
34 |
+
// @codeCoverageIgnoreStart
|
35 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
36 |
+
// Avoid direct file request
|
37 |
+
// @codeCoverageIgnoreEnd
|
38 |
+
/**
|
39 |
+
* Predefined presets for blocker.
|
40 |
+
*/
|
41 |
+
class BlockerPresets extends \DevOwl\RealCookieBanner\presets\Presets {
|
42 |
+
const CLASSES = [
|
43 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_FONTS =>
|
44 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\GoogleFontsPreset::class,
|
45 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::YOUTUBE =>
|
46 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\YoutubePreset::class,
|
47 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_SITE_STATS =>
|
48 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\JetPackSiteStatsPreset::class,
|
49 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_COMMENTS =>
|
50 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\JetPackCommentsPreset::class,
|
51 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GRAVATAR =>
|
52 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\GravatarPreset::class,
|
53 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_EMOJIS =>
|
54 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\WordPressEmojisPreset::class,
|
55 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FONTAWESOME =>
|
56 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\FontAwesomePreset::class,
|
57 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_USER_LOGIN =>
|
58 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\WordPressUserLoginPreset::class,
|
59 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_PLUGIN_EMBED =>
|
60 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\WordPressPluginEmbed::class,
|
61 |
+
// Hidden content blocker just for scanning purposes
|
62 |
+
// FREE
|
63 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_COMMENTS =>
|
64 |
+
\DevOwl\RealCookieBanner\presets\free\blocker\WordPressCommentsPreset::class,
|
65 |
+
// PRO
|
66 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_PUBLISHER_MASTERTAG =>
|
67 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AwinPublisherMasterTagPreset::class,
|
68 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FOUND_EE =>
|
69 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FoundEePreset::class,
|
70 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FRESHCHAT =>
|
71 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\FreshchatPreset::class,
|
72 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_ADS =>
|
73 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAdsPreset::class,
|
74 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_AD_SENSE =>
|
75 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GoogleAdsensePreset::class,
|
76 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GTM =>
|
77 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\GtmPreset::class,
|
78 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HCAPTCHA =>
|
79 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\HCaptchaPreset::class,
|
80 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HELP_CRUNCH_CHAT =>
|
81 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\HelpCrunchChatPreset::class,
|
82 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::HELP_SCOUT_CHAT =>
|
83 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\HelpScoutChatPreset::class,
|
84 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::LUCKY_ORANGE =>
|
85 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\LuckyOrangePreset::class,
|
86 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MATOMO =>
|
87 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MatomoPreset::class,
|
88 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::MTM =>
|
89 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\MtmPreset::class,
|
90 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::BING_ADS =>
|
91 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\BingAdsPreset::class,
|
92 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::PADDLE_COM =>
|
93 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\PaddleComPreset::class,
|
94 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REAMAZE_CHAT =>
|
95 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\ReamazeChatPreset::class,
|
96 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AMAZON_ASSOCIATES_WIDGET =>
|
97 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\AmazonAssociatesWidgetPreset::class,
|
98 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::TIKTOK_PIXEL =>
|
99 |
+
\DevOwl\RealCookieBanner\presets\pro\blocker\TikTokPixelPreset::class
|
100 |
+
];
|
101 |
+
const PRESETS_TYPE = 'blocker';
|
102 |
+
/**
|
103 |
+
* C'tor.
|
104 |
+
*/
|
105 |
+
public function __construct() {
|
106 |
+
parent::__construct(self::PRESETS_TYPE);
|
107 |
+
}
|
108 |
+
// Documented in Presets
|
109 |
+
public function getClassList($force = \false) {
|
110 |
+
/**
|
111 |
+
* Filters available presets for blocker.
|
112 |
+
*
|
113 |
+
* @hook RCB/Presets/Blocker
|
114 |
+
* @param {string} $presets All available presets. `[id => <extends AbstractBlockerPreset>::class]`
|
115 |
+
* @returns {string}
|
116 |
+
*/
|
117 |
+
$list = apply_filters('RCB/Presets/Blocker', self::CLASSES);
|
118 |
+
if ($this->needsRecalculation() || $force) {
|
119 |
+
$this->persist($this->fromClassList($list));
|
120 |
+
}
|
121 |
+
return $list;
|
122 |
+
}
|
123 |
+
// Documented in Presets
|
124 |
+
public function persist($items) {
|
125 |
+
$persist = parent::persist($items);
|
126 |
+
if ($persist) {
|
127 |
+
/**
|
128 |
+
* Available presets for blockers got persisted.
|
129 |
+
*
|
130 |
+
* @hook RCB/Presets/Blocker/Persisted
|
131 |
+
* @param {array[]} $presets All available presets as array
|
132 |
+
* @since 2.6.0
|
133 |
+
*/
|
134 |
+
do_action('RCB/Presets/Blocker/Persisted', $items);
|
135 |
+
}
|
136 |
+
return $persist;
|
137 |
+
}
|
138 |
+
// Documented in Presets
|
139 |
+
public function getOtherMetaKeys() {
|
140 |
+
// Make hosts always available in cache cause we need this for the scanner
|
141 |
+
return [\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_HOSTS, 'extended', 'mustHosts'];
|
142 |
+
}
|
143 |
+
/**
|
144 |
+
* Resolve `attributes.cookies` so we can e.g. show created cookies in "Connected cookies"
|
145 |
+
* in blocker edit form.
|
146 |
+
*
|
147 |
+
* @param array $preset Result of `getWithAttributes()`
|
148 |
+
*/
|
149 |
+
public function resolveAvailableCookies(&$preset) {
|
150 |
+
$cookiePresets = new \DevOwl\RealCookieBanner\presets\CookiePresets();
|
151 |
+
$existingCookies = \DevOwl\RealCookieBanner\presets\CookiePresets::getCookiesWithPreset();
|
152 |
+
if ($preset !== \false && isset($preset['attributes'], $preset['attributes']['cookies'])) {
|
153 |
+
$newCookies = [];
|
154 |
+
foreach ($preset['attributes']['cookies'] as $cookie) {
|
155 |
+
if (\is_string($cookie)) {
|
156 |
+
// It should reference to an existing preset, let's resolve the ID
|
157 |
+
foreach ($existingCookies as $existingCookie) {
|
158 |
+
if (
|
159 |
+
$existingCookie->metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID] ===
|
160 |
+
$cookie
|
161 |
+
) {
|
162 |
+
$newCookies[] = $existingCookie->ID;
|
163 |
+
continue 2;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
// Cookie preset is available, but does not actually exist as cookie
|
167 |
+
$cookieAttributes = $cookiePresets->getFromCache($cookie);
|
168 |
+
$cookieName = $cookieAttributes['name'];
|
169 |
+
$cookieDescription = $cookieAttributes['description'] ?? '';
|
170 |
+
$newCookies[] = [
|
171 |
+
'id' => $cookie,
|
172 |
+
'name' =>
|
173 |
+
$cookieName . (empty($cookieDescription) ? '' : \sprintf(' (%s)', $cookieDescription)),
|
174 |
+
'version' => $cookieAttributes['version'],
|
175 |
+
'attributes' => $cookiePresets->getWithAttributes($cookie)['attributes']
|
176 |
+
];
|
177 |
+
} else {
|
178 |
+
$newCookies[] = $cookie;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
$preset['attributes']['cookies'] = $newCookies;
|
182 |
+
}
|
183 |
+
return $preset;
|
184 |
+
}
|
185 |
+
// Documented in Presets
|
186 |
+
public function fromClassList($clazzes) {
|
187 |
+
$result = [];
|
188 |
+
$existingBlockers = self::getBlockerWithPreset();
|
189 |
+
$existingCookies = \DevOwl\RealCookieBanner\presets\CookiePresets::getCookiesWithPreset();
|
190 |
+
foreach ($clazzes as $id => $clazz) {
|
191 |
+
/**
|
192 |
+
* Instance.
|
193 |
+
*
|
194 |
+
* @var AbstractBlockerPreset
|
195 |
+
*/
|
196 |
+
$instance = new $clazz();
|
197 |
+
$preset = $instance->common();
|
198 |
+
$preset['instance'] = $instance;
|
199 |
+
if (!isset($preset['tags'])) {
|
200 |
+
$preset['tags'] = [];
|
201 |
+
}
|
202 |
+
$result[$id] = $preset;
|
203 |
+
}
|
204 |
+
// Iterate again to apply middleware
|
205 |
+
foreach ($result as &$preset) {
|
206 |
+
$this->applyMiddleware($preset, $existingCookies, $existingBlockers, $result);
|
207 |
+
}
|
208 |
+
return $result;
|
209 |
+
}
|
210 |
+
/**
|
211 |
+
* See filter `RCB/Presets/Blocker/Middleware`.
|
212 |
+
*
|
213 |
+
* @param array $preset
|
214 |
+
* @param WP_Post[] $existingCookies
|
215 |
+
* @param WP_Post[] $existingBlockers
|
216 |
+
* @param array $result
|
217 |
+
*/
|
218 |
+
public function applyMiddleware(&$preset, $existingCookies, $existingBlockers, &$result) {
|
219 |
+
/**
|
220 |
+
* Inject some middleware directly to the content blocker preset. This can be useful to
|
221 |
+
* enhance the preset with functionalities like `extends`.
|
222 |
+
*
|
223 |
+
* @hook RCB/Presets/Blocker/Middleware
|
224 |
+
* @param {array} $preset The preset passed as reference
|
225 |
+
* @param {AbstractCookiePreset} $instance Preset instance
|
226 |
+
* @param {WP_Post[]} $existingBlockers
|
227 |
+
* @param {WP_Post[]} $existingCookies
|
228 |
+
* @param {array[]} $result All collected presets (since 2.6.0); when requesting a single preset attributes, this can be of size 1
|
229 |
+
* @param {Presets} $presetsInstance
|
230 |
+
* @returns {array}
|
231 |
+
*/
|
232 |
+
$preset = apply_filters_ref_array('RCB/Presets/Blocker/Middleware', [
|
233 |
+
&$preset,
|
234 |
+
$preset['instance'] ?? null,
|
235 |
+
$existingBlockers,
|
236 |
+
$existingCookies,
|
237 |
+
&$result,
|
238 |
+
$this
|
239 |
+
]);
|
240 |
+
// Make `hosts` always available in metadata (needed for scanner)
|
241 |
+
if (
|
242 |
+
isset(
|
243 |
+
$preset['attributes'],
|
244 |
+
$preset['attributes'][\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_HOSTS]
|
245 |
+
)
|
246 |
+
) {
|
247 |
+
$preset[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_HOSTS] =
|
248 |
+
$preset['attributes'][\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_HOSTS];
|
249 |
+
}
|
250 |
+
unset($preset['instance']);
|
251 |
+
}
|
252 |
+
/**
|
253 |
+
* Get all available blocker with a preset.
|
254 |
+
*/
|
255 |
+
public static function getBlockerWithPreset() {
|
256 |
+
return \DevOwl\RealCookieBanner\settings\Blocker::getInstance()->getOrdered(
|
257 |
+
\false,
|
258 |
+
get_posts(
|
259 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
260 |
+
[
|
261 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
262 |
+
'numberposts' => -1,
|
263 |
+
'nopaging' => \true,
|
264 |
+
'meta_query' => [
|
265 |
+
[
|
266 |
+
'key' => \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID,
|
267 |
+
'compare' => 'EXISTS'
|
268 |
+
]
|
269 |
+
],
|
270 |
+
'post_status' => ['publish', 'private', 'draft']
|
271 |
+
],
|
272 |
+
'blockerWithPreset'
|
273 |
+
)
|
274 |
+
)
|
275 |
+
);
|
276 |
+
}
|
277 |
+
}
|
inc/presets/CookiePresets.php
ADDED
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\free\GoogleFontsPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\free\JetPackCommentsPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\RealCookieBannerPreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressCommentsPreset;
|
9 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressUserLoginPreset;
|
10 |
+
use DevOwl\RealCookieBanner\presets\free\YoutubePreset;
|
11 |
+
use DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset;
|
12 |
+
use DevOwl\RealCookieBanner\presets\free\GravatarPreset;
|
13 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressEmojisPreset;
|
14 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
15 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
16 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
17 |
+
use DevOwl\RealCookieBanner\Core;
|
18 |
+
use DevOwl\RealCookieBanner\presets\free\ElementorPreset;
|
19 |
+
use DevOwl\RealCookieBanner\presets\free\FontAwesomePreset;
|
20 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressPluginEmbed;
|
21 |
+
use DevOwl\RealCookieBanner\scanner\ScanPresets;
|
22 |
+
use DevOwl\RealCookieBanner\view\ConfigPage;
|
23 |
+
// @codeCoverageIgnoreStart
|
24 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
25 |
+
// Avoid direct file request
|
26 |
+
// @codeCoverageIgnoreEnd
|
27 |
+
/**
|
28 |
+
* Predefined presets for cookies.
|
29 |
+
*/
|
30 |
+
class CookiePresets extends \DevOwl\RealCookieBanner\presets\Presets {
|
31 |
+
const CLASSES = [
|
32 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REAL_COOKIE_BANNER =>
|
33 |
+
\DevOwl\RealCookieBanner\presets\free\RealCookieBannerPreset::class,
|
34 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_USER_LOGIN =>
|
35 |
+
\DevOwl\RealCookieBanner\presets\free\WordPressUserLoginPreset::class,
|
36 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_COMMENTS =>
|
37 |
+
\DevOwl\RealCookieBanner\presets\free\WordPressCommentsPreset::class,
|
38 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_COMMENTS =>
|
39 |
+
\DevOwl\RealCookieBanner\presets\free\JetPackCommentsPreset::class,
|
40 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_FONTS =>
|
41 |
+
\DevOwl\RealCookieBanner\presets\free\GoogleFontsPreset::class,
|
42 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::YOUTUBE =>
|
43 |
+
\DevOwl\RealCookieBanner\presets\free\YoutubePreset::class,
|
44 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_SITE_STATS =>
|
45 |
+
\DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::class,
|
46 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GRAVATAR =>
|
47 |
+
\DevOwl\RealCookieBanner\presets\free\GravatarPreset::class,
|
48 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_EMOJIS =>
|
49 |
+
\DevOwl\RealCookieBanner\presets\free\WordPressEmojisPreset::class,
|
50 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ELEMENTOR =>
|
51 |
+
\DevOwl\RealCookieBanner\presets\free\ElementorPreset::class,
|
52 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FONTAWESOME =>
|
53 |
+
\DevOwl\RealCookieBanner\presets\free\FontAwesomePreset::class,
|
54 |
+
\DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_PLUGIN_EMBED =>
|
55 |
+
\DevOwl\RealCookieBanner\presets\free\WordPressPluginEmbed::class
|
56 |
+
];
|
57 |
+
const PRESETS_TYPE = 'cookie';
|
58 |
+
/**
|
59 |
+
* C'tor.
|
60 |
+
*/
|
61 |
+
public function __construct() {
|
62 |
+
parent::__construct(self::PRESETS_TYPE);
|
63 |
+
}
|
64 |
+
// Documented in Presets
|
65 |
+
public function getClassList($force = \false) {
|
66 |
+
/**
|
67 |
+
* Filters available presets for cookies.
|
68 |
+
*
|
69 |
+
* @hook RCB/Presets/Cookies
|
70 |
+
* @param {string[]} $presets All available presets. `[id => <extends AbstractCookiePreset>::class]`
|
71 |
+
* @returns {string[]}
|
72 |
+
*/
|
73 |
+
$list = apply_filters('RCB/Presets/Cookies', self::CLASSES);
|
74 |
+
if ($this->needsRecalculation() || $force) {
|
75 |
+
$this->persist($this->fromClassList($list));
|
76 |
+
}
|
77 |
+
return $list;
|
78 |
+
}
|
79 |
+
// Documented in Presets
|
80 |
+
public function persist($items) {
|
81 |
+
$persist = parent::persist($items);
|
82 |
+
if ($persist) {
|
83 |
+
/**
|
84 |
+
* Available presets for cookies got persisted.
|
85 |
+
*
|
86 |
+
* @hook RCB/Presets/Cookies/Persisted
|
87 |
+
* @param {array[]} $presets All available presets as array
|
88 |
+
* @since 2.6.0
|
89 |
+
*/
|
90 |
+
do_action('RCB/Presets/Cookies/Persisted', $items);
|
91 |
+
}
|
92 |
+
return $persist;
|
93 |
+
}
|
94 |
+
// Documented in Presets
|
95 |
+
public function getOtherMetaKeys() {
|
96 |
+
return ['blockerPresets', 'extended'];
|
97 |
+
}
|
98 |
+
// Documented in Presets
|
99 |
+
public function expandResult(&$rows) {
|
100 |
+
(new \DevOwl\RealCookieBanner\scanner\ScanPresets())->expandResult($rows);
|
101 |
+
}
|
102 |
+
/**
|
103 |
+
* Create a cookie from a cookie preset.
|
104 |
+
*
|
105 |
+
* @param int $identifier
|
106 |
+
* @param int $group
|
107 |
+
*/
|
108 |
+
public function createFromPreset($identifier, $group) {
|
109 |
+
$preset = $this->getWithAttributes($identifier);
|
110 |
+
if ($preset !== \false) {
|
111 |
+
$attributes = $preset['attributes'];
|
112 |
+
$name = $attributes['name'];
|
113 |
+
$purpose = $attributes['purpose'];
|
114 |
+
unset($attributes['name'], $attributes['group'], $attributes['purpose']);
|
115 |
+
// Cast some attributes
|
116 |
+
foreach ($attributes as $key => $value) {
|
117 |
+
switch ($key) {
|
118 |
+
case \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS:
|
119 |
+
$attributes[$key] = \json_encode($value);
|
120 |
+
break;
|
121 |
+
default:
|
122 |
+
break;
|
123 |
+
}
|
124 |
+
}
|
125 |
+
$post = wp_insert_post(
|
126 |
+
[
|
127 |
+
'post_title' => $name,
|
128 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
129 |
+
'post_status' => 'publish',
|
130 |
+
'post_content' => $purpose,
|
131 |
+
'meta_input' => \array_merge(
|
132 |
+
[
|
133 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID => $identifier,
|
134 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_VERSION => $preset['version']
|
135 |
+
],
|
136 |
+
$attributes
|
137 |
+
)
|
138 |
+
],
|
139 |
+
\true
|
140 |
+
);
|
141 |
+
if (is_wp_error($post)) {
|
142 |
+
return $post;
|
143 |
+
}
|
144 |
+
return wp_set_object_terms($post, $group, \DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME);
|
145 |
+
}
|
146 |
+
return \false;
|
147 |
+
}
|
148 |
+
// Documented in Presets
|
149 |
+
public function fromClassList($clazzes) {
|
150 |
+
$result = [];
|
151 |
+
$existingCookies = self::getCookiesWithPreset();
|
152 |
+
$existingBlockers = \DevOwl\RealCookieBanner\presets\BlockerPresets::getBlockerWithPreset();
|
153 |
+
foreach ($clazzes as $id => $clazz) {
|
154 |
+
/**
|
155 |
+
* Instance.
|
156 |
+
*
|
157 |
+
* @var AbstractCookiePreset
|
158 |
+
*/
|
159 |
+
$instance = new $clazz();
|
160 |
+
$preset = $instance->common();
|
161 |
+
$preset['instance'] = $instance;
|
162 |
+
if (!isset($preset['tags'])) {
|
163 |
+
$preset['tags'] = [];
|
164 |
+
}
|
165 |
+
$result[$id] = $preset;
|
166 |
+
}
|
167 |
+
// Iterate again to apply middleware
|
168 |
+
foreach ($result as &$preset) {
|
169 |
+
$this->applyMiddleware($preset, $existingCookies, $existingBlockers, $result);
|
170 |
+
}
|
171 |
+
return $result;
|
172 |
+
}
|
173 |
+
/**
|
174 |
+
* See filter `RCB/Presets/Cookies/Middleware`.
|
175 |
+
*
|
176 |
+
* @param array $preset
|
177 |
+
* @param WP_Post[] $existingCookies
|
178 |
+
* @param WP_Post[] $existingBlockers
|
179 |
+
* @param array $result
|
180 |
+
*/
|
181 |
+
public function applyMiddleware(&$preset, $existingCookies, $existingBlockers, &$result) {
|
182 |
+
/**
|
183 |
+
* Inject some middleware directly to the cookie preset. This can be useful to
|
184 |
+
* enhance the preset with functionalities like `extends`.
|
185 |
+
*
|
186 |
+
* @hook RCB/Presets/Cookies/Middleware
|
187 |
+
* @param {array} $preset The preset passed as reference
|
188 |
+
* @param {AbstractCookiePreset} $instance Preset instance
|
189 |
+
* @param {WP_Post[]} $existingCookies
|
190 |
+
* @param {WP_Post[]} $existingBlocker
|
191 |
+
* @param {array[]} $result All collected presets (since 2.6.0); when requesting a single preset attributes, this can be of size 1
|
192 |
+
* @param {Presets} $presetsInstance
|
193 |
+
* @returns {array}
|
194 |
+
*/
|
195 |
+
$preset = apply_filters_ref_array('RCB/Presets/Cookies/Middleware', [
|
196 |
+
&$preset,
|
197 |
+
$preset['instance'] ?? null,
|
198 |
+
$existingCookies,
|
199 |
+
$existingBlockers,
|
200 |
+
&$result,
|
201 |
+
$this
|
202 |
+
]);
|
203 |
+
unset($preset['instance']);
|
204 |
+
}
|
205 |
+
/**
|
206 |
+
* Get all available cookies with a preset.
|
207 |
+
*/
|
208 |
+
public static function getCookiesWithPreset() {
|
209 |
+
return \DevOwl\RealCookieBanner\settings\Cookie::getInstance()->getOrdered(
|
210 |
+
null,
|
211 |
+
\false,
|
212 |
+
get_posts(
|
213 |
+
\DevOwl\RealCookieBanner\Core::getInstance()->queryArguments(
|
214 |
+
[
|
215 |
+
'post_type' => \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
216 |
+
'numberposts' => -1,
|
217 |
+
'nopaging' => \true,
|
218 |
+
'meta_query' => [
|
219 |
+
[
|
220 |
+
'key' => \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID,
|
221 |
+
'compare' => 'EXISTS'
|
222 |
+
]
|
223 |
+
],
|
224 |
+
'post_status' => ['publish', 'private', 'draft']
|
225 |
+
],
|
226 |
+
'cookiesWithPreset'
|
227 |
+
)
|
228 |
+
)
|
229 |
+
);
|
230 |
+
}
|
231 |
+
/**
|
232 |
+
* Get the URL to create a new cookie from a preset identifier.
|
233 |
+
*
|
234 |
+
* @param string $identifier
|
235 |
+
*/
|
236 |
+
public static function getCreateUrl($identifier) {
|
237 |
+
return admin_url(
|
238 |
+
\sprintf(
|
239 |
+
'admin.php?page=%s#/cookies/%d/new?force=%s',
|
240 |
+
\DevOwl\RealCookieBanner\view\ConfigPage::COMPONENT_ID,
|
241 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::getInstance()->getEssentialGroup()->term_id,
|
242 |
+
$identifier
|
243 |
+
)
|
244 |
+
);
|
245 |
+
}
|
246 |
+
}
|
inc/presets/PresetIdentifierMap.php
ADDED
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
/**
|
10 |
+
* A list of all available preset identifiers. This is useful to save resources when
|
11 |
+
* building the class list for cookies and content blocker.
|
12 |
+
*/
|
13 |
+
class PresetIdentifierMap {
|
14 |
+
const ACTIVE_CAMPAIGN_RECAPTCHA = 'activecampaign-form-with-google-recaptcha';
|
15 |
+
const ACTIVE_CAMPAIGN_SITE_TRACKING = 'activecampaign-site-tracking';
|
16 |
+
const AD_INSERTER = 'a-d-inserter';
|
17 |
+
const ADD_THIS = 'addthis-share';
|
18 |
+
const ADD_TO_ANY = 'add-to-any';
|
19 |
+
const ADOBE_TYPEKIT = 'adobe-fonts-typekit';
|
20 |
+
const AMAZON_ASSOCIATES_WIDGET = 'amazon-associates-widget';
|
21 |
+
const ANALYTIFY = 'analytify';
|
22 |
+
const ANCHOR_FM = 'anchor-fm';
|
23 |
+
const APPLE_MUSIC = 'apple-music';
|
24 |
+
const AWIN_LINK_AND_IMAGE_ADS = 'awin-link-and-image-ads';
|
25 |
+
const AWIN_PUBLISHER_MASTERTAG = 'awin-publisher-mastertag';
|
26 |
+
const BING_ADS = 'bing-ads';
|
27 |
+
const BING_MAPS = 'bing-maps';
|
28 |
+
const BLOOM = 'bloom';
|
29 |
+
const CALDERA_FORMS_RECAPTCHA = 'caldera-forms-with-google-recaptcha';
|
30 |
+
const CALENDLY = 'calendly';
|
31 |
+
const CONVERTKIT = 'convertkit';
|
32 |
+
const CLEANTALK_SPAM_PROTECT = 'cleantalk-spam-protect';
|
33 |
+
const CLEVERREACH_RECAPTCHA = 'clever-reach-with-google-recaptcha';
|
34 |
+
const CLOUDFLARE = 'cloudflare';
|
35 |
+
const CONTACT_FORM_7_RECAPTCHA = 'contact-form-7-with-google-recaptcha';
|
36 |
+
const CUSTOM_FACEBOOK_FEED = 'custom-facebook-feed';
|
37 |
+
const CUSTOM_TWITTER_FEED = 'custom-twitter-feed';
|
38 |
+
const DAILYMOTION = 'dailymotion';
|
39 |
+
const DISCORD_WIDGET = 'discord-widget';
|
40 |
+
const ELEMENTOR = 'elementor';
|
41 |
+
const ELEMENTOR_FORMS_RECAPTCHA = 'elementor-forms-recaptcha';
|
42 |
+
const EXACT_METRICS = 'exact-metrics';
|
43 |
+
const EZOIC_ESSENTIAL = 'ezoic-essential';
|
44 |
+
const EZOIC_PREFERENCES = 'ezoic-preferences';
|
45 |
+
const EZOIC_STATISTIC = 'ezoic-statistic';
|
46 |
+
const EZOIC_MARKETING = 'ezoic-marketing';
|
47 |
+
const FACEBOOK_FOR_WOOCOMMERCE = 'facebook-for-woocommerce';
|
48 |
+
const FACEBOOK_LIKE = 'facebook-like';
|
49 |
+
const FACEBOOK_PAGE_PLUGIN = 'facebook-page-plugin';
|
50 |
+
const FACEBOOK_PIXEL = 'facebook-pixel';
|
51 |
+
const FACEBOOK_POST = 'facebook-post';
|
52 |
+
const FACEBOOK_SHARE = 'facebook-share';
|
53 |
+
const FEEDS_FOR_YOUTUBE = 'feeds-for-youtube';
|
54 |
+
const FLICKR = 'flickr';
|
55 |
+
const FONTAWESOME = 'font-awesome';
|
56 |
+
const FORMIDABLE_RECAPTCHA = 'formidable-with-google-recaptcha';
|
57 |
+
const FORM_MAKER_RECAPTCHA = 'form-maker-with-google-recaptcha';
|
58 |
+
const FOUND_EE = 'found-ee';
|
59 |
+
const FRESHCHAT = 'freshchat';
|
60 |
+
const GA_GOOGLE_ANALYTICS = 'ga-google-analytics';
|
61 |
+
const GA_GOOGLE_ANALYTICS_4 = 'ga-google-analytics-analytics-4';
|
62 |
+
const GETYOURGUIDE = 'getyourguide';
|
63 |
+
const GIPHY = 'giphy';
|
64 |
+
const GOOGLE_ADS = 'google-ads-conversion-tracking';
|
65 |
+
const GOOGLE_AD_SENSE = 'google-adsense';
|
66 |
+
const GOOGLE_ANALYTICS = 'google-analytics';
|
67 |
+
const GOOGLE_ANALYTICS_4 = 'google-analytics-analytics-4';
|
68 |
+
const GOOGLE_FONTS = 'google-fonts';
|
69 |
+
const GOOGLE_MAPS = 'google-maps';
|
70 |
+
const GOOGLE_RECAPTCHA = 'google-recaptcha';
|
71 |
+
const GOOGLE_TRANSLATE = 'google-translate';
|
72 |
+
const GOOGLE_TRENDS = 'google-trends';
|
73 |
+
const GRAVATAR = 'gravatar-avatar-images';
|
74 |
+
const GTM = 'gtm';
|
75 |
+
const HCAPTCHA = 'hcaptcha';
|
76 |
+
const HELP_CRUNCH_CHAT = 'helpcrunch-chat';
|
77 |
+
const HELP_SCOUT_CHAT = 'helpscout-chat';
|
78 |
+
const HOTJAR = 'hotjar';
|
79 |
+
const IMGUR = 'imgur';
|
80 |
+
const INSTAGRAM_POST = 'instagram-post';
|
81 |
+
const INTERCOM_CHAT = 'intercom-chat';
|
82 |
+
const ISSUU = 'issuu';
|
83 |
+
const JETPACK_COMMENTS = 'jetpack-comments';
|
84 |
+
const JETPACK_SITE_STATS = 'jetpack-site-stats';
|
85 |
+
const KLARNA_CHECKOUT_WOOCOMMERCE = 'klarna-checkout-woocommerce';
|
86 |
+
const LINKEDIN_ADS = 'linkedin-ads';
|
87 |
+
const LOOM = 'loom';
|
88 |
+
const LUCKY_ORANGE = 'lucky-orange';
|
89 |
+
const MAILCHIMP_FOR_WOOCOMMERCE = 'mailchimp-for-woocommerce';
|
90 |
+
const MAILERLITE = 'mailerlite';
|
91 |
+
const MAILPOET = 'mailpoet';
|
92 |
+
const MATOMO = 'matomo';
|
93 |
+
const MATOMO_PLUGIN = 'matomo-plugin';
|
94 |
+
const MATOMO_INTEGRATION_PLUGIN = 'wp-matomo-integration';
|
95 |
+
const METRICOOL = 'metricool';
|
96 |
+
const MICROSOFT_CLARITY = 'microsoft-clarity';
|
97 |
+
const MONSTERINSIGHTS = 'monsterinsights';
|
98 |
+
const MOUSEFLOW = 'mouseflow';
|
99 |
+
const MTM = 'mtm';
|
100 |
+
const MY_CRUISE_EXCURSION = 'my-cruise-excursion';
|
101 |
+
const MY_FONTS = 'my-fonts';
|
102 |
+
const NINJA_FORMS_RECAPTCHA = 'ninja-forms-with-google-recaptcha';
|
103 |
+
const OPEN_STREET_MAP = 'open-street-map';
|
104 |
+
const PADDLE_COM = 'paddle-com';
|
105 |
+
const PINTEREST = 'pinterest';
|
106 |
+
const PINTEREST_TAG = 'pinterest-tag';
|
107 |
+
const PODIGEE = 'podigee';
|
108 |
+
const POPUP_MAKER = 'popup-maker';
|
109 |
+
const POLYLANG = 'polylang';
|
110 |
+
const PROVEN_EXPERT_WIDGET = 'proven-expert-widget';
|
111 |
+
const QUFORM = 'quform';
|
112 |
+
const RANKMATH_GA = 'rank-math-ga';
|
113 |
+
const REAL_COOKIE_BANNER = 'real-cookie-banner';
|
114 |
+
const REAMAZE_CHAT = 'reamaze-chat';
|
115 |
+
const REDDIT = 'reddit';
|
116 |
+
const SENDINBLUE = 'sendinblue';
|
117 |
+
const SMASH_BALLOON_SOCIAL_PHOTO_FEED = 'smash-balloon-social-photo-feed';
|
118 |
+
const SOUNDCLOUD = 'soundcloud';
|
119 |
+
const SPOTIFY = 'spotify';
|
120 |
+
const STRIPE = 'stripe';
|
121 |
+
const TABOOLA = 'taboola';
|
122 |
+
const TAWK_TO_CHAT = 'tawk-to-chat';
|
123 |
+
const THRIVE_LEADS = 'thrive-leads';
|
124 |
+
const TIDIO_CHAT = 'tidio-chat';
|
125 |
+
const TIKTOK = 'tik-tok';
|
126 |
+
const TIKTOK_PIXEL = 'tik-tok-pixel';
|
127 |
+
const TRANSLATEPRESS = 'translatepress';
|
128 |
+
const TWITTER_TWEET = 'twitter-tweet';
|
129 |
+
const TYPEFORM = 'typeform';
|
130 |
+
const ULTIMATE_MEMBER = 'ultimate-member';
|
131 |
+
const USERLIKE = 'userlike';
|
132 |
+
const VG_WORT = 'vg-wort';
|
133 |
+
const VIMEO = 'vimeo';
|
134 |
+
const WOOCOMMERCE = 'woocommerce';
|
135 |
+
const WOOCOMMERCE_GOOGLE_ANALYTICS = 'woocommerce-google-analytics';
|
136 |
+
const WOOCOMMERCE_GOOGLE_ANALYTICS_4 = 'woocommerce-google-analytics-analytics-4';
|
137 |
+
const WOOCOMMERCE_GATEWAY_STRIPE = 'woocommerce-gateway-stripe';
|
138 |
+
const WORDFENCE = 'wordfence';
|
139 |
+
const WORDPRESS_COMMENTS = 'wordpress-comments';
|
140 |
+
const WORDPRESS_EMOJIS = 'wordpress-emojis';
|
141 |
+
const WORDPRESS_PLUGIN_EMBED = 'wordpress-plugin-embed';
|
142 |
+
const WORDPRESS_USER_LOGIN = 'wordpress-user-login';
|
143 |
+
const WPFORMS_RECAPTCHA = 'wpforms-with-google-recaptcha';
|
144 |
+
const WPML = 'wpml';
|
145 |
+
const XING_EVENTS = 'xing-events';
|
146 |
+
const YANDEX_METRICA = 'yandex-metrica';
|
147 |
+
const YOUTUBE = 'youtube';
|
148 |
+
const ZENDESK_CHAT = 'zendesk-chat';
|
149 |
+
const ZOHO_BOOKINGS = 'zoho-bookings';
|
150 |
+
const ZOHO_FORMS = 'zoho-forms';
|
151 |
+
}
|
inc/presets/Presets.php
ADDED
@@ -0,0 +1,303 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
7 |
+
use DevOwl\RealCookieBanner\Core;
|
8 |
+
use DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\ExpireOption;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Persistence for cookie and blocker presets metadata by using a class list.
|
15 |
+
*/
|
16 |
+
abstract class Presets {
|
17 |
+
use UtilsProvider;
|
18 |
+
const TABLE_NAME = 'presets';
|
19 |
+
const TRANSIENT_CACHE_KEY = RCB_OPT_PREFIX . '-%s-presets-%s';
|
20 |
+
const TRANSIENT_CACHE_EXPIRE = 12 * 60 * 60;
|
21 |
+
/**
|
22 |
+
* Cache of presets as they can be time-consuming to generate.
|
23 |
+
* So, they are recalculated each x hours.
|
24 |
+
*
|
25 |
+
* @var ExpireOption
|
26 |
+
*/
|
27 |
+
private $expireOption;
|
28 |
+
private $type;
|
29 |
+
/**
|
30 |
+
* C'tor.
|
31 |
+
*
|
32 |
+
* @param string $type
|
33 |
+
*/
|
34 |
+
public function __construct($type) {
|
35 |
+
$this->type = $type;
|
36 |
+
}
|
37 |
+
/**
|
38 |
+
* Get all available presets and persist the metadata to cache.
|
39 |
+
*
|
40 |
+
* @param boolean $force If `true`, the cache gets invalidated
|
41 |
+
*/
|
42 |
+
abstract public function getClassList($force = \false);
|
43 |
+
/**
|
44 |
+
* Create presets from `AbstractBlockerPreset` classes.
|
45 |
+
*
|
46 |
+
* @param string[] $clazzes
|
47 |
+
*/
|
48 |
+
abstract public function fromClassList($clazzes);
|
49 |
+
/**
|
50 |
+
* Get a list of other meta keys which should be persist to metadata cache.
|
51 |
+
*/
|
52 |
+
public function getOtherMetaKeys() {
|
53 |
+
return [];
|
54 |
+
}
|
55 |
+
/**
|
56 |
+
* Expand the read rows with additional, recalculated tags (not cached!).
|
57 |
+
*
|
58 |
+
* @param array $rows
|
59 |
+
*/
|
60 |
+
public function expandResult(&$rows) {
|
61 |
+
// Silence is golden.
|
62 |
+
}
|
63 |
+
/**
|
64 |
+
* Get presets from the cache.
|
65 |
+
*
|
66 |
+
* @param boolean $force If `true`, the cache gets invalidated
|
67 |
+
*/
|
68 |
+
public function getAllFromCache($force = \false) {
|
69 |
+
global $wpdb;
|
70 |
+
// Probably create new metadata cache
|
71 |
+
$this->getClassList($force);
|
72 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
73 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
74 |
+
$rows = $wpdb->get_results(
|
75 |
+
$wpdb->prepare(
|
76 |
+
"SELECT * FROM {$table_name} WHERE context = %s AND `type` = %s ORDER BY `name`",
|
77 |
+
$this->getContextKey(),
|
78 |
+
$this->getType()
|
79 |
+
),
|
80 |
+
ARRAY_A
|
81 |
+
);
|
82 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
83 |
+
$result = [];
|
84 |
+
foreach ($rows as &$row) {
|
85 |
+
$this->castReadRow($row);
|
86 |
+
$result[$row['identifier']] = $row;
|
87 |
+
}
|
88 |
+
$this->expandResult($result);
|
89 |
+
return $result;
|
90 |
+
}
|
91 |
+
/**
|
92 |
+
* Get a preset from the cache. Returns `false` if preset not in cache.
|
93 |
+
*
|
94 |
+
* @param string $identifier
|
95 |
+
*/
|
96 |
+
public function getFromCache($identifier) {
|
97 |
+
global $wpdb;
|
98 |
+
$list = $this->getClassList();
|
99 |
+
if (isset($list[$identifier])) {
|
100 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
101 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
102 |
+
$row = $wpdb->get_row(
|
103 |
+
$wpdb->prepare(
|
104 |
+
"SELECT * FROM {$table_name} WHERE identifier = %s AND context = %s AND `type` = %s",
|
105 |
+
$identifier,
|
106 |
+
$this->getContextKey(),
|
107 |
+
$this->getType()
|
108 |
+
),
|
109 |
+
ARRAY_A
|
110 |
+
);
|
111 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
112 |
+
if (\is_array($row)) {
|
113 |
+
$this->castReadRow($row);
|
114 |
+
$result = [$row];
|
115 |
+
$this->expandResult($result);
|
116 |
+
return $result[0];
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return \false;
|
120 |
+
}
|
121 |
+
/**
|
122 |
+
* Cast SQL types.
|
123 |
+
*
|
124 |
+
* @param array $row
|
125 |
+
*/
|
126 |
+
public function castReadRow(&$row) {
|
127 |
+
$row['id'] = \intval($row['id']);
|
128 |
+
$row['version'] = \intval($row['version']);
|
129 |
+
if (empty($row['description'])) {
|
130 |
+
unset($row['description']);
|
131 |
+
}
|
132 |
+
if (empty($row['attributes_name'])) {
|
133 |
+
unset($row['attributes_name']);
|
134 |
+
}
|
135 |
+
if (empty($row['tags'])) {
|
136 |
+
unset($row['tags']);
|
137 |
+
} else {
|
138 |
+
$row['tags'] = \json_decode($row['tags'], ARRAY_A);
|
139 |
+
}
|
140 |
+
$row['disabled'] = \boolval($row['disabled']);
|
141 |
+
$row['recommended'] = \boolval($row['recommended']);
|
142 |
+
if ($row['disabled'] && empty($row['tags'][__('Disabled', RCB_TD)])) {
|
143 |
+
$row['tags'][__('Disabled', RCB_TD)] = \sprintf(
|
144 |
+
// translators:
|
145 |
+
__(
|
146 |
+
'This template is currently disabled because the respective WordPress plugin is not installed or the desired function is not active. <a href="%s" target="_blank">Learn more</a>',
|
147 |
+
RCB_TD
|
148 |
+
),
|
149 |
+
__('https://devowl.io/knowledge-base/real-cookie-banner-disabled-cookie-templates/', RCB_TD)
|
150 |
+
);
|
151 |
+
}
|
152 |
+
$row['hidden'] = \boolval($row['hidden']);
|
153 |
+
if (!empty($row['other_meta'])) {
|
154 |
+
// Merge by reference
|
155 |
+
$other_meta = \json_decode($row['other_meta'], ARRAY_A);
|
156 |
+
if (\is_array($other_meta)) {
|
157 |
+
foreach ($other_meta as $key => $value) {
|
158 |
+
$row[$key] = $value;
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
unset($row['other_meta']);
|
163 |
+
}
|
164 |
+
/**
|
165 |
+
* Get a preset with attributes resolved. Returns `false` if
|
166 |
+
* preset not found or no attributes are available. This function does currently
|
167 |
+
* not use the metadata cache!
|
168 |
+
*
|
169 |
+
* @param string $identifier
|
170 |
+
*/
|
171 |
+
public function getWithAttributes($identifier) {
|
172 |
+
$list = $this->getClassList();
|
173 |
+
if (isset($list[$identifier])) {
|
174 |
+
$resolved = $this->fromClassList([$list[$identifier]]);
|
175 |
+
if (\count($resolved) > 0 && !empty($resolved[0]['attributes'])) {
|
176 |
+
return $resolved[0];
|
177 |
+
}
|
178 |
+
}
|
179 |
+
return \false;
|
180 |
+
}
|
181 |
+
/**
|
182 |
+
* Check if the current preset type needs to be recalculated.
|
183 |
+
*/
|
184 |
+
public function needsRecalculation() {
|
185 |
+
$option = $this->getExpireOption();
|
186 |
+
$cache = $option->get();
|
187 |
+
// Migration <= v1.3 currently does save all presets in one autoloaded option
|
188 |
+
// instead of the presets table. Let's delete the old behavior as the option
|
189 |
+
// should only hold the amount of available presets.
|
190 |
+
if (\is_array($cache)) {
|
191 |
+
$option->delete();
|
192 |
+
$cache = \false;
|
193 |
+
}
|
194 |
+
return $cache === \false;
|
195 |
+
}
|
196 |
+
/**
|
197 |
+
* Force regeneration of presets.
|
198 |
+
*/
|
199 |
+
public function forceRegeneration() {
|
200 |
+
$this->getExpireOption()->delete();
|
201 |
+
}
|
202 |
+
/**
|
203 |
+
* Persist a set of presets.
|
204 |
+
*
|
205 |
+
* @param array $items
|
206 |
+
*/
|
207 |
+
public function persist($items) {
|
208 |
+
if (\count($items) === 0) {
|
209 |
+
return \false;
|
210 |
+
}
|
211 |
+
global $wpdb;
|
212 |
+
$values = [];
|
213 |
+
$context = self::getContextKey();
|
214 |
+
$otherMetaKeys = $this->getOtherMetaKeys();
|
215 |
+
foreach ($items as $identifier => $value) {
|
216 |
+
$other_meta = [];
|
217 |
+
foreach ($otherMetaKeys as $key) {
|
218 |
+
if (isset($value[$key])) {
|
219 |
+
$other_meta[$key] = $value[$key];
|
220 |
+
}
|
221 |
+
}
|
222 |
+
$values[] = \str_ireplace(
|
223 |
+
"'NULL'",
|
224 |
+
'NULL',
|
225 |
+
$wpdb->prepare(
|
226 |
+
'(%s, %s, %s, %d, %s, %s, %s, %s, %s, %d, %d, %d, %s, %s)',
|
227 |
+
$this->getType(),
|
228 |
+
$identifier,
|
229 |
+
$context,
|
230 |
+
$value['version'],
|
231 |
+
isset($value['description']) ? $value['description'] : '',
|
232 |
+
$value['logoFile'],
|
233 |
+
$value['name'],
|
234 |
+
isset($value['tags']) && \count($value['tags']) > 0 ? \json_encode($value['tags']) : 'NULL',
|
235 |
+
isset($value['attributes'], $value['attributes']['name']) ? $value['attributes']['name'] : 'NULL',
|
236 |
+
isset($value['disabled']) ? ($value['disabled'] ? 1 : 0) : 0,
|
237 |
+
isset($value['hidden']) ? ($value['hidden'] ? 1 : 0) : 0,
|
238 |
+
isset($value['recommended']) ? ($value['recommended'] ? 1 : 0) : 0,
|
239 |
+
empty($other_meta) ? 'NULL' : \json_encode($other_meta),
|
240 |
+
isset($value['tier']) ? $value['tier'] : 'NULL'
|
241 |
+
)
|
242 |
+
);
|
243 |
+
}
|
244 |
+
// Persist it
|
245 |
+
$table_name = $this->getTableName(self::TABLE_NAME);
|
246 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
247 |
+
$result = $wpdb->query(
|
248 |
+
\sprintf(
|
249 |
+
'INSERT INTO %s (`type`, `identifier`, `context`, `version`, `description`, `logoFile`, `name`, `tags`, `attributes_name`, `disabled`, `hidden`, `recommended`, `other_meta`, `tier`)
|
250 |
+
VALUES %s ON DUPLICATE KEY UPDATE
|
251 |
+
`version` = VALUES(`version`),
|
252 |
+
`description` = VALUES(`description`),
|
253 |
+
logoFile = VALUES(`logoFile`),
|
254 |
+
`name` = VALUES(`name`),
|
255 |
+
tags = VALUES(`tags`),
|
256 |
+
attributes_name = VALUES(`attributes_name`),
|
257 |
+
`disabled` = VALUES(`disabled`),
|
258 |
+
`hidden` = VALUES(`hidden`),
|
259 |
+
`recommended` = VALUES(`recommended`),
|
260 |
+
`other_meta` = VALUES(`other_meta`),
|
261 |
+
`tier` = VALUES(`tier`)',
|
262 |
+
$table_name,
|
263 |
+
\join(',', $values)
|
264 |
+
)
|
265 |
+
);
|
266 |
+
// phpcs:enable WordPress.DB.PreparedSQL
|
267 |
+
// When $result is zero, the query did not fail but no new row where added, we need to respect `ON DUPLICATE KEY UPDATE`
|
268 |
+
$result = $result === 0 ? 1 : $result;
|
269 |
+
$this->getExpireOption()->set($result);
|
270 |
+
return $result > 0;
|
271 |
+
}
|
272 |
+
/**
|
273 |
+
* Get the `ExpireOption` instance.
|
274 |
+
*/
|
275 |
+
public function getExpireOption() {
|
276 |
+
return $this->expireOption === null
|
277 |
+
? ($this->expireOption = new \DevOwl\RealCookieBanner\Vendor\MatthiasWeb\Utils\ExpireOption(
|
278 |
+
\sprintf(self::TRANSIENT_CACHE_KEY, $this->getType(), self::getContextKey()),
|
279 |
+
\false,
|
280 |
+
self::TRANSIENT_CACHE_EXPIRE
|
281 |
+
))
|
282 |
+
: $this->expireOption;
|
283 |
+
}
|
284 |
+
// Self-explaining
|
285 |
+
public function getType() {
|
286 |
+
return $this->type;
|
287 |
+
}
|
288 |
+
/**
|
289 |
+
* Get the context key for cache. Presets should be saved per-language.
|
290 |
+
*/
|
291 |
+
public static function getContextKey() {
|
292 |
+
$language = isset($_GET[\DevOwl\RealCookieBanner\comp\language\Hooks::GET_QUERY_FORCE_LANG])
|
293 |
+
? $_GET[\DevOwl\RealCookieBanner\comp\language\Hooks::GET_QUERY_FORCE_LANG]
|
294 |
+
: \DevOwl\RealCookieBanner\Core::getInstance()
|
295 |
+
->getCompLanguage()
|
296 |
+
->getCurrentLanguage();
|
297 |
+
// Fallback to blog language
|
298 |
+
if (empty($language)) {
|
299 |
+
$language = \str_replace('-', '_', get_locale());
|
300 |
+
}
|
301 |
+
return $language;
|
302 |
+
}
|
303 |
+
}
|
inc/presets/UpdateNotice.php
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
7 |
+
use DevOwl\RealCookieBanner\Core;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
9 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
10 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Let the user know when a preset got updated through a plugin update.
|
17 |
+
*/
|
18 |
+
class UpdateNotice {
|
19 |
+
use UtilsProvider;
|
20 |
+
const DISMISS_PARAM = 'rcb-dismiss-upgrade-notice';
|
21 |
+
/**
|
22 |
+
* Creates an admin notice when there is an update for preset'able entry.
|
23 |
+
*/
|
24 |
+
public function admin_notices() {
|
25 |
+
$needsUpdate = $this->needsUpdate();
|
26 |
+
if (isset($_GET[self::DISMISS_PARAM])) {
|
27 |
+
$this->dismiss($needsUpdate);
|
28 |
+
return;
|
29 |
+
}
|
30 |
+
if (current_user_can(\DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY) && \count($needsUpdate) > 0) {
|
31 |
+
$this->outputNotice($needsUpdate);
|
32 |
+
}
|
33 |
+
}
|
34 |
+
/**
|
35 |
+
* Dismiss the notice by updating the preset version in database.
|
36 |
+
*
|
37 |
+
* @param array $needsUpdate
|
38 |
+
*/
|
39 |
+
protected function dismiss($needsUpdate) {
|
40 |
+
foreach ($needsUpdate as $update) {
|
41 |
+
update_post_meta(
|
42 |
+
$update->post_id,
|
43 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_VERSION,
|
44 |
+
$update->should
|
45 |
+
);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
/**
|
49 |
+
* Output the notice.
|
50 |
+
*
|
51 |
+
* @param array $needsUpdate
|
52 |
+
*/
|
53 |
+
protected function outputNotice($needsUpdate) {
|
54 |
+
$configPage = \DevOwl\RealCookieBanner\Core::getInstance()->getConfigPage();
|
55 |
+
echo '<div class="notice notice-warning"><p>' .
|
56 |
+
__(
|
57 |
+
'It seems that since the last update of <strong>Real Cookies Banner</strong> some templates have been updated. Please check your following services to make sure they are up to date:',
|
58 |
+
RCB_TD
|
59 |
+
) .
|
60 |
+
'</p><ul>';
|
61 |
+
foreach ($needsUpdate as $update) {
|
62 |
+
$configPageUrl = $configPage->getUrl();
|
63 |
+
switch ($update->post_type) {
|
64 |
+
case \DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME:
|
65 |
+
$typeLabel = __('Content Blocker', RCB_TD);
|
66 |
+
$editLink = $configPageUrl . '#/blocker/edit/' . $update->post_id;
|
67 |
+
$createLink = $configPageUrl . '#/blocker/new';
|
68 |
+
break;
|
69 |
+
case \DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME:
|
70 |
+
$groupIds = wp_get_post_terms(
|
71 |
+
$update->post_id,
|
72 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME,
|
73 |
+
['fields' => 'ids']
|
74 |
+
);
|
75 |
+
$typeLabel = __('Cookie', RCB_TD);
|
76 |
+
$editLink = $configPageUrl . '#/cookies/' . $groupIds[0] . '/edit/' . $update->post_id;
|
77 |
+
$createLink = $configPageUrl . '#/cookies/' . $groupIds[0] . '/new';
|
78 |
+
break;
|
79 |
+
default:
|
80 |
+
break;
|
81 |
+
}
|
82 |
+
echo \sprintf(
|
83 |
+
'<li><strong>%s</strong> (%s) - <a target="_blank" href="%s">%s</a> - <a target="_blank" href="%s">%s</a></li>',
|
84 |
+
$update->post_title,
|
85 |
+
$typeLabel,
|
86 |
+
$editLink,
|
87 |
+
__('Edit', RCB_TD),
|
88 |
+
$createLink,
|
89 |
+
__('Create new from template', RCB_TD)
|
90 |
+
);
|
91 |
+
}
|
92 |
+
$dismissLink = add_query_arg(self::DISMISS_PARAM, '1');
|
93 |
+
echo '</ul><p><a href="' . $dismissLink . '">' . __('Dismiss this notice', RCB_TD) . '</a></p></div>';
|
94 |
+
}
|
95 |
+
/**
|
96 |
+
* Read all updates from database.
|
97 |
+
* It uses a very cheap SQL on each page request.
|
98 |
+
*/
|
99 |
+
protected function needsUpdate() {
|
100 |
+
global $wpdb;
|
101 |
+
$table_name = $this->getTableName(\DevOwl\RealCookieBanner\presets\Presets::TABLE_NAME);
|
102 |
+
// Probably refresh preset metadata cache
|
103 |
+
$tempTd = \DevOwl\RealCookieBanner\comp\language\Hooks::getInstance()->createTemporaryTextDomain();
|
104 |
+
(new \DevOwl\RealCookieBanner\presets\BlockerPresets())->getClassList();
|
105 |
+
(new \DevOwl\RealCookieBanner\presets\CookiePresets())->getClassList();
|
106 |
+
$tempTd->teardown();
|
107 |
+
$needsUpdate = $wpdb->get_results(
|
108 |
+
// phpcs:disable WordPress.DB.PreparedSQL
|
109 |
+
$wpdb->prepare(
|
110 |
+
"SELECT\n pm.meta_id AS post_version_meta_id,\n pm.post_id,\n pm.meta_value AS post_preset_version,\n prid.meta_value AS post_preset_identifier,\n p.post_title, p.post_type,\n presets.version as should\n FROM {$wpdb->postmeta} pm\n INNER JOIN {$wpdb->postmeta} prid\n ON prid.post_id = pm.post_id\n INNER JOIN {$wpdb->posts} p\n ON p.ID = pm.post_id\n INNER JOIN {$table_name} presets\n ON BINARY presets.identifier = BINARY prid.meta_value\n AND presets.context = %s\n AND presets.type = (\n CASE\n WHEN p.post_type = %s THEN %s\n ELSE %s\n END\n )\n WHERE pm.meta_key = %s\n AND pm.meta_value > 0\n AND prid.meta_key = %s\n AND p.post_type IN (%s, %s)\n AND presets.version <> pm.meta_value",
|
111 |
+
\DevOwl\RealCookieBanner\presets\Presets::getContextKey(),
|
112 |
+
\DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME,
|
113 |
+
\DevOwl\RealCookieBanner\presets\CookiePresets::PRESETS_TYPE,
|
114 |
+
\DevOwl\RealCookieBanner\presets\BlockerPresets::PRESETS_TYPE,
|
115 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_VERSION,
|
116 |
+
\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID,
|
117 |
+
\DevOwl\RealCookieBanner\settings\Blocker::CPT_NAME,
|
118 |
+
\DevOwl\RealCookieBanner\settings\Cookie::CPT_NAME
|
119 |
+
)
|
120 |
+
);
|
121 |
+
// Remove rows of languages other than current and cast to correct types
|
122 |
+
foreach ($needsUpdate as $key => &$row) {
|
123 |
+
$row->post_version_meta_id = \intval($row->post_version_meta_id);
|
124 |
+
$row->post_id = \intval($row->post_id);
|
125 |
+
$row->post_preset_version = \intval($row->post_preset_version);
|
126 |
+
$row->should = \intval($row->should);
|
127 |
+
if (
|
128 |
+
\intval(
|
129 |
+
\DevOwl\RealCookieBanner\Core::getInstance()
|
130 |
+
->getCompLanguage()
|
131 |
+
->getCurrentPostId($row->post_id, $row->post_type)
|
132 |
+
) !== \intval($row->post_id)
|
133 |
+
) {
|
134 |
+
unset($needsUpdate[$key]);
|
135 |
+
}
|
136 |
+
}
|
137 |
+
return $needsUpdate;
|
138 |
+
}
|
139 |
+
}
|
inc/presets/free/ElementorPreset.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware;
|
9 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
10 |
+
use DevOwl\RealCookieBanner\settings\General;
|
11 |
+
use DevOwl\RealCookieBanner\Utils;
|
12 |
+
// @codeCoverageIgnoreStart
|
13 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
14 |
+
// Avoid direct file request
|
15 |
+
// @codeCoverageIgnoreEnd
|
16 |
+
/**
|
17 |
+
* Elementor page builder cookie preset.
|
18 |
+
*/
|
19 |
+
class ElementorPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
20 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ELEMENTOR;
|
21 |
+
const SLUG_FREE = 'elementor';
|
22 |
+
const SLUG_PRO = 'elementor-pro';
|
23 |
+
const VERSION = 1;
|
24 |
+
// Documented in AbstractPreset
|
25 |
+
public function common() {
|
26 |
+
$name = 'Elementor';
|
27 |
+
$cookieHost = \DevOwl\RealCookieBanner\Utils::host(\DevOwl\RealCookieBanner\Utils::HOST_TYPE_CURRENT);
|
28 |
+
return [
|
29 |
+
'id' => self::IDENTIFIER,
|
30 |
+
'version' => self::VERSION,
|
31 |
+
'name' => $name,
|
32 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/elementor.png'),
|
33 |
+
'needs' => self::needs(),
|
34 |
+
'recommended' => \true,
|
35 |
+
'attributes' => [
|
36 |
+
'name' => $name,
|
37 |
+
'group' => __('Essential', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
38 |
+
'purpose' => __(
|
39 |
+
'Elementor is a software used to create the layout of this website. Cookies are used to store the number of page views and active sessions of the user. The collected data is not used for analysis purposes, but only to ensure that, for example, hidden elements are not displayed again during multiple active sessions.',
|
40 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
41 |
+
),
|
42 |
+
'provider' => get_bloginfo('name'),
|
43 |
+
'providerPrivacyPolicy' => \DevOwl\RealCookieBanner\settings\General::getInstance()->getPrivacyPolicyUrl(
|
44 |
+
''
|
45 |
+
),
|
46 |
+
'technicalDefinitions' => [
|
47 |
+
[
|
48 |
+
'type' => 'local',
|
49 |
+
'name' => 'elementor',
|
50 |
+
'host' => $cookieHost,
|
51 |
+
'durationUnit' => 'y',
|
52 |
+
'sessionDuration' => \false,
|
53 |
+
'duration' => 0
|
54 |
+
],
|
55 |
+
[
|
56 |
+
'type' => 'session',
|
57 |
+
'name' => 'elementor',
|
58 |
+
'host' => $cookieHost,
|
59 |
+
'durationUnit' => 'y',
|
60 |
+
'sessionDuration' => \false,
|
61 |
+
'duration' => 0
|
62 |
+
]
|
63 |
+
]
|
64 |
+
]
|
65 |
+
];
|
66 |
+
}
|
67 |
+
// Documented in AbstractPreset
|
68 |
+
public function managerNone() {
|
69 |
+
return \false;
|
70 |
+
}
|
71 |
+
// Documented in AbstractPreset
|
72 |
+
public function managerGtm() {
|
73 |
+
return \false;
|
74 |
+
}
|
75 |
+
// Documented in AbstractPreset
|
76 |
+
public function managerMtm() {
|
77 |
+
return \false;
|
78 |
+
}
|
79 |
+
// Self-explanatory
|
80 |
+
public static function needs() {
|
81 |
+
return \DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware::generateNeedsForSlugs([
|
82 |
+
self::SLUG_PRO,
|
83 |
+
self::SLUG_FREE
|
84 |
+
]);
|
85 |
+
}
|
86 |
+
}
|
inc/presets/free/FontAwesomePreset.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Font Awesome cookie preset.
|
15 |
+
*/
|
16 |
+
class FontAwesomePreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::FONTAWESOME;
|
18 |
+
const VERSION = 1;
|
19 |
+
// Documented in AbstractPreset
|
20 |
+
public function common() {
|
21 |
+
$name = 'Font Awesome';
|
22 |
+
return [
|
23 |
+
'id' => self::IDENTIFIER,
|
24 |
+
'version' => self::VERSION,
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/font-awesome.png'),
|
27 |
+
'attributes' => [
|
28 |
+
'name' => $name,
|
29 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
30 |
+
'purpose' => __(
|
31 |
+
'Font Awesome is a service that downloads a custom icon font that are not installed on the client device of the user and embeds them into the website. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible.',
|
32 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
33 |
+
),
|
34 |
+
'provider' => 'Fonticons, Inc.',
|
35 |
+
'providerPrivacyPolicy' => 'https://fontawesome.com/privacy',
|
36 |
+
'noTechnicalDefinitions' => \true,
|
37 |
+
'technicalHandlingNotice' => __(
|
38 |
+
'There is no need for an opt-in script, because Font Awesome is loaded by some plugin or theme without JavaScript. In addition to this cookie, please create a content blocker that automatically blocks Font Awesome.',
|
39 |
+
RCB_TD
|
40 |
+
),
|
41 |
+
'ePrivacyUSA' => \true
|
42 |
+
]
|
43 |
+
];
|
44 |
+
}
|
45 |
+
// Documented in AbstractPreset
|
46 |
+
public function managerNone() {
|
47 |
+
return \false;
|
48 |
+
}
|
49 |
+
// Documented in AbstractPreset
|
50 |
+
public function managerGtm() {
|
51 |
+
return \false;
|
52 |
+
}
|
53 |
+
// Documented in AbstractPreset
|
54 |
+
public function managerMtm() {
|
55 |
+
return \false;
|
56 |
+
}
|
57 |
+
}
|
inc/presets/free/GoogleFontsPreset.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Google Fonts cookie preset.
|
15 |
+
*/
|
16 |
+
class GoogleFontsPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GOOGLE_FONTS;
|
18 |
+
const VERSION = 2;
|
19 |
+
/**
|
20 |
+
* Web Font Loader compatibility.
|
21 |
+
*
|
22 |
+
* @see https://app.clickup.com/t/aq01tu
|
23 |
+
*/
|
24 |
+
const WEB_FONT_LOADER_ON_PAGE_LOAD = '<script>
|
25 |
+
(function () {
|
26 |
+
// Web Font Loader compatibility (https://github.com/typekit/webfontloader)
|
27 |
+
var modules = {
|
28 |
+
typekit: "https://use.typekit.net",
|
29 |
+
google: "https://fonts.googleapis.com/"
|
30 |
+
};
|
31 |
+
|
32 |
+
var load = function (config) {
|
33 |
+
setTimeout(function () {
|
34 |
+
var a = window.consentApi;
|
35 |
+
|
36 |
+
// Only when blocker is active
|
37 |
+
if (a) {
|
38 |
+
// Iterate all modules and handle in a single `WebFont.load`
|
39 |
+
Object.keys(modules).forEach(function (module) {
|
40 |
+
var newConfigWithoutOtherModules = JSON.parse(
|
41 |
+
JSON.stringify(config)
|
42 |
+
);
|
43 |
+
Object.keys(modules).forEach(function (toRemove) {
|
44 |
+
if (toRemove !== module) {
|
45 |
+
delete newConfigWithoutOtherModules[toRemove];
|
46 |
+
}
|
47 |
+
});
|
48 |
+
|
49 |
+
if (newConfigWithoutOtherModules[module]) {
|
50 |
+
a.unblock(modules[module]).then(function () {
|
51 |
+
var originalLoad = window.WebFont.load;
|
52 |
+
if (originalLoad !== load) {
|
53 |
+
originalLoad(newConfigWithoutOtherModules);
|
54 |
+
}
|
55 |
+
});
|
56 |
+
}
|
57 |
+
});
|
58 |
+
}
|
59 |
+
}, 0);
|
60 |
+
};
|
61 |
+
|
62 |
+
if (!window.WebFont) {
|
63 |
+
window.WebFont = {
|
64 |
+
load: load
|
65 |
+
};
|
66 |
+
}
|
67 |
+
})();
|
68 |
+
</script>';
|
69 |
+
// Documented in AbstractPreset
|
70 |
+
public function common() {
|
71 |
+
$name = 'Google Fonts';
|
72 |
+
return [
|
73 |
+
'id' => self::IDENTIFIER,
|
74 |
+
'version' => self::VERSION,
|
75 |
+
'name' => $name,
|
76 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/google-fonts.png'),
|
77 |
+
'attributes' => [
|
78 |
+
'name' => $name,
|
79 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
80 |
+
'purpose' => __(
|
81 |
+
'Google Fonts is a service that downloads fonts that are not installed on the client device of the user and embeds them into the website. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible.',
|
82 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
83 |
+
),
|
84 |
+
'provider' => 'Google Ireland Limited',
|
85 |
+
'providerPrivacyPolicy' => 'https://policies.google.com/privacy',
|
86 |
+
'noTechnicalDefinitions' => \true,
|
87 |
+
'technicalHandlingNotice' => __(
|
88 |
+
'An opt-in script is not required, as this service is probably already integrated via e.g. your theme. In addition to this service, please create a content blocker that automatically blocks the integration of Google Fonts (from e.g. your theme) before you have the consent of your users.',
|
89 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
90 |
+
),
|
91 |
+
'codeOnPageLoad' => self::WEB_FONT_LOADER_ON_PAGE_LOAD,
|
92 |
+
'ePrivacyUSA' => \true
|
93 |
+
]
|
94 |
+
];
|
95 |
+
}
|
96 |
+
// Documented in AbstractPreset
|
97 |
+
public function managerNone() {
|
98 |
+
return \false;
|
99 |
+
}
|
100 |
+
// Documented in AbstractPreset
|
101 |
+
public function managerGtm() {
|
102 |
+
return \false;
|
103 |
+
}
|
104 |
+
// Documented in AbstractPreset
|
105 |
+
public function managerMtm() {
|
106 |
+
return \false;
|
107 |
+
}
|
108 |
+
}
|
inc/presets/free/GravatarPreset.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Gravatar Avatar cookie preset.
|
15 |
+
*/
|
16 |
+
class GravatarPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::GRAVATAR;
|
18 |
+
const VERSION = 1;
|
19 |
+
// Documented in AbstractPreset
|
20 |
+
public function common() {
|
21 |
+
$name = 'Gravatar (Avatar images)';
|
22 |
+
return [
|
23 |
+
'id' => self::IDENTIFIER,
|
24 |
+
'version' => self::VERSION,
|
25 |
+
'name' => 'Gravatar',
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/gravatar.png'),
|
27 |
+
'attributes' => [
|
28 |
+
'name' => $name,
|
29 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
30 |
+
'purpose' => __(
|
31 |
+
'Gravatar is a service where people can associate their email address with an avatar image that is for example loaded in the comment area. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible.',
|
32 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
33 |
+
),
|
34 |
+
'provider' => 'Automattic Inc.',
|
35 |
+
'providerPrivacyPolicy' => 'https://automattic.com/privacy/',
|
36 |
+
'noTechnicalDefinitions' => \true,
|
37 |
+
'technicalHandlingNotice' => __(
|
38 |
+
'There is no need for an opt-in script, because Gravatar images are loaded by WordPress or some plugin without JavaScript. In addition to this cookie, please create a content blocker that automatically blocks images from Gravatar e. g. in the comment section.',
|
39 |
+
RCB_TD
|
40 |
+
),
|
41 |
+
'ePrivacyUSA' => \true
|
42 |
+
]
|
43 |
+
];
|
44 |
+
}
|
45 |
+
// Documented in AbstractPreset
|
46 |
+
public function managerNone() {
|
47 |
+
return \false;
|
48 |
+
}
|
49 |
+
// Documented in AbstractPreset
|
50 |
+
public function managerGtm() {
|
51 |
+
return \false;
|
52 |
+
}
|
53 |
+
// Documented in AbstractPreset
|
54 |
+
public function managerMtm() {
|
55 |
+
return \false;
|
56 |
+
}
|
57 |
+
}
|
inc/presets/free/JetPackCommentsPreset.php
ADDED
@@ -0,0 +1,430 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
use DevOwl\RealCookieBanner\Utils;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* JetPack Comments cookie preset.
|
16 |
+
*/
|
17 |
+
class JetPackCommentsPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
18 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_COMMENTS;
|
19 |
+
const VERSION = 1;
|
20 |
+
// Documented in AbstractPreset
|
21 |
+
public function common() {
|
22 |
+
$name = __('Jetpack Comments', RCB_TD);
|
23 |
+
$cookieHost = \DevOwl\RealCookieBanner\Utils::host(\DevOwl\RealCookieBanner\Utils::HOST_TYPE_CURRENT);
|
24 |
+
return [
|
25 |
+
'id' => self::IDENTIFIER,
|
26 |
+
'version' => self::VERSION,
|
27 |
+
'name' => $name,
|
28 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/jetpack.png'),
|
29 |
+
'needs' => \DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::needs(),
|
30 |
+
'attributes' => [
|
31 |
+
'name' => __('Jetpack Comments', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
32 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
33 |
+
'purpose' => __(
|
34 |
+
'Jetpack Comments is a comment system for WordPress sites that allows you to post comments using your email, wordpress.com, google.com, twitter.com or facebook.com account. The cookies are used to display the comment form and add integrations from wordpress.com, google.com, twitter.com or facebook.com. The data of the visited website may be shared with the above mentioned third party providers.',
|
35 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
36 |
+
),
|
37 |
+
'provider' => 'Automattic Inc.',
|
38 |
+
'providerPrivacyPolicy' => 'https://automattic.com/privacy/',
|
39 |
+
'technicalDefinitions' => [
|
40 |
+
[
|
41 |
+
'type' => 'http',
|
42 |
+
'name' => 'NID',
|
43 |
+
'host' => '.google.com',
|
44 |
+
'durationUnit' => 'y',
|
45 |
+
'sessionDuration' => \false,
|
46 |
+
'duration' => 1
|
47 |
+
],
|
48 |
+
[
|
49 |
+
'type' => 'http',
|
50 |
+
'name' => 'G_ENABLED_IDPS',
|
51 |
+
'host' => '.wordpress.com',
|
52 |
+
'duration' => 9999,
|
53 |
+
'durationUnit' => 'y',
|
54 |
+
'sessionDuration' => \false
|
55 |
+
],
|
56 |
+
[
|
57 |
+
'type' => 'http',
|
58 |
+
'name' => 'comment_author_email_*',
|
59 |
+
'host' => $cookieHost,
|
60 |
+
'duration' => 1,
|
61 |
+
'durationUnit' => 'y',
|
62 |
+
'sessionDuration' => \false
|
63 |
+
],
|
64 |
+
[
|
65 |
+
'type' => 'http',
|
66 |
+
'name' => 'comment_author_url_*',
|
67 |
+
'host' => $cookieHost,
|
68 |
+
'duration' => 1,
|
69 |
+
'durationUnit' => 'y',
|
70 |
+
'sessionDuration' => \false
|
71 |
+
],
|
72 |
+
[
|
73 |
+
'type' => 'http',
|
74 |
+
'name' => 'comment_author_*',
|
75 |
+
'host' => $cookieHost,
|
76 |
+
'duration' => 1,
|
77 |
+
'durationUnit' => 'y',
|
78 |
+
'sessionDuration' => \false
|
79 |
+
],
|
80 |
+
[
|
81 |
+
'type' => 'http',
|
82 |
+
'name' => 'comment_author_url_*',
|
83 |
+
'host' => '.wordpress.com',
|
84 |
+
'duration' => 1,
|
85 |
+
'durationUnit' => 'y',
|
86 |
+
'sessionDuration' => \false
|
87 |
+
],
|
88 |
+
[
|
89 |
+
'type' => 'http',
|
90 |
+
'name' => 'comment_author_email_*',
|
91 |
+
'host' => '.wordpress.com',
|
92 |
+
'duration' => 1,
|
93 |
+
'durationUnit' => 'y',
|
94 |
+
'sessionDuration' => \false
|
95 |
+
],
|
96 |
+
[
|
97 |
+
'type' => 'http',
|
98 |
+
'name' => 'comment_author_*',
|
99 |
+
'host' => '.wordpress.com',
|
100 |
+
'duration' => 1,
|
101 |
+
'durationUnit' => 'y',
|
102 |
+
'sessionDuration' => \false
|
103 |
+
],
|
104 |
+
[
|
105 |
+
'type' => 'http',
|
106 |
+
'name' => 'hc_post_as',
|
107 |
+
'host' => '.wordpress.com',
|
108 |
+
'duration' => 2,
|
109 |
+
'durationUnit' => 'd',
|
110 |
+
'sessionDuration' => \false
|
111 |
+
],
|
112 |
+
[
|
113 |
+
'type' => 'http',
|
114 |
+
'name' => 'wpc_wpc',
|
115 |
+
'host' => '.wordpress.com',
|
116 |
+
'durationUnit' => 'y',
|
117 |
+
'sessionDuration' => \true,
|
118 |
+
'duration' => 0
|
119 |
+
],
|
120 |
+
[
|
121 |
+
'type' => 'http',
|
122 |
+
'name' => '_wpndash',
|
123 |
+
'host' => '.wordpress.com',
|
124 |
+
'duration' => 1,
|
125 |
+
'durationUnit' => 'y',
|
126 |
+
'sessionDuration' => \false
|
127 |
+
],
|
128 |
+
[
|
129 |
+
'type' => 'http',
|
130 |
+
'name' => 'wordpress_logged_in',
|
131 |
+
'host' => '.wordpress.com',
|
132 |
+
'duration' => 1,
|
133 |
+
'durationUnit' => 'y',
|
134 |
+
'sessionDuration' => \false
|
135 |
+
],
|
136 |
+
[
|
137 |
+
'type' => 'http',
|
138 |
+
'name' => 'recognized_logins',
|
139 |
+
'host' => '.wordpress.com',
|
140 |
+
'duration' => 78,
|
141 |
+
'durationUnit' => 'y',
|
142 |
+
'sessionDuration' => \false
|
143 |
+
],
|
144 |
+
[
|
145 |
+
'type' => 'http',
|
146 |
+
'name' => 'wordpress_test_cookie',
|
147 |
+
'host' => '.wordpress.com',
|
148 |
+
'durationUnit' => 'y',
|
149 |
+
'sessionDuration' => \true,
|
150 |
+
'duration' => 0
|
151 |
+
],
|
152 |
+
[
|
153 |
+
'type' => 'http',
|
154 |
+
'name' => 'wpc_gpc',
|
155 |
+
'host' => '.wordpress.com',
|
156 |
+
'duration' => 1,
|
157 |
+
'durationUnit' => 'd',
|
158 |
+
'sessionDuration' => \false
|
159 |
+
],
|
160 |
+
[
|
161 |
+
'type' => 'http',
|
162 |
+
'name' => 'SIDCC',
|
163 |
+
'host' => '.google.com',
|
164 |
+
'duration' => 1,
|
165 |
+
'durationUnit' => 'y',
|
166 |
+
'sessionDuration' => \false
|
167 |
+
],
|
168 |
+
[
|
169 |
+
'type' => 'http',
|
170 |
+
'name' => '__Secure-3PAPISID',
|
171 |
+
'host' => '.google.com',
|
172 |
+
'duration' => 2,
|
173 |
+
'durationUnit' => 'y',
|
174 |
+
'sessionDuration' => \false
|
175 |
+
],
|
176 |
+
[
|
177 |
+
'type' => 'http',
|
178 |
+
'name' => '__Secure-APISID',
|
179 |
+
'host' => '.google.com',
|
180 |
+
'duration' => 1,
|
181 |
+
'durationUnit' => 'mo',
|
182 |
+
'sessionDuration' => \false
|
183 |
+
],
|
184 |
+
[
|
185 |
+
'type' => 'http',
|
186 |
+
'name' => '__Secure-SSID',
|
187 |
+
'host' => '.google.com',
|
188 |
+
'duration' => 1,
|
189 |
+
'durationUnit' => 'mo',
|
190 |
+
'sessionDuration' => \false
|
191 |
+
],
|
192 |
+
[
|
193 |
+
'type' => 'http',
|
194 |
+
'name' => '__Secure-SSID',
|
195 |
+
'host' => '.google.com',
|
196 |
+
'duration' => 6,
|
197 |
+
'durationUnit' => 'mo',
|
198 |
+
'sessionDuration' => \false
|
199 |
+
],
|
200 |
+
[
|
201 |
+
'type' => 'http',
|
202 |
+
'name' => '__Secure-HSID',
|
203 |
+
'host' => '.google.com',
|
204 |
+
'duration' => 1,
|
205 |
+
'durationUnit' => 'mo',
|
206 |
+
'sessionDuration' => \false
|
207 |
+
],
|
208 |
+
[
|
209 |
+
'type' => 'http',
|
210 |
+
'name' => 'SAPISID',
|
211 |
+
'host' => '.google.com',
|
212 |
+
'duration' => 2,
|
213 |
+
'durationUnit' => 'y',
|
214 |
+
'sessionDuration' => \false
|
215 |
+
],
|
216 |
+
[
|
217 |
+
'type' => 'http',
|
218 |
+
'name' => 'SSID',
|
219 |
+
'host' => '.google.com',
|
220 |
+
'duration' => 2,
|
221 |
+
'durationUnit' => 'y',
|
222 |
+
'sessionDuration' => \false
|
223 |
+
],
|
224 |
+
[
|
225 |
+
'type' => 'http',
|
226 |
+
'name' => 'HSID',
|
227 |
+
'host' => '.google.com',
|
228 |
+
'duration' => 2,
|
229 |
+
'durationUnit' => 'y',
|
230 |
+
'sessionDuration' => \false
|
231 |
+
],
|
232 |
+
[
|
233 |
+
'type' => 'http',
|
234 |
+
'name' => 'SID',
|
235 |
+
'host' => '.google.com',
|
236 |
+
'duration' => 2,
|
237 |
+
'durationUnit' => 'y',
|
238 |
+
'sessionDuration' => \false
|
239 |
+
],
|
240 |
+
[
|
241 |
+
'type' => 'http',
|
242 |
+
'name' => '__Secure-3PSID',
|
243 |
+
'host' => '.google.com',
|
244 |
+
'duration' => 2,
|
245 |
+
'durationUnit' => 'y',
|
246 |
+
'sessionDuration' => \false
|
247 |
+
],
|
248 |
+
[
|
249 |
+
'type' => 'http',
|
250 |
+
'name' => 'CONSENT',
|
251 |
+
'host' => '.google.com',
|
252 |
+
'duration' => 18,
|
253 |
+
'durationUnit' => 'y',
|
254 |
+
'sessionDuration' => \false
|
255 |
+
],
|
256 |
+
[
|
257 |
+
'type' => 'http',
|
258 |
+
'name' => '1P_JAR',
|
259 |
+
'host' => '.google.com',
|
260 |
+
'duration' => 1,
|
261 |
+
'durationUnit' => 'mo',
|
262 |
+
'sessionDuration' => \false
|
263 |
+
],
|
264 |
+
[
|
265 |
+
'type' => 'http',
|
266 |
+
'name' => 'G_AUTHUSER_H',
|
267 |
+
'host' => '.public-api.wordpress.com',
|
268 |
+
'durationUnit' => 'y',
|
269 |
+
'sessionDuration' => \true,
|
270 |
+
'duration' => 0
|
271 |
+
],
|
272 |
+
[
|
273 |
+
'type' => 'http',
|
274 |
+
'name' => '__Host-GAPS',
|
275 |
+
'host' => 'accounts.google.com',
|
276 |
+
'duration' => 2,
|
277 |
+
'durationUnit' => 'y',
|
278 |
+
'sessionDuration' => \false
|
279 |
+
],
|
280 |
+
[
|
281 |
+
'type' => 'http',
|
282 |
+
'name' => 'GAPS',
|
283 |
+
'host' => 'accounts.google.com',
|
284 |
+
'duration' => 2,
|
285 |
+
'durationUnit' => 'y',
|
286 |
+
'sessionDuration' => \false
|
287 |
+
],
|
288 |
+
[
|
289 |
+
'type' => 'http',
|
290 |
+
'name' => 'LSID',
|
291 |
+
'host' => 'accounts.google.com',
|
292 |
+
'duration' => 2,
|
293 |
+
'durationUnit' => 'y',
|
294 |
+
'sessionDuration' => \false
|
295 |
+
],
|
296 |
+
[
|
297 |
+
'type' => 'http',
|
298 |
+
'name' => '__Host-3PLSID',
|
299 |
+
'host' => 'accounts.google.com',
|
300 |
+
'duration' => 2,
|
301 |
+
'durationUnit' => 'y',
|
302 |
+
'sessionDuration' => \false
|
303 |
+
],
|
304 |
+
[
|
305 |
+
'type' => 'http',
|
306 |
+
'name' => 'user_id',
|
307 |
+
'host' => 'accounts.google.com',
|
308 |
+
'durationUnit' => 'y',
|
309 |
+
'sessionDuration' => \true,
|
310 |
+
'duration' => 0
|
311 |
+
],
|
312 |
+
[
|
313 |
+
'type' => 'http',
|
314 |
+
'name' => 'LSOLH',
|
315 |
+
'host' => 'accounts.google.com',
|
316 |
+
'duration' => 6,
|
317 |
+
'durationUnit' => 'mo',
|
318 |
+
'sessionDuration' => \false
|
319 |
+
],
|
320 |
+
[
|
321 |
+
'type' => 'local',
|
322 |
+
'name' => 'oauth2_ss::https://public-api.wordpress.com::1::DEFAULT::_ss_',
|
323 |
+
'host' => 'https://accounts.google.com',
|
324 |
+
'durationUnit' => 'y',
|
325 |
+
'sessionDuration' => \false,
|
326 |
+
'duration' => 0
|
327 |
+
],
|
328 |
+
[
|
329 |
+
'type' => 'local',
|
330 |
+
'name' => 'promo',
|
331 |
+
'host' => 'https://accounts.google.com',
|
332 |
+
'durationUnit' => 'y',
|
333 |
+
'sessionDuration' => \false,
|
334 |
+
'duration' => 0
|
335 |
+
],
|
336 |
+
[
|
337 |
+
'type' => 'http',
|
338 |
+
'name' => 'wpc_tc',
|
339 |
+
'host' => '.wordpress.com',
|
340 |
+
'durationUnit' => 'y',
|
341 |
+
'sessionDuration' => \true,
|
342 |
+
'duration' => 0
|
343 |
+
],
|
344 |
+
[
|
345 |
+
'type' => 'session',
|
346 |
+
'name' => 'oauth2_cs::https://public-api.wordpress.com::*',
|
347 |
+
'host' => 'https://accounts.google.com',
|
348 |
+
'durationUnit' => 'y',
|
349 |
+
'sessionDuration' => \false,
|
350 |
+
'duration' => 0
|
351 |
+
],
|
352 |
+
[
|
353 |
+
'type' => 'http',
|
354 |
+
'name' => 'wpc_fbc',
|
355 |
+
'host' => '.wordpress.com',
|
356 |
+
'durationUnit' => 'y',
|
357 |
+
'sessionDuration' => \true,
|
358 |
+
'duration' => 0
|
359 |
+
],
|
360 |
+
[
|
361 |
+
'type' => 'http',
|
362 |
+
'name' => 'tk_qs',
|
363 |
+
'host' => '.wordpress.com',
|
364 |
+
'duration' => 1,
|
365 |
+
'durationUnit' => 'y',
|
366 |
+
'sessionDuration' => \false
|
367 |
+
],
|
368 |
+
[
|
369 |
+
'type' => 'http',
|
370 |
+
'name' => 'wordpress_logged_in',
|
371 |
+
'host' => '.wordpress.com',
|
372 |
+
'duration' => 3,
|
373 |
+
'durationUnit' => 'y',
|
374 |
+
'sessionDuration' => \false
|
375 |
+
],
|
376 |
+
[
|
377 |
+
'type' => 'http',
|
378 |
+
'name' => 'tk_ai',
|
379 |
+
'host' => '.wordpress.com',
|
380 |
+
'duration' => 5,
|
381 |
+
'durationUnit' => 'y',
|
382 |
+
'sessionDuration' => \false
|
383 |
+
],
|
384 |
+
[
|
385 |
+
'type' => 'http',
|
386 |
+
'name' => 'tk_tc',
|
387 |
+
'host' => '.wordpress.com',
|
388 |
+
'durationUnit' => 'y',
|
389 |
+
'sessionDuration' => \true,
|
390 |
+
'duration' => 0
|
391 |
+
],
|
392 |
+
[
|
393 |
+
'type' => 'http',
|
394 |
+
'name' => 'ACCOUNT_CHOOSER',
|
395 |
+
'host' => 'accounts.google.com',
|
396 |
+
'duration' => 1,
|
397 |
+
'durationUnit' => 'h',
|
398 |
+
'sessionDuration' => \false
|
399 |
+
],
|
400 |
+
[
|
401 |
+
'type' => 'http',
|
402 |
+
'name' => 'APISID',
|
403 |
+
'host' => '.google.com',
|
404 |
+
'duration' => 2,
|
405 |
+
'durationUnit' => 'y',
|
406 |
+
'sessionDuration' => \false
|
407 |
+
]
|
408 |
+
],
|
409 |
+
'technicalHandlingNotice' => __(
|
410 |
+
'There is no need for an opt-in script because the comment feature is loaded by the Jetpack WordPress plugin. In addition to the cookie, you must create a content blocker that will block Jetpack Comments until the user gives consent to load it.',
|
411 |
+
RCB_TD
|
412 |
+
),
|
413 |
+
'codeOptOutDelete' => \true,
|
414 |
+
'ePrivacyUSA' => \true
|
415 |
+
]
|
416 |
+
];
|
417 |
+
}
|
418 |
+
// Documented in AbstractPreset
|
419 |
+
public function managerNone() {
|
420 |
+
return \false;
|
421 |
+
}
|
422 |
+
// Documented in AbstractPreset
|
423 |
+
public function managerGtm() {
|
424 |
+
return \false;
|
425 |
+
}
|
426 |
+
// Documented in AbstractPreset
|
427 |
+
public function managerMtm() {
|
428 |
+
return \false;
|
429 |
+
}
|
430 |
+
}
|
inc/presets/free/JetpackSiteStatsPreset.php
ADDED
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware;
|
9 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
10 |
+
use DevOwl\RealCookieBanner\Utils;
|
11 |
+
// @codeCoverageIgnoreStart
|
12 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
13 |
+
// Avoid direct file request
|
14 |
+
// @codeCoverageIgnoreEnd
|
15 |
+
/**
|
16 |
+
* Jetpack Site Stats cookie preset.
|
17 |
+
*/
|
18 |
+
class JetpackSiteStatsPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
19 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::JETPACK_SITE_STATS;
|
20 |
+
const SLUG = 'jetpack';
|
21 |
+
const VERSION = 1;
|
22 |
+
// Documented in AbstractPreset
|
23 |
+
public function common() {
|
24 |
+
$name = 'Jetpack Site Stats';
|
25 |
+
$cookieHostCurrent = \DevOwl\RealCookieBanner\Utils::host(\DevOwl\RealCookieBanner\Utils::HOST_TYPE_CURRENT);
|
26 |
+
return [
|
27 |
+
'id' => self::IDENTIFIER,
|
28 |
+
'version' => self::VERSION,
|
29 |
+
'name' => $name,
|
30 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/jetpack.png'),
|
31 |
+
'needs' => self::needs(),
|
32 |
+
'attributes' => [
|
33 |
+
'name' => $name,
|
34 |
+
'group' => __('Statistics', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
35 |
+
'purpose' => __(
|
36 |
+
'Jetpack Site Stats is a service to create detailed statistics about the user behavior on the website. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible. This information can be used to track the user on this website and to connect collected data of several page views on this website. the client of the user in the technical sense, but technical data is transferred from the client to the server of the service provider in order to track the user on this website and to connect collected data of several page views on this website.',
|
37 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
38 |
+
),
|
39 |
+
'provider' => 'Automattic Inc.',
|
40 |
+
'providerPrivacyPolicy' => 'https://automattic.com/privacy/',
|
41 |
+
'technicalDefinitions' => [
|
42 |
+
[
|
43 |
+
'type' => 'http',
|
44 |
+
'name' => 'NID',
|
45 |
+
'host' => '.google.com',
|
46 |
+
'durationUnit' => 'mo',
|
47 |
+
'sessionDuration' => \false,
|
48 |
+
'duration' => 6
|
49 |
+
],
|
50 |
+
[
|
51 |
+
'type' => 'http',
|
52 |
+
'name' => 'G_ENABLED_IDPS',
|
53 |
+
'host' => '.public-api.wordpress.com',
|
54 |
+
'duration' => 6,
|
55 |
+
'durationUnit' => 'mo',
|
56 |
+
'sessionDuration' => \false
|
57 |
+
],
|
58 |
+
[
|
59 |
+
'type' => 'http',
|
60 |
+
'name' => 'comment_author_email_*',
|
61 |
+
'host' => $cookieHostCurrent,
|
62 |
+
'duration' => 6,
|
63 |
+
'durationUnit' => 'mo',
|
64 |
+
'sessionDuration' => \false
|
65 |
+
],
|
66 |
+
[
|
67 |
+
'type' => 'http',
|
68 |
+
'name' => 'comment_author_url_*',
|
69 |
+
'host' => $cookieHostCurrent,
|
70 |
+
'duration' => 6,
|
71 |
+
'durationUnit' => 'mo',
|
72 |
+
'sessionDuration' => \false
|
73 |
+
],
|
74 |
+
[
|
75 |
+
'type' => 'http',
|
76 |
+
'name' => 'comment_author_*',
|
77 |
+
'host' => $cookieHostCurrent,
|
78 |
+
'duration' => 6,
|
79 |
+
'durationUnit' => 'mo',
|
80 |
+
'sessionDuration' => \false
|
81 |
+
],
|
82 |
+
[
|
83 |
+
'type' => 'http',
|
84 |
+
'name' => 'comment_author_url_*',
|
85 |
+
'host' => '.wordpress.com',
|
86 |
+
'duration' => 6,
|
87 |
+
'durationUnit' => 'mo',
|
88 |
+
'sessionDuration' => \false
|
89 |
+
],
|
90 |
+
[
|
91 |
+
'type' => 'http',
|
92 |
+
'name' => 'comment_author_email_*',
|
93 |
+
'host' => '.wordpress.com',
|
94 |
+
'duration' => 6,
|
95 |
+
'durationUnit' => 'mo',
|
96 |
+
'sessionDuration' => \false
|
97 |
+
],
|
98 |
+
[
|
99 |
+
'type' => 'http',
|
100 |
+
'name' => 'comment_author_*',
|
101 |
+
'host' => '.wordpress.com',
|
102 |
+
'duration' => 6,
|
103 |
+
'durationUnit' => 'mo',
|
104 |
+
'sessionDuration' => \false
|
105 |
+
],
|
106 |
+
[
|
107 |
+
'type' => 'http',
|
108 |
+
'name' => 'hc_post_as',
|
109 |
+
'host' => '.wordpress.com',
|
110 |
+
'duration' => 2,
|
111 |
+
'durationUnit' => 'd',
|
112 |
+
'sessionDuration' => \false
|
113 |
+
],
|
114 |
+
[
|
115 |
+
'type' => 'http',
|
116 |
+
'name' => 'wpc_wpc',
|
117 |
+
'host' => '.wordpress.com',
|
118 |
+
'durationUnit' => 'y',
|
119 |
+
'sessionDuration' => \true,
|
120 |
+
'duration' => 0
|
121 |
+
],
|
122 |
+
[
|
123 |
+
'type' => 'http',
|
124 |
+
'name' => '_wpndash',
|
125 |
+
'host' => '.wordpress.com',
|
126 |
+
'duration' => 6,
|
127 |
+
'durationUnit' => 'mo',
|
128 |
+
'sessionDuration' => \false
|
129 |
+
],
|
130 |
+
[
|
131 |
+
'type' => 'http',
|
132 |
+
'name' => 'wordpress_logged_in',
|
133 |
+
'host' => '.wordpress.com',
|
134 |
+
'duration' => 6,
|
135 |
+
'durationUnit' => 'mo',
|
136 |
+
'sessionDuration' => \false
|
137 |
+
],
|
138 |
+
[
|
139 |
+
'type' => 'http',
|
140 |
+
'name' => 'recognized_logins',
|
141 |
+
'host' => '.wordpress.com',
|
142 |
+
'duration' => 6,
|
143 |
+
'durationUnit' => 'mo',
|
144 |
+
'sessionDuration' => \false
|
145 |
+
],
|
146 |
+
[
|
147 |
+
'type' => 'http',
|
148 |
+
'name' => 'wordpress_test_cookie',
|
149 |
+
'host' => '.wordpress.com',
|
150 |
+
'durationUnit' => 'y',
|
151 |
+
'sessionDuration' => \true,
|
152 |
+
'duration' => 0
|
153 |
+
],
|
154 |
+
[
|
155 |
+
'type' => 'http',
|
156 |
+
'name' => 'wpc_gpc',
|
157 |
+
'host' => '.wordpress.com',
|
158 |
+
'duration' => 1,
|
159 |
+
'durationUnit' => 'd',
|
160 |
+
'sessionDuration' => \false
|
161 |
+
],
|
162 |
+
[
|
163 |
+
'type' => 'http',
|
164 |
+
'name' => 'SIDCC',
|
165 |
+
'host' => '.google.com',
|
166 |
+
'duration' => 6,
|
167 |
+
'durationUnit' => 'mo',
|
168 |
+
'sessionDuration' => \false
|
169 |
+
],
|
170 |
+
[
|
171 |
+
'type' => 'http',
|
172 |
+
'name' => '__Secure-3PAPISID',
|
173 |
+
'host' => '.google.com',
|
174 |
+
'duration' => 6,
|
175 |
+
'durationUnit' => 'mo',
|
176 |
+
'sessionDuration' => \false
|
177 |
+
],
|
178 |
+
[
|
179 |
+
'type' => 'http',
|
180 |
+
'name' => '__Secure-APISID',
|
181 |
+
'host' => '.google.com',
|
182 |
+
'duration' => 1,
|
183 |
+
'durationUnit' => 'mo',
|
184 |
+
'sessionDuration' => \false
|
185 |
+
],
|
186 |
+
[
|
187 |
+
'type' => 'http',
|
188 |
+
'name' => '__Secure-SSID',
|
189 |
+
'host' => '.google.com',
|
190 |
+
'duration' => 1,
|
191 |
+
'durationUnit' => 'mo',
|
192 |
+
'sessionDuration' => \false
|
193 |
+
],
|
194 |
+
[
|
195 |
+
'type' => 'http',
|
196 |
+
'name' => '__Secure-SSID',
|
197 |
+
'host' => '.google.com',
|
198 |
+
'duration' => 6,
|
199 |
+
'durationUnit' => 'mo',
|
200 |
+
'sessionDuration' => \false
|
201 |
+
],
|
202 |
+
[
|
203 |
+
'type' => 'http',
|
204 |
+
'name' => '__Secure-HSID',
|
205 |
+
'host' => '.google.com',
|
206 |
+
'duration' => 1,
|
207 |
+
'durationUnit' => 'mo',
|
208 |
+
'sessionDuration' => \false
|
209 |
+
],
|
210 |
+
[
|
211 |
+
'type' => 'http',
|
212 |
+
'name' => 'SAPISID',
|
213 |
+
'host' => '.google.com',
|
214 |
+
'duration' => 6,
|
215 |
+
'durationUnit' => 'mo',
|
216 |
+
'sessionDuration' => \false
|
217 |
+
],
|
218 |
+
[
|
219 |
+
'type' => 'http',
|
220 |
+
'name' => 'SSID',
|
221 |
+
'host' => '.google.com',
|
222 |
+
'duration' => 6,
|
223 |
+
'durationUnit' => 'mo',
|
224 |
+
'sessionDuration' => \false
|
225 |
+
],
|
226 |
+
[
|
227 |
+
'type' => 'http',
|
228 |
+
'name' => 'HSID',
|
229 |
+
'host' => '.google.com',
|
230 |
+
'duration' => 6,
|
231 |
+
'durationUnit' => 'mo',
|
232 |
+
'sessionDuration' => \false
|
233 |
+
],
|
234 |
+
[
|
235 |
+
'type' => 'http',
|
236 |
+
'name' => 'SID',
|
237 |
+
'host' => '.google.com',
|
238 |
+
'duration' => 6,
|
239 |
+
'durationUnit' => 'mo',
|
240 |
+
'sessionDuration' => \false
|
241 |
+
],
|
242 |
+
[
|
243 |
+
'type' => 'http',
|
244 |
+
'name' => '__Secure-3PSID',
|
245 |
+
'host' => '.google.com',
|
246 |
+
'duration' => 6,
|
247 |
+
'durationUnit' => 'mo',
|
248 |
+
'sessionDuration' => \false
|
249 |
+
],
|
250 |
+
[
|
251 |
+
'type' => 'http',
|
252 |
+
'name' => 'CONSENT',
|
253 |
+
'host' => '.google.com',
|
254 |
+
'duration' => 6,
|
255 |
+
'durationUnit' => 'mo',
|
256 |
+
'sessionDuration' => \false
|
257 |
+
],
|
258 |
+
[
|
259 |
+
'type' => 'http',
|
260 |
+
'name' => '1P_JAR',
|
261 |
+
'host' => '.google.com',
|
262 |
+
'duration' => 1,
|
263 |
+
'durationUnit' => 'mo',
|
264 |
+
'sessionDuration' => \false
|
265 |
+
],
|
266 |
+
[
|
267 |
+
'type' => 'http',
|
268 |
+
'name' => 'G_AUTHUSER_H',
|
269 |
+
'host' => '.public-api.wordpress.com',
|
270 |
+
'durationUnit' => 'y',
|
271 |
+
'sessionDuration' => \true,
|
272 |
+
'duration' => 0
|
273 |
+
],
|
274 |
+
[
|
275 |
+
'type' => 'http',
|
276 |
+
'name' => '__Host-GAPS',
|
277 |
+
'host' => 'accounts.google.com',
|
278 |
+
'duration' => 6,
|
279 |
+
'durationUnit' => 'mo',
|
280 |
+
'sessionDuration' => \false
|
281 |
+
],
|
282 |
+
[
|
283 |
+
'type' => 'http',
|
284 |
+
'name' => 'GAPS',
|
285 |
+
'host' => 'accounts.google.com',
|
286 |
+
'duration' => 6,
|
287 |
+
'durationUnit' => 'mo',
|
288 |
+
'sessionDuration' => \false
|
289 |
+
],
|
290 |
+
[
|
291 |
+
'type' => 'http',
|
292 |
+
'name' => 'LSID',
|
293 |
+
'host' => 'accounts.google.com',
|
294 |
+
'duration' => 6,
|
295 |
+
'durationUnit' => 'mo',
|
296 |
+
'sessionDuration' => \false
|
297 |
+
],
|
298 |
+
[
|
299 |
+
'type' => 'http',
|
300 |
+
'name' => '__Host-3PLSID',
|
301 |
+
'host' => 'accounts.google.com',
|
302 |
+
'duration' => 6,
|
303 |
+
'durationUnit' => 'mo',
|
304 |
+
'sessionDuration' => \false
|
305 |
+
],
|
306 |
+
[
|
307 |
+
'type' => 'http',
|
308 |
+
'name' => '__Host-3PLSID',
|
309 |
+
'host' => 'accounts.google.com',
|
310 |
+
'duration' => 6,
|
311 |
+
'durationUnit' => 'mo',
|
312 |
+
'sessionDuration' => \false
|
313 |
+
],
|
314 |
+
[
|
315 |
+
'type' => 'http',
|
316 |
+
'name' => 'user_id',
|
317 |
+
'host' => 'accounts.google.com',
|
318 |
+
'durationUnit' => 'y',
|
319 |
+
'sessionDuration' => \true,
|
320 |
+
'duration' => 0
|
321 |
+
],
|
322 |
+
[
|
323 |
+
'type' => 'http',
|
324 |
+
'name' => 'LSOLH',
|
325 |
+
'host' => 'accounts.google.com',
|
326 |
+
'duration' => 6,
|
327 |
+
'durationUnit' => 'mo',
|
328 |
+
'sessionDuration' => \false
|
329 |
+
],
|
330 |
+
[
|
331 |
+
'type' => 'local',
|
332 |
+
'name' => 'oauth2_ss::https://public-api.wordpress.com::1::DEFAULT::_ss_',
|
333 |
+
'host' => 'https://accounts.google.com',
|
334 |
+
'durationUnit' => 'y',
|
335 |
+
'sessionDuration' => \false,
|
336 |
+
'duration' => 0
|
337 |
+
],
|
338 |
+
[
|
339 |
+
'type' => 'local',
|
340 |
+
'name' => 'promo',
|
341 |
+
'host' => 'https://accounts.google.com',
|
342 |
+
'durationUnit' => 'y',
|
343 |
+
'sessionDuration' => \false,
|
344 |
+
'duration' => 0
|
345 |
+
],
|
346 |
+
[
|
347 |
+
'type' => 'http',
|
348 |
+
'name' => 'wpc_tc',
|
349 |
+
'host' => '.wordpress.com',
|
350 |
+
'durationUnit' => 'y',
|
351 |
+
'sessionDuration' => \true,
|
352 |
+
'duration' => 0
|
353 |
+
],
|
354 |
+
[
|
355 |
+
'type' => 'session',
|
356 |
+
'name' => 'oauth2_cs::https://public-api.wordpress.com::*',
|
357 |
+
'host' => 'https://accounts.google.com',
|
358 |
+
'durationUnit' => 'y',
|
359 |
+
'sessionDuration' => \false,
|
360 |
+
'duration' => 0
|
361 |
+
],
|
362 |
+
[
|
363 |
+
'type' => 'http',
|
364 |
+
'name' => 'wpc_fbc',
|
365 |
+
'host' => '.wordpress.com',
|
366 |
+
'durationUnit' => 'y',
|
367 |
+
'sessionDuration' => \true,
|
368 |
+
'duration' => 0
|
369 |
+
]
|
370 |
+
],
|
371 |
+
'technicalHandlingNotice' => __(
|
372 |
+
'There is no need for an opt-in script because the site stats feature is loaded by the Jetpack WordPress plugin. In addition to the cookie, you must create a content blocker that will block Jetpack Site Stats until the user gives consent to load it.',
|
373 |
+
RCB_TD
|
374 |
+
),
|
375 |
+
'ePrivacyUSA' => \true
|
376 |
+
]
|
377 |
+
];
|
378 |
+
}
|
379 |
+
// Documented in AbstractPreset
|
380 |
+
public function managerNone() {
|
381 |
+
return \false;
|
382 |
+
}
|
383 |
+
// Documented in AbstractPreset
|
384 |
+
public function managerGtm() {
|
385 |
+
return \false;
|
386 |
+
}
|
387 |
+
// Documented in AbstractPreset
|
388 |
+
public function managerMtm() {
|
389 |
+
return \false;
|
390 |
+
}
|
391 |
+
// Self-explanatory
|
392 |
+
public static function needs() {
|
393 |
+
return \DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware::generateNeedsForSlugs([
|
394 |
+
self::SLUG
|
395 |
+
]);
|
396 |
+
}
|
397 |
+
}
|
inc/presets/free/RealCookieBannerPreset.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\MyConsent;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
use DevOwl\RealCookieBanner\settings\Consent;
|
10 |
+
use DevOwl\RealCookieBanner\settings\General;
|
11 |
+
use DevOwl\RealCookieBanner\Utils;
|
12 |
+
// @codeCoverageIgnoreStart
|
13 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
14 |
+
// Avoid direct file request
|
15 |
+
// @codeCoverageIgnoreEnd
|
16 |
+
/**
|
17 |
+
* Real Cookie Banner cookie preset.
|
18 |
+
*/
|
19 |
+
class RealCookieBannerPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
20 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::REAL_COOKIE_BANNER;
|
21 |
+
const VERSION = 2;
|
22 |
+
// Documented in AbstractPreset
|
23 |
+
public function common() {
|
24 |
+
$name = 'Real Cookie Banner';
|
25 |
+
return [
|
26 |
+
'id' => self::IDENTIFIER,
|
27 |
+
'version' => self::VERSION,
|
28 |
+
'name' => $name,
|
29 |
+
'logoFile' => 'real-cookie-banner.svg',
|
30 |
+
'hidden' => \true,
|
31 |
+
'attributes' => [
|
32 |
+
'name' => $name,
|
33 |
+
'group' => __('Essential', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
34 |
+
'purpose' => __(
|
35 |
+
'Real Cookie Banner asks the user to consent to the cookies used on this website. The cookies store the UUID (pseudonym identification of the user) and the selection of the agreed cookie groups and cookies.',
|
36 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
37 |
+
),
|
38 |
+
'provider' => get_bloginfo('name'),
|
39 |
+
'providerPrivacyPolicy' => \DevOwl\RealCookieBanner\settings\General::getInstance()->getPrivacyPolicyUrl(
|
40 |
+
''
|
41 |
+
),
|
42 |
+
'technicalDefinitions' => [
|
43 |
+
[
|
44 |
+
'type' => 'http',
|
45 |
+
'name' => \DevOwl\RealCookieBanner\MyConsent::COOKIE_NAME_USER_PREFIX . '*',
|
46 |
+
'host' => \DevOwl\RealCookieBanner\Utils::host(
|
47 |
+
\DevOwl\RealCookieBanner\Utils::HOST_TYPE_MAIN_WITH_ALL_SUBDOMAINS
|
48 |
+
),
|
49 |
+
'duration' => \DevOwl\RealCookieBanner\settings\Consent::getInstance()->getCookieDuration(),
|
50 |
+
'durationUnit' => 'd',
|
51 |
+
'sessionDuration' => \false
|
52 |
+
],
|
53 |
+
[
|
54 |
+
'type' => 'http',
|
55 |
+
'name' => 'PHPSESSID',
|
56 |
+
'host' => \DevOwl\RealCookieBanner\Utils::host(
|
57 |
+
\DevOwl\RealCookieBanner\Utils::HOST_TYPE_CURRENT
|
58 |
+
),
|
59 |
+
'durationUnit' => 'y',
|
60 |
+
'duration' => 0,
|
61 |
+
'sessionDuration' => \true
|
62 |
+
]
|
63 |
+
],
|
64 |
+
'codeOptOutDelete' => \false
|
65 |
+
]
|
66 |
+
];
|
67 |
+
}
|
68 |
+
// Documented in AbstractPreset
|
69 |
+
public function managerNone() {
|
70 |
+
return \false;
|
71 |
+
}
|
72 |
+
// Documented in AbstractPreset
|
73 |
+
public function managerGtm() {
|
74 |
+
return \false;
|
75 |
+
}
|
76 |
+
// Documented in AbstractPreset
|
77 |
+
public function managerMtm() {
|
78 |
+
return \false;
|
79 |
+
}
|
80 |
+
}
|
inc/presets/free/WordPressCommentsPreset.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
use DevOwl\RealCookieBanner\settings\General;
|
9 |
+
use DevOwl\RealCookieBanner\Utils;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* WordPress Comments cookie preset.
|
16 |
+
*/
|
17 |
+
class WordPressCommentsPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
18 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_COMMENTS;
|
19 |
+
const VERSION = 2;
|
20 |
+
// Documented in AbstractPreset
|
21 |
+
public function common() {
|
22 |
+
$name = __('WordPress Comments', RCB_TD);
|
23 |
+
$cookieHost = \DevOwl\RealCookieBanner\Utils::host(\DevOwl\RealCookieBanner\Utils::HOST_TYPE_MAIN);
|
24 |
+
return [
|
25 |
+
'id' => self::IDENTIFIER,
|
26 |
+
'version' => self::VERSION,
|
27 |
+
'name' => $name,
|
28 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
29 |
+
'attributes' => [
|
30 |
+
'name' => __('Comments', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
31 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
32 |
+
'purpose' => __(
|
33 |
+
'WordPress as a content management system offers the possibility to write comments under blog posts and similar content. The cookie stores the name, e-mail address and website of a commentator to display it again if the commentator wants to write another comment on this website.',
|
34 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
35 |
+
),
|
36 |
+
'provider' => get_bloginfo('name'),
|
37 |
+
'providerPrivacyPolicy' => \DevOwl\RealCookieBanner\settings\General::getInstance()->getPrivacyPolicyUrl(
|
38 |
+
''
|
39 |
+
),
|
40 |
+
'technicalDefinitions' => [
|
41 |
+
[
|
42 |
+
'type' => 'http',
|
43 |
+
'name' => 'comment_author_*',
|
44 |
+
'host' => $cookieHost,
|
45 |
+
'duration' => 1,
|
46 |
+
'durationUnit' => 'y',
|
47 |
+
'sessionDuration' => \false
|
48 |
+
],
|
49 |
+
[
|
50 |
+
'type' => 'http',
|
51 |
+
'name' => 'comment_author_email_*',
|
52 |
+
'host' => $cookieHost,
|
53 |
+
'duration' => 1,
|
54 |
+
'durationUnit' => 'y',
|
55 |
+
'sessionDuration' => \false
|
56 |
+
],
|
57 |
+
[
|
58 |
+
'type' => 'http',
|
59 |
+
'name' => 'comment_author_url_*',
|
60 |
+
'host' => $cookieHost,
|
61 |
+
'duration' => 1,
|
62 |
+
'durationUnit' => 'y',
|
63 |
+
'sessionDuration' => \false
|
64 |
+
]
|
65 |
+
],
|
66 |
+
'technicalHandlingNotice' => __(
|
67 |
+
'Please note that if this service is enabled, the "Save my name, email, and website in this browser for the next time I comment." checkbox in the comment form will disappear. Real Cookie Banner handles the consent to set the cookies as part of the overall cookie consent. The commentary system uses the Gravatar service to display avatars of commentators. You must also create a service for Gravatar as well.',
|
68 |
+
RCB_TD
|
69 |
+
),
|
70 |
+
'codeOptIn' => '<script>
|
71 |
+
var checkboxId = "wp-comment-cookies-consent";
|
72 |
+
var checkbox = document.querySelector(\'[name="\' + checkboxId + \'"]\');
|
73 |
+
var label = document.querySelector(\'[for="\' + checkboxId + \'"]\') || (checkbox && checkbox.parentElement);
|
74 |
+
|
75 |
+
if (label && checkbox) {
|
76 |
+
checkbox.checked = true;
|
77 |
+
checkbox.style.display = "none";
|
78 |
+
label.style.display = "none";
|
79 |
+
}
|
80 |
+
</script>',
|
81 |
+
'codeOptOutDelete' => \false
|
82 |
+
]
|
83 |
+
];
|
84 |
+
}
|
85 |
+
// Documented in AbstractPreset
|
86 |
+
public function managerNone() {
|
87 |
+
return \false;
|
88 |
+
}
|
89 |
+
// Documented in AbstractPreset
|
90 |
+
public function managerGtm() {
|
91 |
+
return \false;
|
92 |
+
}
|
93 |
+
// Documented in AbstractPreset
|
94 |
+
public function managerMtm() {
|
95 |
+
return \false;
|
96 |
+
}
|
97 |
+
}
|
inc/presets/free/WordPressEmojisPreset.php
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* WordPress Emojis cookie preset.
|
14 |
+
*/
|
15 |
+
class WordPressEmojisPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_EMOJIS;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'WordPress Emojis';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
26 |
+
'attributes' => [
|
27 |
+
'name' => 'Emojis',
|
28 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
29 |
+
'purpose' => __(
|
30 |
+
'WordPress Emoji is an emoji set that is loaded from wordpress.org. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible.',
|
31 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
32 |
+
),
|
33 |
+
'noTechnicalDefinitions' => \true,
|
34 |
+
'provider' => 'WordPress.org',
|
35 |
+
'providerPrivacyPolicy' => __(
|
36 |
+
'https://wordpress.org/about/privacy/',
|
37 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
38 |
+
),
|
39 |
+
'ePrivacyUSA' => \true
|
40 |
+
]
|
41 |
+
];
|
42 |
+
}
|
43 |
+
// Documented in AbstractPreset
|
44 |
+
public function managerNone() {
|
45 |
+
return \false;
|
46 |
+
}
|
47 |
+
// Documented in AbstractPreset
|
48 |
+
public function managerGtm() {
|
49 |
+
return \false;
|
50 |
+
}
|
51 |
+
// Documented in AbstractPreset
|
52 |
+
public function managerMtm() {
|
53 |
+
return \false;
|
54 |
+
}
|
55 |
+
}
|
inc/presets/free/WordPressPluginEmbed.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* WordPress plugin embed cookie preset.
|
14 |
+
*/
|
15 |
+
class WordPressPluginEmbed extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_PLUGIN_EMBED;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'WordPress.org Plugin (Embed)';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
26 |
+
'attributes' => [
|
27 |
+
'name' => $name,
|
28 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
29 |
+
'purpose' => __(
|
30 |
+
'WordPress.org allows to display further and latest information about plugins published on wordpress.org. No cookies in the technical sense are set on the client of the user, but technical and personal data such as the IP address will be transmitted from the client to the server of the service provider to make the use of the service possible.',
|
31 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
32 |
+
),
|
33 |
+
'provider' => 'WordPress.org',
|
34 |
+
'providerPrivacyPolicy' => 'https://wordpress.org/about/privacy/',
|
35 |
+
'noTechnicalDefinitions' => \true,
|
36 |
+
'ePrivacyUSA' => \true
|
37 |
+
]
|
38 |
+
];
|
39 |
+
}
|
40 |
+
// Documented in AbstractPreset
|
41 |
+
public function managerNone() {
|
42 |
+
return \false;
|
43 |
+
}
|
44 |
+
// Documented in AbstractPreset
|
45 |
+
public function managerGtm() {
|
46 |
+
return \false;
|
47 |
+
}
|
48 |
+
// Documented in AbstractPreset
|
49 |
+
public function managerMtm() {
|
50 |
+
return \false;
|
51 |
+
}
|
52 |
+
}
|
inc/presets/free/WordPressUserLoginPreset.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
use DevOwl\RealCookieBanner\settings\General;
|
9 |
+
use DevOwl\RealCookieBanner\Utils;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* WordPress User Login cookie preset.
|
16 |
+
*/
|
17 |
+
class WordPressUserLoginPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
18 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::WORDPRESS_USER_LOGIN;
|
19 |
+
const VERSION = 1;
|
20 |
+
// Documented in AbstractPreset
|
21 |
+
public function common() {
|
22 |
+
$cookieHost = \DevOwl\RealCookieBanner\Utils::host(\DevOwl\RealCookieBanner\Utils::HOST_TYPE_CURRENT);
|
23 |
+
return [
|
24 |
+
'id' => self::IDENTIFIER,
|
25 |
+
'version' => self::VERSION,
|
26 |
+
'name' => __('WordPress User Login', RCB_TD),
|
27 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
28 |
+
'attributes' => [
|
29 |
+
'name' => __('WordPress User Login', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
30 |
+
'group' => __('Essential', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
31 |
+
'purpose' => __(
|
32 |
+
'WordPress is the content management system for this website and allows registered users to log in to the system. The cookies store the credentials of a logged-in user as hash, login status and user ID as well as user-related settings for the WordPress backend.',
|
33 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
34 |
+
),
|
35 |
+
'provider' => get_bloginfo('name'),
|
36 |
+
'providerPrivacyPolicy' => \DevOwl\RealCookieBanner\settings\General::getInstance()->getPrivacyPolicyUrl(
|
37 |
+
''
|
38 |
+
),
|
39 |
+
'technicalDefinitions' => [
|
40 |
+
[
|
41 |
+
'type' => 'http',
|
42 |
+
'name' => 'wordpress_*',
|
43 |
+
'host' => $cookieHost,
|
44 |
+
'duration' => 0,
|
45 |
+
'durationUnit' => 'y',
|
46 |
+
'sessionDuration' => \true
|
47 |
+
],
|
48 |
+
[
|
49 |
+
'type' => 'http',
|
50 |
+
'name' => 'wordpress_logged_in_*',
|
51 |
+
'host' => $cookieHost,
|
52 |
+
'duration' => 0,
|
53 |
+
'durationUnit' => 'y',
|
54 |
+
'sessionDuration' => \true
|
55 |
+
],
|
56 |
+
[
|
57 |
+
'type' => 'http',
|
58 |
+
'name' => 'wp-settings-*-*',
|
59 |
+
'host' => $cookieHost,
|
60 |
+
'duration' => 1,
|
61 |
+
'durationUnit' => 'y',
|
62 |
+
'sessionDuration' => \false
|
63 |
+
],
|
64 |
+
[
|
65 |
+
'type' => 'http',
|
66 |
+
'name' => 'wordpress_test_cookie',
|
67 |
+
'host' => $cookieHost,
|
68 |
+
'duration' => 0,
|
69 |
+
'durationUnit' => 'y',
|
70 |
+
'sessionDuration' => \true
|
71 |
+
]
|
72 |
+
],
|
73 |
+
'codeOptOutDelete' => \false,
|
74 |
+
'createContentBlockerNotice' => \join('<br /><br />', [
|
75 |
+
__(
|
76 |
+
'You can block the login form to your WordPress (backend) login until consent. This is useful if you want external services like Google reCAPTCHA to load additionally at the login.',
|
77 |
+
RCB_TD
|
78 |
+
),
|
79 |
+
__(
|
80 |
+
'Note: In this case, you must classify this service as non-essential (e.g. functional). Also, you should create a content blocker that not only waits for consent for this service, but also for consent for all third-party services (like Google reCAPTCHA in the example).',
|
81 |
+
RCB_TD
|
82 |
+
)
|
83 |
+
]),
|
84 |
+
'deactivateAutomaticContentBlockerCreation' => \true
|
85 |
+
]
|
86 |
+
];
|
87 |
+
}
|
88 |
+
// Documented in AbstractPreset
|
89 |
+
public function managerNone() {
|
90 |
+
return \false;
|
91 |
+
}
|
92 |
+
// Documented in AbstractPreset
|
93 |
+
public function managerGtm() {
|
94 |
+
return \false;
|
95 |
+
}
|
96 |
+
// Documented in AbstractPreset
|
97 |
+
public function managerMtm() {
|
98 |
+
return \false;
|
99 |
+
}
|
100 |
+
}
|
inc/presets/free/YoutubePreset.php
ADDED
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Youtube cookie preset.
|
15 |
+
*/
|
16 |
+
class YoutubePreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::YOUTUBE;
|
18 |
+
const VERSION = 1;
|
19 |
+
// Documented in AbstractPreset
|
20 |
+
public function common() {
|
21 |
+
$name = 'YouTube';
|
22 |
+
return [
|
23 |
+
'id' => self::IDENTIFIER,
|
24 |
+
'version' => self::VERSION,
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/youtube.png'),
|
27 |
+
'attributes' => [
|
28 |
+
'name' => $name,
|
29 |
+
'group' => __('Functional', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
30 |
+
'purpose' => __(
|
31 |
+
'YouTube allows embedding content posted on youtube.com directly into websites. The cookies are used to collect visited websites and detailed statistics about the user behaviour. This data can be linked to the data of users registered on youtube.com and google.com or localized versions of these services.',
|
32 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
33 |
+
),
|
34 |
+
'provider' => 'Google Ireland Limited',
|
35 |
+
'providerPrivacyPolicy' => 'https://policies.google.com/privacy',
|
36 |
+
'technicalDefinitions' => [
|
37 |
+
[
|
38 |
+
'type' => 'http',
|
39 |
+
'name' => 'SIDCC',
|
40 |
+
'host' => '.youtube.com',
|
41 |
+
'durationUnit' => 'y',
|
42 |
+
'sessionDuration' => \false,
|
43 |
+
'duration' => 1
|
44 |
+
],
|
45 |
+
[
|
46 |
+
'type' => 'http',
|
47 |
+
'name' => '__Secure-3PAPISID',
|
48 |
+
'host' => '.youtube.com',
|
49 |
+
'duration' => 2,
|
50 |
+
'durationUnit' => 'y',
|
51 |
+
'sessionDuration' => \false
|
52 |
+
],
|
53 |
+
[
|
54 |
+
'type' => 'http',
|
55 |
+
'name' => '__Secure-APISID',
|
56 |
+
'host' => '.youtube.com',
|
57 |
+
'duration' => 1,
|
58 |
+
'durationUnit' => 'mo',
|
59 |
+
'sessionDuration' => \false
|
60 |
+
],
|
61 |
+
[
|
62 |
+
'type' => 'http',
|
63 |
+
'name' => '__Secure-SSID',
|
64 |
+
'host' => '.youtube.com',
|
65 |
+
'duration' => 1,
|
66 |
+
'durationUnit' => 'mo',
|
67 |
+
'sessionDuration' => \false
|
68 |
+
],
|
69 |
+
[
|
70 |
+
'type' => 'http',
|
71 |
+
'name' => '__Secure-HSID',
|
72 |
+
'host' => '.youtube.com',
|
73 |
+
'duration' => 1,
|
74 |
+
'durationUnit' => 'mo',
|
75 |
+
'sessionDuration' => \false
|
76 |
+
],
|
77 |
+
[
|
78 |
+
'type' => 'http',
|
79 |
+
'name' => 'APISID',
|
80 |
+
'host' => '.youtube.com',
|
81 |
+
'duration' => 6,
|
82 |
+
'durationUnit' => 'mo',
|
83 |
+
'sessionDuration' => \false
|
84 |
+
],
|
85 |
+
[
|
86 |
+
'type' => 'http',
|
87 |
+
'name' => '__Secure-3PSID',
|
88 |
+
'host' => '.youtube.com',
|
89 |
+
'duration' => 6,
|
90 |
+
'durationUnit' => 'mo',
|
91 |
+
'sessionDuration' => \false
|
92 |
+
],
|
93 |
+
[
|
94 |
+
'type' => 'http',
|
95 |
+
'name' => 'SAPISID',
|
96 |
+
'host' => '.youtube.com',
|
97 |
+
'duration' => 2,
|
98 |
+
'durationUnit' => 'y',
|
99 |
+
'sessionDuration' => \false
|
100 |
+
],
|
101 |
+
[
|
102 |
+
'type' => 'http',
|
103 |
+
'name' => 'HSID',
|
104 |
+
'host' => '.youtube.com',
|
105 |
+
'duration' => 6,
|
106 |
+
'durationUnit' => 'mo',
|
107 |
+
'sessionDuration' => \false
|
108 |
+
],
|
109 |
+
[
|
110 |
+
'type' => 'http',
|
111 |
+
'name' => 'SSID',
|
112 |
+
'host' => '.youtube.com',
|
113 |
+
'duration' => 2,
|
114 |
+
'durationUnit' => 'y',
|
115 |
+
'sessionDuration' => \false
|
116 |
+
],
|
117 |
+
[
|
118 |
+
'type' => 'http',
|
119 |
+
'name' => 'SID',
|
120 |
+
'host' => '.youtube.com',
|
121 |
+
'duration' => 6,
|
122 |
+
'durationUnit' => 'mo',
|
123 |
+
'sessionDuration' => \false
|
124 |
+
],
|
125 |
+
[
|
126 |
+
'type' => 'http',
|
127 |
+
'name' => '1P_JAR',
|
128 |
+
'host' => '.youtube.com',
|
129 |
+
'duration' => 1,
|
130 |
+
'durationUnit' => 'mo',
|
131 |
+
'sessionDuration' => \false
|
132 |
+
],
|
133 |
+
[
|
134 |
+
'type' => 'http',
|
135 |
+
'name' => 'SEARCH_SAMESITE',
|
136 |
+
'host' => '.youtube.com',
|
137 |
+
'duration' => 6,
|
138 |
+
'durationUnit' => 'mo',
|
139 |
+
'sessionDuration' => \false
|
140 |
+
],
|
141 |
+
[
|
142 |
+
'type' => 'http',
|
143 |
+
'name' => 'CONSENT',
|
144 |
+
'host' => '.youtube.com',
|
145 |
+
'duration' => 6,
|
146 |
+
'durationUnit' => 'y',
|
147 |
+
'sessionDuration' => \false
|
148 |
+
],
|
149 |
+
[
|
150 |
+
'type' => 'http',
|
151 |
+
'name' => 'YSC',
|
152 |
+
'host' => '.youtube.com',
|
153 |
+
'durationUnit' => 'y',
|
154 |
+
'sessionDuration' => \true,
|
155 |
+
'duration' => 0
|
156 |
+
],
|
157 |
+
[
|
158 |
+
'type' => 'http',
|
159 |
+
'name' => 'SIDCC',
|
160 |
+
'host' => '.youtube.com',
|
161 |
+
'duration' => 6,
|
162 |
+
'durationUnit' => 'mo',
|
163 |
+
'sessionDuration' => \false
|
164 |
+
],
|
165 |
+
[
|
166 |
+
'type' => 'http',
|
167 |
+
'name' => 'LOGIN_INFO',
|
168 |
+
'host' => '.youtube.com',
|
169 |
+
'duration' => 2,
|
170 |
+
'durationUnit' => 'y',
|
171 |
+
'sessionDuration' => \false
|
172 |
+
],
|
173 |
+
[
|
174 |
+
'type' => 'http',
|
175 |
+
'name' => 'HSID',
|
176 |
+
'host' => '.youtube.com',
|
177 |
+
'duration' => 2,
|
178 |
+
'durationUnit' => 'y',
|
179 |
+
'sessionDuration' => \false
|
180 |
+
],
|
181 |
+
[
|
182 |
+
'type' => 'http',
|
183 |
+
'name' => 'VISITOR_INFO1_LIVE',
|
184 |
+
'host' => '.youtube.com',
|
185 |
+
'duration' => 6,
|
186 |
+
'durationUnit' => 'mo',
|
187 |
+
'sessionDuration' => \false
|
188 |
+
],
|
189 |
+
[
|
190 |
+
'type' => 'http',
|
191 |
+
'name' => '__Secure-3PAPISID',
|
192 |
+
'host' => '.youtube.com',
|
193 |
+
'duration' => 6,
|
194 |
+
'durationUnit' => 'mo',
|
195 |
+
'sessionDuration' => \false
|
196 |
+
],
|
197 |
+
[
|
198 |
+
'type' => 'http',
|
199 |
+
'name' => 'CONSENT',
|
200 |
+
'host' => '.youtube.com',
|
201 |
+
'duration' => 18,
|
202 |
+
'durationUnit' => 'y',
|
203 |
+
'sessionDuration' => \false
|
204 |
+
],
|
205 |
+
[
|
206 |
+
'type' => 'http',
|
207 |
+
'name' => 'SSID',
|
208 |
+
'host' => '.youtube.com',
|
209 |
+
'duration' => 6,
|
210 |
+
'durationUnit' => 'mo',
|
211 |
+
'sessionDuration' => \false
|
212 |
+
],
|
213 |
+
[
|
214 |
+
'type' => 'http',
|
215 |
+
'name' => '__Secure-SSID',
|
216 |
+
'host' => '.youtube.com',
|
217 |
+
'duration' => 1,
|
218 |
+
'durationUnit' => 'mo',
|
219 |
+
'sessionDuration' => \false
|
220 |
+
],
|
221 |
+
[
|
222 |
+
'type' => 'http',
|
223 |
+
'name' => '__Secure-APISID',
|
224 |
+
'host' => '.youtube.com',
|
225 |
+
'duration' => 1,
|
226 |
+
'durationUnit' => 'mo',
|
227 |
+
'sessionDuration' => \false
|
228 |
+
],
|
229 |
+
[
|
230 |
+
'type' => 'http',
|
231 |
+
'name' => '__Secure-HSID',
|
232 |
+
'host' => '.youtube.com',
|
233 |
+
'duration' => 1,
|
234 |
+
'durationUnit' => 'mo',
|
235 |
+
'sessionDuration' => \false
|
236 |
+
],
|
237 |
+
[
|
238 |
+
'type' => 'http',
|
239 |
+
'name' => 'SAPISID',
|
240 |
+
'host' => '.youtube.com',
|
241 |
+
'duration' => 6,
|
242 |
+
'durationUnit' => 'mo',
|
243 |
+
'sessionDuration' => \false
|
244 |
+
],
|
245 |
+
[
|
246 |
+
'type' => 'http',
|
247 |
+
'name' => 'APISID',
|
248 |
+
'host' => '.youtube.com',
|
249 |
+
'duration' => 2,
|
250 |
+
'durationUnit' => 'y',
|
251 |
+
'sessionDuration' => \false
|
252 |
+
],
|
253 |
+
[
|
254 |
+
'type' => 'http',
|
255 |
+
'name' => '__Secure-3PSID',
|
256 |
+
'host' => '.youtube.com',
|
257 |
+
'duration' => 2,
|
258 |
+
'durationUnit' => 'y',
|
259 |
+
'sessionDuration' => \false
|
260 |
+
],
|
261 |
+
[
|
262 |
+
'type' => 'http',
|
263 |
+
'name' => 'PREF',
|
264 |
+
'host' => '.youtube.com',
|
265 |
+
'duration' => 8,
|
266 |
+
'durationUnit' => 'mo',
|
267 |
+
'sessionDuration' => \false
|
268 |
+
],
|
269 |
+
[
|
270 |
+
'type' => 'http',
|
271 |
+
'name' => 'SID',
|
272 |
+
'host' => '.youtube.com',
|
273 |
+
'duration' => 2,
|
274 |
+
'durationUnit' => 'y',
|
275 |
+
'sessionDuration' => \false
|
276 |
+
],
|
277 |
+
[
|
278 |
+
'type' => 'http',
|
279 |
+
'name' => 's_gl',
|
280 |
+
'host' => '.youtube.com',
|
281 |
+
'durationUnit' => 'y',
|
282 |
+
'sessionDuration' => \true,
|
283 |
+
'duration' => 0
|
284 |
+
],
|
285 |
+
[
|
286 |
+
'type' => 'http',
|
287 |
+
'name' => 'SIDCC',
|
288 |
+
'host' => '.google.com',
|
289 |
+
'duration' => 1,
|
290 |
+
'durationUnit' => 'y',
|
291 |
+
'sessionDuration' => \false
|
292 |
+
],
|
293 |
+
[
|
294 |
+
'type' => 'http',
|
295 |
+
'name' => '__Secure-3PAPISID',
|
296 |
+
'host' => '.google.com',
|
297 |
+
'duration' => 2,
|
298 |
+
'durationUnit' => 'y',
|
299 |
+
'sessionDuration' => \false
|
300 |
+
],
|
301 |
+
[
|
302 |
+
'type' => 'http',
|
303 |
+
'name' => 'SAPISID',
|
304 |
+
'host' => '.google.com',
|
305 |
+
'duration' => 2,
|
306 |
+
'durationUnit' => 'y',
|
307 |
+
'sessionDuration' => \false
|
308 |
+
],
|
309 |
+
[
|
310 |
+
'type' => 'http',
|
311 |
+
'name' => 'APISID',
|
312 |
+
'host' => '.google.com',
|
313 |
+
'duration' => 2,
|
314 |
+
'durationUnit' => 'y',
|
315 |
+
'sessionDuration' => \false
|
316 |
+
],
|
317 |
+
[
|
318 |
+
'type' => 'http',
|
319 |
+
'name' => 'SSID',
|
320 |
+
'host' => '.google.com',
|
321 |
+
'duration' => 2,
|
322 |
+
'durationUnit' => 'y',
|
323 |
+
'sessionDuration' => \false
|
324 |
+
],
|
325 |
+
[
|
326 |
+
'type' => 'http',
|
327 |
+
'name' => 'HSID',
|
328 |
+
'host' => '.google.com',
|
329 |
+
'duration' => 2,
|
330 |
+
'durationUnit' => 'y',
|
331 |
+
'sessionDuration' => \false
|
332 |
+
],
|
333 |
+
[
|
334 |
+
'type' => 'http',
|
335 |
+
'name' => '__Secure-3PSID',
|
336 |
+
'host' => '.google.com',
|
337 |
+
'duration' => 2,
|
338 |
+
'durationUnit' => 'y',
|
339 |
+
'sessionDuration' => \false
|
340 |
+
],
|
341 |
+
[
|
342 |
+
'type' => 'http',
|
343 |
+
'name' => 'SID',
|
344 |
+
'host' => '.google.com',
|
345 |
+
'duration' => 2,
|
346 |
+
'durationUnit' => 'y',
|
347 |
+
'sessionDuration' => \false
|
348 |
+
],
|
349 |
+
[
|
350 |
+
'type' => 'http',
|
351 |
+
'name' => 'CONSENT',
|
352 |
+
'host' => '.google.com',
|
353 |
+
'duration' => 18,
|
354 |
+
'durationUnit' => 'y',
|
355 |
+
'sessionDuration' => \false
|
356 |
+
],
|
357 |
+
[
|
358 |
+
'type' => 'http',
|
359 |
+
'name' => 'NID',
|
360 |
+
'host' => '.google.com',
|
361 |
+
'duration' => 6,
|
362 |
+
'durationUnit' => 'mo',
|
363 |
+
'sessionDuration' => \false
|
364 |
+
],
|
365 |
+
[
|
366 |
+
'type' => 'http',
|
367 |
+
'name' => '1P_JAR',
|
368 |
+
'host' => '.google.com',
|
369 |
+
'duration' => 1,
|
370 |
+
'durationUnit' => 'mo',
|
371 |
+
'sessionDuration' => \false
|
372 |
+
],
|
373 |
+
[
|
374 |
+
'type' => 'http',
|
375 |
+
'name' => 'DV',
|
376 |
+
'host' => 'www.google.com',
|
377 |
+
'duration' => 1,
|
378 |
+
'durationUnit' => 'm',
|
379 |
+
'sessionDuration' => \false
|
380 |
+
]
|
381 |
+
],
|
382 |
+
'technicalHandlingNotice' => __(
|
383 |
+
'There is no need for an opt-in script because the YouTube content is usually loaded in an iframe. You must create a content blocker that will block YouTube until the user gives consent to load it.',
|
384 |
+
RCB_TD
|
385 |
+
),
|
386 |
+
'codeOptOutDelete' => \false,
|
387 |
+
'ePrivacyUSA' => \true
|
388 |
+
]
|
389 |
+
];
|
390 |
+
}
|
391 |
+
// Documented in AbstractPreset
|
392 |
+
public function managerNone() {
|
393 |
+
return \false;
|
394 |
+
}
|
395 |
+
// Documented in AbstractPreset
|
396 |
+
public function managerGtm() {
|
397 |
+
return \false;
|
398 |
+
}
|
399 |
+
// Documented in AbstractPreset
|
400 |
+
public function managerMtm() {
|
401 |
+
return \false;
|
402 |
+
}
|
403 |
+
}
|
inc/presets/free/blocker/FontAwesomePreset.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\free\FontAwesomePreset as PresetsFontAwesomePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Font Awesome blocker preset.
|
14 |
+
*/
|
15 |
+
class FontAwesomePreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\FontAwesomePreset::IDENTIFIER;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Font Awesome';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/font-awesome.png'),
|
26 |
+
'attributes' => [
|
27 |
+
'name' => $name,
|
28 |
+
'hosts' => \array_merge(
|
29 |
+
['*use.fontawesome.com*', '*kit.fontawesome.com*', '*bootstrapcdn.com/font-awesome/*'],
|
30 |
+
$this->createHostsForCdn('font-awesome')
|
31 |
+
),
|
32 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\FontAwesomePreset::IDENTIFIER],
|
33 |
+
'visual' => \false
|
34 |
+
]
|
35 |
+
];
|
36 |
+
}
|
37 |
+
}
|
inc/presets/free/blocker/GoogleFontsPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\GoogleFontsPreset as FreeGoogleFontsPreset;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Google Fonts blocker preset.
|
14 |
+
*/
|
15 |
+
class GoogleFontsPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\GoogleFontsPreset::IDENTIFIER;
|
17 |
+
const VERSION = 2;
|
18 |
+
/**
|
19 |
+
* Web Font Loader compatibility.
|
20 |
+
*
|
21 |
+
* @see https://app.clickup.com/t/aq01tu
|
22 |
+
*/
|
23 |
+
const WEB_FONT_LOADER_URL = '*ajax.googleapis.com/ajax/libs/webfont/1/webfont.js*';
|
24 |
+
// Documented in AbstractPreset
|
25 |
+
public function common() {
|
26 |
+
$name = 'Google Fonts';
|
27 |
+
return [
|
28 |
+
'id' => self::IDENTIFIER,
|
29 |
+
'version' => self::VERSION,
|
30 |
+
'name' => $name,
|
31 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/google-fonts.png'),
|
32 |
+
'attributes' => [
|
33 |
+
'name' => $name,
|
34 |
+
'hosts' => ['*fonts.googleapis.com*', self::WEB_FONT_LOADER_URL, '*fonts.gstatic.com*'],
|
35 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\blocker\GoogleFontsPreset::IDENTIFIER],
|
36 |
+
'visual' => \false
|
37 |
+
]
|
38 |
+
];
|
39 |
+
}
|
40 |
+
}
|
inc/presets/free/blocker/GravatarPreset.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\free\GravatarPreset as PresetsGravatarPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Gravatar Avatar blocker preset.
|
14 |
+
*/
|
15 |
+
class GravatarPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\GravatarPreset::IDENTIFIER;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Gravatar';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/gravatar.png'),
|
26 |
+
'attributes' => [
|
27 |
+
'name' => $name,
|
28 |
+
'hosts' => ['*gravatar.com/avatar*'],
|
29 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\GravatarPreset::IDENTIFIER],
|
30 |
+
'visual' => \false
|
31 |
+
]
|
32 |
+
];
|
33 |
+
}
|
34 |
+
}
|
inc/presets/free/blocker/JetPackCommentsPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\free\JetPackCommentsPreset as FreeJetpackJetPackCommentsPreset;
|
9 |
+
use DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* Jetpack Comments blocker preset.
|
16 |
+
*/
|
17 |
+
class JetPackCommentsPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
18 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\JetPackCommentsPreset::IDENTIFIER;
|
19 |
+
const VERSION = 2;
|
20 |
+
// Documented in AbstractPreset
|
21 |
+
public function common() {
|
22 |
+
$name = 'Jetpack Comments';
|
23 |
+
return [
|
24 |
+
'id' => self::IDENTIFIER,
|
25 |
+
'version' => self::VERSION,
|
26 |
+
'name' => $name,
|
27 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/jetpack.png'),
|
28 |
+
'needs' => \DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::needs(),
|
29 |
+
'attributes' => [
|
30 |
+
'name' => $name,
|
31 |
+
'description' => __(
|
32 |
+
'We use the Jetpack Comments service to give you the opportunity to leave a comment. In order to be able to write your own comment, you must allow this service to load.',
|
33 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
34 |
+
),
|
35 |
+
'hosts' => ['jetpack_remote_comment', 'iframe[class="jetpack_remote_comment"]'],
|
36 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\JetPackCommentsPreset::IDENTIFIER]
|
37 |
+
]
|
38 |
+
];
|
39 |
+
}
|
40 |
+
}
|
inc/presets/free/blocker/JetPackSiteStatsPreset.php
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset as FreeJetpackSiteStatsPreset;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Jetpack Site Stats blocker preset.
|
14 |
+
*/
|
15 |
+
class JetPackSiteStatsPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::IDENTIFIER;
|
17 |
+
const VERSION = 3;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Jetpack Site Stats';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/jetpack.png'),
|
26 |
+
'needs' => \DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::needs(),
|
27 |
+
'attributes' => [
|
28 |
+
'name' => $name,
|
29 |
+
'hosts' => ['*pixel.wp.com*', '*stats.wp.com*'],
|
30 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\JetpackSiteStatsPreset::IDENTIFIER],
|
31 |
+
'visual' => \false
|
32 |
+
]
|
33 |
+
];
|
34 |
+
}
|
35 |
+
}
|
inc/presets/free/blocker/WordPressCommentsPreset.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressCommentsPreset as PresetsWordPressCommentsPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* WordPress Comments blocker preset.
|
13 |
+
*/
|
14 |
+
class WordPressCommentsPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
15 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\WordPressCommentsPreset::IDENTIFIER;
|
16 |
+
const VERSION = 1;
|
17 |
+
// Documented in AbstractPreset
|
18 |
+
public function common() {
|
19 |
+
$name = __('WordPress Comments', RCB_TD);
|
20 |
+
return [
|
21 |
+
'id' => self::IDENTIFIER,
|
22 |
+
'version' => self::VERSION,
|
23 |
+
'name' => $name,
|
24 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
25 |
+
'hidden' => \true,
|
26 |
+
'attributes' => [
|
27 |
+
'hosts' => ['form[action*="wp-comments-post.php"]'],
|
28 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\WordPressCommentsPreset::IDENTIFIER]
|
29 |
+
]
|
30 |
+
];
|
31 |
+
}
|
32 |
+
}
|
inc/presets/free/blocker/WordPressEmojisPreset.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressEmojisPreset as FreeWordPressEmojisPreset;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* WordPress Emojis blocker preset.
|
13 |
+
*/
|
14 |
+
class WordPressEmojisPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
15 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\WordPressEmojisPreset::IDENTIFIER;
|
16 |
+
const VERSION = 1;
|
17 |
+
// Documented in AbstractPreset
|
18 |
+
public function common() {
|
19 |
+
$name = 'WordPress Emojis';
|
20 |
+
return [
|
21 |
+
'id' => self::IDENTIFIER,
|
22 |
+
'version' => self::VERSION,
|
23 |
+
'name' => $name,
|
24 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
25 |
+
'attributes' => [
|
26 |
+
'name' => $name,
|
27 |
+
'hosts' => ['*s.w.org/images/core/emoji*', 'window._wpemojiSettings', 'link[href="//s.w.org"]'],
|
28 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\WordPressEmojisPreset::IDENTIFIER],
|
29 |
+
'visual' => \false
|
30 |
+
]
|
31 |
+
];
|
32 |
+
}
|
33 |
+
}
|
inc/presets/free/blocker/WordPressPluginEmbed.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressPluginEmbed as FreeWordPressPluginEmbed;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* WordPress Emojis blocker preset.
|
14 |
+
*/
|
15 |
+
class WordPressPluginEmbed extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\WordPressPluginEmbed::IDENTIFIER;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'WordPress.org Plugin (Embed)';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
26 |
+
'attributes' => [
|
27 |
+
'name' => $name,
|
28 |
+
'description' => __(
|
29 |
+
'WordPress.org would give more information about a WordPress plugin here if you would give your consent.',
|
30 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
31 |
+
),
|
32 |
+
'hosts' => ['*wordpress.org/plugins/*/embed/*'],
|
33 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\WordPressPluginEmbed::IDENTIFIER],
|
34 |
+
'visual' => \true,
|
35 |
+
'forceHidden' => \true
|
36 |
+
]
|
37 |
+
];
|
38 |
+
}
|
39 |
+
}
|
inc/presets/free/blocker/WordPressUserLoginPreset.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\free\WordPressUserLoginPreset as FreeWordPressUserLoginPreset;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* WordPress User Login blocker preset.
|
14 |
+
*/
|
15 |
+
class WordPressUserLoginPreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\WordPressUserLoginPreset::IDENTIFIER;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
return [
|
21 |
+
'id' => self::IDENTIFIER,
|
22 |
+
'version' => self::VERSION,
|
23 |
+
'name' => __('WordPress User Login', RCB_TD),
|
24 |
+
'logoFile' => admin_url('images/wordpress-logo.svg'),
|
25 |
+
'attributes' => [
|
26 |
+
'name' => __('WordPress User Login', \DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED),
|
27 |
+
'description' => __(
|
28 |
+
'In order to log in, you must allow us to load additional services for security and convenience reasons.',
|
29 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
30 |
+
),
|
31 |
+
'hosts' => ['form[name="loginform"]'],
|
32 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\WordPressUserLoginPreset::IDENTIFIER],
|
33 |
+
'visual' => \true
|
34 |
+
]
|
35 |
+
];
|
36 |
+
}
|
37 |
+
}
|
inc/presets/free/blocker/YoutubePreset.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\free\blocker;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\language\Hooks;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\free\YoutubePreset as FreeYoutubePreset;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Youtube blocker preset.
|
15 |
+
*/
|
16 |
+
class YoutubePreset extends \DevOwl\RealCookieBanner\presets\AbstractBlockerPreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\free\YoutubePreset::IDENTIFIER;
|
18 |
+
const VERSION = 2;
|
19 |
+
// Documented in AbstractPreset
|
20 |
+
public function common() {
|
21 |
+
$name = 'YouTube';
|
22 |
+
return [
|
23 |
+
'id' => self::IDENTIFIER,
|
24 |
+
'version' => self::VERSION,
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/youtube.png'),
|
27 |
+
'attributes' => [
|
28 |
+
'name' => $name,
|
29 |
+
'description' => __(
|
30 |
+
'Video from YouTube has been blocked because you did not allow to load it.',
|
31 |
+
\DevOwl\RealCookieBanner\comp\language\Hooks::TD_FORCED
|
32 |
+
),
|
33 |
+
'hosts' => [
|
34 |
+
'*youtube.com*',
|
35 |
+
'*youtu.be*',
|
36 |
+
'*youtube-nocookie.com*',
|
37 |
+
'*ytimg.com*',
|
38 |
+
// [Plugin Comp] Elementor
|
39 |
+
'div[data-settings*="youtube_url"]'
|
40 |
+
],
|
41 |
+
'cookies' => [\DevOwl\RealCookieBanner\presets\free\YoutubePreset::IDENTIFIER]
|
42 |
+
]
|
43 |
+
];
|
44 |
+
}
|
45 |
+
}
|
inc/presets/free/blocker/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/presets/free/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/presets/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/presets/middleware/AdoptTierFromClassNamespaceMiddleware.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use ReflectionClass;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Middleware to automatically create `tier` from class namespace.
|
14 |
+
*/
|
15 |
+
class AdoptTierFromClassNamespaceMiddleware {
|
16 |
+
const TIER_PRO = 'pro';
|
17 |
+
const TIER_FREE = 'free';
|
18 |
+
/**
|
19 |
+
* Adopt `tier` from class name.
|
20 |
+
*
|
21 |
+
* @param array $preset
|
22 |
+
* @param AbstractCookiePreset|AbstractBlockerPreset $instance
|
23 |
+
*/
|
24 |
+
public function middleware(&$preset, $instance) {
|
25 |
+
if (!isset($preset['tier']) && $instance !== null) {
|
26 |
+
$declaringFileName = (new \ReflectionClass(\get_class($instance)))->getFileName();
|
27 |
+
$isProFileName =
|
28 |
+
\strpos($declaringFileName, 'overrides/pro/presets') !== \false ||
|
29 |
+
\strpos($declaringFileName, 'presets/pro') !== \false;
|
30 |
+
$preset['tier'] = !$isProFileName ? self::TIER_FREE : self::TIER_PRO;
|
31 |
+
}
|
32 |
+
return $preset;
|
33 |
+
}
|
34 |
+
}
|
inc/presets/middleware/BlockerExistsMiddleware.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
6 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
7 |
+
use WP_Post;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Middleware to add a tag with label when the preset already exists.
|
14 |
+
*/
|
15 |
+
class BlockerExistsMiddleware {
|
16 |
+
/**
|
17 |
+
* See class description.
|
18 |
+
*
|
19 |
+
* @param array $preset
|
20 |
+
* @param AbstractCookiePreset $instance Preset instance
|
21 |
+
* @param WP_Post[] $existingBlocker
|
22 |
+
* @param WP_Post[] $existingCookies
|
23 |
+
*/
|
24 |
+
public function middleware(&$preset, $instance, $existingBlocker, $existingCookies) {
|
25 |
+
$labelAlreadyExists = __('Already exists', RCB_TD);
|
26 |
+
foreach ($existingBlocker as $blocker) {
|
27 |
+
if ($blocker->metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID] === $preset['id']) {
|
28 |
+
$tooltipAlreadyExists = __('You have already created a Content Blocker with this template.', RCB_TD);
|
29 |
+
$preset['tags'][$labelAlreadyExists] = $tooltipAlreadyExists;
|
30 |
+
return $preset;
|
31 |
+
}
|
32 |
+
}
|
33 |
+
// Mark hidden blocker presets as "Already exists" when the first service is created
|
34 |
+
// This is useful especially for the scanner
|
35 |
+
foreach ($existingCookies as $cookie) {
|
36 |
+
if ($cookie->metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID] === $preset['id']) {
|
37 |
+
$tooltipAlreadyExists = __('You have already created a Service (Cookie) with this template.', RCB_TD);
|
38 |
+
$preset['tags'][$labelAlreadyExists] = $tooltipAlreadyExists;
|
39 |
+
break;
|
40 |
+
}
|
41 |
+
}
|
42 |
+
return $preset;
|
43 |
+
}
|
44 |
+
}
|
inc/presets/middleware/BlockerHostsOptionsMiddleware.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use WP_Post;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Middleware that adds a `mustHosts` attribute to the blocker metadata from `hosts` options.
|
14 |
+
*
|
15 |
+
* Available options:
|
16 |
+
*
|
17 |
+
* ```
|
18 |
+
* "hosts" => [
|
19 |
+
* ["*google.com/recaptcha*", [
|
20 |
+
* // This is necessary for the scanner: If a host is marked as must, the URL must exist when scanning
|
21 |
+
* // In this case `recaptcha` is the "must-group", that means one of the hosts must be available within the group
|
22 |
+
* BlockerHostsOptionsMiddleware::LOGICAL_MUST => self::IDENTIFIER // can be another string if you want to group multiple hosts with OR in a group
|
23 |
+
* ]]
|
24 |
+
* ]
|
25 |
+
* ```
|
26 |
+
*/
|
27 |
+
class BlockerHostsOptionsMiddleware {
|
28 |
+
const LOGICAL_MUST = 'must';
|
29 |
+
/**
|
30 |
+
* See class description.
|
31 |
+
*
|
32 |
+
* @param array $preset
|
33 |
+
* @param AbstractBlockerPreset|AbstractCookiePreset $unused0
|
34 |
+
* @param WP_Post[] $unused1
|
35 |
+
* @param WP_Post[] $unused2
|
36 |
+
* @param array $result
|
37 |
+
*/
|
38 |
+
public function middleware(&$preset, $unused0, $unused1, $unused2, &$result) {
|
39 |
+
if (isset($preset['attributes'], $preset['attributes']['hosts'])) {
|
40 |
+
// Allow middleware also for extended blockers
|
41 |
+
if (
|
42 |
+
isset($preset['extended']) &&
|
43 |
+
isset($result[$preset['extended']], $result[$preset['extended']]['mustHosts'])
|
44 |
+
) {
|
45 |
+
$preset['mustHosts'] = $result[$preset['extended']]['mustHosts'];
|
46 |
+
}
|
47 |
+
foreach ($preset['attributes']['hosts'] as $key => $host) {
|
48 |
+
if (\is_array($host)) {
|
49 |
+
$preset['attributes']['hosts'][$key] = $host[0];
|
50 |
+
$options = wp_parse_args($host[1], [self::LOGICAL_MUST => \false]);
|
51 |
+
// `must`
|
52 |
+
if ($options[self::LOGICAL_MUST] !== \false) {
|
53 |
+
$preset['mustHosts'][$options[self::LOGICAL_MUST]][] = $host[0];
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
}
|
58 |
+
return $preset;
|
59 |
+
}
|
60 |
+
}
|
inc/presets/middleware/CookieBlockerPresetIdsMiddleware.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\base\UtilsProvider;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\BlockerPresets;
|
8 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
9 |
+
use WP_Post;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* Middleware to add `blockerPresetIds` to the cookies so they are associated together.
|
16 |
+
* This is useful to show a dropdown of available content blockers for a cookie preset.
|
17 |
+
*/
|
18 |
+
class CookieBlockerPresetIdsMiddleware {
|
19 |
+
use UtilsProvider;
|
20 |
+
/**
|
21 |
+
* See class description.
|
22 |
+
*
|
23 |
+
* @param array $preset
|
24 |
+
* @param AbstractCookiePreset $instance Preset instance
|
25 |
+
* @param WP_Post[] $existingCookies
|
26 |
+
* @param WP_Post[] $existingBlockers
|
27 |
+
*/
|
28 |
+
public function middleware(&$preset, $instance, $existingCookies, $existingBlockers) {
|
29 |
+
// Check if preset is already created
|
30 |
+
$labelAlreadyExists = __('Already exists', RCB_TD);
|
31 |
+
$foundExisting = \in_array($labelAlreadyExists, \array_keys($preset['tags']), \true);
|
32 |
+
$usedPresetIds = [];
|
33 |
+
foreach ($existingBlockers as $existingBlocker) {
|
34 |
+
$usedPresetIds[] = $existingBlocker->metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID];
|
35 |
+
}
|
36 |
+
// If not existing, check if a content blocker with same ID exists
|
37 |
+
$preset['blockerPresets'] = isset($preset['blockerPresets']) ? $preset['blockerPresets'] : [];
|
38 |
+
if (!$foundExisting) {
|
39 |
+
$checkBlockerPresets = \array_unique(
|
40 |
+
\array_merge(isset($preset['blockerPresetIds']) ? $preset['blockerPresetIds'] : [], [$preset['id']])
|
41 |
+
);
|
42 |
+
$blockerPresets = new \DevOwl\RealCookieBanner\presets\BlockerPresets();
|
43 |
+
foreach ($checkBlockerPresets as $presetId) {
|
44 |
+
// Check if blocker already created
|
45 |
+
if (\in_array($presetId, $usedPresetIds, \true)) {
|
46 |
+
continue;
|
47 |
+
}
|
48 |
+
// Check if blocker preset exists with attributes
|
49 |
+
$blockerPreset = $blockerPresets->getWithAttributes($presetId);
|
50 |
+
if (
|
51 |
+
$blockerPreset === \false ||
|
52 |
+
(isset($blockerPreset['disabled']) && $blockerPreset['disabled']) ||
|
53 |
+
(isset($blockerPreset['hidden']) && $blockerPreset['hidden']) ||
|
54 |
+
(isset($blockerPreset['tier']) &&
|
55 |
+
$blockerPreset['tier'] ===
|
56 |
+
\DevOwl\RealCookieBanner\presets\middleware\AdoptTierFromClassNamespaceMiddleware::TIER_PRO &&
|
57 |
+
!$this->isPro())
|
58 |
+
) {
|
59 |
+
continue;
|
60 |
+
}
|
61 |
+
$preset['tags']['Content Blocker'] = __(
|
62 |
+
'A suitable content blocker for this service can be created automatically.',
|
63 |
+
RCB_TD
|
64 |
+
);
|
65 |
+
$blockerName = $blockerPreset['name'];
|
66 |
+
$blockerDescription = isset($blockerPreset['description']) ? $blockerPreset['description'] : '';
|
67 |
+
$preset['blockerPresets'][$presetId] =
|
68 |
+
$blockerName . (empty($blockerDescription) ? '' : \sprintf(' (%s)', $blockerDescription));
|
69 |
+
}
|
70 |
+
}
|
71 |
+
unset($preset['blockerPresetIds']);
|
72 |
+
return $preset;
|
73 |
+
}
|
74 |
+
}
|
inc/presets/middleware/CookieExistsMiddleware.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
6 |
+
use DevOwl\RealCookieBanner\settings\Blocker;
|
7 |
+
use WP_Post;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Middleware to add a tag with label when the preset already exists.
|
14 |
+
*/
|
15 |
+
class CookieExistsMiddleware {
|
16 |
+
/**
|
17 |
+
* See class description.
|
18 |
+
*
|
19 |
+
* @param array $preset
|
20 |
+
* @param AbstractCookiePreset $instance Preset instance
|
21 |
+
* @param WP_Post[] $existingCookies
|
22 |
+
*/
|
23 |
+
public function middleware(&$preset, $instance, $existingCookies) {
|
24 |
+
foreach ($existingCookies as $cookie) {
|
25 |
+
if ($cookie->metas[\DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID] === $preset['id']) {
|
26 |
+
$labelAlreadyExists = __('Already exists', RCB_TD);
|
27 |
+
$tooltipAlreadyExists = __('You have already created a cookie with this template.', RCB_TD);
|
28 |
+
$preset['tags'][$labelAlreadyExists] = $tooltipAlreadyExists;
|
29 |
+
break;
|
30 |
+
}
|
31 |
+
}
|
32 |
+
return $preset;
|
33 |
+
}
|
34 |
+
}
|
inc/presets/middleware/CookieGroupNamesBackwardsCompatibleMiddleware.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\CookieGroup;
|
6 |
+
use WP_Term;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Example: After we have introduced Continuous Localization the `Statistic` wording got changed
|
13 |
+
* to `Statistics`. This middleware fixes the `Statistics` wording and check if a term for `Statistic`
|
14 |
+
* exists and fallback to this wording as we do not change the original term while updating the plugin.
|
15 |
+
*/
|
16 |
+
class CookieGroupNamesBackwardsCompatibleMiddleware {
|
17 |
+
private $getOriginalAndLegacyName;
|
18 |
+
/**
|
19 |
+
* C'tor.
|
20 |
+
*
|
21 |
+
* @param callable $getOriginalAndLegacyName A function which returns an `[originalName: string, legacyName: string]` array.
|
22 |
+
*/
|
23 |
+
public function __construct($getOriginalAndLegacyName) {
|
24 |
+
$this->getOriginalAndLegacyName = $getOriginalAndLegacyName;
|
25 |
+
}
|
26 |
+
/**
|
27 |
+
* See class description.
|
28 |
+
*
|
29 |
+
* @param array $preset
|
30 |
+
*/
|
31 |
+
public function middleware(&$preset) {
|
32 |
+
list($originalTermName, $legacyTermName) = \call_user_func($this->getOriginalAndLegacyName);
|
33 |
+
if (
|
34 |
+
isset($preset['attributes'], $preset['attributes']['group']) &&
|
35 |
+
$preset['attributes']['group'] === $originalTermName
|
36 |
+
) {
|
37 |
+
$legacyTerm = get_term_by(
|
38 |
+
'name',
|
39 |
+
$legacyTermName,
|
40 |
+
\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME
|
41 |
+
);
|
42 |
+
if ($legacyTerm instanceof \WP_Term) {
|
43 |
+
$preset['attributes']['group'] = $legacyTermName;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
return $preset;
|
47 |
+
}
|
48 |
+
// Undocumented
|
49 |
+
public static function createMiddlewareStatisticStatics() {
|
50 |
+
return new \DevOwl\RealCookieBanner\presets\middleware\CookieGroupNamesBackwardsCompatibleMiddleware(
|
51 |
+
function () {
|
52 |
+
return [__('Statistics', RCB_TD), __('Statistic', RCB_TD)];
|
53 |
+
}
|
54 |
+
);
|
55 |
+
}
|
56 |
+
}
|
inc/presets/middleware/CookieManagerMiddleware.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
6 |
+
use DevOwl\RealCookieBanner\settings\General;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Create manager arguments (GTM, MTM) and tag.
|
13 |
+
*/
|
14 |
+
class CookieManagerMiddleware {
|
15 |
+
/**
|
16 |
+
* Create manager arguments (GTM, MTM) and tag.
|
17 |
+
*
|
18 |
+
* @param array $preset
|
19 |
+
* @param AbstractCookiePreset $instance
|
20 |
+
*/
|
21 |
+
public function middleware(&$preset, $instance) {
|
22 |
+
if ($instance === null) {
|
23 |
+
return $preset;
|
24 |
+
}
|
25 |
+
$activeManager = \DevOwl\RealCookieBanner\settings\General::getInstance()->getSetCookiesViaManager();
|
26 |
+
switch ($activeManager) {
|
27 |
+
case 'none':
|
28 |
+
$managerExtends = $instance->managerNone();
|
29 |
+
if ($managerExtends !== \false) {
|
30 |
+
$preset = \array_merge_recursive($preset, $managerExtends);
|
31 |
+
}
|
32 |
+
break;
|
33 |
+
case 'googleTagManager':
|
34 |
+
$managerExtends = $instance->managerGtm();
|
35 |
+
if ($managerExtends !== \false) {
|
36 |
+
$preset['tags']['GTM'] = \sprintf(
|
37 |
+
// translators:
|
38 |
+
__('This cookie template is optimized to work with %s.', RCB_TD),
|
39 |
+
'Google Tag Manager'
|
40 |
+
);
|
41 |
+
$preset = \array_merge_recursive($preset, $managerExtends);
|
42 |
+
}
|
43 |
+
break;
|
44 |
+
case 'matomoTagManager':
|
45 |
+
$managerExtends = $instance->managerMtm();
|
46 |
+
if ($managerExtends !== \false) {
|
47 |
+
$preset['tags']['MTM'] = \sprintf(
|
48 |
+
// translators:
|
49 |
+
__('This cookie template is optimized to work with %s.', RCB_TD),
|
50 |
+
'Matomo Tag Manager'
|
51 |
+
);
|
52 |
+
$preset = \array_merge_recursive($preset, $managerExtends);
|
53 |
+
}
|
54 |
+
break;
|
55 |
+
default:
|
56 |
+
break;
|
57 |
+
}
|
58 |
+
return $preset;
|
59 |
+
}
|
60 |
+
}
|
inc/presets/middleware/CookiesDeactivateAutomaticContentBlockerCreationByNeedsMiddleware.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
// @codeCoverageIgnoreStart
|
6 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
7 |
+
// Avoid direct file request
|
8 |
+
// @codeCoverageIgnoreEnd
|
9 |
+
/**
|
10 |
+
* Middleware that adds a `attributes.deactivateAutomaticContentBlockerCreationByNeeds` attribute and automatically
|
11 |
+
* set `attributes.deactivateAutomaticContentBlockerCreation` determined by active plugins.
|
12 |
+
*/
|
13 |
+
class CookiesDeactivateAutomaticContentBlockerCreationByNeedsMiddleware {
|
14 |
+
const PROPERTY = 'deactivateAutomaticContentBlockerCreationByNeeds';
|
15 |
+
const PROPERTY_TO_SET = 'deactivateAutomaticContentBlockerCreation';
|
16 |
+
/**
|
17 |
+
* See class description.
|
18 |
+
*
|
19 |
+
* @param array $preset
|
20 |
+
*/
|
21 |
+
public function middleware(&$preset) {
|
22 |
+
if (isset($preset['attributes'], $preset['attributes'][self::PROPERTY])) {
|
23 |
+
$preset['attributes'][
|
24 |
+
self::PROPERTY_TO_SET
|
25 |
+
] = !\DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware::check(
|
26 |
+
$preset['attributes'][self::PROPERTY],
|
27 |
+
$preset['id'],
|
28 |
+
'cookie'
|
29 |
+
);
|
30 |
+
unset($preset['attributes'][self::PROPERTY]);
|
31 |
+
}
|
32 |
+
return $preset;
|
33 |
+
}
|
34 |
+
}
|
inc/presets/middleware/DisablePresetByNeedsMiddleware.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\Utils;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Middleware to enable `'needs': ['wp:elementor', 'wp:elementor-pro']` in cookie and content blocker presets.
|
14 |
+
*/
|
15 |
+
class DisablePresetByNeedsMiddleware {
|
16 |
+
const WP_PREFIX = 'wp:';
|
17 |
+
/**
|
18 |
+
* Pass preset metadata with attributes and disable the preset when none of the given plugins is active.
|
19 |
+
*
|
20 |
+
* @param array $preset
|
21 |
+
* @param AbstractCookiePreset|AbstractBlockerPreset $instance
|
22 |
+
*/
|
23 |
+
public function middleware(&$preset, $instance) {
|
24 |
+
if (isset($preset['needs']) && !isset($preset['disabled']) && $instance !== null) {
|
25 |
+
$type = $instance instanceof \DevOwl\RealCookieBanner\presets\AbstractCookiePreset ? 'cookie' : 'blocker';
|
26 |
+
$foundActive = self::check($preset['needs'], $preset['id'], $type);
|
27 |
+
$preset['disabled'] = !$foundActive;
|
28 |
+
unset($preset['needs']);
|
29 |
+
}
|
30 |
+
return $preset;
|
31 |
+
}
|
32 |
+
/**
|
33 |
+
* Check by an array of dependencies if one is active.
|
34 |
+
*
|
35 |
+
* @param string[] $needs
|
36 |
+
* @param string $presetIdentifier
|
37 |
+
* @param string $type Can be `cookie` or `blocker`
|
38 |
+
*/
|
39 |
+
public static function check($needs, $presetIdentifier, $type) {
|
40 |
+
foreach ($needs as $dep) {
|
41 |
+
if (\DevOwl\RealCookieBanner\Utils::startsWith($dep, self::WP_PREFIX)) {
|
42 |
+
$plugin = \substr($dep, \strlen(self::WP_PREFIX));
|
43 |
+
if (\DevOwl\RealCookieBanner\Utils::isPluginActive($plugin)) {
|
44 |
+
/**
|
45 |
+
* Allows you to deactivate a false-positive plugin preset.
|
46 |
+
*
|
47 |
+
* Example: Someone has RankMath SEO active, but deactivated the GA function.
|
48 |
+
*
|
49 |
+
* Attention: This filter is only applied for active plugins!
|
50 |
+
*
|
51 |
+
* @hook RCB/Blocker/SkipIfActive
|
52 |
+
* @param {boolean} $isActive
|
53 |
+
* @param {string} $plugin The active plugin (can be slug or file)
|
54 |
+
* @param {string} $identifier The preset identifier
|
55 |
+
* @param {string} $type Can be `cookie` or `blocker`
|
56 |
+
* @return {boolean}
|
57 |
+
* @since 2.6.0
|
58 |
+
*/
|
59 |
+
if (apply_filters('RCB/Presets/Active', \true, $plugin, $presetIdentifier, $type)) {
|
60 |
+
return \true;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
}
|
65 |
+
return \false;
|
66 |
+
}
|
67 |
+
/**
|
68 |
+
* Generate the `needs` keyword for a set of slugs.
|
69 |
+
*
|
70 |
+
* @param string[] $slugs
|
71 |
+
*/
|
72 |
+
public static function generateNeedsForSlugs($slugs) {
|
73 |
+
foreach ($slugs as &$slug) {
|
74 |
+
$slug = \sprintf('%s%s', self::WP_PREFIX, $slug);
|
75 |
+
}
|
76 |
+
return $slugs;
|
77 |
+
}
|
78 |
+
}
|
inc/presets/middleware/DisableTechnicalHandlingThroughPluginMiddleware.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\settings\Cookie;
|
6 |
+
use DevOwl\RealCookieBanner\Utils;
|
7 |
+
// @codeCoverageIgnoreStart
|
8 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
9 |
+
// Avoid direct file request
|
10 |
+
// @codeCoverageIgnoreEnd
|
11 |
+
/**
|
12 |
+
* Middleware to enable `attributes.disableTechnicalHandlingThroughPlugin` in cookie and content blocker presets.
|
13 |
+
*/
|
14 |
+
class DisableTechnicalHandlingThroughPluginMiddleware {
|
15 |
+
/**
|
16 |
+
* Pass preset metadata with attributes and disable the technical handling attributes when
|
17 |
+
* a given plugin is active.
|
18 |
+
*
|
19 |
+
* @param array $preset
|
20 |
+
*/
|
21 |
+
public function middleware(&$preset) {
|
22 |
+
if (isset($preset['attributes']) && isset($preset['attributes']['disableTechnicalHandlingThroughPlugin'])) {
|
23 |
+
$plugins = $preset['attributes']['disableTechnicalHandlingThroughPlugin'];
|
24 |
+
foreach ($plugins as $plugin) {
|
25 |
+
if (\DevOwl\RealCookieBanner\Utils::isPluginActive($plugin)) {
|
26 |
+
// Deactivate all technical handling
|
27 |
+
foreach (\DevOwl\RealCookieBanner\settings\Cookie::TECHNICAL_HANDLING_META_COLLECTION as $key) {
|
28 |
+
if (isset($preset['attributes'][$key])) {
|
29 |
+
unset($preset['attributes'][$key]);
|
30 |
+
}
|
31 |
+
}
|
32 |
+
// Show a notice to the user
|
33 |
+
$oldNotice = $preset['attributes']['technicalHandlingNotice'] ?? '';
|
34 |
+
$preset['attributes']['technicalHandlingNotice'] =
|
35 |
+
\sprintf(
|
36 |
+
// translators:
|
37 |
+
__(
|
38 |
+
'You don\'t have to define a technical handling here, because this is done by the plugin <strong>%s</strong>.',
|
39 |
+
RCB_TD
|
40 |
+
),
|
41 |
+
\DevOwl\RealCookieBanner\Utils::getActivePluginsMap()[$plugin]
|
42 |
+
) . (empty($oldNotice) ? '' : \sprintf('<br /><br />%s', $oldNotice));
|
43 |
+
break;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
unset($preset['attributes']['disableTechnicalHandlingThroughPlugin']);
|
47 |
+
}
|
48 |
+
return $preset;
|
49 |
+
}
|
50 |
+
}
|
inc/presets/middleware/ExtendsMiddleware.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\middleware;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\presets\AbstractBlockerPreset;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\Presets;
|
8 |
+
use DevOwl\RealCookieBanner\Utils;
|
9 |
+
use WP_Post;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* Middleware to enable `attributes.extends` in cookie and content blocker presets.
|
16 |
+
*/
|
17 |
+
class ExtendsMiddleware {
|
18 |
+
/**
|
19 |
+
* `attributes` can contain a magic key `extends` with a class name. Let's extend
|
20 |
+
* from that attributes.
|
21 |
+
*
|
22 |
+
* @param array $preset
|
23 |
+
* @param AbstractBlockerPreset|AbstractCookiePreset $unused0
|
24 |
+
* @param WP_Post[] $unused1
|
25 |
+
* @param WP_Post[] $unused2
|
26 |
+
* @param array $result
|
27 |
+
* @param Presets $presetsInstance
|
28 |
+
*/
|
29 |
+
public function middleware(&$preset, $unused0, $unused1, $unused2, &$result, $presetsInstance) {
|
30 |
+
if (isset($preset['attributes']) && isset($preset['attributes']['extends'])) {
|
31 |
+
$parentIdentifier = $preset['attributes']['extends'];
|
32 |
+
$parent = $result[$parentIdentifier] ?? null;
|
33 |
+
// Parent identifier does not exist
|
34 |
+
if (!isset($parent)) {
|
35 |
+
// Check if we can request it
|
36 |
+
$parent = $presetsInstance->getWithAttributes($parentIdentifier);
|
37 |
+
if ($parent === \false) {
|
38 |
+
return $preset;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
$preset['attributes'] = \array_merge($parent['attributes'], $preset['attributes']);
|
42 |
+
unset($preset['attributes']['extends']);
|
43 |
+
// Mark this preset as `extended` so we can use this e.g. in the scanner to prioritize this
|
44 |
+
// over the parent. Example: MonsterInsights > Google Analytics
|
45 |
+
$preset['extended'] = $parent['id'];
|
46 |
+
// Allow extending single properties (useful for arrays)
|
47 |
+
foreach ($preset['attributes'] as $extendsKey => $extendsValue) {
|
48 |
+
if (\DevOwl\RealCookieBanner\Utils::startsWith($extendsKey, 'extends')) {
|
49 |
+
foreach ($preset['attributes'] as $key => $value) {
|
50 |
+
if ($extendsKey === \sprintf('extends%sStart', \ucfirst($key))) {
|
51 |
+
$preset['attributes'][$key] = \array_merge($extendsValue, $value);
|
52 |
+
} elseif ($extendsKey === \sprintf('extends%sEnd', \ucfirst($key))) {
|
53 |
+
$preset['attributes'][$key] = \array_merge($value, $extendsValue);
|
54 |
+
} else {
|
55 |
+
continue;
|
56 |
+
}
|
57 |
+
unset($preset['attributes'][$extendsKey]);
|
58 |
+
}
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
return $preset;
|
63 |
+
}
|
64 |
+
}
|
inc/presets/middleware/index.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\Vendor;
|
4 |
+
|
5 |
+
// Silence is golden.
|
inc/presets/pro/ActiveCampaignSiteTrackingPreset.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Active Campaign Site Tracking preset.
|
14 |
+
*/
|
15 |
+
class ActiveCampaignSiteTrackingPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ACTIVE_CAMPAIGN_SITE_TRACKING;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'ActiveCampaign';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'description' => 'Site Tracking',
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/activecampaign.png')
|
27 |
+
];
|
28 |
+
}
|
29 |
+
// Documented in AbstractPreset
|
30 |
+
public function managerNone() {
|
31 |
+
return \false;
|
32 |
+
}
|
33 |
+
// Documented in AbstractPreset
|
34 |
+
public function managerGtm() {
|
35 |
+
return \false;
|
36 |
+
}
|
37 |
+
// Documented in AbstractPreset
|
38 |
+
public function managerMtm() {
|
39 |
+
return \false;
|
40 |
+
}
|
41 |
+
}
|
inc/presets/pro/AdInserterPreset.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware;
|
8 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
9 |
+
// @codeCoverageIgnoreStart
|
10 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
11 |
+
// Avoid direct file request
|
12 |
+
// @codeCoverageIgnoreEnd
|
13 |
+
/**
|
14 |
+
* Ad Inserter plugin cookie preset.
|
15 |
+
*/
|
16 |
+
class AdInserterPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
17 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AD_INSERTER;
|
18 |
+
const SLUG_FREE = 'ad-inserter';
|
19 |
+
const SLUG_PRO = 'ad-inserter-pro';
|
20 |
+
const VERSION = 1;
|
21 |
+
// Documented in AbstractPreset
|
22 |
+
public function common() {
|
23 |
+
$name = 'Ad Inserter';
|
24 |
+
return [
|
25 |
+
'id' => self::IDENTIFIER,
|
26 |
+
'version' => self::VERSION,
|
27 |
+
'name' => $name,
|
28 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/a-inserter.png'),
|
29 |
+
'recommended' => \true,
|
30 |
+
'needs' => self::needs()
|
31 |
+
];
|
32 |
+
}
|
33 |
+
// Documented in AbstractPreset
|
34 |
+
public function managerNone() {
|
35 |
+
return \false;
|
36 |
+
}
|
37 |
+
// Documented in AbstractPreset
|
38 |
+
public function managerGtm() {
|
39 |
+
return \false;
|
40 |
+
}
|
41 |
+
// Documented in AbstractPreset
|
42 |
+
public function managerMtm() {
|
43 |
+
return \false;
|
44 |
+
}
|
45 |
+
// Self-explanatory
|
46 |
+
public static function needs() {
|
47 |
+
return \DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware::generateNeedsForSlugs([
|
48 |
+
self::SLUG_FREE,
|
49 |
+
self::SLUG_PRO
|
50 |
+
]);
|
51 |
+
}
|
52 |
+
}
|
inc/presets/pro/AddThisPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* AddThis Share Buttons preset.
|
14 |
+
*/
|
15 |
+
class AddThisPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_THIS;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'AddThis (Share)';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/addthis.png')
|
26 |
+
];
|
27 |
+
}
|
28 |
+
// Documented in AbstractPreset
|
29 |
+
public function managerNone() {
|
30 |
+
return \false;
|
31 |
+
}
|
32 |
+
// Documented in AbstractPreset
|
33 |
+
public function managerGtm() {
|
34 |
+
return \false;
|
35 |
+
}
|
36 |
+
// Documented in AbstractPreset
|
37 |
+
public function managerMtm() {
|
38 |
+
return \false;
|
39 |
+
}
|
40 |
+
}
|
inc/presets/pro/AddToAnyPreset.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* AddToAny Share Buttons preset.
|
14 |
+
*/
|
15 |
+
class AddToAnyPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADD_TO_ANY;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'AddToAny';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'description' => 'Share Buttons',
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/add-to-any.png')
|
27 |
+
];
|
28 |
+
}
|
29 |
+
// Documented in AbstractPreset
|
30 |
+
public function managerNone() {
|
31 |
+
return \false;
|
32 |
+
}
|
33 |
+
// Documented in AbstractPreset
|
34 |
+
public function managerGtm() {
|
35 |
+
return \false;
|
36 |
+
}
|
37 |
+
// Documented in AbstractPreset
|
38 |
+
public function managerMtm() {
|
39 |
+
return \false;
|
40 |
+
}
|
41 |
+
}
|
inc/presets/pro/AdobeTypekitPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Adobe Typekit cookie preset.
|
14 |
+
*/
|
15 |
+
class AdobeTypekitPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ADOBE_TYPEKIT;
|
17 |
+
const VERSION = 2;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Adobe Fonts (Typekit)';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/adobe-fonts.png')
|
26 |
+
];
|
27 |
+
}
|
28 |
+
// Documented in AbstractPreset
|
29 |
+
public function managerNone() {
|
30 |
+
return \false;
|
31 |
+
}
|
32 |
+
// Documented in AbstractPreset
|
33 |
+
public function managerGtm() {
|
34 |
+
return \false;
|
35 |
+
}
|
36 |
+
// Documented in AbstractPreset
|
37 |
+
public function managerMtm() {
|
38 |
+
return \false;
|
39 |
+
}
|
40 |
+
}
|
inc/presets/pro/AmazonAssociatesWidgetPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Amazon Associates Widget cookie preset.
|
14 |
+
*/
|
15 |
+
class AmazonAssociatesWidgetPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AMAZON_ASSOCIATES_WIDGET;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Amazon Widget';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/amazon-associates.png')
|
26 |
+
];
|
27 |
+
}
|
28 |
+
// Documented in AbstractPreset
|
29 |
+
public function managerNone() {
|
30 |
+
return \false;
|
31 |
+
}
|
32 |
+
// Documented in AbstractPreset
|
33 |
+
public function managerGtm() {
|
34 |
+
return \false;
|
35 |
+
}
|
36 |
+
// Documented in AbstractPreset
|
37 |
+
public function managerMtm() {
|
38 |
+
return \false;
|
39 |
+
}
|
40 |
+
}
|
inc/presets/pro/AnalytifyPreset.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations;
|
6 |
+
use DevOwl\RealCookieBanner\Core;
|
7 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
8 |
+
use DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware;
|
9 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
10 |
+
// @codeCoverageIgnoreStart
|
11 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
12 |
+
// Avoid direct file request
|
13 |
+
// @codeCoverageIgnoreEnd
|
14 |
+
/**
|
15 |
+
* Analytify preset -> Google Analytics cookie preset.
|
16 |
+
*/
|
17 |
+
class AnalytifyPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
18 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANALYTIFY;
|
19 |
+
const SLUG_PRO = \DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations::SLUG_ANALYTIFY_PRO;
|
20 |
+
const SLUG_FREE = \DevOwl\RealCookieBanner\comp\PresetsPluginIntegrations::SLUG_ANALYTIFY_FREE;
|
21 |
+
const VERSION = \DevOwl\RealCookieBanner\presets\pro\GoogleAnalyticsPreset::VERSION;
|
22 |
+
// Documented in AbstractPreset
|
23 |
+
public function common() {
|
24 |
+
$name = 'Analytify';
|
25 |
+
$extendsAttributes = (new \DevOwl\RealCookieBanner\presets\pro\GoogleAnalyticsPreset())->common();
|
26 |
+
return [
|
27 |
+
'id' => self::IDENTIFIER,
|
28 |
+
'version' => self::VERSION,
|
29 |
+
'name' => $name,
|
30 |
+
'description' => $extendsAttributes['description'],
|
31 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/analytify.png'),
|
32 |
+
'needs' => self::needs()
|
33 |
+
];
|
34 |
+
}
|
35 |
+
// Documented in AbstractPreset
|
36 |
+
public function managerNone() {
|
37 |
+
return \false;
|
38 |
+
}
|
39 |
+
// Documented in AbstractPreset
|
40 |
+
public function managerGtm() {
|
41 |
+
return \false;
|
42 |
+
}
|
43 |
+
// Documented in AbstractPreset
|
44 |
+
public function managerMtm() {
|
45 |
+
return \false;
|
46 |
+
}
|
47 |
+
// Self-explanatory
|
48 |
+
public static function needs() {
|
49 |
+
return \DevOwl\RealCookieBanner\presets\middleware\DisablePresetByNeedsMiddleware::generateNeedsForSlugs([
|
50 |
+
self::SLUG_PRO,
|
51 |
+
self::SLUG_FREE
|
52 |
+
]);
|
53 |
+
}
|
54 |
+
}
|
inc/presets/pro/AnchorFmPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Anchor.fm preset.
|
14 |
+
*/
|
15 |
+
class AnchorFmPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::ANCHOR_FM;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Anchor.fm';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/anchor-fm.png')
|
26 |
+
];
|
27 |
+
}
|
28 |
+
// Documented in AbstractPreset
|
29 |
+
public function managerNone() {
|
30 |
+
return \false;
|
31 |
+
}
|
32 |
+
// Documented in AbstractPreset
|
33 |
+
public function managerGtm() {
|
34 |
+
return \false;
|
35 |
+
}
|
36 |
+
// Documented in AbstractPreset
|
37 |
+
public function managerMtm() {
|
38 |
+
return \false;
|
39 |
+
}
|
40 |
+
}
|
inc/presets/pro/AppleMusicPreset.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Apple Music preset.
|
14 |
+
*/
|
15 |
+
class AppleMusicPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::APPLE_MUSIC;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Apple Music';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'name' => $name,
|
25 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/apple-music.png')
|
26 |
+
];
|
27 |
+
}
|
28 |
+
// Documented in AbstractPreset
|
29 |
+
public function managerNone() {
|
30 |
+
return \false;
|
31 |
+
}
|
32 |
+
// Documented in AbstractPreset
|
33 |
+
public function managerGtm() {
|
34 |
+
return \false;
|
35 |
+
}
|
36 |
+
// Documented in AbstractPreset
|
37 |
+
public function managerMtm() {
|
38 |
+
return \false;
|
39 |
+
}
|
40 |
+
}
|
inc/presets/pro/AwinLinkImageAdsPreset.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Awin (Link and Image Ads) cookie preset.
|
14 |
+
*/
|
15 |
+
class AwinLinkImageAdsPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_LINK_AND_IMAGE_ADS;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Awin';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'description' => 'Link and Image Ads',
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/awin.png')
|
27 |
+
];
|
28 |
+
}
|
29 |
+
// Documented in AbstractPreset
|
30 |
+
public function managerNone() {
|
31 |
+
return \false;
|
32 |
+
}
|
33 |
+
// Documented in AbstractPreset
|
34 |
+
public function managerGtm() {
|
35 |
+
return \false;
|
36 |
+
}
|
37 |
+
// Documented in AbstractPreset
|
38 |
+
public function managerMtm() {
|
39 |
+
return \false;
|
40 |
+
}
|
41 |
+
}
|
inc/presets/pro/AwinPublisherMasterTagPreset.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace DevOwl\RealCookieBanner\presets\pro;
|
4 |
+
|
5 |
+
use DevOwl\RealCookieBanner\Core;
|
6 |
+
use DevOwl\RealCookieBanner\presets\AbstractCookiePreset;
|
7 |
+
use DevOwl\RealCookieBanner\presets\PresetIdentifierMap;
|
8 |
+
// @codeCoverageIgnoreStart
|
9 |
+
\defined('ABSPATH') or die('No script kiddies please!');
|
10 |
+
// Avoid direct file request
|
11 |
+
// @codeCoverageIgnoreEnd
|
12 |
+
/**
|
13 |
+
* Awin (Publisher MasterTag) cookie preset.
|
14 |
+
*/
|
15 |
+
class AwinPublisherMasterTagPreset extends \DevOwl\RealCookieBanner\presets\AbstractCookiePreset {
|
16 |
+
const IDENTIFIER = \DevOwl\RealCookieBanner\presets\PresetIdentifierMap::AWIN_PUBLISHER_MASTERTAG;
|
17 |
+
const VERSION = 1;
|
18 |
+
// Documented in AbstractPreset
|
19 |
+
public function common() {
|
20 |
+
$name = 'Awin';
|
21 |
+
return [
|
22 |
+
'id' => self::IDENTIFIER,
|
23 |
+
'version' => self::VERSION,
|
24 |
+
'description' => 'Publisher MasterTag',
|
25 |
+
'name' => $name,
|
26 |
+
'logoFile' => \DevOwl\RealCookieBanner\Core::getInstance()->getBaseAssetsUrl('logos/awin.png')
|
27 |
+
];
|
28 |
+
}
|
29 |
+
// Documented in AbstractPreset
|
30 |
+
public function managerNone() {
|
31 |
+
return \false;
|
32 |
+
}
|
33 |
+
// Documented in AbstractPreset
|
34 |
+
public function managerGtm() {
|
35 |
+
return \false;
|
36 |
+
}
|
37 |
+
// Documented in AbstractPreset
|
38 |
+
public function managerMtm() {
|
39 |
+
return \false;
|
40 |
+
}
|
41 |
+
}
|
inc/presets/pro/BingAdsPreset.php
ADDED
@
|