WP DSGVO Tools (GDPR) Shortcodes

Below, you’ll find a detailed guide on how to add the WP DSGVO Tools (GDPR) Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the WP DSGVO Tools (GDPR) Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the WP DSGVO Tools (GDPR) Plugin and the shortcodes it provides:

Plugin Icon
WP DSGVO Tools (GDPR)

"WP DSGVO Tools (GDPR) is a powerful WordPress plugin that aids compliance with EU GDPR regulations. It provides comprehensive tools for data privacy and consent management, ensuring a safer user experience."

★★★★✩ (115) Active Installs: 20000+ Tested with: 6.3.2 PHP Version: 5.6.0
Included Shortcodes:
  • [lw_content_block]
  • [cookie_popup_link]
  • [imprint]
  • [pp_link]
  • [privacy_policy]
  • [subject_access_request]
  • [unsubscribe_form]

WP DSGVO Tools (GDPR) [lw_content_block] Shortcode

The ShapePress-DSGVO plugin shortcode, ‘lw_content_block’, is designed to manage content blocks in your WordPress site. It allows customization of content types and integrates with other shortcodes. It also checks if the embedding of content is allowed by cookies. If not, it replaces iframes, displays images, and adds an opt-in handler. This shortcode ensures your site is GDPR compliant.

Shortcode: [lw_content_block]

Parameters

Here is a list of all possible lw_content_block shortcode parameters and attributes:

  • type – Specifies the type of content block to be displayed
  • shortcode – Executes a specific shortcode if provided

Examples and Usage

Basic Example – A simple usage of the shortcode to specify the type of content block.

[lw_content_block type="video"]

Advanced Examples

Using the shortcode to specify the type of content block and to execute another shortcode within the content block.

[lw_content_block type="video" shortcode="another_shortcode"]

Another advanced usage of the shortcode can be to specify the type of content block and to execute a shortcode with attributes within the content block.

[lw_content_block type="video" shortcode="another_shortcode attr1='value1' attr2='value2'"]

These examples demonstrate the flexibility of the ‘lw_content_block’ shortcode in the Shapepress-DSGVO plugin. It allows for the dynamic creation and customization of content blocks based on the specified type and shortcode parameters.

PHP Function Code

In case you have difficulties debugging what causing issues with [lw_content_block] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('lw_content_block', 'SPDSGVOContentBlockShortcode');

Shortcode PHP function:

