Plugin Directory

Changeset 3430922


Ignore:
Timestamp:
01/02/2026 09:07:51 AM (7 weeks ago)
Author:
homio13
Message:

Update to version 3.0.7

Location:
calliope
Files:
114 added
11 edited

Legend:

Unmodified
Added
Removed
  • calliope/trunk/calliope.php

    r3430503 r3430922  
    44Plugin URI: https://wordpress.org/plugins/calliope/
    55Description: WordPress AI Contents Generator - Automatically generate high-quality content using AI technology
    6 Version: 3.0.6
     6Version: 3.0.7
    77Author: homio13
    88Author URI: https://profiles.wordpress.org/homio13/
     
    2626use Calliope\Utils\Logger;
    2727use Calliope\Utils\Utils;
     28use Calliope\Utils\Tracking;
    2829use Calliope\Database\Migration;
    2930use Calliope\Database\Seeds;
     
    7374    wp_schedule_event(time(), 'every_ten_minutes', 'calliope_cron_scheduler');
    7475  }
     76
     77  // GA4にプラグインインストールイベントを送信
     78  Tracking::plugin_install();
    7579}
    7680
     
    7983function calliope_plugin_deactivation()
    8084{
     85  // GA4にプラグインアンインストールイベントを送信
     86  Tracking::plugin_uninstall();
     87
    8188  // サブスクリプションの解約
    8289  $user = Utils::get_user();
  • calliope/trunk/readme-es.txt

    r3430503 r3430922  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 3.0.6
     7Stable tag: 3.0.7
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    128128== Changelog ==
    129129
     130= 3.0.7 =
     131* 🔒 **Seguridad**: Credenciales de API de Google CSE movidas al servidor para mayor seguridad
     132* 📊 **Análisis**: Añadido seguimiento de eventos GA4 para análisis de comportamiento del usuario
     133
    130134= 3.0.6 =
    131135* 🔧 **Corrección de Errores**: Añadido autoloader PSR-4 personalizado para corregir error de carga de clase durante la activación del plugin
  • calliope/trunk/readme-ja.txt

    r3430503 r3430922  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 3.0.6
     7Stable tag: 3.0.7
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    128128== Changelog ==
    129129
     130= 3.0.7 =
     131* 🔒 **セキュリティ**: Google CSE APIの認証情報をサーバーサイドに移動し、セキュリティを強化
     132* 📊 **分析**: ユーザー行動分析のためのGA4イベントトラッキングを追加
     133
    130134= 3.0.6 =
    131135* 🔧 **バグ修正**: プラグイン有効化時のクラス読み込みエラーを修正するため、独自PSR-4オートローダーを追加
  • calliope/trunk/readme.txt

    r3430503 r3430922  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 3.0.6
     7Stable tag: 3.0.7
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    128128== Changelog ==
    129129
     130= 3.0.7 =
     131* 🔒 **Security**: Moved Google CSE API credentials to server-side for enhanced security
     132* 📊 **Analytics**: Added GA4 event tracking for user behavior analysis
     133
    130134= 3.0.6 =
    131135* 🔧 **Bug Fix**: Added custom PSR-4 autoloader to fix class loading error during plugin activation
  • calliope/trunk/src/Admin/Pages/DashboardPage.php

    r3430503 r3430922  
    55use Calliope\Utils\Utils;
    66use Calliope\Utils\Logger;
     7use Calliope\Utils\Tracking;
    78use Calliope\Config\Config;
    89use Calliope\I18n\Translator;
     
    3031    {
    3132        global $wpdb;
     33
     34        // GA4にダッシュボード表示イベントを送信
     35        Tracking::dashboard_view();
    3236
    3337        /////// 全期間の投稿件数
  • calliope/trunk/src/Admin/Pages/FeedEditPage.php

    r3430503 r3430922  
    55use Calliope\Utils\Utils;
    66use Calliope\Utils\Logger;
     7use Calliope\Utils\Tracking;
    78use Calliope\Config\Config;
    89use Calliope\I18n\Translator;
     
    7374                if ($id == null || $id == '') {
    7475                    $id = FeedsRepository::insert($cols);
     76                    // GA4にフィード作成イベントを送信
     77                    Tracking::feed_create($id, $cols['keyword'] ?? '');
    7578                } else {
    7679                    FeedsRepository::update($id, $cols);
     80                    // GA4にフィード更新イベントを送信
     81                    Tracking::feed_update($id, $cols['keyword'] ?? '');
    7782                }
    7883            }
  • calliope/trunk/src/Admin/Pages/SettingPage.php

    r3430503 r3430922  
    55use Calliope\Utils\Utils;
    66use Calliope\Utils\Logger;
     7use Calliope\Utils\Tracking;
    78use Calliope\Config\Config;
    89use Calliope\I18n\Translator;
     
    5657                    SettingRepository::insert($cols);
    5758                }
     59
     60                // GA4に設定保存イベントを送信
     61                Tracking::settings_save($cols['gpt_version'] ?? '');
    5862            }
    5963        }
  • calliope/trunk/src/AutoGenerator/Search/GoogleCseClient.php

    r3430503 r3430922  
    11<?php
    2 namespace Calliope\AutoGenerator\Search; 
     2namespace Calliope\AutoGenerator\Search;
    33
    44if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    55
    6 use Calliope\Config\Config;
    76use Calliope\Utils\Logger;
    87use Calliope\Utils\Utils;
     
    1211  public static function search($query)
    1312  {
    14     $apiKey = Config::GOOGLE_CSE_API_KEY;
    15     $cx = Config::GOOGLE_CSE_CX;
     13    $language = Utils::get_language();
    1614
    17     if (empty($apiKey) || empty($cx)) {
    18       Logger::log('Google CSE is not configured. Skipping competitor research.');
    19       return [];
    20     }
    21 
    22     $language = Utils::get_language();
    23     $region = Utils::get_user_region();
    24 
    25     $hl = $language === 'ja' ? 'ja' : 'en';
    26     $gl = $language === 'ja' ? 'JP' : 'US';
    27     $lr = $language === 'ja' ? 'lang_ja' : 'lang_en';
    28 
    29     $args = [
    30       'key' => $apiKey,
    31       'cx' => $cx,
    32       'q' => $query,
    33       'num' => 5,
    34       'hl' => $hl,
    35       'gl' => $gl,
    36       'lr' => $lr,
    37       'safe' => 'off',
     15    $data = [
     16      'query' => $query,
     17      'language' => $language,
    3818    ];
    3919
    40     $url = 'https://www.googleapis.com/customsearch/v1?' . http_build_query($args);
    41 
    42     $response = wp_remote_get($url, [
    43       'timeout' => 8,
    44       'redirection' => 5,
    45       'user-agent' => 'CalliopeBot/1.0 (+https://wordpress.org)',
    46     ]);
     20    $response = Utils::request_post(
     21      Utils::get_endpoint('googleCseSearch'),
     22      $data
     23    );
    4724
    4825    if (is_wp_error($response)) {
     
    5835
    5936    $body = json_decode(wp_remote_retrieve_body($response), true);
    60     if (empty($body) || empty($body['items'])) {
    61       Logger::log('Google CSE returned no items.');
     37
     38    if (empty($body) || empty($body['results'])) {
     39      Logger::log('Google CSE returned no results.');
    6240      return [];
    6341    }
    6442
    65     $results = [];
    66     foreach ($body['items'] as $item) {
    67       if (empty($item['link']) || empty($item['title'])) continue;
    68       $results[] = [
    69         'title' => $item['title'],
    70         'url' => $item['link'],
    71       ];
    72     }
    73 
    74     return $results;
     43    return $body['results'];
    7544  }
    7645}
  • calliope/trunk/src/Config/Config.php

    r3430503 r3430922  
    1414  // firebase api key
    1515  const FIREBASE_API_KEY = 'AIzaSyAfGJnyQXqjB2pNvK8VaJmZtsgcoDhQUA4';
    16 
    17   // Google Custom Search JSON API credentials
    18   const GOOGLE_CSE_API_KEY = 'AIzaSyBwTbHOS5cqDtVg5dPCiKH6873_BApgVMQ';
    19   const GOOGLE_CSE_CX = 'b192b4a3f7db94229';
    2016
    2117  //テーブル名
  • calliope/trunk/src/Scheduler/Scheduler.php

    r3430503 r3430922  
    55use Calliope\Utils\Utils;
    66use Calliope\Utils\Logger;
     7use Calliope\Utils\Tracking;
    78use Calliope\Api\UserCertification;
    89use Calliope\AutoGenerator\AutoGenerator;
     
    5859            if(!Utils::is_verify_post_count()){
    5960                Logger::log('calliope_scheduler.........done(記事投稿数の制限です)');
     61                // GA4に投稿制限到達イベントを送信
     62                Tracking::post_limit_reached();
    6063                return;
    6164            }
    62            
     65
    6366            Logger::log('calliope_scheduler.........テスト実行を開始します');
    6467
     
    7376            if(!Utils::is_verify_post_count()){
    7477                Logger::log('calliope_scheduler.........done(記事投稿数の制限です)');
     78                // GA4に投稿制限到達イベントを送信
     79                Tracking::post_limit_reached();
    7580                return;
    7681            }
     
    106111
    107112        global $wpdb;
     113
     114        // GA4に記事生成開始イベントを送信
     115        Tracking::article_generate_start($feed->id, $this->is_test_exec);
    108116
    109117        // calliope_feeds_scheduleにスケジュールを登録
     
    264272            ]);
    265273
     274            // GA4に記事生成成功イベントを送信
     275            $feeds_schedule = $this->get_feeds_schedule($id);
     276            Tracking::article_generate_success($feeds_schedule->feeds_id, $is_test_exec);
     277
    266278            Logger::log('cron_generate_post.........done');
    267        
     279
    268280        } catch (Exception $e) {
    269281            // エラーが発生した場合のログ出力
    270282            Logger::log('cron_generate_post.........error: ' . $e->getMessage());
    271            
     283
     284            // GA4に記事生成エラーイベントを送信
     285            $feeds_schedule = $this->get_feeds_schedule($id);
     286            Tracking::article_generate_error($feeds_schedule->feeds_id, $e->getMessage(), $is_test_exec);
     287
    272288            // エラーが発生した場合のステータス更新
    273289            FeedsScheduleRepository::update($id, [
Note: See TracChangeset for help on using the changeset viewer.