Plugin Directory

Changeset 3352481


Ignore:
Timestamp:
08/29/2025 08:42:07 AM (7 months ago)
Author:
cookieopt2024
Message:

version 1.0.13

Location:
cookie-optimizer
Files:
13 deleted
6 edited
59 copied

Legend:

Unmodified
Added
Removed
  • cookie-optimizer/tags/1.0.13/app/Includes/CookieOptBanner.php

    r3352416 r3352481  
    4242            add_action('wp_ajax_set_cookie_opt_server', [$this, 'handle_set_cookie_opt_server']);
    4343            add_action('wp_ajax_nopriv_set_cookie_opt_server', [$this, 'handle_set_cookie_opt_server']);
     44
     45            add_action('wp_ajax_nopriv_handle_render_banner', [$this, 'handle_render_banner']);
     46            add_action('wp_ajax_handle_render_banner', [$this, 'handle_render_banner']);
    4447        }
    4548    }
     
    138141
    139142        wp_send_json_success([
    140             'message' => 'Cookie set',
     143            'message' => 'Get cookie success',
    141144            'cookie' => $dataCookie
    142145        ]);
     
    155158
    156159            setcookie(COOKIE_OPT_NAME, $value, $expires, '/', '', $secure, true);
    157             cookie_log_current_state('client_send_cookie_value', ['cookie' => $_COOKIE[COOKIE_OPT_NAME]]);
     160            cookie_log_current_state('client_send_cookie_value');
    158161
    159162            wp_send_json_success([
     
    162165                'value' => $value,
    163166            ]);
    164 
    165             wp_send_json_success(['message' => 'Cookie set']);
    166167            die;
    167168        }
     
    193194    }
    194195
     196    public function handle_render_banner(){
     197        $html_banner = $this->data_banner_html();
     198        $is_display_banner = $this->handle_display_banner();
     199
     200        wp_send_json_success([
     201            'message' => 'Get cookie success',
     202            'dataBannerRender' => $html_banner,
     203            'isDisplayBanner' => $is_display_banner
     204        ]);
     205    }
     206
    195207    public function prepare_data_for_render_cookie(){
    196208        $setting = $this->CookiePermissionService->getSettingBanner();
    197         $html_banner = $this->data_banner_html();
    198         $is_display_banner = $this->handle_display_banner();
    199209
    200210        return [
     
    205215            'eventOnScroll' => $setting['onScroll'],
    206216            'eventReload' => $setting['reloading'],
    207             'dataRenderBanner' => wp_json_encode($html_banner),
    208             'isDisplayBanner' => $is_display_banner
    209217        ];
    210218    }
  • cookie-optimizer/tags/1.0.13/constants.php

    r3352416 r3352481  
    22
    33// Plugin version and mode
    4 define('VERSION', '1.0.12');
     4define('VERSION', '1.0.13');
    55
    66// Plugin directory details
  • cookie-optimizer/tags/1.0.13/cookie-opt.php

    r3352416 r3352481  
    1212 * Plugin URI: https://manage.medipartner.jp
    1313 * Description: Cookieをユーザーに見える化し、各法律にする準拠バナー同意ソリューション
    14  * Version: 1.0.12
     14 * Version: 1.0.13
    1515 * Requires at least: 5.3
    1616 * Requires PHP: 7.3
     
    5151 *
    5252 * @class CookieOpt
    53  * @version 1.0.12
     53 * @version 1.0.13
    5454 */
    5555class CookieOpt
     
    7676     */
    7777    public $defaults = [
    78         'version' => '1.0.12',
     78        'version' => '1.0.13',
    7979    ];
    8080
  • cookie-optimizer/tags/1.0.13/public/build/assets/js/banner.js

    r3352416 r3352481  
    1 jQuery(document).ready(function(n){let e=!1;if(dataEvent.dataRenderBanner&&dataEvent.isDisplayBanner==!0){let a=JSON.parse(dataEvent.dataRenderBanner);n("body").prepend(a),f(e)}d(),u()});function f(n){dataEvent.eventOnScroll.status===1&&jQuery(window).on("scroll",function(){jQuery(document).scrollTop()>=parseInt(dataEvent.eventOnScroll.value)&&n===!1&&(l().action==0&&(c(1),i(1,dataEvent.regulation),n=!0),jQuery(".modal").hide())}),dataEvent.eventOnclick==1&&(jQuery(window).on("click",function(){if(!jQuery(".modal").is(":hidden")){let a=l();dataEvent.regulation!="ja"&&a.action==0&&(c(1),i(1,dataEvent.regulation)),jQuery(".modal").hide()}jQuery(window).off("click")}),jQuery('div[data-banner="banner-main"], div[data-banner="banner-customize"]').on("click",function(e){e.stopPropagation()})),d(),u()}function u(){if(jQuery("#display_banner").val()=="show"){let e=jQuery("#none_view").val();jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"handle_view_banner",none:e}})}}function i(n,e){let a,t;if(e==="ja")t={url:dataEvent.url,type:"POST",data:{type:n,action:"handle_banner",none:dataEvent.none_handle_banner}};else{let o=document.getElementById("form-banner");a=new FormData(o),a.append("type",n),t={url:dataEvent.url,type:"POST",contentType:!1,cache:!1,processData:!1,data:a}}jQuery.ajax(t)}function d(){jQuery('i[data-icon="banner-customize"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-main"]').show()}),jQuery('i[data-icon="banner-main"]').on("click",function(){jQuery(".coop-banner").hide(),i(1,dataEvent.regulation)}),jQuery('a[data-button="customize_button"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-customize"]').show()}),jQuery(".handle-cookie").on("click",function(){let n=jQuery(this).attr("data-type");if(dataEvent.regulation!="ja"){let e=y(n);c(e)}else c(1);i(n,dataEvent.regulation),jQuery(".coop-banner").hide(),dataEvent.eventReload==1&&location.reload()})}function y(n){let e=jQuery(".cookie-category-type"),t=Array.from(e).filter(function(s){return s.checked}).length,o=parseInt(n),r=o;return o==2&&(t==3?r=1:t==0?r=3:r=2),r}function p(n,e){jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"set_cookie_opt_server",cookie_value:n,type:e},success:function(a){},error:function(a){console.error(a)}})}function l(){let n;return jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"get_parse_cookie_opt"},success:function(e){n=JSON.parse(e.data.cookie)},error:function(e){}}),n||{action:0,type:0,necessary:1,functional:0,socialmedia:0,performance:0}}function c(n){let e=l();e.action=1,e.type=n,e.necessary=1,n==1?(e.functional=1,e.socialmedia=1,e.performance=1):n==3?(e.functional=0,e.socialmedia=0,e.performance=0):(e.functional=jQuery("#banner__functionality-cookie").is(":checked")?1:0,e.socialmedia=jQuery("#banner__social-media-cookie").is(":checked")?1:0,e.performance=jQuery("#banner__performance-cookie").is(":checked")?1:0);let a=JSON.stringify(e);p(a,n)}
     1jQuery(document).ready(function(n){let e=!1;n.ajax({url:dataEvent.url,type:"GET",data:{action:"handle_render_banner"},success:function(a){let t=a.data.dataBannerRender,o=a.data.isDisplayBanner;t&&o===!0&&(n("body").prepend(t),f(e))}}),d(),u()});function f(n){dataEvent.eventOnScroll.status===1&&jQuery(window).on("scroll",function(){jQuery(document).scrollTop()>=parseInt(dataEvent.eventOnScroll.value)&&n===!1&&(l().action==0&&(c(1),i(1,dataEvent.regulation),n=!0),jQuery(".modal").hide())}),dataEvent.eventOnclick==1&&(jQuery(window).on("click",function(){if(!jQuery(".modal").is(":hidden")){let a=l();dataEvent.regulation!="ja"&&a.action==0&&(c(1),i(1,dataEvent.regulation)),jQuery(".modal").hide()}jQuery(window).off("click")}),jQuery('div[data-banner="banner-main"], div[data-banner="banner-customize"]').on("click",function(e){e.stopPropagation()})),d(),u()}function u(){if(jQuery(".coop-banner").length>0){let e=jQuery("#none_view").val();jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"handle_view_banner",none:e}})}}function i(n,e){let a,t;if(e==="ja")t={url:dataEvent.url,type:"POST",data:{type:n,action:"handle_banner",none:dataEvent.none_handle_banner}};else{let o=document.getElementById("form-banner");a=new FormData(o),a.append("type",n),t={url:dataEvent.url,type:"POST",contentType:!1,cache:!1,processData:!1,data:a}}jQuery.ajax(t)}function d(){jQuery('i[data-icon="banner-customize"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-main"]').show()}),jQuery('i[data-icon="banner-main"]').on("click",function(){jQuery(".coop-banner").hide(),i(1,dataEvent.regulation)}),jQuery('a[data-button="customize_button"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-customize"]').show()}),jQuery(".handle-cookie").on("click",function(){let n=jQuery(this).attr("data-type");if(dataEvent.regulation!="ja"){let e=y(n);c(e)}else c(1);i(n,dataEvent.regulation),jQuery(".coop-banner").hide(),dataEvent.eventReload==1&&location.reload()})}function y(n){let e=jQuery(".cookie-category-type"),t=Array.from(e).filter(function(s){return s.checked}).length,o=parseInt(n),r=o;return o==2&&(t==3?r=1:t==0?r=3:r=2),r}function p(n,e){jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"set_cookie_opt_server",cookie_value:n,type:e},success:function(a){},error:function(a){console.error(a)}})}function l(){let n;return jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"get_parse_cookie_opt"},success:function(e){n=JSON.parse(e.data.cookie)},error:function(e){}}),n||{action:0,type:0,necessary:1,functional:0,socialmedia:0,performance:0}}function c(n){let e=l();e.action=1,e.type=n,e.necessary=1,n==1?(e.functional=1,e.socialmedia=1,e.performance=1):n==3?(e.functional=0,e.socialmedia=0,e.performance=0):(e.functional=jQuery("#banner__functionality-cookie").is(":checked")?1:0,e.socialmedia=jQuery("#banner__social-media-cookie").is(":checked")?1:0,e.performance=jQuery("#banner__performance-cookie").is(":checked")?1:0);let a=JSON.stringify(e);p(a,n)}
  • cookie-optimizer/tags/1.0.13/readme.txt

    r3352416 r3352481  
    55Requires PHP: 7.3
    66Tested up to: 6.7   
    7 Stable tag: 1.0.12
     7Stable tag: 1.0.13
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6565== Changelog ==
    6666
    67 = 1.0.12 =
     67= 1.0.13 =
    6868Initial release
    6969
  • cookie-optimizer/tags/1.0.13/uninstall.php

    r3352416 r3352481  
    1919 *
    2020 * @link       https://cookieoptimizer.net
    21  * @since      1.0.12
     21 * @since      1.0.13
    2222 *
    2323 * @package    Cookie Optimizer
  • cookie-optimizer/trunk/app/Includes/CookieOptBanner.php

    r3352416 r3352481  
    4242            add_action('wp_ajax_set_cookie_opt_server', [$this, 'handle_set_cookie_opt_server']);
    4343            add_action('wp_ajax_nopriv_set_cookie_opt_server', [$this, 'handle_set_cookie_opt_server']);
     44
     45            add_action('wp_ajax_nopriv_handle_render_banner', [$this, 'handle_render_banner']);
     46            add_action('wp_ajax_handle_render_banner', [$this, 'handle_render_banner']);
    4447        }
    4548    }
     
    138141
    139142        wp_send_json_success([
    140             'message' => 'Cookie set',
     143            'message' => 'Get cookie success',
    141144            'cookie' => $dataCookie
    142145        ]);
     
    155158
    156159            setcookie(COOKIE_OPT_NAME, $value, $expires, '/', '', $secure, true);
    157             cookie_log_current_state('client_send_cookie_value', ['cookie' => $_COOKIE[COOKIE_OPT_NAME]]);
     160            cookie_log_current_state('client_send_cookie_value');
    158161
    159162            wp_send_json_success([
     
    162165                'value' => $value,
    163166            ]);
    164 
    165             wp_send_json_success(['message' => 'Cookie set']);
    166167            die;
    167168        }
     
    193194    }
    194195
     196    public function handle_render_banner(){
     197        $html_banner = $this->data_banner_html();
     198        $is_display_banner = $this->handle_display_banner();
     199
     200        wp_send_json_success([
     201            'message' => 'Get cookie success',
     202            'dataBannerRender' => $html_banner,
     203            'isDisplayBanner' => $is_display_banner
     204        ]);
     205    }
     206
    195207    public function prepare_data_for_render_cookie(){
    196208        $setting = $this->CookiePermissionService->getSettingBanner();
    197         $html_banner = $this->data_banner_html();
    198         $is_display_banner = $this->handle_display_banner();
    199209
    200210        return [
     
    205215            'eventOnScroll' => $setting['onScroll'],
    206216            'eventReload' => $setting['reloading'],
    207             'dataRenderBanner' => wp_json_encode($html_banner),
    208             'isDisplayBanner' => $is_display_banner
    209217        ];
    210218    }
  • cookie-optimizer/trunk/constants.php

    r3352416 r3352481  
    22
    33// Plugin version and mode
    4 define('VERSION', '1.0.12');
     4define('VERSION', '1.0.13');
    55
    66// Plugin directory details
  • cookie-optimizer/trunk/cookie-opt.php

    r3352416 r3352481  
    1212 * Plugin URI: https://manage.medipartner.jp
    1313 * Description: Cookieをユーザーに見える化し、各法律にする準拠バナー同意ソリューション
    14  * Version: 1.0.12
     14 * Version: 1.0.13
    1515 * Requires at least: 5.3
    1616 * Requires PHP: 7.3
     
    5151 *
    5252 * @class CookieOpt
    53  * @version 1.0.12
     53 * @version 1.0.13
    5454 */
    5555class CookieOpt
     
    7676     */
    7777    public $defaults = [
    78         'version' => '1.0.12',
     78        'version' => '1.0.13',
    7979    ];
    8080
  • cookie-optimizer/trunk/public/build/assets/js/banner.js

    r3352416 r3352481  
    1 jQuery(document).ready(function(n){let e=!1;if(dataEvent.dataRenderBanner&&dataEvent.isDisplayBanner==!0){let a=JSON.parse(dataEvent.dataRenderBanner);n("body").prepend(a),f(e)}d(),u()});function f(n){dataEvent.eventOnScroll.status===1&&jQuery(window).on("scroll",function(){jQuery(document).scrollTop()>=parseInt(dataEvent.eventOnScroll.value)&&n===!1&&(l().action==0&&(c(1),i(1,dataEvent.regulation),n=!0),jQuery(".modal").hide())}),dataEvent.eventOnclick==1&&(jQuery(window).on("click",function(){if(!jQuery(".modal").is(":hidden")){let a=l();dataEvent.regulation!="ja"&&a.action==0&&(c(1),i(1,dataEvent.regulation)),jQuery(".modal").hide()}jQuery(window).off("click")}),jQuery('div[data-banner="banner-main"], div[data-banner="banner-customize"]').on("click",function(e){e.stopPropagation()})),d(),u()}function u(){if(jQuery("#display_banner").val()=="show"){let e=jQuery("#none_view").val();jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"handle_view_banner",none:e}})}}function i(n,e){let a,t;if(e==="ja")t={url:dataEvent.url,type:"POST",data:{type:n,action:"handle_banner",none:dataEvent.none_handle_banner}};else{let o=document.getElementById("form-banner");a=new FormData(o),a.append("type",n),t={url:dataEvent.url,type:"POST",contentType:!1,cache:!1,processData:!1,data:a}}jQuery.ajax(t)}function d(){jQuery('i[data-icon="banner-customize"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-main"]').show()}),jQuery('i[data-icon="banner-main"]').on("click",function(){jQuery(".coop-banner").hide(),i(1,dataEvent.regulation)}),jQuery('a[data-button="customize_button"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-customize"]').show()}),jQuery(".handle-cookie").on("click",function(){let n=jQuery(this).attr("data-type");if(dataEvent.regulation!="ja"){let e=y(n);c(e)}else c(1);i(n,dataEvent.regulation),jQuery(".coop-banner").hide(),dataEvent.eventReload==1&&location.reload()})}function y(n){let e=jQuery(".cookie-category-type"),t=Array.from(e).filter(function(s){return s.checked}).length,o=parseInt(n),r=o;return o==2&&(t==3?r=1:t==0?r=3:r=2),r}function p(n,e){jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"set_cookie_opt_server",cookie_value:n,type:e},success:function(a){},error:function(a){console.error(a)}})}function l(){let n;return jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"get_parse_cookie_opt"},success:function(e){n=JSON.parse(e.data.cookie)},error:function(e){}}),n||{action:0,type:0,necessary:1,functional:0,socialmedia:0,performance:0}}function c(n){let e=l();e.action=1,e.type=n,e.necessary=1,n==1?(e.functional=1,e.socialmedia=1,e.performance=1):n==3?(e.functional=0,e.socialmedia=0,e.performance=0):(e.functional=jQuery("#banner__functionality-cookie").is(":checked")?1:0,e.socialmedia=jQuery("#banner__social-media-cookie").is(":checked")?1:0,e.performance=jQuery("#banner__performance-cookie").is(":checked")?1:0);let a=JSON.stringify(e);p(a,n)}
     1jQuery(document).ready(function(n){let e=!1;n.ajax({url:dataEvent.url,type:"GET",data:{action:"handle_render_banner"},success:function(a){let t=a.data.dataBannerRender,o=a.data.isDisplayBanner;t&&o===!0&&(n("body").prepend(t),f(e))}}),d(),u()});function f(n){dataEvent.eventOnScroll.status===1&&jQuery(window).on("scroll",function(){jQuery(document).scrollTop()>=parseInt(dataEvent.eventOnScroll.value)&&n===!1&&(l().action==0&&(c(1),i(1,dataEvent.regulation),n=!0),jQuery(".modal").hide())}),dataEvent.eventOnclick==1&&(jQuery(window).on("click",function(){if(!jQuery(".modal").is(":hidden")){let a=l();dataEvent.regulation!="ja"&&a.action==0&&(c(1),i(1,dataEvent.regulation)),jQuery(".modal").hide()}jQuery(window).off("click")}),jQuery('div[data-banner="banner-main"], div[data-banner="banner-customize"]').on("click",function(e){e.stopPropagation()})),d(),u()}function u(){if(jQuery(".coop-banner").length>0){let e=jQuery("#none_view").val();jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"handle_view_banner",none:e}})}}function i(n,e){let a,t;if(e==="ja")t={url:dataEvent.url,type:"POST",data:{type:n,action:"handle_banner",none:dataEvent.none_handle_banner}};else{let o=document.getElementById("form-banner");a=new FormData(o),a.append("type",n),t={url:dataEvent.url,type:"POST",contentType:!1,cache:!1,processData:!1,data:a}}jQuery.ajax(t)}function d(){jQuery('i[data-icon="banner-customize"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-main"]').show()}),jQuery('i[data-icon="banner-main"]').on("click",function(){jQuery(".coop-banner").hide(),i(1,dataEvent.regulation)}),jQuery('a[data-button="customize_button"]').on("click",function(){jQuery(".coop-banner").hide(),jQuery('.coop-banner[data-banner="banner-customize"]').show()}),jQuery(".handle-cookie").on("click",function(){let n=jQuery(this).attr("data-type");if(dataEvent.regulation!="ja"){let e=y(n);c(e)}else c(1);i(n,dataEvent.regulation),jQuery(".coop-banner").hide(),dataEvent.eventReload==1&&location.reload()})}function y(n){let e=jQuery(".cookie-category-type"),t=Array.from(e).filter(function(s){return s.checked}).length,o=parseInt(n),r=o;return o==2&&(t==3?r=1:t==0?r=3:r=2),r}function p(n,e){jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"set_cookie_opt_server",cookie_value:n,type:e},success:function(a){},error:function(a){console.error(a)}})}function l(){let n;return jQuery.ajax({url:dataEvent.url,type:"POST",data:{action:"get_parse_cookie_opt"},success:function(e){n=JSON.parse(e.data.cookie)},error:function(e){}}),n||{action:0,type:0,necessary:1,functional:0,socialmedia:0,performance:0}}function c(n){let e=l();e.action=1,e.type=n,e.necessary=1,n==1?(e.functional=1,e.socialmedia=1,e.performance=1):n==3?(e.functional=0,e.socialmedia=0,e.performance=0):(e.functional=jQuery("#banner__functionality-cookie").is(":checked")?1:0,e.socialmedia=jQuery("#banner__social-media-cookie").is(":checked")?1:0,e.performance=jQuery("#banner__performance-cookie").is(":checked")?1:0);let a=JSON.stringify(e);p(a,n)}
  • cookie-optimizer/trunk/readme.txt

    r3352416 r3352481  
    55Requires PHP: 7.3
    66Tested up to: 6.7   
    7 Stable tag: 1.0.12
     7Stable tag: 1.0.13
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    6565== Changelog ==
    6666
    67 = 1.0.12 =
     67= 1.0.13 =
    6868Initial release
    6969
  • cookie-optimizer/trunk/uninstall.php

    r3352416 r3352481  
    1919 *
    2020 * @link       https://cookieoptimizer.net
    21  * @since      1.0.12
     21 * @since      1.0.13
    2222 *
    2323 * @package    Cookie Optimizer
Note: See TracChangeset for help on using the changeset viewer.