function SPDSGVOContentBlockShortcode($atts, $content){

    $params = shortcode_atts( array (
        'type' => '',
        'shortcode' => ''
    ), $atts );

    if (empty($params['type'])) return $content;
    $slug = $params['type'];

	global $OL3_LIBS_LOADED;
	//$OL3_LIBS_LOADED = 0;

    $shortcode = $params['shortcode'];
    if (empty($shortcode) == false) $content = do_shortcode("[" . $shortcode ."]");

    $embeddingApi = SPDSGVOEmbeddingsManager::getInstance()->getEmbeddingApiBySlug($slug);
    if ($embeddingApi == null) return $content;
    // if its allowed by cookie nothing is to do here. otherwise replace iframes, show image, add optin handler
    if ($embeddingApi->checkIfIntegrationIsAllowed($embeddingApi->slug) == true) return $content;

    $originalContentBase64Encoded = base64_encode(htmlentities($content));
    $processedContent =  $embeddingApi->processContent($content);

    $customCssClasses = SPDSGVOSettings::get('embed_placeholder_custom_css_classes');

    $content = '<div class="sp-dsgvo sp-dsgvo-embedding-container sp-dsgvo-embedding-' . $embeddingApi->slug . ' '. $customCssClasses .'">' . $processedContent . '<div class="sp-dsgvo-hidden-embedding-content sp-dsgvo-hidden-embedding-content-' . $embeddingApi->slug . '" data-sp-dsgvo-embedding-slug="' . $embeddingApi->slug . '">' . $originalContentBase64Encoded . '</div></div>';


    return $content;
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/content-block-shortcode.php

WP DSGVO Tools (GDPR) [cookie_popup_link] Shortcode

The ShapePress-DSGVO shortcode is a function that generates a clickable link to a cookie popup. It allows customization of the link’s CSS class and display text. This shortcode uses the ‘SPDSGVOCookiePopupLinkShortcode’ function to create a hyperlink. The ‘class’ and ‘text’ parameters can be adjusted to fit your site’s design and language needs.

Shortcode: [cookie_popup_link]

Parameters

Here is a list of all possible cookie_popup_link shortcode parameters and attributes:

  • class – specifies custom CSS classes for the link
  • text – sets the displayed text for the cookie popup link

Examples and Usage

Basic example – A simple usage of the shortcode to generate a link that triggers the privacy popup with default text.

[cookie_popup_link /]

Advanced example – Using the shortcode with custom class and text. In this example, we are adding a custom class ‘my-custom-class’ and changing the default text to ‘Click Here’.

[cookie_popup_link class="my-custom-class" text="Click Here" /]

This shortcode can be used to customize the link that triggers the privacy popup, allowing you to match the style and language of your website. You can specify a custom CSS class to style the link, and change the default text to better suit your needs.

PHP Function Code

In case you have difficulties debugging what causing issues with [cookie_popup_link] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('cookie_popup_link', 'SPDSGVOCookiePopupLinkShortcode');

Shortcode PHP function:

function SPDSGVOCookiePopupLinkShortcode($atts){

    $params = shortcode_atts( array (
        'class' => '',
        'text' => __('Cookie Popup','shapepress-dsgvo'),
    ), $atts );


    return '<a href="#" class="sp-dsgvo-show-privacy-popup '.$params['class'].'">' . $params['text'] . "</a>";
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/cookie-popup-shortcode.php

WP DSGVO Tools (GDPR) [imprint] Shortcode

The ShapePress-DSGVO plugin shortcode ‘[imprint]’ dynamically generates an imprint for your WordPress site. It retrieves the site operator’s information based on the type (private, one-man, corporation, society, etc.) and formats it into a readable imprint.

Shortcode: [imprint]

Examples and Usage

Basic example – Display the imprint information of the site using the shortcode with no parameters.

[imprint /]

Advanced examples

Display the imprint information of the site using the shortcode with a language parameter. This will display the imprint in the specified language if the translation is available.

[imprint lang="de" /]

Display the imprint information of the site using the shortcode with a language and a country parameter. This will display the imprint in the specified language and for the specified country if the translation and country specific data is available.

[imprint lang="de" country="DE" /]

Please note that the actual functionality of these examples depends on the implementation of the SPDSGVOImprintShortcode function. The function in the provided code does not seem to support these parameters at the moment.

PHP Function Code

In case you have difficulties debugging what causing issues with [imprint] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('imprint', 'SPDSGVOImprintShortcode');

Shortcode PHP function:

function SPDSGVOImprintShortcode($atts){

    $locale = SPDSGVOLanguageTools::getInstance()->getCurrentLanguageCode();
/*
    $params = shortcode_atts(array(
        'lang' => $locale
    ), $atts);

    $locale = $params['lang'];
*/
    $settings = SPDSGVOSettings::getAll();


    $operatorType = $settings['page_operator_type'];
    $selectedCountry = $settings['spdsgvo_company_info_countrycode'];
    $selectedCountry = SPDSGVOConstants::getCountries()[$selectedCountry];
    $selectedCountry = __($selectedCountry, 'shapepress-dsgvo');

    $owner = "";
    $companyName = "";
    switch ($operatorType) {
        case 'private':
            $companyName = '';
            $owner = $settings['page_operator_operator_name'];

            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $owner);
            break;
        case 'one-man':
            $companyName = $settings['page_operator_company_name'];
            $owner = __('Company owner','shapepress-dsgvo'). ": " . $settings['page_operator_company_law_person'];

            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $companyName);
            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $owner);
            break;
        case 'corporation':
            $companyName = $settings['page_operator_corporate_name'];
            $owner = __('Executive director','shapepress-dsgvo'). ": " .$settings['page_operator_corporate_ceo'] ;

            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $companyName);
            if (empty($settings['page_operator_corporate_ceo']) == false) $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $owner);
            break;
        case 'society':
            $societyName = $settings['page_operator_society_name'];
            $board = __('Simplifying board','shapepress-dsgvo'). ": " .$settings['page_operator_society_board'] ;

            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $societyName);
            if (empty($settings['page_operator_society_board']) == false) $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $board);
            break;
        case 'corp-public-law' :
        case 'corp-private-law' :

            $companyName =  $settings['page_operator_corp_public_law_name'];
            $representative =  $settings['page_operator_corp_public_law_representative'];
            $supervisor =  $settings['page_operator_corp_public_law_supervisor'];

            if (empty($companyName) == false) $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $companyName);
            if (empty($representative) == false)  {
                $imprint[] =  SPDSGVOGetFormatedHtmlTextArray('br', __('Representative person','shapepress-dsgvo'). ': '. $representative);
            }
            if (empty($supervisor) == false) {
                $imprint[] =  SPDSGVOGetFormatedHtmlTextArray('br', __('Supervisory authority','shapepress-dsgvo'). ': '. $supervisor);
            }
            break;
    }

    $selectedCountry = $settings['spdsgvo_company_info_countrycode'];
    $selectedCountry = SPDSGVOConstants::getCountries()[$selectedCountry];
    $selectedCountry = __($selectedCountry, 'shapepress-dsgvo');

    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $settings['spdsgvo_company_info_street']);
    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $settings['spdsgvo_company_info_zip'] . " " . $settings['spdsgvo_company_info_loc']);
    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', $selectedCountry);
    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Email', 'shapepress-dsgvo'). ': <a href="mailto:' . $settings['spdsgvo_company_info_email'] .'">'.$settings['spdsgvo_company_info_email'].'</a>');
    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Phone', 'shapepress-dsgvo'). ": " .$settings['spdsgvo_company_info_phone']);

    switch ($operatorType) {
        case 'private':

            break;
        case 'one-man':
            if (empty($settings['spdsgvo_company_uid_nr']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Sales tax identification number','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_uid_nr']);
            }
            if (empty($settings['spdsgvo_company_fn_nr']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Commercial book no.','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_fn_nr']);
            }
            if (empty($settings['spdsgvo_company_law_loc']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('§11 Place of Jurisdiction','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_law_loc']);
            }
            break;
        case 'corporation':

            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Shareholder','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_chairmen']);
            $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Register Court & Register Number','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_law_loc'] . " ". $settings['spdsgvo_company_fn_nr']);
            if (empty($settings['spdsgvo_company_uid_nr']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Sales tax identification number','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_uid_nr']);
            }
            break;
        case 'society':
            if (empty($settings['page_operator_society_number']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Society number','shapepress-dsgvo'). ": ".$settings['page_operator_society_number']);
            }
            if (empty($settings['spdsgvo_company_uid_nr']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Sales tax identification number','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_uid_nr']);
            }
            if (empty($settings['spdsgvo_company_fn_nr']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('Commercial book no.','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_fn_nr']);
            }
            if (empty($settings['spdsgvo_company_law_loc']) == false)
            {
                $imprint[] = SPDSGVOGetFormatedHtmlTextArray('br', __('§11 Place of Jurisdiction','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_law_loc']);
            }
            break;
    }

    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('p', __('Responsible for content','shapepress-dsgvo'). ": ".$settings['spdsgvo_company_resp_content']);

    $imprint[] = SPDSGVOGetFormatedHtmlTextArray('p', __('European Commission Online Dispute Resolution (OS) platform for consumers: <a href="https://ec.europa.eu/consumers/odr/" target="_blank">https://ec.europa.eu/consumers/odr/</a>. We are not willing or obliged to participate in a dispute settlement procedure before a consumer arbitration board.','shapepress-dsgvo'));

   // $imprint[] = SPDSGVOGetFormatedHtmlTextArray('p', __('','shapepress-dsgvo'). ": ".$settings['']);

    //$imprintPage = SPDSGVOSettings::get('imprint_page');
    
    //$imprint = str_replace('[save_date]', date('d.m.Y H:i',strtotime(get_post($imprintPage)->post_modified)), $imprint);


    $htmlContent = '';
    foreach ($imprint as $lineItem)
    {
        if (!empty($lineItem['text'])) {
            $htmlContent .= SPDSGVOGetHtmlFromPrivacyPolicyLineItem($lineItem);
        }
    }


    return apply_filters('the_content', wp_kses_post($htmlContent));
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/imprint.php

WP DSGVO Tools (GDPR) [pp_link] Shortcode

The Shapepress-dsgvo plugin shortcode, ‘pp_link’, creates a customizable link to your site’s privacy policy. This shortcode uses the ‘SPDSGVOPrivacyPolicyLinkShortcode’ function to generate a link. It allows for customization of the link’s CSS class and display text. The default text is the site’s custom privacy policy header.

Shortcode: [pp_link]

Parameters

Here is a list of all possible pp_link shortcode parameters and attributes:

  • class – Adds a custom CSS class to the privacy policy link.
  • text – Sets custom text for the privacy policy link.

Examples and Usage

Basic example – A simple usage of the shortcode to add a link to the privacy policy with default text and no additional CSS class.

[pp_link /]

Advanced examples

1. In this example, we are using the shortcode to add a link to the privacy policy with custom text. The text of the link will be “Read our Privacy Policy”.

[pp_link text="Read our Privacy Policy" /]

2. This example demonstrates the use of the shortcode to add a link to the privacy policy with a custom CSS class. The CSS class “custom-class” will be added to the link, allowing for custom styling via CSS.

[pp_link class="custom-class" /]

3. In the final example, we are using the shortcode to add a link to the privacy policy with both custom text and a custom CSS class. The text of the link will be “Read our Privacy Policy” and the CSS class “custom-class” will be added to the link.

[pp_link class="custom-class" text="Read our Privacy Policy" /]

PHP Function Code

In case you have difficulties debugging what causing issues with [pp_link] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('pp_link', 'SPDSGVOPrivacyPolicyLinkShortcode');

Shortcode PHP function:

function SPDSGVOPrivacyPolicyLinkShortcode($atts)
{

    $params = shortcode_atts(array(
        'class' => '',
        'text' => SPDSGVOSettings::get('privacy_policy_custom_header'),
    ), $atts);


    return '<a href="#" class="sp-dsgvo-navigate-privacy-policy ' . $params['class'] . '">' . $params['text'] . "</a>";
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/privacy-policy-link-shortcode.php

WP DSGVO Tools (GDPR) [privacy_policy] Shortcode

The Shapepress-dsgvo shortcode is designed to generate a comprehensive privacy policy for a website. It includes sections for data protection, data processing responsibility, data security officer, contact forms, and more. This shortcode uses various settings such as ‘privacy_policy_title_html_htag’, ‘privacy_policy_subtitle_html_htag’, and ‘privacy_policy_subsubtitle_html_htag’ to customize the privacy policy. It also supports multiple languages and is compatible with various plugins like WooCommerce.

Shortcode: [privacy_policy]

PHP Function Code

In case you have difficulties debugging what causing issues with [privacy_policy] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('privacy_policy', 'SPDSGVOPrivacyPolicyShortcode');

Shortcode PHP function:

function SPDSGVOPrivacyPolicyShortcode($atts){

    $locale = SPDSGVOLanguageTools::getInstance()->getCurrentLanguageCode();
/*
    $params = shortcode_atts(array(
        'lang' => $locale
    ), $atts);

    $locale = $params['lang'];
*/
    $hTagTitle = "h1";
    $hTagSubtitle = "h2";
    $hTagSubSubtitle = "h3";


    $hTagTitle = SPDSGVOSettings::get('privacy_policy_title_html_htag');
    $hTagSubtitle = SPDSGVOSettings::get('privacy_policy_subtitle_html_htag');
    $hTagSubSubtitle = SPDSGVOSettings::get('privacy_policy_subsubtitle_html_htag');


    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagTitle, SPDSGVOSettings::get('privacy_policy_custom_header'));
    //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Data protection','shapepress-dsgvo'));
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('privacy-policy-introduction', $locale));

    // <editor-fold desc="Responsible for data processing">
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Responsible','shapepress-dsgvo'));
    $responsibleText = SPDSGVOLanguageTools::getPrivacyPolicyText('content-person', $locale);
    // <p>The controller of your personal data on our website is:</p> {:50}, {:51}, {:52} {:53}, {:55}, {:54}.
    $operatorType = SPDSGVOSettings::get('page_operator_type');

    switch ($operatorType)
    {
        case 'private':
            $responsibleText .= SPDSGVOSettings::get('page_operator_operator_name') .", ";
            break;
        case 'one-man':
            $responsibleText .= SPDSGVOSettings::get('page_operator_company_law_person') .", ";
            $responsibleText .= SPDSGVOSettings::get('page_operator_company_name') .", ";
            break;
        case 'corporation':
            $responsibleText .= SPDSGVOSettings::get('page_operator_corporate_name') .", ";
            break;
        case 'society':
            $responsibleText .= SPDSGVOSettings::get('page_operator_society_name') .", ";
            break;
        case 'corp-public-law':
        case 'corp-private-law':
            $responsibleText .= SPDSGVOSettings::get('page_operator_corp_public_law_name') .", ";
            break;
    }

    $responsibleText .= SPDSGVOSettings::get('spdsgvo_company_info_street').", ";
    $responsibleText .= SPDSGVOSettings::get('spdsgvo_company_info_zip') . " ";
    $responsibleText .= SPDSGVOSettings::get('spdsgvo_company_info_loc') .", ";

	$countryCodeTemp = SPDSGVOSettings::get('spdsgvo_company_info_countrycode');
	if ($countryCodeTemp == "AT") $countryCodeTemp = "Österreich";
	if ($countryCodeTemp == "DE") $countryCodeTemp = "Deutschland";
	if ($countryCodeTemp == "CH") $countryCodeTemp = "Schweiz";
	if ($countryCodeTemp == "IT") $countryCodeTemp = "Italien";
    $responsibleText .= $countryCodeTemp .", ";
    if (empty(SPDSGVOSettings::get('spdsgvo_company_info_email')) == false)
        $responsibleText .= '<a href="mailto:' . SPDSGVOSettings::get('spdsgvo_company_info_email').'">'.SPDSGVOSettings::get("spdsgvo_company_info_email").'</a>' .", ";
    if (empty(SPDSGVOSettings::get('spdsgvo_company_info_phone')) == false) $responsibleText .= SPDSGVOSettings::get('spdsgvo_company_info_phone');

	$responsibleTextSeparator = apply_filters('spdsgvo_change_responsibleText_separator', ', ');
    if (empty($responsibleTextSepartor) !== false) $responsibleText = str_replace( ", ", $responsibleTextSeparator,$responsibleText);

    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', $responsibleText);
    // </editor-fold>

    // 3rd party countries modification
    $countryCode =  strtolower(SPDSGVOSettings::get('spdsgvo_company_info_countrycode'));
    $supportedCountries = array('de','at');
    if (in_array($countryCode, $supportedCountries) == false) {
        // add special paragraph
        if ($countryCode == 'US') {
            // only show in us if privacy shield certed
            if (SPDSGVOSettings::get('page_operator_privacy_shield') == '1') {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('privacy-policy-introduction-' . $countryCode, $locale));
            }
        } else {
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('privacy-policy-introduction-' . $countryCode, $locale));
        }
    }

    // <editor-fold desc="Data security officer">
    $operator_pp_responsibility_type = SPDSGVOSettings::get('operator_pp_responsibility_type');
    $dsoText = SPDSGVOLanguageTools::getPrivacyPolicyText('dso-responsible', $locale);
    // Unseren Datenschutzbeauftragten erreichen Sie unter:

    if ( $operator_pp_responsibility_type == 'external')
    {
        $dsoText .= SPDSGVOSettings::get('operator_pp_dso_external_company') .", ";
        $dsoText .= __('attn.','shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_external_name') .", <br />";
        $dsoText .=  SPDSGVOSettings::get('operator_pp_dso_external_street') ." <br />";
        $dsoText .=  SPDSGVOSettings::get('operator_pp_dso_external_zip') ." ";
        $dsoText .=  SPDSGVOSettings::get('operator_pp_dso_external_loc') ." <br />";
        $dsoText .= __('Phone:','shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_external_phone') ." <br />";
        $dsoText .= __('Email:','shapepress-dsgvo') . ' <a href= "mailto:' . SPDSGVOSettings::get('operator_pp_dso_external_email').'">'.SPDSGVOSettings::get("operator_pp_dso_external_email").'</a>' ." <br />";

    } elseif ($operator_pp_responsibility_type == 'internal')
    {
        $dsoText .= __('attn.','shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_intern_name') .", <br />";
        $dsoText .=  SPDSGVOSettings::get('spdsgvo_company_info_street') ." <br />";
        $dsoText .=  SPDSGVOSettings::get('spdsgvo_company_info_zip') ." ";
        $dsoText .=  SPDSGVOSettings::get('spdsgvo_company_info_loc') ." <br />";
        $dsoText .= __('Phone:','shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_intern_phone') ." <br />";
        $dsoText .= __('Email:','shapepress-dsgvo') . ' <a href= "mailto:' . SPDSGVOSettings::get('operator_pp_dso_intern_email').'">'.SPDSGVOSettings::get("operator_pp_dso_intern_email").'</a>' ." <br />";
    }

    // only add if not none
    if ($operator_pp_responsibility_type == 'external' || $operator_pp_responsibility_type == 'internal')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Data security officer','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', $dsoText);
    }
    // </editor-fold>

    // <editor-fold desc="Responsible person for data security questions">
    if ($operator_pp_responsibility_type == 'no') {
        $operator_pp_responsibility_contact = SPDSGVOSettings::get('operator_pp_responsibility_contact');
        $dpqText = SPDSGVOLanguageTools::getPrivacyPolicyText('data-protection-responsible', $locale);
        // Unseren Ansprechpartner für Datenschutzangelegenheiten erreichen Sie unter:
        if ($operator_pp_responsibility_contact == 'external') {
            $dpqText .= SPDSGVOSettings::get('operator_pp_dso_contact_external_company') . ", ";
            $dpqText .= __('attn.', 'shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_contact_external_name') . ", <br />";
            $dpqText .= SPDSGVOSettings::get('operator_pp_dso_contact_external_street') . " <br />";
            $dpqText .= SPDSGVOSettings::get('operator_pp_dso_contact_external_loc') . " ";
            $dpqText .= SPDSGVOSettings::get('operator_pp_dso_contact_external_zip') . " <br />";
            $dpqText .= __('Phone:', 'shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_contact_external_phone') . " <br />";
            $dpqText .= __('Email:', 'shapepress-dsgvo') . ' <a href= "mailto:' . SPDSGVOSettings::get('operator_pp_dso_contact_external_email') . '">' . SPDSGVOSettings::get("operator_pp_dso_contact_external_email") . '</a>' . " <br />";
        } elseif ($operator_pp_responsibility_contact == 'internal') {
            $dpqText .= SPDSGVOSettings::get('spdsgvo_company_info_name') . " <br />";
            $dpqText .= __('attn.', 'shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_contact_intern_name') . ", <br />";
            $dpqText .= SPDSGVOSettings::get('spdsgvo_company_info_street') . " <br />";
            $dpqText .= SPDSGVOSettings::get('spdsgvo_company_info_zip') . " ";
            $dpqText .= SPDSGVOSettings::get('spdsgvo_company_info_loc') . " <br />";
            $dpqText .= __('Phone:', 'shapepress-dsgvo') . ' ' . SPDSGVOSettings::get('operator_pp_dso_contact_intern_phone') . " <br />";
            $dpqText .= __('Email:', 'shapepress-dsgvo') . ' <a href= "mailto:' . SPDSGVOSettings::get('operator_pp_dso_contact_intern_email') . '">' . SPDSGVOSettings::get("operator_pp_dso_contact_intern_email") . '</a>' . " <br />";
        }

        if ($operator_pp_responsibility_contact == 'external' || $operator_pp_responsibility_contact == 'internal') {
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Responsible for privacy issues', 'shapepress-dsgvo'));
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', $dpqText);
        }
    }
    // </editor-fold>

    // <editor-fold desc="Hosting">
    $selectedHostingProvider = SPDSGVOSettings::get('page_basics_hosting_provider');
    if (empty($selectedHostingProvider) == false) {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Hosting', 'shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('hosting-introduction', $locale));


        foreach (SPDSGVOConstants::getHostingProvider() as $key => $value) {

            if ($key == 'other') continue;

            if (in_array($key, $selectedHostingProvider)) {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $value);
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($key, $locale));
            }
        }

        if (in_array('other', $selectedHostingProvider)) {
            //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, __('Hosting Provider', 'shapepress-dsgvo'));
            //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('other-hosting', $locale));
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOSettings::get('page_basics_other_provider_text'));
        }
    }
    // </editor-fold>

    // <editor-fold desc="Server Logfiles">
    $useLogFiles = SPDSGVOSettings::get('page_basics_use_logfiles');
    if ($useLogFiles == '1')
    {
        $logFileText = SPDSGVOLanguageTools::getPrivacyPolicyText('server-log-files', $locale);
        $logFileDays = SPDSGVOSettings::get('page_basics_logfiles_life');
        $logFileText = str_replace('{COUNT_DAYS}', $logFileDays, $logFileText);

        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Server Log Files','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('span', $logFileText);
    }

    // </editor-fold>

    // <editor-fold desc="CDN">
    $useCdnProvider = SPDSGVOSettings::get('page_basics_use_cdn');
    if ($useCdnProvider == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('CDN Provider','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('cdn-introduction', $locale));

        $selectedCdnProvider = SPDSGVOSettings::get('page_basics_cdn_provider');
        $selectedCdnProvider = is_array($selectedCdnProvider) ? $selectedCdnProvider : [] ;
        foreach (SPDSGVOConstants::getCDNServers() as $key => $value)
        {
            if ($key == 'other') continue;

            if (in_array($key, $selectedCdnProvider))
            {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $value);
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($key, $locale));
            }
        }

        if (in_array('other', $selectedCdnProvider))
        {
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, __('CDN Provider','shapepress-dsgvo'));
            //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('other-cdn', $locale));
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOSettings::get('page_basics_other_cdn_provider_text'));
        }
    }

    // </editor-fold>

    // <editor-fold desc="Formulare">
    if (SPDSGVOSettings::get('page_basics_forms_contact') == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle,  __('Contact Form','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('contact-form', $locale));
    }
    if (SPDSGVOSettings::get('page_basics_forms_application') == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle,  __('Application Form','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('application-form', $locale));
    }
    if (SPDSGVOSettings::get('page_basics_forms_contest') == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Promotional contest or game form','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('contest-form', $locale));
    }
    if (SPDSGVOSettings::get('page_basics_forms_registration') == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Registration Form','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('registration-form', $locale));
    }
    if (SPDSGVOSettings::get('page_basics_forms_comments') == '1')
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Comments Form','shapepress-dsgvo'));
        //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('comments-form', $locale));

        $publishType = SPDSGVOSettings::get('page_basics_forms_comments_publish_type');
        if ($publishType = 'name_comment')
        {
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('comments-form-name', $locale));
        } elseif ($publishType = 'nick_comment')
        {
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('comments-form-nick', $locale));
        }
    }
    // </editor-fold>

    // <editor-fold desc="Security Services / Captcha">
    $selectedSecurityServices = SPDSGVOSettings::get('page_basics_security_provider');
    if (empty($selectedSecurityServices) == false)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Security Services','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('security-services-introduction', $locale));

        foreach (SPDSGVOConstants::getSecurityServices() as $key => $value)
        {
            if ($key == 'local-security-question') continue;
            if ($key == 'other') continue;

            if (in_array($key, $selectedSecurityServices))
            {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $value);
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($key, $locale));
            }
        }

        if (in_array('other', $selectedSecurityServices))
        {
            //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('other-security-service', $locale));
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOSettings::get('page_basics_other_security_provider_text'));
        }
    }
    // </editor-fold>

    // todo: Kartendienste

    // todo: Chat

    // <editor-fold desc="Fonts">
    $selectedFontProvider = SPDSGVOSettings::get('page_basics_font_provider');
    if (empty($selectedFontProvider) == false)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Web Fonts','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('webfonts-introduction', $locale));

        foreach (SPDSGVOConstants::getFontServices() as $key => $value)
        {
            if (in_array($key, $selectedFontProvider))
            {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $value);
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($key, $locale));
            }
        }
    }
    // </editor-fold>


    // <editor-fold desc="Embeddings">
    $integrations = SPDSGVOIntegrationApiBase::getAllIntegrationApis(SPDSGVOConstants::CATEGORY_SLUG_EMBEDDINGS, FALSE);
    $enabledIntegrationCount = 0;
    $integrationTexts = null;
    foreach ($integrations as $integrationSlug => $integration)
    {
        if ($integration->getIsEnabled())
        {
            $enabledIntegrationCount += 1;
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $integration->getName());
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($integrationSlug, $locale));
        }
    }
    if ($enabledIntegrationCount > 0)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Embeddings','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText(SPDSGVOConstants::CATEGORY_SLUG_EMBEDDINGS.'-introduction', $locale));

        $privacyPolicy = array_merge($privacyPolicy, $integrationTexts);
    }
    // </editor-fold>

    // <editor-fold desc="Shop">
    // todo: check wegen bestellung als gast
    if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {

        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Web Shop','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('webshop-introduction', $locale));

    }
    // </editor-fold>
    // <editor-fold desc="Payment Provider">
    if (SPDSGVOSettings::get('page_basics_use_payment_provider') == '1')
    {
        $enabled_gateways = SPDSGVOSettings::get('page_basics_payment_provider');
        $enabled_gateways = is_array($enabled_gateways) ? $enabled_gateways : [] ;
        $dummyProvider = array('cash', 'cod','bank-transfer');

        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, __('Payments are processed via:','shapepress-dsgvo'));
        foreach ($enabled_gateways as $gateway)
        {
            if (in_array($gateway, $dummyProvider)) continue;
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($gateway, $locale));

        }
    }

    // </editor-fold>

    // <editor-fold desc="Tagmanager">
    $integrations = SPDSGVOIntegrationApiBase::getAllIntegrationApis(SPDSGVOConstants::CATEGORY_SLUG_TAGMANAGER, FALSE);
    $enabledIntegrationCount = 0;
    $integrationTexts = null;
    foreach ($integrations as $integrationSlug => $integration)
    {
        if ($integration->getIsEnabled())
        {
            $enabledIntegrationCount += 1;
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $integration->getName());
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($integrationSlug, $locale));
        }
    }
    if ($enabledIntegrationCount > 0)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Tag Manager','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText(SPDSGVOConstants::CATEGORY_SLUG_TAGMANAGER.'-introduction', $locale));

        $privacyPolicy = array_merge($privacyPolicy, $integrationTexts);
    }
    // </editor-fold>

    // <editor-fold desc="Analyse">
    $integrations = SPDSGVOIntegrationApiBase::getAllIntegrationApis(SPDSGVOConstants::CATEGORY_SLUG_STATISTICS, FALSE);

    // add techn. required too (wp stats, matomo, piwik, mautic) because the have another catin the filter
    if (SPDSGVOMatomoApi::getInstance()->getIsEnabled()) $integrations[SPDSGVOMatomoApi::getInstance()->getSlug()] =SPDSGVOMatomoApi::getInstance();
    if (SPDSGVOWpStatisticsApi::getInstance()->getIsEnabled()) $integrations[SPDSGVOWpStatisticsApi::getInstance()->getSlug()] = SPDSGVOWpStatisticsApi::getInstance();
    if (SPDSGVOPiwikApi::getInstance()->getIsEnabled()) $integrations[SPDSGVOPiwikApi::getInstance()->getSlug()] = SPDSGVOPiwikApi::getInstance();
    if (SPDSGVOMauticApi::getInstance()->getIsEnabled()) $integrations[SPDSGVOMauticApi::getInstance()->getSlug()] = SPDSGVOMauticApi::getInstance();

    $enabledIntegrationCount = 0;
    $integrationTexts = null;
    foreach ($integrations as $integrationSlug => $integration)
    {

        if ($integration->getIsEnabled())
        {
            $integrationSettings = $integration->getSettings();
            $ppSlugName = $integrationSlug;
            if (array_key_exists('implementationMode',$integrationSettings) && empty($integrationSettings['implementationMode']) == false)
            {
                $ppSlugName .= '-'.$integrationSettings['implementationMode'];
            }

            $enabledIntegrationCount += 1;
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $integration->getName());

            // do replacings for matomo and piwik
            $webAgencyText = "";
            if (array_key_exists('agency', $integrationSettings['meta']) == true)
            {
                $webAgencyText = $integrationSettings['meta']['agency'];
            }
            $ppText = SPDSGVOLanguageTools::getPrivacyPolicyText($ppSlugName, $locale);
            if (strpos($ppSlugName, "by-agency") >= 0)
            {
                $ppText = str_replace("{web_agency}", $webAgencyText, $ppText);
            }

            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray('p', $ppText);
        }
    }
    if ($enabledIntegrationCount > 0)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Analysis Services','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText(SPDSGVOConstants::CATEGORY_SLUG_STATISTICS.'-introduction', $locale));
        $privacyPolicy = array_merge($privacyPolicy, $integrationTexts);
    }
    // </editor-fold>

    // <editor-fold desc="Targeting">
    $integrations = SPDSGVOIntegrationApiBase::getAllIntegrationApis(SPDSGVOConstants::CATEGORY_SLUG_TARGETING, FALSE);
    $enabledIntegrationCount = 0;
    $integrationTexts = null;
    foreach ($integrations as $integrationSlug => $integration)
    {
        if ($integration->getIsEnabled())
        {
            $enabledIntegrationCount += 1;
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $integration->getName());
            $integrationTexts[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($integrationSlug, $locale));
        }
    }
    if ($enabledIntegrationCount > 0)
    {
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Ads, Profiling, Tracking, Retargeting','shapepress-dsgvo'));
        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText(SPDSGVOConstants::CATEGORY_SLUG_TARGETING.'-introduction', $locale));

        $privacyPolicy = array_merge($privacyPolicy, $integrationTexts);
    }
    // </editor-fold>

    // <editor-fold desc="Newsletter">
    if (SPDSGVOSettings::get('page_basics_use_newsletter_provider') == '1')
    {
        $enabled_newsletter = SPDSGVOSettings::get('page_basics_newsletter_provider');
        $enabled_newsletter = is_array($enabled_newsletter) ? $enabled_newsletter : [] ;
        $dummyProvider = array('own');

        $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Newsletter Services','shapepress-dsgvo'));

        foreach (SPDSGVOConstants::getNewsletterIntegrations() as $key => $value)
        {
            if ($key == 'other') continue;

            if (in_array($key, $enabled_newsletter))
            {
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, $value);
                $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText($key, $locale));
            }
        }

        if (in_array('other', $enabled_newsletter))
        {
            //$privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubSubtitle, __('Newsletter Service','shapepress-dsgvo'));
            $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOSettings::get('page_basics_other_newsletter_provider_text'));
        }

    }

    // here the affected rights start
    // <editor-fold desc="Widerspruchsrecht">
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Right to object','shapepress-dsgvo'));
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('right-to-object', $locale));
    // </editor-fold>

    // <editor-fold desc="Widerrufsrecht">
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Withdrawal','shapepress-dsgvo'));
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('right-to-withdrawal', $locale));
    // </editor-fold>

    // <editor-fold desc="Widerrufsrecht">
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray($hTagSubtitle, __('Right to data subject','shapepress-dsgvo'));
    $privacyPolicy[] = SPDSGVOGetFormatedHtmlTextArray('p', SPDSGVOLanguageTools::getPrivacyPolicyText('right-to-data-subject', $locale));
    // </editor-fold>


    /*
    $privacyPolicyPage = SPDSGVOSettings::get('privacy_policy_page');

    if(get_post($privacyPolicyPage) instanceof WP_POST) {
        $privacyPolicy = str_replace('[save_date]', date('d.m.Y H:i',strtotime(get_post($privacyPolicyPage)->post_modified)), $privacyPolicy);
    }
    */

    $htmlContent = '';
    foreach ($privacyPolicy as $lineItem)
    {
        if (!empty($lineItem['text'])) {
            $htmlContent .= SPDSGVOGetHtmlFromPrivacyPolicyLineItem($lineItem);
        }
    }

    return apply_filters('the_content', wp_kses_post($htmlContent));
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/privacy-policy.php

