Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*********************
- *
- *
- * INSTALLATION/UNINSTALLATION
- *
- *
- *********************/
- register_activation_hook(__FILE__, 'wpsl_InstallBorlabsCookie');
- register_deactivation_hook(__FILE__, 'wpsl_UninstallBorlabsCookie');
- /* Adds new Blocked Content Type when the plugin is about to be activated */
- function wpsl_InstallBorlabsCookie()
- {
- if (function_exists('BorlabsCookieHelper')) {
- // We use the previewHTML code of the blocked content type "Google Maps"
- $bctGoogleMaps = BorlabsCookieHelper()->getBlockedContentTypeDataById('googlemaps');
- // Add new Blocked Content Type wpstorelocator - if the BCT exists nothing happens
- BorlabsCookieHelper()->addBlockedContentType(
- 'wpstorelocator',
- 'WP Store Locator',
- 'Lorem ipsum dolor - You text here, use it as advertisement if you like.',
- [],
- $bctGoogleMaps['previewHTML'],
- '',
- '',
- [
- 'responsiveIframe'=>true,
- ],
- true,
- true
- );
- }
- }
- /* Deletes Blocked Content Type when the plugin is about to be disabled */
- function wpsl_UninstallBorlabsCookie()
- {
- if (function_exists('BorlabsCookieHelper')) {
- // Delete Blocked Content Type wpstorelocator
- BorlabsCookieHelper()->deleteBlockedContentType('wpstorelocator');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement