\DevOwl\RealCookieBanner\presets\middlewareDisablePresetByNeedsMiddleware

Middleware to enable `'needs': ['wp-plugin:elementor', 'wp-plugin:elementor-pro']` in cookie and content blocker presets.

Summary

Methods
Properties
Constants
middleware()
check()
generateNeedsForSlugs()
No public properties found
WP_PLUGIN_PREFIX
WP_THEME_PREFIX
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

WP_PLUGIN_PREFIX

WP_PLUGIN_PREFIX ='wp-plugin:'

WP_THEME_PREFIX

WP_THEME_PREFIX ='wp-theme:'

Methods

check()

check(array<mixed,string>  $needs,string  $presetIdentifier,string  $type,string  $slug = null)

Check by an array of dependencies if one is active.

Parameters

array<mixed,string> $needs
string $presetIdentifier
string $type

Can be cookie or blocker

string $slug

Automatically gets filled with the found slug

generateNeedsForSlugs()

generateNeedsForSlugs(array<mixed,string>  $slugs,string  $type = self::WP_PLUGIN_PREFIX)

Generate the `needs` keyword for a set of slugs.

Parameters

array<mixed,string> $slugs
string $type