WP DSGVO Tools (GDPR) [subject_access_request] Shortcode

The ShapePress-DSGVO shortcode facilitates users to request access to their personal data. It creates a form for logged-in users to enter their first name, last name, and email. Upon submission, it sends an email with an extract of the user’s data. If the request is successful, a success message is displayed. It ensures GDPR compliance by requiring users to accept the terms before submission.

Shortcode: [subject_access_request]

Examples and Usage

Basic example – The shortcode provided is used to create a Subject Access Request form. This form allows users to request a copy of their personal data stored on the website.

[subject_access_request /]

PHP Function Code

In case you have difficulties debugging what causing issues with [subject_access_request] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('subject_access_request', 'SPDSGVODownloadMyDataShortcode');

Shortcode PHP function:

function SPDSGVODownloadMyDataShortcode($atts){

    $firstName = '';
    $lastName  = '';
    $email     = '';
    if(is_user_logged_in()){
        $firstName = wp_get_current_user()->user_firstname;
        $lastName  = wp_get_current_user()->user_lastname;
		$email     = wp_get_current_user()->user_email;
    }      

    ob_start();
    ?>  
        <?php if(isset($_REQUEST['result']) && (sanitize_text_field($_REQUEST['result'])) === 'success'): ?>

            <p class="sp-dsgvo sar-success-message"><?php _e('Your request has been created','shapepress-dsgvo')?> <br> <?php _e('You will receive an email from us with a current extract of your data stored with us.','shapepress-dsgvo')?></p>

        <?php else: ?>
    <div class="sp-dsgvo sp-sar-form">
            <form method="post" action="<?php echo esc_url(SPDSGVOSubjectAccessRequestAction::url()); ?>" class="sp-dsgvo-framework">
                <?php wp_nonce_field( esc_attr(SPDSGVOSubjectAccessRequestAction::getActionName()). '-nonce' ); ?>
                <fieldset>

                	<div class="lwb-row">
                		<div class="lwb-col-3">
                			<label for="email-field"><?php _e('First name','shapepress-dsgvo')?></label>
                		</div>
                        <div class="lwb-col-6">
                            <input class="w-100" required type="text" id="first-name-field" name="first_name" value="<?php echo esc_attr($firstName) ?>" placeholder="<?php _e('First name','shapepress-dsgvo')?>" spellcheck="false" />
                        </div>
                	</div>

                    <div class="lwb-row">
                        <div class="lwb-col-3">
                            <label for="email-field"><?php _e('Last name','shapepress-dsgvo')?></label>
                        </div>
                        <div class="lwb-col-6">
                            <input class="w-100" required type="text" id="last-name-field" name="last_name" value="<?php echo esc_attr($lastName) ?>" placeholder="<?php _e('Last name','shapepress-dsgvo')?>" spellcheck="false" />
                        </div>
                    </div>

                   <div class="lwb-row">
						<div class="lwb-col-3">
                    		<label for="email-field"><?php _e('Email','shapepress-dsgvo')?></label>
						</div>
                        <div class="lwb-col-6">
                            <input class="w-100" required type="email" id="email-field" name="email" value="<?php echo esc_attr($email) ?>" placeholder="<?php _e('Email','shapepress-dsgvo')?>" spellcheck="false" />
                        </div>
                    </div>
                    <div class="lwb-row form-row-website-cap">
                        <div class="lwb-col-3">
                            <label for="email-field"><?php _e('Website','shapepress-dsgvo')?></label>
                        </div>
                        <div class="lwb-col-6">
                            <input class="w-100" type="text" id="website" name="website" value="" placeholder="" spellcheck="false" />
                        </div>
                    </div>

                    <div class="lwb-row">
						<div class="lwb-col-12">
                    		<label for="dsgvo-checkbox">
                   			 	<input required type="checkbox" id="dsgvo-checkbox" name="dsgvo_checkbox" value="1" />
                   			 	<span style="font-weight:normal">
                                    <?php
                                    $accepted_text = convDeChars(SPDSGVOSettings::get('sar_dsgvo_accepted_text'));
                                    ?>
                                    <?php echo esc_html($accepted_text); ?>
                                </span>
                   			 </label>
						</div>
                    </div>
                    <br>
                    <input type="submit" value="<?php _e('Create request','shapepress-dsgvo')?>" />
                </fieldset>
            </form>
    </div>
        <?php endif; ?>
    <?php

    return ob_get_clean();
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/subject-access-request/subject-access-request.php

WP DSGVO Tools (GDPR) [unsubscribe_form] Shortcode

The ShapePress-DSGVO shortcode provides a user-friendly form for users to unsubscribe from your site. It automatically fills in the user’s data if they are logged in. Upon submission, it sends a request for data deletion and provides feedback messages based on the request’s status. It ensures GDPR compliance by requiring users to agree before submitting the form.

Shortcode: [unsubscribe_form]

Examples and Usage

Basic example – A simple usage of the shortcode to display the unsubscribe form.

[unsubscribe_form /]

PHP Function Code

In case you have difficulties debugging what causing issues with [unsubscribe_form] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode('unsubscribe_form', 'SPDSGVOUnsubscribeShortcode');

Shortcode PHP function:

function SPDSGVOUnsubscribeShortcode($atts){

    $firstName = '';
    $lastName  = '';
    $email     = '';

    if(is_user_logged_in()){
        $firstName = wp_get_current_user()->user_firstname;
        $lastName  = wp_get_current_user()->user_lastname;
        $email     = wp_get_current_user()->user_email;
    }      

    ob_start();
    ?>  
        <?php if(isset($_REQUEST['result']) && (sanitize_text_field($_REQUEST['result'])) === 'success'): ?>

            <p class="sp-dsgvo us-success-message"><?php _e('Request sent successfully. You will receive an email in a few minutes.','shapepress-dsgvo')?></p>

        <?php elseif(isset($_REQUEST['result']) && sanitize_text_field($_REQUEST['result']) === 'confirmed'): ?>

			<p class="sp-dsgvo us-success-message"><?php _e('Request successfully completed. Your data has been completely deleted.','shapepress-dsgvo')?></p>

        <?php else: ?>
        <div class="sp-dsgvo sp-unsubsribe-form">
            <form method="post" action="<?php echo esc_url(SPDSGVOSuperUnsubscribeFormAction::url()) ?>" >
                <?php wp_nonce_field( esc_attr(SPDSGVOSuperUnsubscribeFormAction::getActionName()). '-nonce' ); ?>
                <fieldset>
                    <div class="lwb-row">
                        <div class="lwb-col-3">
                            <label style="min-width:100px;" for="email-field"><?php _e('First name','shapepress-dsgvo')?></label>
                        </div>
                        <div class="lwb-col-6">
                            <input class="w-100" required type="text" id="first-name-field" name="first_name" value="<?php echo esc_attr($firstName) ?>" placeholder="<?php _e('First name','shapepress-dsgvo')?>" spellcheck="false" />
                        </div>


                    </div>
                    <div class="lwb-row">
                        <div class="lwb-col-3">
                            <label for="email-field"><?php _e('Last name','shapepress-dsgvo')?></label>
                        </div>
                        <div class="lwb-col-6">
                            <input class="w-100" required type="text" id="last-name-field" name="last_name" value="<?php echo esc_attr($lastName) ?>" placeholder="<?php _e('Last name','shapepress-dsgvo')?>" spellcheck="false" />
                        </div>
                    </div>

					<div class="lwb-row">
                        <div class="lwb-col-3">
                            <label for="email-field"><?php _e('Email','shapepress-dsgvo')?></label>
                        </div>
						<div class="lwb-col-6">
                   			 <input class="w-100" required type="email" id="email-field" name="email" value="<?php echo esc_attr($email) ?>" placeholder="<?php _e('Email','shapepress-dsgvo')?>" spellcheck="false" />
						</div>
                    </div>
                    <div class="lwb-row form-row-website-cap">
                        <div class="lwb-col-3">
                            <label for="email-field"><?php _e('Website','shapepress-dsgvo')?></label>
                        </div>
                        <div class="lwb-col-6">
                            <input class="w-100" type="text" id="website" name="website" value="" placeholder="" spellcheck="false" />
                        </div>
                    </div>
                    <div class="lwb-row">
						<div class="lwb-col">
                    		<label for="dsgvo-checkbox">
                   			 	<input required type="checkbox" id="dsgvo-checkbox" name="dsgvo_checkbox" value="1" />
                                <?php
                                $accept_text = convDeChars(SPDSGVOSettings::get('su_dsgvo_accepted_text'));
                                ?>
                   			 	<span style="font-weight:normal"><?php echo esc_html($accept_text);  ?></span>
                   			 </label>
						</div>
                    </div>
                    <br>
                    <input type="submit" value="<?php _e('Create delete request','shapepress-dsgvo')?>" />
                </fieldset>
            </form>
        </div>
        <?php endif; ?>
    <?php

    return ob_get_clean();
}

Code file location:

shapepress-dsgvo/shapepress-dsgvo/public/shortcodes/super-unsubscribe/unsubscribe-form.php

Conclusion

Now that you’ve learned how to embed the WP DSGVO Tools (GDPR) Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *