assets
4 years ago
CookiebotAPI.md
3 years ago
admin-ui.md
4 years ago
how-to-add-new-addon.md
4 years ago
how-to-block-cookies.md
4 years ago
upgrade-guide.md
4 years ago
upgrade-guide.md
32 lines
| 1 | # Cookiebot upgrade guide |
| 2 | |
| 3 | ## version 3 to version 4 |
| 4 | |
| 5 | ### Breaking changes |
| 6 | - The `cookiebot_addons_list` filter hook was renamed to `cybot_cookiebot_addons_list` and the initial/expected value has been restructured. |
| 7 | - The `cookiebot_addons_language` filter hook was renamed to `cybot_cookiebot_addons_language`. |
| 8 | - The `cookiebot_addons_embed_source` filter hook was renamed to `cybot_cookiebot_addons_embed_source`. |
| 9 | - The `cookiebot_addons_embed_placeholder` filter hook was renamed to `cybot_cookiebot_addons_embed_placeholder`. |
| 10 | - The `cookiebot_embed_regex` filter hook was renamed to `cybot_cookiebot_embed_regex`. |
| 11 | - The `cookiebot_embed_default_regex` filter hook was renamed to `cybot_cookiebot_embed_default_regex`. |
| 12 | |
| 13 | ### Deprecations |
| 14 | |
| 15 | ### non-namespaced globals |
| 16 | PHP namespaces were not used in the Cookiebot plugin before version 4. |
| 17 | The following globals are now deprecated and will be removed in the next major version update. |
| 18 | Please use the namespaced version instead when supporting the Cookiebot plugin in your own plugin, or when implementing a new add-on. |
| 19 | |
| 20 | - class `\Cookiebot_WP` (The plugin's main class) |
| 21 | - moved to namespace: `cybot\cookiebot\lib\Cookiebot_WP` [](../src/lib/Cookiebot_WP.phpsrc/lib/Cookiebot_WP.php](../src/lib/Cookiebot_WP.php](../src/lib/Cookiebot_WP.php) |
| 22 | - deprecation: `\Cookiebot_WP` [](../src/lib/global-deprecations.phpsrc/lib/global-deprecations.php](../src/lib/global-deprecations.php](../src/lib/global-deprecations.php) |
| 23 | - function `\cookiebot_assist` (Helper function to update your scripts) |
| 24 | - moved to namespace: `cybot\cookiebot\lib\cookiebot_assist` [](../src/lib/helper.phpsrc/lib/helper.php](../src/lib/helper.php](../src/lib/helper.php) |
| 25 | - deprecation: `\cookiebot_assist` [](../src/lib/global-deprecations.phpsrc/lib/global-deprecations.php](../src/lib/global-deprecations.php](../src/lib/global-deprecations.php) |
| 26 | - function `\cookiebot_active` (Helper function to check if cookiebot is active. Useful for other plugins adding support for Cookiebot.) |
| 27 | - moved to namespace: `cybot\cookiebot\lib\cookiebot_active` [](../src/lib/helper.phpsrc/lib/helper.php](../src/lib/helper.php](../src/lib/helper.php) |
| 28 | - deprecation: `\cookiebot_active` [](../src/lib/global-deprecations.phpsrc/lib/global-deprecations.php](../src/lib/global-deprecations.php](../src/lib/global-deprecations.php) |
| 29 | - function `\cookiebot` (Returns the main instance of Cookiebot_WP to prevent the need to use globals.) |
| 30 | - moved to namespace: `cybot\cookiebot\lib\cookiebot` [](../src/lib/helper.phpsrc/lib/helper.php](../src/lib/helper.php](../src/lib/helper.php) |
| 31 | - deprecation: `\cookiebot` [](../src/lib/global-deprecations.phpsrc/lib/global-deprecations.php](../src/lib/global-deprecations.php](../src/lib/global-deprecations.php) |
| 32 |