Changeset 3661854
- Timestamp:
- 08/23/2026 12:53:56 PM (2 months ago)
- Location:
- astrowave-simple-visit-counter
- Files:
-
- 7 added
- 4 edited
-
assets/banner-1544x500.jpg (added)
-
assets/banner-772x250.jpg (added)
-
assets/icon-128x128.jpg (added)
-
assets/icon-256x256.jpg (added)
-
assets/screenshot-1.jpg (added)
-
assets/screenshot-2.jpg (added)
-
assets/screenshot-3.jpg (added)
-
trunk/astrowave-simple-visit-counter.php (modified) (16 diffs)
-
trunk/css/counter-style.css (modified) (1 diff)
-
trunk/js/counter-ajax.js (modified) (2 diffs)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
astrowave-simple-visit-counter/trunk/astrowave-simple-visit-counter.php
r3629633 r3661854 3 3 * Plugin Name: Astrowave Simple Visit Counter 4 4 * Plugin URI: https://wordpress.org/plugins/astrowave-simple-visit-counter/ 5 * Description: 超軽量アクセスカウンター。DB不要・Cookie二重カウント防止・Bot排除・夜中0時リセット。ウィジェットまたはショートコードで設置できます。6 * Version: 1. 1.05 * Description: Ultra-lightweight visitor counter. No DB, cookie dedupe, bot filter, midnight reset by WP timezone. / 超軽量アクセスカウンター。DB不要・Cookie二重カウント防止・Bot排除・夜中0時リセット(WPタイムゾーン準拠)。 6 * Version: 1.2.0 7 7 * Author: Saigamo 8 8 * Author URI: https://astrowave.jp/ … … 17 17 18 18 // 定数の定義 19 define('ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION', '1. 1.0');19 define('ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION', '1.2.0'); 20 20 define('ASTROWAVE_SIMPLE_VISIT_COUNTER_DIR', plugin_dir_path(__FILE__)); 21 21 define('ASTROWAVE_SIMPLE_VISIT_COUNTER_URL', plugin_dir_url(__FILE__)); … … 65 65 $cookieName = "astrowave_simple_visit_counter_visited"; 66 66 $hasVisitedToday = isset($_COOKIE[$cookieName]); 67 $did_increment = false; 67 68 68 69 // Botではなく、今日まだカウントされていない場合のみカウントアップ … … 78 79 $tal++; 79 80 $tday++; 81 $did_increment = true; 80 82 81 83 // カウンターデータを保存 … … 120 122 } 121 123 124 // キリ番判定(ちょうどその番号になった訪問者のみ) 125 $options = get_option('astrowave_simple_visit_counter_options', array()); 126 $milestone = isset($options['milestone']) ? absint($options['milestone']) : 0; 127 $is_milestone = ($did_increment && $milestone > 0 && $tal === $milestone); 128 122 129 return array( 123 130 'total' => $tal, 124 131 'today' => $tday, 125 132 'yesterday' => $yday, 133 'is_milestone' => $is_milestone, 134 'milestone' => $milestone, 126 135 ); 127 136 } … … 175 184 wp_enqueue_script('astrowave-simple-visit-counter-ajax', ASTROWAVE_SIMPLE_VISIT_COUNTER_URL . 'js/counter-ajax.js', array(), ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION, true); 176 185 177 // AjaxのURL をJavaScriptに渡す186 // AjaxのURLとキリ番ポップアップ用データをJavaScriptに渡す 178 187 wp_localize_script('astrowave-simple-visit-counter-ajax', 'astrowaveSimpleVisitCounterData', array( 179 'ajax_url' => admin_url('admin-ajax.php'), 180 'nonce' => wp_create_nonce('astrowave_simple_visit_counter_ajax_nonce') 188 'ajax_url' => admin_url('admin-ajax.php'), 189 'nonce' => wp_create_nonce('astrowave_simple_visit_counter_ajax_nonce'), 190 'site_name' => get_bloginfo('name'), 191 'date' => current_time('Y/m/d H:i'), 181 192 )); 182 193 … … 217 228 } 218 229 219 // フロント表示 230 // フロント表示(昨日/今日の表示は設定画面の値に従う) 220 231 public function widget($args, $instance) { 221 232 $title = !empty($instance['title']) ? $instance['title'] : ''; 222 $show_daily = !empty($instance['show_daily']) ? 'true' : 'false';223 233 224 234 echo $args['before_widget']; … … 226 236 echo $args['before_title'] . esc_html($title) . $args['after_title']; 227 237 } 228 echo astrowave_simple_visit_counter_render( array('show_daily' => $show_daily));238 echo astrowave_simple_visit_counter_render(); 229 239 echo $args['after_widget']; 230 240 } … … 233 243 public function form($instance) { 234 244 $title = isset($instance['title']) ? $instance['title'] : ''; 235 $show_daily = isset($instance['show_daily']) ? (bool) $instance['show_daily'] : true;236 245 ?> 237 246 <p> … … 239 248 <input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" placeholder="例: アクセスカウンター"> 240 249 </p> 241 <p> 242 <input type="checkbox" id="<?php echo esc_attr($this->get_field_id('show_daily')); ?>" name="<?php echo esc_attr($this->get_field_name('show_daily')); ?>" value="1" <?php checked($show_daily); ?>> 243 <label for="<?php echo esc_attr($this->get_field_id('show_daily')); ?>">「昨日○人 今日○人」を表示する</label> 244 </p> 250 <p class="description">「昨日○人 今日○人」の表示は、設定 → Astrowave Simple Visit Counter で一括ON/OFFできます。</p> 245 251 <?php 246 252 } … … 250 256 $instance = array(); 251 257 $instance['title'] = sanitize_text_field($new_instance['title']); 252 $instance['show_daily'] = !empty($new_instance['show_daily']) ? 1 : 0;253 258 return $instance; 254 259 } … … 323 328 $sanitized['digits'] = absint($input['digits']); 324 329 } 325 if (isset($input['show_daily'])) { 326 $sanitized['show_daily'] = (bool) $input['show_daily']; 327 } 330 // チェックボックスは未チェック時に送信されないため、明示的に false を保存する 331 $sanitized['show_daily'] = !empty($input['show_daily']); 328 332 if (isset($input['font_type'])) { 329 333 $sanitized['font_type'] = sanitize_text_field($input['font_type']); … … 332 336 $sanitized['google_font'] = sanitize_text_field($input['google_font']); 333 337 } 338 // キリ番(0 または空 = 無効) 339 $sanitized['milestone'] = isset($input['milestone']) ? absint($input['milestone']) : 0; 334 340 return $sanitized; 335 341 } … … 341 347 $google_font = isset($options['google_font']) ? $options['google_font'] : ''; 342 348 $digits = isset($options['digits']) ? intval($options['digits']) : 5; 349 $milestone = isset($options['milestone']) ? absint($options['milestone']) : 0; 343 350 344 351 // 現在のカウント値を取得(表示のみ、カウントアップはしない) … … 441 448 <label> 442 449 <input type="checkbox" name="astrowave_simple_visit_counter_options[show_daily]" value="1" <?php checked($show_daily); ?>> 443 「昨日○人 今日○人」を デフォルトで表示する450 「昨日○人 今日○人」を表示する 444 451 </label> 445 <p class="description">※ウィジェットごとに個別にON/OFFすることもできます。</p> 452 <p class="description">ウィジェット・ショートコードの両方に反映されます。ページごとの表示制御はテーマのCSSで行ってください(例: <code>.home .astrowave-simple-visit-counter-daily { display: none; }</code>)。</p> 453 </td> 454 </tr> 455 <tr> 456 <th>キリ番ポップアップ</th> 457 <td> 458 <input type="number" name="astrowave_simple_visit_counter_options[milestone]" value="<?php echo esc_attr($milestone ? $milestone : ''); ?>" min="0" step="1" style="width: 140px;" placeholder="例: 100000"> 459 <p class="description">合計カウントがこの数字になった訪問者だけに、お祝いポップアップを表示します。<strong>空欄または 0 で無効</strong>(デフォルトOFF)。テストするときは「現在の合計 + 1」を入れて、別ブラウザ/シークレットでアクセスしてください。</p> 446 460 </td> 447 461 </tr> … … 479 493 <th>ショートコード</th> 480 494 <td> 481 <code>[astrowave_simple_visit_counter]</code> — 合計のみ表示<br> 482 <code>[astrowave_simple_visit_counter show_daily="true"]</code> — 昨日/今日も表示 495 <code>[astrowave_simple_visit_counter]</code> — 設定画面の表示設定に従う<br> 496 <code>[astrowave_simple_visit_counter show_daily="true"]</code> — 昨日/今日を強制表示<br> 497 <code>[astrowave_simple_visit_counter show_daily="false"]</code> — 昨日/今日を強制非表示 483 498 </td> 484 499 </tr> -
astrowave-simple-visit-counter/trunk/css/counter-style.css
r3629633 r3661854 28 28 margin: 0 2px; 29 29 } 30 31 /* ============================================================ 32 キリ番ポップアップ(オプション・デフォルトOFF) 33 ============================================================ */ 34 35 .astrowave-svc-milestone-overlay { 36 position: fixed; 37 inset: 0; 38 z-index: 999999; 39 display: flex; 40 align-items: center; 41 justify-content: center; 42 padding: 20px; 43 background: rgba(10, 14, 39, 0.72); 44 opacity: 0; 45 transition: opacity 0.2s ease; 46 box-sizing: border-box; 47 } 48 49 .astrowave-svc-milestone-overlay.is-visible { 50 opacity: 1; 51 } 52 53 .astrowave-svc-milestone-modal { 54 position: relative; 55 width: 100%; 56 max-width: 400px; 57 padding: 28px 24px 24px; 58 border-radius: 12px; 59 background: #12182e; 60 color: #fff; 61 text-align: center; 62 box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45); 63 transform: translateY(8px); 64 transition: transform 0.2s ease; 65 } 66 67 .astrowave-svc-milestone-overlay.is-visible .astrowave-svc-milestone-modal { 68 transform: translateY(0); 69 } 70 71 .astrowave-svc-milestone-close { 72 position: absolute; 73 top: 8px; 74 right: 12px; 75 border: 0; 76 background: transparent; 77 color: rgba(255, 255, 255, 0.65); 78 font-size: 28px; 79 line-height: 1; 80 cursor: pointer; 81 padding: 4px 8px; 82 } 83 84 .astrowave-svc-milestone-close:hover { 85 color: #fff; 86 } 87 88 .astrowave-svc-milestone-card { 89 padding: 20px 16px; 90 margin-bottom: 16px; 91 border-radius: 8px; 92 background: linear-gradient(145deg, #0a0e27 0%, #1a1040 50%, #0d1b2a 100%); 93 border: 1px solid rgba(255, 255, 255, 0.12); 94 } 95 96 .astrowave-svc-milestone-label { 97 margin: 0 0 8px; 98 font-size: 0.85em; 99 letter-spacing: 0.12em; 100 opacity: 0.75; 101 } 102 103 .astrowave-svc-milestone-number { 104 margin: 0 0 12px; 105 font-size: 2.8em; 106 font-weight: 700; 107 letter-spacing: 0.04em; 108 line-height: 1.1; 109 } 110 111 .astrowave-svc-milestone-site { 112 margin: 0 0 4px; 113 font-size: 1em; 114 opacity: 0.9; 115 } 116 117 .astrowave-svc-milestone-date { 118 margin: 0; 119 font-size: 0.8em; 120 opacity: 0.55; 121 } 122 123 .astrowave-svc-milestone-msg { 124 margin: 0 0 20px; 125 font-size: 0.95em; 126 line-height: 1.5; 127 } 128 129 .astrowave-svc-milestone-actions { 130 display: flex; 131 gap: 10px; 132 justify-content: center; 133 flex-wrap: wrap; 134 } 135 136 .astrowave-svc-milestone-save, 137 .astrowave-svc-milestone-dismiss { 138 border: 0; 139 border-radius: 6px; 140 padding: 10px 18px; 141 font-size: 0.9em; 142 cursor: pointer; 143 } 144 145 .astrowave-svc-milestone-save { 146 background: #5b8def; 147 color: #fff; 148 } 149 150 .astrowave-svc-milestone-save:hover { 151 background: #4a7ad8; 152 } 153 154 .astrowave-svc-milestone-dismiss { 155 background: rgba(255, 255, 255, 0.12); 156 color: #fff; 157 } 158 159 .astrowave-svc-milestone-dismiss:hover { 160 background: rgba(255, 255, 255, 0.2); 161 } -
astrowave-simple-visit-counter/trunk/js/counter-ajax.js
r3629633 r3661854 51 51 counter.classList.remove('astrowave-simple-visit-counter-loading'); 52 52 }); 53 54 // キリ番ポップアップ(ちょうどその番号になった訪問者のみ) 55 if (counts.is_milestone) { 56 astrowaveSimpleVisitCounterShowMilestone(counts.total, counts.milestone); 57 } 53 58 } 54 59 } … … 58 63 xhr.send('action=astrowave_simple_visit_counter_get_counts&nonce=' + encodeURIComponent(astrowaveSimpleVisitCounterData.nonce)); 59 64 }); 65 66 /** 67 * キリ番お祝いポップアップを表示 68 */ 69 function astrowaveSimpleVisitCounterShowMilestone(total, milestone) { 70 if (document.getElementById('astrowave-svc-milestone-overlay')) { 71 return; 72 } 73 74 var siteName = (astrowaveSimpleVisitCounterData && astrowaveSimpleVisitCounterData.site_name) || ''; 75 var dateStr = (astrowaveSimpleVisitCounterData && astrowaveSimpleVisitCounterData.date) || ''; 76 var displayNum = String(total); 77 78 var overlay = document.createElement('div'); 79 overlay.id = 'astrowave-svc-milestone-overlay'; 80 overlay.className = 'astrowave-svc-milestone-overlay'; 81 overlay.setAttribute('role', 'dialog'); 82 overlay.setAttribute('aria-modal', 'true'); 83 overlay.setAttribute('aria-labelledby', 'astrowave-svc-milestone-title'); 84 85 overlay.innerHTML = 86 '<div class="astrowave-svc-milestone-modal">' + 87 '<button type="button" class="astrowave-svc-milestone-close" aria-label="閉じる">×</button>' + 88 '<div class="astrowave-svc-milestone-card" id="astrowave-svc-milestone-card">' + 89 '<p class="astrowave-svc-milestone-label">キリ番達成</p>' + 90 '<p id="astrowave-svc-milestone-title" class="astrowave-svc-milestone-number">' + displayNum + '</p>' + 91 '<p class="astrowave-svc-milestone-site">' + escapeHtml(siteName) + '</p>' + 92 '<p class="astrowave-svc-milestone-date">' + escapeHtml(dateStr) + '</p>' + 93 '</div>' + 94 '<p class="astrowave-svc-milestone-msg">あなたが <strong>' + escapeHtml(displayNum) + '</strong> 人目の訪問者です!</p>' + 95 '<div class="astrowave-svc-milestone-actions">' + 96 '<button type="button" class="astrowave-svc-milestone-save">画像を保存</button>' + 97 '<button type="button" class="astrowave-svc-milestone-dismiss">閉じる</button>' + 98 '</div>' + 99 '</div>'; 100 101 document.body.appendChild(overlay); 102 103 // 表示アニメーション用 104 requestAnimationFrame(function() { 105 overlay.classList.add('is-visible'); 106 }); 107 108 function closeModal() { 109 overlay.classList.remove('is-visible'); 110 setTimeout(function() { 111 if (overlay.parentNode) { 112 overlay.parentNode.removeChild(overlay); 113 } 114 }, 200); 115 } 116 117 overlay.querySelector('.astrowave-svc-milestone-close').addEventListener('click', closeModal); 118 overlay.querySelector('.astrowave-svc-milestone-dismiss').addEventListener('click', closeModal); 119 overlay.addEventListener('click', function(e) { 120 if (e.target === overlay) { 121 closeModal(); 122 } 123 }); 124 125 overlay.querySelector('.astrowave-svc-milestone-save').addEventListener('click', function() { 126 astrowaveSimpleVisitCounterSaveImage(displayNum, siteName, dateStr); 127 }); 128 } 129 130 /** 131 * canvas で記念画像を生成してダウンロード 132 */ 133 function astrowaveSimpleVisitCounterSaveImage(num, siteName, dateStr) { 134 var canvas = document.createElement('canvas'); 135 var w = 720; 136 var h = 480; 137 canvas.width = w; 138 canvas.height = h; 139 var ctx = canvas.getContext('2d'); 140 141 // 背景(宇宙っぽいダークグラデ) 142 var grad = ctx.createLinearGradient(0, 0, w, h); 143 grad.addColorStop(0, '#0a0e27'); 144 grad.addColorStop(0.5, '#1a1040'); 145 grad.addColorStop(1, '#0d1b2a'); 146 ctx.fillStyle = grad; 147 ctx.fillRect(0, 0, w, h); 148 149 // 星っぽい点 150 ctx.fillStyle = 'rgba(255,255,255,0.35)'; 151 for (var i = 0; i < 40; i++) { 152 var x = (i * 97 + 13) % w; 153 var y = (i * 53 + 29) % h; 154 var r = (i % 3) + 0.5; 155 ctx.beginPath(); 156 ctx.arc(x, y, r, 0, Math.PI * 2); 157 ctx.fill(); 158 } 159 160 // ラベル 161 ctx.fillStyle = 'rgba(255,255,255,0.7)'; 162 ctx.font = '24px sans-serif'; 163 ctx.textAlign = 'center'; 164 ctx.fillText('キリ番達成', w / 2, 100); 165 166 // 数字 167 ctx.fillStyle = '#ffffff'; 168 ctx.font = 'bold 96px sans-serif'; 169 ctx.fillText(String(num), w / 2, 230); 170 171 // サイト名 172 ctx.fillStyle = 'rgba(255,255,255,0.85)'; 173 ctx.font = '28px sans-serif'; 174 ctx.fillText(siteName || '', w / 2, 300); 175 176 // 日時 177 ctx.fillStyle = 'rgba(255,255,255,0.55)'; 178 ctx.font = '20px sans-serif'; 179 ctx.fillText(dateStr || '', w / 2, 340); 180 181 // フッター 182 ctx.fillStyle = 'rgba(255,255,255,0.4)'; 183 ctx.font = '16px sans-serif'; 184 ctx.fillText('Astrowave Simple Visit Counter', w / 2, 430); 185 186 // ダウンロード 187 var link = document.createElement('a'); 188 link.download = 'milestone-' + String(num) + '.png'; 189 link.href = canvas.toDataURL('image/png'); 190 link.click(); 191 } 192 193 function escapeHtml(str) { 194 return String(str) 195 .replace(/&/g, '&') 196 .replace(/</g, '<') 197 .replace(/>/g, '>') 198 .replace(/"/g, '"'); 199 } -
astrowave-simple-visit-counter/trunk/readme.txt
r3629633 r3661854 3 3 Tags: counter, access counter, visitor counter, widget, lightweight 4 4 Requires at least: 5.0 5 Tested up to: 7. 05 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 超軽量アクセスカウンター。DB不要・Cookie二重カウント防止・Bot排除・日本時間夜中0時リセット。 11 Lightweight visitor counter. No DB, cookie dedupe, bot filter, midnight reset by WP timezone. 12 12 13 13 == Description == 14 15 **Astrowave Simple Visit Counter** is an ultra-lightweight visitor counter that stores data in a file — no database tables. 16 17 = Features = 18 19 * **Cache-friendly**: Uses Ajax so cached pages (e.g. WP Super Cache) still show live counts. 20 * **No database**: Counts are stored in a simple `.dat` file under uploads. 21 * **Cookie dedupe**: One count per visitor per day (reload-safe). 22 * **Bot filter**: Skips common search crawlers (Google, Yahoo, Bing, etc.). 23 * **Midnight reset**: Resets the “today” count at **00:00 in your WordPress timezone** (Settings → General → Timezone). Example: if the site timezone is `Asia/Tokyo`, it resets at midnight JST — not a hard-coded Japan-only clock. 24 * **Backup**: Occasional automatic backup of the count file. 25 * **Milestone popup (optional)**: Celebrate when the total hits a number you set. Empty / 0 = off (default). 26 * **GDPR-friendly**: Uses an essential functional cookie (flag only), not tracking. 27 28 = How to use = 29 30 1. Activate the plugin 31 2. Appearance → Widgets → add “Astrowave Simple Visit Counter” 32 3. Or use the shortcode `[astrowave_simple_visit_counter]` 33 4. Toggle yesterday/today in Settings → Astrowave Simple Visit Counter 34 5. (Optional) Set a milestone number on the same settings screen 35 36 = Shortcodes = 37 38 * `[astrowave_simple_visit_counter]` — follows settings 39 * `[astrowave_simple_visit_counter show_daily="true"]` — force yesterday/today 40 * `[astrowave_simple_visit_counter show_daily="false"]` — hide yesterday/today 41 42 --- 14 43 15 44 **Astrowave Simple Visit Counter** は、データベースを一切使わない超軽量なアクセスカウンタープラグインです。 … … 21 50 * **Cookie二重カウント防止**: 同じ人が何回リロードしても、1日1回しかカウントされません。 22 51 * **Bot排除**: Google、Yahoo、Bingなどの有名な検索クローラーを自動で除外します。 23 * **夜中0時リセット**: 日本時間(JST)の夜中0時に「今日」のカウントがリセットされます。52 * **夜中0時リセット**: WordPressのタイムゾーン設定(設定 → 一般 → タイムゾーン)に従い、そのタイムゾーンの夜中0時に「今日」のカウントがリセットされます。日本向けサイトで `Asia/Tokyo` にしていれば、従来どおり日本時間(JST)の0時です。世界のどこからでも、サイトのタイムゾーン設定に合わせて動作します。 24 53 * **バックアップ機能**: 万が一のデータ破損に備えて、自動バックアップを行います。 54 * **キリ番ポップアップ(任意)**: 設定した合計数になった訪問者だけにお祝い表示+画像保存。空欄でOFF(デフォルト無効)。 25 55 * **GDPR安全**: 使用するCookieは「機能上必須なCookie(エッセンシャルCookie)」のため、同意バナー不要です。 26 56 … … 30 60 2. 外観 → ウィジェット → 「Astrowave Simple Visit Counter」をサイドバーに追加 31 61 3. または、投稿・固定ページに `[astrowave_simple_visit_counter]` ショートコードを記述 62 4. 「昨日○人 今日○人」の表示は、設定 → Astrowave Simple Visit Counter で一括ON/OFF 63 5. (任意)同じ設定画面でキリ番の数字を入れると、ちょうどその数になった訪問者にポップアップを表示 32 64 33 65 = ショートコード = 34 66 35 * `[astrowave_simple_visit_counter]` — 合計カウントのみ表示 36 * `[astrowave_simple_visit_counter show_daily="true"]` — 「昨日○人 今日○人」も表示 67 * `[astrowave_simple_visit_counter]` — 設定画面の表示設定に従う 68 * `[astrowave_simple_visit_counter show_daily="true"]` — 昨日/今日も強制表示 69 * `[astrowave_simple_visit_counter show_daily="false"]` — 昨日/今日を強制非表示 37 70 38 = フォント設定 =71 = フォント設定 / Fonts = 39 72 40 73 デフォルトでは同梱の「Orbitron」フォント(宇宙風デジタルフォント)が使用されます。 41 74 設定 → Astrowave Simple Visit Counter から、お好みのGoogle Fontsに変更することもできます。 42 75 76 Default font is bundled Orbitron. You can switch to a Google Font from the settings screen. 77 43 78 == Installation == 79 80 1. Upload the `astrowave-simple-visit-counter` folder to `/wp-content/plugins/`. 81 2. Activate “Astrowave Simple Visit Counter” from Plugins. 82 3. Add the widget under Appearance → Widgets (or use the shortcode). 83 84 日本語: 44 85 45 86 1. `astrowave-simple-visit-counter` フォルダを `/wp-content/plugins/` にアップロードします。 … … 49 90 == Frequently Asked Questions == 50 91 51 = データベースは使いますか? = 92 = Does midnight reset use Japan time (JST)? = 93 94 No hard-coded JST. It follows **Settings → General → Timezone**. With `Asia/Tokyo`, that is midnight JST. With another timezone, it resets at that zone’s midnight. 95 96 = 夜中0時リセットは日本時間固定ですか? = 97 98 いいえ、固定ではありません。**設定 → 一般 → タイムゾーン** に従います。`Asia/Tokyo` なら日本時間の0時、それ以外のタイムゾーンならその地域の0時です。 99 100 = Does it use a database? / データベースは使いますか? = 101 102 No. Counts are stored in `wp-content/uploads/astrowave-simple-visit-counter/data.dat`. 52 103 53 104 いいえ、一切使いません。カウントデータは `wp-content/uploads/astrowave-simple-visit-counter/data.dat` にテキストで保存されます。 54 105 55 = Cookieの同意バナーは必要ですか? = 106 = Do I need a cookie consent banner? / Cookieの同意バナーは必要ですか? = 107 108 The cookie is an essential functional flag (“already counted today” = `"1"`), not tracking. Typically no consent banner is required for this use case under GDPR/ePrivacy essential-cookie rules. 56 109 57 110 このプラグインが使用するCookieは、「今日カウントしたか」を示す単純なフラグ(値は "1" のみ)です。個人を特定・追跡するものではないため、GDPR/ePrivacy指令における「機能上必須なCookie」に該当し、同意バナーなしで使用できます。 58 111 59 = カウンターのデザインを変えたいです = 112 = Can I customize the design? / カウンターのデザインを変えたいです = 113 114 Override CSS classes `.astrowave-simple-visit-counter-wrap`, `.astrowave-simple-visit-counter-total`, `.astrowave-simple-visit-counter-daily`. 60 115 61 116 CSSクラス `.astrowave-simple-visit-counter-wrap`、`.astrowave-simple-visit-counter-total`、`.astrowave-simple-visit-counter-daily` をテーマのCSSで上書きすることで自由にカスタマイズできます。 62 117 118 = Hide yesterday/today on specific pages only? / 特定のページだけ昨日/今日を隠したいです = 119 120 Settings are site-wide. Use theme CSS, e.g.: 121 122 `.home .astrowave-simple-visit-counter-daily { display: none; }` 123 124 設定画面はサイト全体のON/OFFです。ページごとの制御はテーマの追加CSSで行ってください。 125 126 = What is the milestone popup? / キリ番ポップアップとは? = 127 128 Set a target total (e.g. 100000). Only the visitor who reaches that exact number sees a celebration popup and can save an image. Empty or 0 disables it. For testing, set “current total + 1” and visit in another browser / private window. 129 130 設定画面で合計カウントの目標数字(例: 100000)を入れると、ちょうどその数になった訪問者だけにお祝いポップアップと「画像を保存」ボタンが表示されます。空欄または 0 のときは無効です。テスト時は「現在の合計 + 1」を設定し、別ブラウザ/シークレットウィンドウでアクセスしてください。 131 63 132 == Screenshots == 64 133 65 1. フロント表示(デフォルトのOrbitronフォント)66 2. 管理画面の設定ページ67 3. ウィジェット設定134 1. Front-end display (default Orbitron font) / フロント表示 135 2. Settings page / 管理画面の設定ページ 136 3. Milestone popup / キリ番ポップアップ 68 137 69 138 == Changelog == 139 140 = 1.2.0 = 141 * Added optional milestone popup (default OFF): celebrate when the total hits your number, with image save. 142 * Clarified that midnight reset follows the WordPress timezone (not hard-coded JST). 143 * キリ番ポップアップ(オプション・デフォルトOFF)を追加。 144 * 夜中0時リセットが WordPress のタイムゾーン設定に従う旨を説明に明記(JST固定ではない)。 145 146 = 1.1.1 = 147 * 「昨日/今日の表示」を設定画面の一括ON/OFFに統一(ウィジェット個別チェックを削除) 148 * WordPress 7.1 で動作確認(Tested up to: 7.1) 70 149 71 150 = 1.1.0 = … … 77 156 * Cookie二重カウント防止 78 157 * Bot排除機能 79 * 日本時間夜中0時リセット158 * 夜中0時リセット(WordPressタイムゾーン準拠) 80 159 * ウィジェット&ショートコード対応 81 160 * Google Fonts カスタムフォント対応
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)