Changeset 3347352
- Timestamp:
- 08/20/2025 06:51:40 AM (8 months ago)
- Location:
- cookie-optimizer
- Files:
-
- 13 deleted
- 7 edited
- 47 copied
-
tags/1.0.6 (copied) (copied from cookie-optimizer/trunk)
-
tags/1.0.6/app/Includes/CookieOptBanner.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptBanner.php) (5 diffs)
-
tags/1.0.6/app/Includes/CookieOptBannerPreview.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptBannerPreview.php)
-
tags/1.0.6/app/Includes/CookieOptBaseInc.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptBaseInc.php)
-
tags/1.0.6/app/Includes/CookieOptCookiePolicy.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptCookiePolicy.php)
-
tags/1.0.6/app/Includes/CookieOptDashboard.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptDashboard.php)
-
tags/1.0.6/app/Includes/CookieOptLanguages.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptLanguages.php)
-
tags/1.0.6/app/Includes/CookieOptOther.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptOther.php)
-
tags/1.0.6/app/Includes/CookieOptPermission.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptPermission.php)
-
tags/1.0.6/app/Includes/CookieOptPublishSettings.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptPublishSettings.php)
-
tags/1.0.6/app/Includes/CookieOptTagManagement.php (copied) (copied from cookie-optimizer/trunk/app/Includes/CookieOptTagManagement.php)
-
tags/1.0.6/app/Includes/FeatureManager/FeatureUser/CookieIOptPackageBase.php (copied) (copied from cookie-optimizer/trunk/app/Includes/FeatureManager/FeatureUser/CookieIOptPackageBase.php)
-
tags/1.0.6/app/Includes/FeatureManager/FeatureUser/CookieOptBasic.php (copied) (copied from cookie-optimizer/trunk/app/Includes/FeatureManager/FeatureUser/CookieOptBasic.php)
-
tags/1.0.6/app/Includes/FeatureManager/FeatureUser/CookieOptFree.php (copied) (copied from cookie-optimizer/trunk/app/Includes/FeatureManager/FeatureUser/CookieOptFree.php)
-
tags/1.0.6/app/Includes/FeatureManager/FeatureUser/CookieOptManager.php (copied) (copied from cookie-optimizer/trunk/app/Includes/FeatureManager/FeatureUser/CookieOptManager.php)
-
tags/1.0.6/app/Includes/FeatureManager/FeatureUser/CookieOptPro.php (copied) (copied from cookie-optimizer/trunk/app/Includes/FeatureManager/FeatureUser/CookieOptPro.php)
-
tags/1.0.6/app/Services/CookieOptBannerService.php (copied) (copied from cookie-optimizer/trunk/app/Services/CookieOptBannerService.php)
-
tags/1.0.6/app/Services/CookieOptDashboardService.php (copied) (copied from cookie-optimizer/trunk/app/Services/CookieOptDashboardService.php)
-
tags/1.0.6/app/Services/CookieOptPolicyServices.php (copied) (copied from cookie-optimizer/trunk/app/Services/CookieOptPolicyServices.php)
-
tags/1.0.6/app/Services/CookieOptPublishSettingsService.php (copied) (copied from cookie-optimizer/trunk/app/Services/CookieOptPublishSettingsService.php)
-
tags/1.0.6/app/Services/CookiePermissionService.php (copied) (copied from cookie-optimizer/trunk/app/Services/CookiePermissionService.php) (1 diff)
-
tags/1.0.6/app/Services/ViewHelper/CookieOptBannerView.php (deleted)
-
tags/1.0.6/constants.php (copied) (copied from cookie-optimizer/trunk/constants.php) (1 diff)
-
tags/1.0.6/cookie-opt.php (copied) (copied from cookie-optimizer/trunk/cookie-opt.php) (3 diffs)
-
tags/1.0.6/functions.php (copied) (copied from cookie-optimizer/trunk/functions.php)
-
tags/1.0.6/languages/cookie-opt-ja.mo (copied) (copied from cookie-optimizer/trunk/languages/cookie-opt-ja.mo)
-
tags/1.0.6/languages/cookie-opt-ja.po (copied) (copied from cookie-optimizer/trunk/languages/cookie-opt-ja.po)
-
tags/1.0.6/languages/cookie-opt.pot (copied) (copied from cookie-optimizer/trunk/languages/cookie-opt.pot)
-
tags/1.0.6/languages/cookie-optimizer-ja.mo (deleted)
-
tags/1.0.6/languages/cookie-optimizer-ja.po (deleted)
-
tags/1.0.6/languages/cookie-optimizer.mo (deleted)
-
tags/1.0.6/languages/cookie-optimizer.pot (deleted)
-
tags/1.0.6/package.json (deleted)
-
tags/1.0.6/public/assets/css/banner.css (deleted)
-
tags/1.0.6/public/assets/css/cookie_permission_custom.css (deleted)
-
tags/1.0.6/public/assets/css/dashboard.css (deleted)
-
tags/1.0.6/public/assets/css/page_policy_render.css (copied) (copied from cookie-optimizer/trunk/public/assets/css/page_policy_render.css)
-
tags/1.0.6/public/assets/css/policy.css (deleted)
-
tags/1.0.6/public/assets/css/publish_setting.css (deleted)
-
tags/1.0.6/public/assets/css/tag_management.css (deleted)
-
tags/1.0.6/public/build/assets/css/app.css (copied) (copied from cookie-optimizer/trunk/public/build/assets/css/app.css)
-
tags/1.0.6/public/build/assets/css/banner.css (copied) (copied from cookie-optimizer/trunk/public/build/assets/css/banner.css)
-
tags/1.0.6/public/build/assets/js/banner.js (copied) (copied from cookie-optimizer/trunk/public/build/assets/js/banner.js)
-
tags/1.0.6/public/build/assets/js/cookie-policy.js (copied) (copied from cookie-optimizer/trunk/public/build/assets/js/cookie-policy.js)
-
tags/1.0.6/public/build/assets/js/cookie-scan.js (copied) (copied from cookie-optimizer/trunk/public/build/assets/js/cookie-scan.js)
-
tags/1.0.6/public/build/assets/js/cookie_startup.js (copied) (copied from cookie-optimizer/trunk/public/build/assets/js/cookie_startup.js)
-
tags/1.0.6/public/build/manifest.json (copied) (copied from cookie-optimizer/trunk/public/build/manifest.json)
-
tags/1.0.6/readme.txt (copied) (copied from cookie-optimizer/trunk/readme.txt) (2 diffs)
-
tags/1.0.6/table/create_table.php (copied) (copied from cookie-optimizer/trunk/table/create_table.php)
-
tags/1.0.6/templates/banner/banner_main.php (copied) (copied from cookie-optimizer/trunk/templates/banner/banner_main.php) (1 diff)
-
tags/1.0.6/templates/banner/banner_preview.php (copied) (copied from cookie-optimizer/trunk/templates/banner/banner_preview.php)
-
tags/1.0.6/templates/cookie_permissions/cookie_permission_banner.php (deleted)
-
tags/1.0.6/templates/cookie_permissions/partials/cookie_opt_setting_data_setup.php (copied) (copied from cookie-optimizer/trunk/templates/cookie_permissions/partials/cookie_opt_setting_data_setup.php)
-
tags/1.0.6/templates/cookie_policy/cookie-policy-page-for-render.php (copied) (copied from cookie-optimizer/trunk/templates/cookie_policy/cookie-policy-page-for-render.php)
-
tags/1.0.6/templates/module/notice.php (copied) (copied from cookie-optimizer/trunk/templates/module/notice.php)
-
tags/1.0.6/templates/module/notice_up_plan.php (copied) (copied from cookie-optimizer/trunk/templates/module/notice_up_plan.php)
-
tags/1.0.6/templates/publish_setting/index.php (copied) (copied from cookie-optimizer/trunk/templates/publish_setting/index.php)
-
tags/1.0.6/uninstall.php (copied) (copied from cookie-optimizer/trunk/uninstall.php) (1 diff)
-
tags/1.0.6/vendor/composer/autoload_classmap.php (copied) (copied from cookie-optimizer/trunk/vendor/composer/autoload_classmap.php)
-
tags/1.0.6/vendor/composer/autoload_static.php (copied) (copied from cookie-optimizer/trunk/vendor/composer/autoload_static.php)
-
trunk/app/Includes/CookieOptBanner.php (modified) (5 diffs)
-
trunk/app/Services/CookiePermissionService.php (modified) (1 diff)
-
trunk/constants.php (modified) (1 diff)
-
trunk/cookie-opt.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/templates/banner/banner_main.php (modified) (1 diff)
-
trunk/uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cookie-optimizer/tags/1.0.6/app/Includes/CookieOptBanner.php
r3346842 r3347352 26 26 $package_user = $package->packageType(); 27 27 if ($package_user !== 'LOCK' && !$package->checkLimitPackage()) { 28 add_action('template_redirect', [$this, 'prepare_cookie_and_banner_logic'], 0);29 28 add_action('wp_enqueue_scripts', [$this, 'register_enqueue_script']); 30 29 if (function_exists('wp_body_open')) { … … 107 106 108 107 $expires = ($type === 3) ? 0 : time() + (365 * 24 * 60 * 60); // 1 year 109 110 setcookie(COOKIE_OPT_NAME, $cookie_value, $expires, "/"); 108 $options = [ 109 'expires' => $expires, 110 'path' => '/', 111 'domain' => '', 112 'secure' => false, 113 'httponly' => false, 114 'samesite' => 'Lax', 115 ]; 116 117 setcookie(COOKIE_OPT_NAME, wp_unslash($cookie_value), $options); 111 118 112 119 wp_send_json_success([ … … 157 164 } 158 165 159 public function prepare_cookie_and_banner_logic(){ 160 if (is_admin() || is_feed() || is_robots() || (defined('REST_REQUEST') && REST_REQUEST)) { 161 return; 162 } 163 164 $cookieRaw = $_COOKIE[COOKIE_OPT_NAME] ?? null; 165 $dataCookie = null; 166 167 if ($cookieRaw) { 168 $decoded = urldecode(wp_unslash($cookieRaw)); 169 $dataCookie = json_decode($decoded, true); 170 } 171 172 if (!is_array($dataCookie) || !isset($dataCookie['action'])) { 173 $banner = $this->CookiePermissionService->getDataBannerToShow(); 174 $array = [ 166 public function my_banner_in_content() 167 { 168 $is_banner_active = get_option('cookie_opt_banner_active'); 169 if ($is_banner_active != 1) 170 return null; 171 172 $banner = $this->CookiePermissionService->getDataBannerToShow(); 173 174 $cookie_raw = $_COOKIE[COOKIE_OPT_NAME] ?? null; 175 $data_cookie = null; 176 177 if ($cookie_raw) { 178 $decoded = urldecode(wp_unslash($cookie_raw)); 179 $data_cookie = json_decode($decoded, true); 180 } 181 182 if (!is_array($data_cookie) || !isset($data_cookie['action'])) { 183 $data_cookie = [ 175 184 'action' => 0, 176 185 'type' => $banner['regulation'] === 'ja' ? '1' : '', … … 189 198 'samesite' => 'Lax', 190 199 ]; 191 setcookie(COOKIE_OPT_NAME, wp_json_encode($array), $options); 192 } 193 } 194 195 public function my_banner_in_content() 196 { 197 $is_banner_active = get_option('cookie_opt_banner_active'); 198 if ($is_banner_active != 1) 199 return null; 200 201 $banner = $this->CookiePermissionService->getDataBannerToShow(); 200 201 setcookie(COOKIE_OPT_NAME, wp_json_encode($data_cookie), $options); 202 } 203 204 if ($data_cookie['action'] == 1) { 205 return; 206 } 202 207 203 208 $condition_status = (bool)($banner['conditional']['status'] ?? false); … … 222 227 return; 223 228 } 229 224 230 if (empty($rules_show) || $anyMatch($rules_show)) { 225 231 $this->render_banner($banner); -
cookie-optimizer/tags/1.0.6/app/Services/CookiePermissionService.php
r3309701 r3347352 176 176 'position' => '', 177 177 'animation' => '', 178 'target' => '_blank' 178 'target' => '_blank', 179 'hidden' => false 179 180 ]; 180 181 -
cookie-optimizer/tags/1.0.6/constants.php
r3346842 r3347352 2 2 3 3 // Plugin version and mode 4 define('VERSION', '1.0. 5');4 define('VERSION', '1.0.6'); 5 5 6 6 // Plugin directory details -
cookie-optimizer/tags/1.0.6/cookie-opt.php
r3346842 r3347352 12 12 * Plugin URI: https://manage.medipartner.jp 13 13 * Description: Cookieをユーザーに見える化し、各法律にする準拠バナー同意ソリューション 14 * Version: 1.0. 514 * Version: 1.0.6 15 15 * Requires at least: 5.3 16 16 * Requires PHP: 7.3 … … 51 51 * 52 52 * @class CookieOpt 53 * @version 1.0. 553 * @version 1.0.6 54 54 */ 55 55 class CookieOpt … … 76 76 */ 77 77 public $defaults = [ 78 'version' => '1.0. 5',78 'version' => '1.0.6', 79 79 ]; 80 80 -
cookie-optimizer/tags/1.0.6/readme.txt
r3346842 r3347352 5 5 Requires PHP: 7.3 6 6 Tested up to: 6.7 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 65 65 == Changelog == 66 66 67 = 1.0. 5=67 = 1.0.6 = 68 68 Initial release 69 69 -
cookie-optimizer/tags/1.0.6/templates/banner/banner_main.php
r3304586 r3347352 11 11 ?> 12 12 13 <div class="modal <?php $this->propClass($data[' display'], true, 'coop-display--none') ?>">13 <div class="modal <?php $this->propClass($data['hidden'], true, 'coop-display--none') ?>"> 14 14 <input id="none_view" type="hidden" name="none" value="<?php echo esc_attr($none); ?>"> 15 <input id="display_banner" hidden value="<?php echo $data[' display'] == 0 ? 'show' : 'hide' ?>">15 <input id="display_banner" hidden value="<?php echo $data['hidden'] == true ? 'hide' : 'show' ?>"> 16 16 17 17 <div data-banner="banner-main" class="coop-banner <?php echo esc_attr($data['position']) ?>" -
cookie-optimizer/tags/1.0.6/uninstall.php
r3346842 r3347352 19 19 * 20 20 * @link https://cookieoptimizer.net 21 * @since 1.0. 521 * @since 1.0.6 22 22 * 23 23 * @package Cookie Optimizer -
cookie-optimizer/trunk/app/Includes/CookieOptBanner.php
r3346842 r3347352 26 26 $package_user = $package->packageType(); 27 27 if ($package_user !== 'LOCK' && !$package->checkLimitPackage()) { 28 add_action('template_redirect', [$this, 'prepare_cookie_and_banner_logic'], 0);29 28 add_action('wp_enqueue_scripts', [$this, 'register_enqueue_script']); 30 29 if (function_exists('wp_body_open')) { … … 107 106 108 107 $expires = ($type === 3) ? 0 : time() + (365 * 24 * 60 * 60); // 1 year 109 110 setcookie(COOKIE_OPT_NAME, $cookie_value, $expires, "/"); 108 $options = [ 109 'expires' => $expires, 110 'path' => '/', 111 'domain' => '', 112 'secure' => false, 113 'httponly' => false, 114 'samesite' => 'Lax', 115 ]; 116 117 setcookie(COOKIE_OPT_NAME, wp_unslash($cookie_value), $options); 111 118 112 119 wp_send_json_success([ … … 157 164 } 158 165 159 public function prepare_cookie_and_banner_logic(){ 160 if (is_admin() || is_feed() || is_robots() || (defined('REST_REQUEST') && REST_REQUEST)) { 161 return; 162 } 163 164 $cookieRaw = $_COOKIE[COOKIE_OPT_NAME] ?? null; 165 $dataCookie = null; 166 167 if ($cookieRaw) { 168 $decoded = urldecode(wp_unslash($cookieRaw)); 169 $dataCookie = json_decode($decoded, true); 170 } 171 172 if (!is_array($dataCookie) || !isset($dataCookie['action'])) { 173 $banner = $this->CookiePermissionService->getDataBannerToShow(); 174 $array = [ 166 public function my_banner_in_content() 167 { 168 $is_banner_active = get_option('cookie_opt_banner_active'); 169 if ($is_banner_active != 1) 170 return null; 171 172 $banner = $this->CookiePermissionService->getDataBannerToShow(); 173 174 $cookie_raw = $_COOKIE[COOKIE_OPT_NAME] ?? null; 175 $data_cookie = null; 176 177 if ($cookie_raw) { 178 $decoded = urldecode(wp_unslash($cookie_raw)); 179 $data_cookie = json_decode($decoded, true); 180 } 181 182 if (!is_array($data_cookie) || !isset($data_cookie['action'])) { 183 $data_cookie = [ 175 184 'action' => 0, 176 185 'type' => $banner['regulation'] === 'ja' ? '1' : '', … … 189 198 'samesite' => 'Lax', 190 199 ]; 191 setcookie(COOKIE_OPT_NAME, wp_json_encode($array), $options); 192 } 193 } 194 195 public function my_banner_in_content() 196 { 197 $is_banner_active = get_option('cookie_opt_banner_active'); 198 if ($is_banner_active != 1) 199 return null; 200 201 $banner = $this->CookiePermissionService->getDataBannerToShow(); 200 201 setcookie(COOKIE_OPT_NAME, wp_json_encode($data_cookie), $options); 202 } 203 204 if ($data_cookie['action'] == 1) { 205 return; 206 } 202 207 203 208 $condition_status = (bool)($banner['conditional']['status'] ?? false); … … 222 227 return; 223 228 } 229 224 230 if (empty($rules_show) || $anyMatch($rules_show)) { 225 231 $this->render_banner($banner); -
cookie-optimizer/trunk/app/Services/CookiePermissionService.php
r3309701 r3347352 176 176 'position' => '', 177 177 'animation' => '', 178 'target' => '_blank' 178 'target' => '_blank', 179 'hidden' => false 179 180 ]; 180 181 -
cookie-optimizer/trunk/constants.php
r3346842 r3347352 2 2 3 3 // Plugin version and mode 4 define('VERSION', '1.0. 5');4 define('VERSION', '1.0.6'); 5 5 6 6 // Plugin directory details -
cookie-optimizer/trunk/cookie-opt.php
r3346842 r3347352 12 12 * Plugin URI: https://manage.medipartner.jp 13 13 * Description: Cookieをユーザーに見える化し、各法律にする準拠バナー同意ソリューション 14 * Version: 1.0. 514 * Version: 1.0.6 15 15 * Requires at least: 5.3 16 16 * Requires PHP: 7.3 … … 51 51 * 52 52 * @class CookieOpt 53 * @version 1.0. 553 * @version 1.0.6 54 54 */ 55 55 class CookieOpt … … 76 76 */ 77 77 public $defaults = [ 78 'version' => '1.0. 5',78 'version' => '1.0.6', 79 79 ]; 80 80 -
cookie-optimizer/trunk/readme.txt
r3346842 r3347352 5 5 Requires PHP: 7.3 6 6 Tested up to: 6.7 7 Stable tag: 1.0. 57 Stable tag: 1.0.6 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 65 65 == Changelog == 66 66 67 = 1.0. 5=67 = 1.0.6 = 68 68 Initial release 69 69 -
cookie-optimizer/trunk/templates/banner/banner_main.php
r3304586 r3347352 11 11 ?> 12 12 13 <div class="modal <?php $this->propClass($data[' display'], true, 'coop-display--none') ?>">13 <div class="modal <?php $this->propClass($data['hidden'], true, 'coop-display--none') ?>"> 14 14 <input id="none_view" type="hidden" name="none" value="<?php echo esc_attr($none); ?>"> 15 <input id="display_banner" hidden value="<?php echo $data[' display'] == 0 ? 'show' : 'hide' ?>">15 <input id="display_banner" hidden value="<?php echo $data['hidden'] == true ? 'hide' : 'show' ?>"> 16 16 17 17 <div data-banner="banner-main" class="coop-banner <?php echo esc_attr($data['position']) ?>" -
cookie-optimizer/trunk/uninstall.php
r3346842 r3347352 19 19 * 20 20 * @link https://cookieoptimizer.net 21 * @since 1.0. 521 * @since 1.0.6 22 22 * 23 23 * @package Cookie Optimizer
Note: See TracChangeset
for help on using the changeset viewer.