Plugin Directory

Changeset 3661854


Ignore:
Timestamp:
08/23/2026 12:53:56 PM (2 months ago)
Author:
saigamo
Message:

Version 1.2.0: optional milestone popup, bilingual readme (WP timezone), plugin assets (icon/banner/screenshots)

Location:
astrowave-simple-visit-counter
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • astrowave-simple-visit-counter/trunk/astrowave-simple-visit-counter.php

    r3629633 r3661854  
    33 * Plugin Name: Astrowave Simple Visit Counter
    44 * Plugin URI: https://wordpress.org/plugins/astrowave-simple-visit-counter/
    5  * Description: 超軽量アクセスカウンター。DB不要・Cookie二重カウント防止・Bot排除・夜中0時リセット。ウィジェットまたはショートコードで設置できます。
    6  * Version: 1.1.0
     5 * 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
    77 * Author: Saigamo
    88 * Author URI: https://astrowave.jp/
    … …  
    1717
    1818// 定数の定義
    19 define('ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION', '1.1.0');
     19define('ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION', '1.2.0');
    2020define('ASTROWAVE_SIMPLE_VISIT_COUNTER_DIR', plugin_dir_path(__FILE__));
    2121define('ASTROWAVE_SIMPLE_VISIT_COUNTER_URL', plugin_dir_url(__FILE__));
    … …  
    6565    $cookieName = "astrowave_simple_visit_counter_visited";
    6666    $hasVisitedToday = isset($_COOKIE[$cookieName]);
     67    $did_increment = false;
    6768
    6869    // Botではなく、今日まだカウントされていない場合のみカウントアップ
    … …  
    7879        $tal++;
    7980        $tday++;
     81        $did_increment = true;
    8082
    8183        // カウンターデータを保存
    … …  
    120122    }
    121123
     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
    122129    return array(
    123130        'total' => $tal,
    124131        'today' => $tday,
    125132        'yesterday' => $yday,
     133        'is_milestone' => $is_milestone,
     134        'milestone' => $milestone,
    126135    );
    127136}
    … …  
    175184    wp_enqueue_script('astrowave-simple-visit-counter-ajax', ASTROWAVE_SIMPLE_VISIT_COUNTER_URL . 'js/counter-ajax.js', array(), ASTROWAVE_SIMPLE_VISIT_COUNTER_VERSION, true);
    176185   
    177     // AjaxのURLをJavaScriptに渡す
     186    // AjaxのURLとキリ番ポップアップ用データをJavaScriptに渡す
    178187    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'),
    181192    ));
    182193
    … …  
    217228    }
    218229
    219     // フロント表示
     230    // フロント表示(昨日/今日の表示は設定画面の値に従う)
    220231    public function widget($args, $instance) {
    221232        $title = !empty($instance['title']) ? $instance['title'] : '';
    222         $show_daily = !empty($instance['show_daily']) ? 'true' : 'false';
    223233
    224234        echo $args['before_widget'];
    … …  
    226236            echo $args['before_title'] . esc_html($title) . $args['after_title'];
    227237        }
    228         echo astrowave_simple_visit_counter_render(array('show_daily' => $show_daily));
     238        echo astrowave_simple_visit_counter_render();
    229239        echo $args['after_widget'];
    230240    }
    … …  
    233243    public function form($instance) {
    234244        $title = isset($instance['title']) ? $instance['title'] : '';
    235         $show_daily = isset($instance['show_daily']) ? (bool) $instance['show_daily'] : true;
    236245        ?>
    237246        <p>
    … …  
    239248            <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="例: アクセスカウンター">
    240249        </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>
    245251        <?php
    246252    }
    … …  
    250256        $instance = array();
    251257        $instance['title'] = sanitize_text_field($new_instance['title']);
    252         $instance['show_daily'] = !empty($new_instance['show_daily']) ? 1 : 0;
    253258        return $instance;
    254259    }
    … …  
    323328        $sanitized['digits'] = absint($input['digits']);
    324329    }
    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']);
    328332    if (isset($input['font_type'])) {
    329333        $sanitized['font_type'] = sanitize_text_field($input['font_type']);
    … …  
    332336        $sanitized['google_font'] = sanitize_text_field($input['google_font']);
    333337    }
     338    // キリ番(0 または空 = 無効)
     339    $sanitized['milestone'] = isset($input['milestone']) ? absint($input['milestone']) : 0;
    334340    return $sanitized;
    335341}
    … …  
    341347    $google_font = isset($options['google_font']) ? $options['google_font'] : '';
    342348    $digits = isset($options['digits']) ? intval($options['digits']) : 5;
     349    $milestone = isset($options['milestone']) ? absint($options['milestone']) : 0;
    343350
    344351    // 現在のカウント値を取得(表示のみ、カウントアップはしない)
    … …  
    441448                        <label>
    442449                            <input type="checkbox" name="astrowave_simple_visit_counter_options[show_daily]" value="1" <?php checked($show_daily); ?>>
    443                             「昨日○人 今日○人」をデフォルトで表示する
     450                            「昨日○人 今日○人」を表示する
    444451                        </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>
    446460                    </td>
    447461                </tr>
    … …  
    479493                    <th>ショートコード</th>
    480494                    <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> — 昨日/今日を強制非表示
    483498                    </td>
    484499                </tr>
  • astrowave-simple-visit-counter/trunk/css/counter-style.css

    r3629633 r3661854  
    2828    margin: 0 2px;
    2929}
     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  
    5151                    counter.classList.remove('astrowave-simple-visit-counter-loading');
    5252                });
     53
     54                // キリ番ポップアップ(ちょうどその番号になった訪問者のみ)
     55                if (counts.is_milestone) {
     56                    astrowaveSimpleVisitCounterShowMilestone(counts.total, counts.milestone);
     57                }
    5358            }
    5459        }
    … …  
    5863    xhr.send('action=astrowave_simple_visit_counter_get_counts&nonce=' + encodeURIComponent(astrowaveSimpleVisitCounterData.nonce));
    5964});
     65
     66/**
     67 * キリ番お祝いポップアップを表示
     68 */
     69function 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="閉じる">&times;</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 */
     133function 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
     193function escapeHtml(str) {
     194    return String(str)
     195        .replace(/&/g, '&amp;')
     196        .replace(/</g, '&lt;')
     197        .replace(/>/g, '&gt;')
     198        .replace(/"/g, '&quot;');
     199}
  • astrowave-simple-visit-counter/trunk/readme.txt

    r3629633 r3661854  
    33Tags: counter, access counter, visitor counter, widget, lightweight
    44Requires at least: 5.0
    5 Tested up to: 7.0
     5Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 超軽量アクセスカウンター。DB不要・Cookie二重カウント防止・Bot排除・日本時間夜中0時リセット。
     11Lightweight visitor counter. No DB, cookie dedupe, bot filter, midnight reset by WP timezone.
    1212
    1313== 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
     301. Activate the plugin
     312. Appearance → Widgets → add “Astrowave Simple Visit Counter”
     323. Or use the shortcode `[astrowave_simple_visit_counter]`
     334. Toggle yesterday/today in Settings → Astrowave Simple Visit Counter
     345. (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---
    1443
    1544**Astrowave Simple Visit Counter** は、データベースを一切使わない超軽量なアクセスカウンタープラグインです。
    … …  
    2150* **Cookie二重カウント防止**: 同じ人が何回リロードしても、1日1回しかカウントされません。
    2251* **Bot排除**: Google、Yahoo、Bingなどの有名な検索クローラーを自動で除外します。
    23 * **夜中0時リセット**: 日本時間(JST)の夜中0時に「今日」のカウントがリセットされます。
     52* **夜中0時リセット**: WordPressのタイムゾーン設定(設定 → 一般 → タイムゾーン)に従い、そのタイムゾーンの夜中0時に「今日」のカウントがリセットされます。日本向けサイトで `Asia/Tokyo` にしていれば、従来どおり日本時間(JST)の0時です。世界のどこからでも、サイトのタイムゾーン設定に合わせて動作します。
    2453* **バックアップ機能**: 万が一のデータ破損に備えて、自動バックアップを行います。
     54* **キリ番ポップアップ(任意)**: 設定した合計数になった訪問者だけにお祝い表示+画像保存。空欄でOFF(デフォルト無効)。
    2555* **GDPR安全**: 使用するCookieは「機能上必須なCookie(エッセンシャルCookie)」のため、同意バナー不要です。
    2656
    … …  
    30602. 外観 → ウィジェット → 「Astrowave Simple Visit Counter」をサイドバーに追加
    31613. または、投稿・固定ページに `[astrowave_simple_visit_counter]` ショートコードを記述
     624. 「昨日○人 今日○人」の表示は、設定 → Astrowave Simple Visit Counter で一括ON/OFF
     635. (任意)同じ設定画面でキリ番の数字を入れると、ちょうどその数になった訪問者にポップアップを表示
    3264
    3365= ショートコード =
    3466
    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"]` — 昨日/今日を強制非表示
    3770
    38 = フォント設定 =
     71= フォント設定 / Fonts =
    3972
    4073デフォルトでは同梱の「Orbitron」フォント(宇宙風デジタルフォント)が使用されます。
    4174設定 → Astrowave Simple Visit Counter から、お好みのGoogle Fontsに変更することもできます。
    4275
     76Default font is bundled Orbitron. You can switch to a Google Font from the settings screen.
     77
    4378== Installation ==
     79
     801. Upload the `astrowave-simple-visit-counter` folder to `/wp-content/plugins/`.
     812. Activate “Astrowave Simple Visit Counter” from Plugins.
     823. Add the widget under Appearance → Widgets (or use the shortcode).
     83
     84日本語:
    4485
    45861. `astrowave-simple-visit-counter` フォルダを `/wp-content/plugins/` にアップロードします。
    … …  
    4990== Frequently Asked Questions ==
    5091
    51 = データベースは使いますか? =
     92= Does midnight reset use Japan time (JST)? =
     93
     94No 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
     102No. Counts are stored in `wp-content/uploads/astrowave-simple-visit-counter/data.dat`.
    52103
    53104いいえ、一切使いません。カウントデータは `wp-content/uploads/astrowave-simple-visit-counter/data.dat` にテキストで保存されます。
    54105
    55 = Cookieの同意バナーは必要ですか? =
     106= Do I need a cookie consent banner? / Cookieの同意バナーは必要ですか? =
     107
     108The 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.
    56109
    57110このプラグインが使用するCookieは、「今日カウントしたか」を示す単純なフラグ(値は "1" のみ)です。個人を特定・追跡するものではないため、GDPR/ePrivacy指令における「機能上必須なCookie」に該当し、同意バナーなしで使用できます。
    58111
    59 = カウンターのデザインを変えたいです =
     112= Can I customize the design? / カウンターのデザインを変えたいです =
     113
     114Override CSS classes `.astrowave-simple-visit-counter-wrap`, `.astrowave-simple-visit-counter-total`, `.astrowave-simple-visit-counter-daily`.
    60115
    61116CSSクラス `.astrowave-simple-visit-counter-wrap`、`.astrowave-simple-visit-counter-total`、`.astrowave-simple-visit-counter-daily` をテーマのCSSで上書きすることで自由にカスタマイズできます。
    62117
     118= Hide yesterday/today on specific pages only? / 特定のページだけ昨日/今日を隠したいです =
     119
     120Settings 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
     128Set 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
    63132== Screenshots ==
    64133
    65 1. フロント表示(デフォルトのOrbitronフォント)
    66 2. 管理画面の設定ページ
    67 3. ウィジェット設定
     1341. Front-end display (default Orbitron font) / フロント表示
     1352. Settings page / 管理画面の設定ページ
     1363. Milestone popup / キリ番ポップアップ
    68137
    69138== 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)
    70149
    71150= 1.1.0 =
    … …  
    77156* Cookie二重カウント防止
    78157* Bot排除機能
    79 * 日本時間夜中0時リセット
     158* 夜中0時リセット(WordPressタイムゾーン準拠)
    80159* ウィジェット&ショートコード対応
    81160* Google Fonts カスタムフォント対応
Note: See TracChangeset for help on using the changeset viewer.