Changeset 3430922
- Timestamp:
- 01/02/2026 09:07:51 AM (7 weeks ago)
- Location:
- calliope
- Files:
-
- 114 added
- 11 edited
-
assets/icon-256x256.png (modified) (previous)
-
tags/3.0.6 (added)
-
tags/3.0.6/assets (added)
-
tags/3.0.6/assets/css (added)
-
tags/3.0.6/assets/css/redirect_loading.css (added)
-
tags/3.0.6/assets/css/style.css (added)
-
tags/3.0.6/assets/img (added)
-
tags/3.0.6/assets/img/calliope_dash_icon.png (added)
-
tags/3.0.6/assets/img/calliope_dash_icon_30.png (added)
-
tags/3.0.6/assets/img/calliope_frame.png (added)
-
tags/3.0.6/assets/img/calliope_logo.png (added)
-
tags/3.0.6/assets/img/calliope_logo_c.png (added)
-
tags/3.0.6/assets/img/calliope_title.png (added)
-
tags/3.0.6/assets/img/dashboard (added)
-
tags/3.0.6/assets/img/dashboard/feed.png (added)
-
tags/3.0.6/assets/img/dashboard/manual.png (added)
-
tags/3.0.6/assets/img/dashboard/subsc.png (added)
-
tags/3.0.6/assets/img/hint_icon.png (added)
-
tags/3.0.6/assets/img/how_to_use (added)
-
tags/3.0.6/assets/img/how_to_use/how_to_use1.png (added)
-
tags/3.0.6/assets/img/how_to_use/how_to_use2.png (added)
-
tags/3.0.6/assets/img/how_to_use/how_to_use3.png (added)
-
tags/3.0.6/assets/img/openai_key_gen (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen1.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen2.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen3.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen4.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen5.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen6.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen7.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen8.webp (added)
-
tags/3.0.6/assets/img/openai_key_gen/openai_key_gen9.webp (added)
-
tags/3.0.6/assets/img/purchase (added)
-
tags/3.0.6/assets/img/purchase/purchase1.png (added)
-
tags/3.0.6/assets/img/purchase/purchase3.png (added)
-
tags/3.0.6/assets/img/purchase/purchaseUnlimi.png (added)
-
tags/3.0.6/assets/img/trash.png (added)
-
tags/3.0.6/assets/js (added)
-
tags/3.0.6/assets/js/feed_edit_page.js (added)
-
tags/3.0.6/assets/js/feeds_page.js (added)
-
tags/3.0.6/assets/js/redirect_loading.js (added)
-
tags/3.0.6/assets/js/script.js (added)
-
tags/3.0.6/assets/js/subsc_purchase_page.js (added)
-
tags/3.0.6/calliope.php (added)
-
tags/3.0.6/languages (added)
-
tags/3.0.6/readme-es.txt (added)
-
tags/3.0.6/readme-ja.txt (added)
-
tags/3.0.6/readme.txt (added)
-
tags/3.0.6/src (added)
-
tags/3.0.6/src/Admin (added)
-
tags/3.0.6/src/Admin/MenuManager.php (added)
-
tags/3.0.6/src/Admin/Pages (added)
-
tags/3.0.6/src/Admin/Pages/DashboardPage.php (added)
-
tags/3.0.6/src/Admin/Pages/FeedEditPage.php (added)
-
tags/3.0.6/src/Admin/Pages/FeedsPage.php (added)
-
tags/3.0.6/src/Admin/Pages/ManualPage.php (added)
-
tags/3.0.6/src/Admin/Pages/ModePage.php (added)
-
tags/3.0.6/src/Admin/Pages/ResetPasswordPage.php (added)
-
tags/3.0.6/src/Admin/Pages/SettingPage.php (added)
-
tags/3.0.6/src/Admin/Pages/SubscPurchasePage.php (added)
-
tags/3.0.6/src/Admin/Pages/UserCreatePage.php (added)
-
tags/3.0.6/src/Admin/Pages/UserLoginPage.php (added)
-
tags/3.0.6/src/Admin/Views (added)
-
tags/3.0.6/src/Admin/Views/app_wrap_head.php (added)
-
tags/3.0.6/src/Admin/Views/app_wrap_tail.php (added)
-
tags/3.0.6/src/Admin/Views/dashboard.php (added)
-
tags/3.0.6/src/Admin/Views/feed_edit.php (added)
-
tags/3.0.6/src/Admin/Views/feeds.php (added)
-
tags/3.0.6/src/Admin/Views/manual.php (added)
-
tags/3.0.6/src/Admin/Views/mode.php (added)
-
tags/3.0.6/src/Admin/Views/redirect_loading.php (added)
-
tags/3.0.6/src/Admin/Views/reset_password.php (added)
-
tags/3.0.6/src/Admin/Views/setting.php (added)
-
tags/3.0.6/src/Admin/Views/subsc_purchase.php (added)
-
tags/3.0.6/src/Admin/Views/user_create.php (added)
-
tags/3.0.6/src/Admin/Views/user_login.php (added)
-
tags/3.0.6/src/Api (added)
-
tags/3.0.6/src/Api/Base.php (added)
-
tags/3.0.6/src/Api/Mode.php (added)
-
tags/3.0.6/src/Api/StripeClient.php (added)
-
tags/3.0.6/src/Api/UserCertification.php (added)
-
tags/3.0.6/src/AutoGenerator (added)
-
tags/3.0.6/src/AutoGenerator/ArticleFormat.php (added)
-
tags/3.0.6/src/AutoGenerator/AutoGenerator.php (added)
-
tags/3.0.6/src/AutoGenerator/CompetitorResearch.php (added)
-
tags/3.0.6/src/AutoGenerator/Extractor (added)
-
tags/3.0.6/src/AutoGenerator/Extractor/HtmlBodyExtractor.php (added)
-
tags/3.0.6/src/AutoGenerator/OpenAI (added)
-
tags/3.0.6/src/AutoGenerator/OpenAI/Client.php (added)
-
tags/3.0.6/src/AutoGenerator/Prompt.php (added)
-
tags/3.0.6/src/AutoGenerator/Search (added)
-
tags/3.0.6/src/AutoGenerator/Search/GoogleCseClient.php (added)
-
tags/3.0.6/src/Config (added)
-
tags/3.0.6/src/Config/Config.php (added)
-
tags/3.0.6/src/Database (added)
-
tags/3.0.6/src/Database/Migration.php (added)
-
tags/3.0.6/src/Database/Repository (added)
-
tags/3.0.6/src/Database/Repository/BaseRepository.php (added)
-
tags/3.0.6/src/Database/Repository/FeedsRepository.php (added)
-
tags/3.0.6/src/Database/Repository/FeedsScheduleRepository.php (added)
-
tags/3.0.6/src/Database/Repository/SettingRepository.php (added)
-
tags/3.0.6/src/Database/Repository/UserRepository.php (added)
-
tags/3.0.6/src/Database/Seeds.php (added)
-
tags/3.0.6/src/I18n (added)
-
tags/3.0.6/src/I18n/Translator.php (added)
-
tags/3.0.6/src/I18n/languages (added)
-
tags/3.0.6/src/I18n/languages/en.php (added)
-
tags/3.0.6/src/I18n/languages/ja.php (added)
-
tags/3.0.6/src/Scheduler (added)
-
tags/3.0.6/src/Scheduler/Scheduler.php (added)
-
tags/3.0.6/src/Utils (added)
-
tags/3.0.6/src/Utils/Logger.php (added)
-
tags/3.0.6/src/Utils/Utils.php (added)
-
trunk/calliope.php (modified) (4 diffs)
-
trunk/languages (added)
-
trunk/readme-es.txt (modified) (2 diffs)
-
trunk/readme-ja.txt (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/src/Admin/Pages/DashboardPage.php (modified) (2 diffs)
-
trunk/src/Admin/Pages/FeedEditPage.php (modified) (2 diffs)
-
trunk/src/Admin/Pages/SettingPage.php (modified) (2 diffs)
-
trunk/src/AutoGenerator/Search/GoogleCseClient.php (modified) (3 diffs)
-
trunk/src/Config/Config.php (modified) (1 diff)
-
trunk/src/Scheduler/Scheduler.php (modified) (5 diffs)
-
trunk/src/Utils/Tracking.php (added)
Legend:
- Unmodified
- Added
- Removed
-
calliope/trunk/calliope.php
r3430503 r3430922 4 4 Plugin URI: https://wordpress.org/plugins/calliope/ 5 5 Description: WordPress AI Contents Generator - Automatically generate high-quality content using AI technology 6 Version: 3.0. 66 Version: 3.0.7 7 7 Author: homio13 8 8 Author URI: https://profiles.wordpress.org/homio13/ … … 26 26 use Calliope\Utils\Logger; 27 27 use Calliope\Utils\Utils; 28 use Calliope\Utils\Tracking; 28 29 use Calliope\Database\Migration; 29 30 use Calliope\Database\Seeds; … … 73 74 wp_schedule_event(time(), 'every_ten_minutes', 'calliope_cron_scheduler'); 74 75 } 76 77 // GA4にプラグインインストールイベントを送信 78 Tracking::plugin_install(); 75 79 } 76 80 … … 79 83 function calliope_plugin_deactivation() 80 84 { 85 // GA4にプラグインアンインストールイベントを送信 86 Tracking::plugin_uninstall(); 87 81 88 // サブスクリプションの解約 82 89 $user = Utils::get_user(); -
calliope/trunk/readme-es.txt
r3430503 r3430922 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0. 67 Stable tag: 3.0.7 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 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 130 134 = 3.0.6 = 131 135 * 🔧 **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 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0. 67 Stable tag: 3.0.7 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 130 = 3.0.7 = 131 * 🔒 **セキュリティ**: Google CSE APIの認証情報をサーバーサイドに移動し、セキュリティを強化 132 * 📊 **分析**: ユーザー行動分析のためのGA4イベントトラッキングを追加 133 130 134 = 3.0.6 = 131 135 * 🔧 **バグ修正**: プラグイン有効化時のクラス読み込みエラーを修正するため、独自PSR-4オートローダーを追加 -
calliope/trunk/readme.txt
r3430503 r3430922 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 3.0. 67 Stable tag: 3.0.7 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 128 128 == Changelog == 129 129 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 130 134 = 3.0.6 = 131 135 * 🔧 **Bug Fix**: Added custom PSR-4 autoloader to fix class loading error during plugin activation -
calliope/trunk/src/Admin/Pages/DashboardPage.php
r3430503 r3430922 5 5 use Calliope\Utils\Utils; 6 6 use Calliope\Utils\Logger; 7 use Calliope\Utils\Tracking; 7 8 use Calliope\Config\Config; 8 9 use Calliope\I18n\Translator; … … 30 31 { 31 32 global $wpdb; 33 34 // GA4にダッシュボード表示イベントを送信 35 Tracking::dashboard_view(); 32 36 33 37 /////// 全期間の投稿件数 -
calliope/trunk/src/Admin/Pages/FeedEditPage.php
r3430503 r3430922 5 5 use Calliope\Utils\Utils; 6 6 use Calliope\Utils\Logger; 7 use Calliope\Utils\Tracking; 7 8 use Calliope\Config\Config; 8 9 use Calliope\I18n\Translator; … … 73 74 if ($id == null || $id == '') { 74 75 $id = FeedsRepository::insert($cols); 76 // GA4にフィード作成イベントを送信 77 Tracking::feed_create($id, $cols['keyword'] ?? ''); 75 78 } else { 76 79 FeedsRepository::update($id, $cols); 80 // GA4にフィード更新イベントを送信 81 Tracking::feed_update($id, $cols['keyword'] ?? ''); 77 82 } 78 83 } -
calliope/trunk/src/Admin/Pages/SettingPage.php
r3430503 r3430922 5 5 use Calliope\Utils\Utils; 6 6 use Calliope\Utils\Logger; 7 use Calliope\Utils\Tracking; 7 8 use Calliope\Config\Config; 8 9 use Calliope\I18n\Translator; … … 56 57 SettingRepository::insert($cols); 57 58 } 59 60 // GA4に設定保存イベントを送信 61 Tracking::settings_save($cols['gpt_version'] ?? ''); 58 62 } 59 63 } -
calliope/trunk/src/AutoGenerator/Search/GoogleCseClient.php
r3430503 r3430922 1 1 <?php 2 namespace Calliope\AutoGenerator\Search; 2 namespace Calliope\AutoGenerator\Search; 3 3 4 4 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 5 5 6 use Calliope\Config\Config;7 6 use Calliope\Utils\Logger; 8 7 use Calliope\Utils\Utils; … … 12 11 public static function search($query) 13 12 { 14 $apiKey = Config::GOOGLE_CSE_API_KEY; 15 $cx = Config::GOOGLE_CSE_CX; 13 $language = Utils::get_language(); 16 14 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, 38 18 ]; 39 19 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 ); 47 24 48 25 if (is_wp_error($response)) { … … 58 35 59 36 $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.'); 62 40 return []; 63 41 } 64 42 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']; 75 44 } 76 45 } -
calliope/trunk/src/Config/Config.php
r3430503 r3430922 14 14 // firebase api key 15 15 const FIREBASE_API_KEY = 'AIzaSyAfGJnyQXqjB2pNvK8VaJmZtsgcoDhQUA4'; 16 17 // Google Custom Search JSON API credentials18 const GOOGLE_CSE_API_KEY = 'AIzaSyBwTbHOS5cqDtVg5dPCiKH6873_BApgVMQ';19 const GOOGLE_CSE_CX = 'b192b4a3f7db94229';20 16 21 17 //テーブル名 -
calliope/trunk/src/Scheduler/Scheduler.php
r3430503 r3430922 5 5 use Calliope\Utils\Utils; 6 6 use Calliope\Utils\Logger; 7 use Calliope\Utils\Tracking; 7 8 use Calliope\Api\UserCertification; 8 9 use Calliope\AutoGenerator\AutoGenerator; … … 58 59 if(!Utils::is_verify_post_count()){ 59 60 Logger::log('calliope_scheduler.........done(記事投稿数の制限です)'); 61 // GA4に投稿制限到達イベントを送信 62 Tracking::post_limit_reached(); 60 63 return; 61 64 } 62 65 63 66 Logger::log('calliope_scheduler.........テスト実行を開始します'); 64 67 … … 73 76 if(!Utils::is_verify_post_count()){ 74 77 Logger::log('calliope_scheduler.........done(記事投稿数の制限です)'); 78 // GA4に投稿制限到達イベントを送信 79 Tracking::post_limit_reached(); 75 80 return; 76 81 } … … 106 111 107 112 global $wpdb; 113 114 // GA4に記事生成開始イベントを送信 115 Tracking::article_generate_start($feed->id, $this->is_test_exec); 108 116 109 117 // calliope_feeds_scheduleにスケジュールを登録 … … 264 272 ]); 265 273 274 // GA4に記事生成成功イベントを送信 275 $feeds_schedule = $this->get_feeds_schedule($id); 276 Tracking::article_generate_success($feeds_schedule->feeds_id, $is_test_exec); 277 266 278 Logger::log('cron_generate_post.........done'); 267 279 268 280 } catch (Exception $e) { 269 281 // エラーが発生した場合のログ出力 270 282 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 272 288 // エラーが発生した場合のステータス更新 273 289 FeedsScheduleRepository::update($id, [
Note: See TracChangeset
for help on using the changeset viewer.