Changeset 3443437
- Timestamp:
- 01/20/2026 04:40:59 PM (2 months ago)
- Location:
- creation-genius/trunk
- Files:
-
- 5 edited
-
class-creation-genius.php (modified) (2 diffs)
-
creation-genius.php (modified) (2 diffs)
-
modules/api-handler.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
views/settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
creation-genius/trunk/class-creation-genius.php
r3441990 r3443437 126 126 add_action('wp_enqueue_scripts', array($this, 'enqueue_frontend_assets')); 127 127 add_action('the_post', array($this, 'check_ai_generated_post')); 128 129 // Auto-connect if not connected 130 if (!get_option('creation_genius_connected')) { 131 $this->api_handler->auto_connect(); 132 // Schedule analysis after auto-connect 133 if (!wp_next_scheduled('creation_genius_run_immediate_analysis')) { 134 wp_schedule_single_event(time() + 60, 'creation_genius_run_immediate_analysis'); 135 } 136 } 128 137 } 129 138 … … 206 215 } 207 216 208 // Schedule immediate analysis (async) to avoid activation timeout 209 if (!wp_next_scheduled('creation_genius_run_immediate_analysis')) { 210 wp_schedule_single_event(time(), 'creation_genius_run_immediate_analysis'); 211 } 217 // Schedule immediate analysis (async) on activation 218 wp_schedule_single_event(time(), 'creation_genius_run_immediate_analysis'); 212 219 213 220 // Flush rewrite rules -
creation-genius/trunk/creation-genius.php
r3442012 r3443437 4 4 * Plugin URI: https://creationgenius.com 5 5 * Description: Supercharge your WordPress with Creation Genius: The ultimate AI content engine for generating SEO-optimized blog posts, articles, and reviews in seconds. 6 * Version: 1.0. 56 * Version: 1.0.6 7 7 * Author: Creation Genius AI 8 8 * Author URI: https://creationgenius.com/about-us/ … … 22 22 23 23 // Define plugin constants 24 define('CREATION_GENIUS_VERSION', '1.0. 5');24 define('CREATION_GENIUS_VERSION', '1.0.6'); 25 25 define('CREATION_GENIUS_PLUGIN_DIR', plugin_dir_path(__FILE__)); 26 26 define('CREATION_GENIUS_PLUGIN_URL', plugin_dir_url(__FILE__)); -
creation-genius/trunk/modules/api-handler.php
r3441990 r3443437 22 22 public function __construct() { 23 23 $this->database = new Creation_Genius_Database(); 24 } 25 26 /** 27 * Auto connect to server 28 */ 29 public function auto_connect() { 30 if (get_option('creation_genius_connected')) { 31 return array('success' => true, 'message' => 'Already connected.'); 32 } 33 34 $base_url = get_option('creation_genius_base_url', 'https://creationgenius.com/'); 35 $domain = home_url(); 36 $email = get_option('admin_email'); 37 38 return $this->connect_server($base_url, $domain, $email); 24 39 } 25 40 … … 595 610 ); 596 611 } elseif ($response_code === 401) { 612 // Attempt auto-reconnect 613 $reconnect = $this->auto_connect(); 614 if ($reconnect['success']) { 615 // Retry the request one more time 616 // Update API key in current data 617 $data['api_key'] = get_option('creation_genius_api_key'); 618 $args['body'] = wp_json_encode($data); 619 $retry_response = wp_remote_post($url, $args); 620 621 if (!is_wp_error($retry_response) && wp_remote_retrieve_response_code($retry_response) === 200) { 622 $retry_body = wp_remote_retrieve_body($retry_response); 623 return json_decode($retry_body, true); 624 } 625 } 626 597 627 return array( 598 628 'success' => false, … … 736 766 737 767 if (is_wp_error($basic_test)) { 768 // Attempt auto-reconnect if basic test fails 769 $reconnect = $this->auto_connect(); 770 if ($reconnect['success']) { 771 return $this->test_connection(); // Retry test after reconnect 772 } 773 738 774 //error_log('Creation Genius Basic URL Test Failed: ' . $basic_test->get_error_message()); 739 775 return array( -
creation-genius/trunk/readme.txt
r3443119 r3443437 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 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 … … 19 19 ### 🌟 Why Use Creation Genius? 20 20 21 Most AI tools force you to copy-paste raw text and manually fix formatting. Creation Genius automates theseoperational tasks so you can focus on strategy.21 Most AI tools force you to copy-paste raw text and manually fix formatting. Creation Genius automates operational tasks so you can focus on strategy. 22 22 23 23 * **Context-Aware Generation:** The engine reads your "About Us", "Content Guidelines", and existing posts to mimic your specific tone and style. … … 103 103 == Changelog == 104 104 105 = 1.0.6 = 106 * **Fix:** Resolved "Undefined variable $plugin" fatal error in settings page. 107 * **New:** Added auto-connect feature to simplify initial setup. 108 * **New:** Added auto-reconnect logic to handle API connection drops smoothly. 109 * **Improvement:** Site analysis now runs immediately upon activation for instant recommendations. 110 * **Improvement:** Fixed HTML syntax errors in settings page dropdowns. 111 105 112 = 1.0.5 = 106 113 * **New:** Added Performance Analytics module. -
creation-genius/trunk/views/settings.php
r3441990 r3443437 12 12 // Get plugin instance 13 13 $creation_genius_plugin = Creation_Genius::get_instance(); 14 $creation_genius_api_handler = $ plugin->get_api_handler();14 $creation_genius_api_handler = $creation_genius_plugin->get_api_handler(); 15 15 16 16 // Get current settings … … 117 117 $creation_genius_base_url = ''; 118 118 $creation_genius_connection_date = ''; 119 }120 }121 122 if (isset($_POST['creation_genius_test_connection']) && check_admin_referer('creation_genius_test_connection')) {123 $creation_genius_response = $creation_genius_api_handler->test_connection();124 125 if ($creation_genius_response['success']) {126 echo '<div class="notice notice-success is-dismissible"><p>' . esc_html__('Connection test successful!', 'creation-genius') . '</p></div>';127 } else {128 echo '<div class="notice notice-error is-dismissible"><p>' . esc_html__('Connection test failed: ', 'creation-genius') . esc_html($creation_genius_response['message']) . '</p></div>';129 }130 }131 132 if (isset($_POST['creation_genius_disconnect']) && check_admin_referer('creation_genius_disconnect')) {133 $creation_genius_response = $creation_genius_api_handler->disconnect_server();134 135 if ($creation_genius_response['success']) {136 echo '<div class="notice notice-success is-dismissible"><p>' . esc_html($creation_genius_response['message']) . '</p></div>';137 $creation_genius_is_connected = false;138 $creation_genius_api_key = '';139 $creation_genius_base_url = '';140 $creation_genius_connection_date = '';141 } else {142 echo '<div class="notice notice-error is-dismissible"><p>' . esc_html($creation_genius_response['message']) . '</p></div>';143 119 } 144 120 } … … 511 487 Finance 512 488 </option> 513 <option ="education" <?php selected(get_option('creation_genius_industry', ''), 'education'); ?>>489 <option value="education" <?php selected(get_option('creation_genius_industry', ''), 'education'); ?>> 514 490 Education 515 491 </option> 516 <option ="retail" <?php selected(get_option('creation_genius_industry', ''), 'retail'); ?>>492 <option value="retail" <?php selected(get_option('creation_genius_industry', ''), 'retail'); ?>> 517 493 Retail 518 494 </option> 519 <option ="restaurant" <?php selected(get_option('creation_genius_industry', ''), 'restaurant'); ?>>495 <option value="restaurant" <?php selected(get_option('creation_genius_industry', ''), 'restaurant'); ?>> 520 496 Restaurant & Food 521 497 </option>
Note: See TracChangeset
for help on using the changeset viewer.