Plugin Directory

Changeset 1881361


Ignore:
Timestamp:
05/25/2018 11:27:34 AM (8 years ago)
Author:
insertpostads
Message:

GDPR compliance 1.3.2

Location:
insert-post-ads
Files:
85 added
6 edited

Legend:

Unmodified
Added
Removed
  • insert-post-ads/trunk/apis/vi/api.php

    r1789616 r1881361  
    77            if(!is_wp_error($response) && (200 == wp_remote_retrieve_response_code($response))) {
    88                $responseBody = json_decode($response['body']);
     9                //echo '<pre>'; print_r($responseBody->data); echo '</pre>';
    910                if((json_last_error() == JSON_ERROR_NONE) && ($responseBody->status == 'ok')) {
    1011                    $viSettings = array(
     
    1819                        'adsTxtAPI' => $responseBody->data->adsTxtAPI,
    1920                        'languages' => $responseBody->data->languages,
    20                         'jsTagAPI' => $responseBody->data->jsTagAPI,
     21                        'jsTagAPI' => $responseBody->data->jsTagAPI,
     22                        'vendorListURL' => $responseBody->data->vendorListURL,
     23                        'vendorListVersion' => $responseBody->data->vendorListVersion,
     24                        'consentPopupContent' => $responseBody->data->consentPopupContent
    2125                    );
    2226                    delete_transient('insert_ads_vi_api_settings');
     
    3135    }
    3236    return $viSettings;
     37}
     38
     39function insert_ads_vi_api_get_consent_purposes() {
     40    $viSettings = insert_ads_vi_api_get_settings();
     41    if(($viSettings != false) && is_array($viSettings)) {
     42        return $viSettings['purposes'];
     43    }
     44    return false;
     45}
     46
     47function insert_ads_vi_api_get_consent_popup_content() {
     48    $viSettings = insert_ads_vi_api_get_settings();
     49    if(($viSettings != false) && is_array($viSettings)) {
     50        return $viSettings['consentPopupContent'];
     51    }
     52    return false;
     53}
     54
     55function insert_ads_vi_api_get_vendor_list_version() {
     56    $viSettings = insert_ads_vi_api_get_settings();
     57    if(($viSettings != false) && is_array($viSettings)) {
     58        return $viSettings['vendorListVersion'];
     59    }
     60    return false;
     61}
     62
     63function insert_ads_vi_api_is_eu() {
     64    //$userIp = $_SERVER["REMOTE_ADDR"];
     65    $userIp = '185.216.33.82';
     66    $isEU = get_transient('insert_ads_vi_api_is_eu_'.$userIp);
     67    if($isEU === false) {
     68        try{
     69            $response = wp_remote_get(
     70                'http://gdpr-check.net/gdpr/is-eu?ip='.$userIp,
     71                array('timeout' => 15)
     72            );
     73            if(!is_wp_error($response)) {
     74                if(200 == wp_remote_retrieve_response_code($response)) {
     75                    $responseBody = json_decode($response['body']);
     76                    if((json_last_error() == JSON_ERROR_NONE)) {
     77                        if((isset($responseBody->is_eu)) && ($responseBody->is_eu == '1')) {
     78                            delete_transient('insert_ads_vi_api_is_eu_'.$userIp);
     79                            set_transient('insert_ads_vi_api_is_eu_'.$userIp, '1', WEEK_IN_SECONDS);
     80                            return true;
     81                        } else {
     82                            delete_transient('insert_ads_vi_api_is_eu_'.$userIp);
     83                            set_transient('insert_ads_vi_api_is_eu_'.$userIp, '0', WEEK_IN_SECONDS);
     84                            return false;
     85                        }
     86                    } else {
     87                        return false;
     88                    }
     89                } else {
     90                    return false;
     91                }
     92            }
     93        } catch(Exception $ex) {
     94            return false;
     95        }
     96    } else {
     97        if($isEU == '1') {
     98            return true;
     99        } else {
     100            return false;
     101        }
     102
     103    }
    33104}
    34105
  • insert-post-ads/trunk/css/admin.css

    r1822814 r1881361  
    8787    font-size: 13px;
    8888    position: absolute;
    89     bottom: -65px;
     89    bottom: -220px;
    9090    line-height: 32px;
    9191    font-weight: bold;
     
    330330    display:none;
    331331}
     332#insert_ads_vi_code_settings_show_gdpr_authorization + label{
     333    background: #C8161B !important;
     334    border: 2px solid #000 !important;
     335    color: #fff !important;
     336    display: block;
     337    font-weight: bold !important;
     338    height: 30px;
     339    margin: 15px auto 0;
     340    text-shadow: 1px 1px 5px #000;
     341    width: 80%;
     342}
     343#insert_ads_vi_code_settings_show_gdpr_authorization + label.ui-state-active {
     344    background: #6ddc5f !important;
     345}
  • insert-post-ads/trunk/includes/vi-integration.php

    r1823428 r1881361  
    722722    $control->create_section(' vi Stories Settings ');
    723723    echo $control->HTML;
     724    $control->clear_controls();
     725
     726    $control->HTML .= '<p>Enable GDPR Compliance confirmation notice on your site for visitors from EU.<br />If you disable this option make sure you are using a data usage authorization system on your website to remain GDPR complaint.</p>';
     727    $control->add_control(array('type' => 'checkbox-button', 'label' => 'Status : Do not Show GDPR Authorization Popup', 'checkedLabel' => 'Status : Show GDPR Authorization Popup', 'uncheckedLabel' => 'Status : Do not Show GDPR Authorization Popup', 'optionName' => 'show_gdpr_authorization'));
     728    $control->create_section(' vi stories: GDPR Compliance ');
     729    echo $control->HTML;
    724730    echo '<script type="text/javascript">';
    725731        echo $control->JS;
     
    745751    $vicodeSettings['optional_2'] = ((isset($_POST['insert_ads_vi_code_settings_optional_2']))?$_POST['insert_ads_vi_code_settings_optional_2']:'');
    746752    $vicodeSettings['optional_3'] = ((isset($_POST['insert_ads_vi_code_settings_optional_3']))?$_POST['insert_ads_vi_code_settings_optional_3']:'');
     753
     754    $vicodeSettings['show_gdpr_authorization'] = ((isset($_POST['insert_ads_vi_code_settings_show_gdpr_authorization']))?$_POST['insert_ads_vi_code_settings_show_gdpr_authorization']:'');
    747755    update_option('insert_ads_vi_code_settings', $vicodeSettings);
    748756    $viCodeStatus = insert_ads_vi_api_set_vi_code($vicodeSettings);
  • insert-post-ads/trunk/insert-post-ads.php

    r1811853 r1881361  
    33* Plugin Name: Insert Post Ads
    44* Plugin URI: http://www.insertpostads.com/
    5 * Version: 1.3.1
     5* Version: 1.3.2
    66* Author: InsertPostAds
    77* Author URI: http://www.insertpostads.com/
     
    4040        $this->plugin->displayName  = 'Post Adverts'; // Plugin Name
    4141        $this->plugin->posttype     = 'insertpostads';
    42         $this->plugin->version      = '1.3';
     42        $this->plugin->version      = '1.3.2';
    4343        $this->plugin->folder       = plugin_dir_path( __FILE__ );
    4444        $this->plugin->url          = plugin_dir_url( __FILE__ );
     
    614614require_once(dirname(__FILE__).'/includes/common.php');
    615615require_once(dirname(__FILE__).'/includes/geotargeting.php');
     616require_once(dirname(__FILE__).'/includes/gdpr.php');
    616617require_once(dirname(__FILE__).'/adstxt.php');
    617618require_once(dirname(__FILE__).'/includes/adstxt.php');
  • insert-post-ads/trunk/js/admin.js

    r1822814 r1881361  
    918918                    var insert_ads_vi_code_settings_optional_2 = jQuery('#insert_ads_vi_code_settings_optional_2').val();
    919919                    var insert_ads_vi_code_settings_optional_3 = jQuery('#insert_ads_vi_code_settings_optional_3').val();
     920                    var insert_ads_vi_code_settings_show_gdpr_authorization = jQuery('#insert_ads_vi_code_settings_show_gdpr_authorization').prop('checked');
    920921                    jQuery('.ui-dialog-content').html('<div class="insert_ads_ajaxloader"></div>');
    921922                    jQuery('.insert_ads_ajaxloader').show();
     
    936937                            'insert_ads_vi_code_settings_optional_2': insert_ads_vi_code_settings_optional_2,
    937938                            'insert_ads_vi_code_settings_optional_3': insert_ads_vi_code_settings_optional_3,
     939                            'insert_ads_vi_code_settings_show_gdpr_authorization': insert_ads_vi_code_settings_show_gdpr_authorization,
    938940                        }, function(response) {
    939941                            if(response.indexOf('###SUCCESS###') !== -1) {
     
    12471249                    var insert_ads_vi_code_settings_optional_2 = jQuery('#insert_ads_vi_code_settings_optional_2').val();
    12481250                    var insert_ads_vi_code_settings_optional_3 = jQuery('#insert_ads_vi_code_settings_optional_3').val();
     1251        var insert_ads_vi_code_settings_show_gdpr_authorization = jQuery('#insert_ads_vi_code_settings_show_gdpr_authorization').prop('checked');
    12491252                    var curLoc = jQuery('input[name="cur-pos-rad"]:checked').val();
    12501253                    var disLoc = jQuery('input[name="cur-pos-rad"]').not(':checked').val();
     
    12681271                            'insert_ads_vi_code_settings_optional_2': insert_ads_vi_code_settings_optional_2,
    12691272                            'insert_ads_vi_code_settings_optional_3': insert_ads_vi_code_settings_optional_3,
     1273                            'insert_ads_vi_code_settings_show_gdpr_authorization': insert_ads_vi_code_settings_show_gdpr_authorization,
    12701274                        }, function(response) {
    12711275                            if(/*response.indexOf('###SUCCESS###') !== -1*/true) {
  • insert-post-ads/trunk/readme.txt

    r1822814 r1881361  
    33Tags: ad injection, ads, ads plugin, adsense, adsense injection, google adsense, insert ads in post, insert post ads, wordpress ads plugin, advertising plugin, banners plugin, post ads
    44Requires at least: 3.6
    5 Tested up to: 4.9.4
    6 Stable tag: 1.3.1
     5Tested up to: 4.9.6
     6Stable tag: 1.3.2
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6969
    7070== Changelog ==
     71= 1.3.2 =
     72* GDPR consent management module added
     73* Updated Privacy policy
     74
    7175= 1.3.1 =
    7276* Bug fixes
     
    117121= 1.0 =
    118122* First release
     123
     124== Privacy Policy ==
     125
     126Users privacy is very important to us and we make extra effort not to collect data about the users to the maximum extend possible.
     127However to provide enhanced functionality we utilize the APIs from different third party services as listed below and the usage of those API are in accordance with their privacy policies.
     128
     129= Geo Targeting =
     130
     131To enable Geo Targeting functionality for Ads we have to send the visitor IP address to a third party service (http://freegeoip.net/ OR https://ipstack.com/) and the usage of thier API is in accordance to their privacy policy located at https://ipstack.com/privacy/.
     132This third party API is utilized only when you enable or use Geo Targetting features in the plugin admin.
     133
     134= video intelligence =
     135
     136The plugin provides deep integration with video intelligence to provide enhanced features and for easy integration with their services.
     137This third party API and features are utilized only when you enable or use video inteligence related features in the plugin admin and the usage of thier API and features are in accordance to their privacy policy.
     138
     139video intelligence ("vi") as a third party, needs to process the user's technical data such as cookie ID, IP Address, Geo-Location and Device ID to personalize content and advertising and analyse our traffic.
     140You can find below a link vi's Legal webpage where there are transparently presented all GDPR relevant information.
     141Please access the link to check vi's Privacy Policy, Terms&Conditions pages, Opt Out Mechanism, Vendor and Purposes lists.
     142https://www.vi.ai/legals/
Note: See TracChangeset for help on using the changeset viewer.