Plugin Directory

Changeset 3491436


Ignore:
Timestamp:
03/26/2026 05:08:56 AM (10 days ago)
Author:
1platform
Message:

Update to version 2.10.8 from GitHub

Location:
1platform-content-ai
Files:
12 added
6 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • 1platform-content-ai/tags/2.10.8/.git/FETCH_HEAD

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53        branch 'main' of https://github.com/1platformlabs/1platform-content-ai
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2        branch 'main' of https://github.com/1platformlabs/1platform-content-ai
  • 1platform-content-ai/tags/2.10.8/.git/ORIG_HEAD

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/tags/2.10.8/.git/config

    r3491387 r3491436  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2JpMkwzbDZTTzZTc0tSN0U3WEt3V0c3UHJlajRNazJQZEFJcg==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzXzRUeUVBeWhUbkpHaGdyUmNJd3JXYWJnOUtwS1ZzbDJoV01sQg==
    1313[branch "main"]
    1414    remote = origin
  • 1platform-content-ai/tags/2.10.8/.git/logs/HEAD

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    checkout: moving from master to main
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000    checkout: moving from master to main
  • 1platform-content-ai/tags/2.10.8/.git/logs/refs/heads/main

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    branch: Created from refs/remotes/origin/main
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000    branch: Created from refs/remotes/origin/main
  • 1platform-content-ai/tags/2.10.8/.git/logs/refs/remotes/origin/main

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501700 +0000    fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head
  • 1platform-content-ai/tags/2.10.8/.git/refs/heads/main

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/tags/2.10.8/.git/refs/remotes/origin/main

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/tags/2.10.8/1platform-content-ai.php

    r3491387 r3491436  
    55 * Plugin URI: https://1platform.pro/
    66 * Description: SaaS client for AI-powered content generation, SEO optimization, and site management. All AI processing happens on 1Platform external servers. Includes free local tools: Table of Contents and Internal Links.
    7  * Version: 2.10.7
     7 * Version: 2.10.8
    88 * Author: 1Platform
    99 * License: GPLv2 or later
     
    6262require_once plugin_dir_path( __FILE__ ) . 'includes/cron/agent-actions-cron.php';
    6363
     64require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php';
    6465require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateKeywordsTable.php';
    6566require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateAPILogsTable.php';
     
    6869require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateInternalLinksTable.php';
    6970
     71/**
     72 * Build the migration runner with all registered migrations.
     73 *
     74 * Each migration is assigned a sequential version number.
     75 * New migrations MUST be appended at the end with the next version number.
     76 */
     77function contai_build_migration_runner(): ContaiMigrationRunner {
     78    $runner = new ContaiMigrationRunner();
     79
     80    $runner->register(1, new ContaiCreateKeywordsTable());
     81    $runner->register(2, new ContaiCreateAPILogsTable());
     82    $runner->register(3, new ContaiCreateJobsTable());
     83    $runner->register(4, new ContaiUpdateKeywordsTableStatus());
     84    $runner->register(5, new ContaiCreateInternalLinksTable());
     85
     86    return $runner;
     87}
     88
    7089function contai_activate_plugin() {
    71     try {
    72         $keywords_migration = new ContaiCreateKeywordsTable();
    73         $keywords_migration->up();
    74     } catch (Exception $e) {
    75         contai_log("ContaiCreateKeywordsTable migration error: " . $e->getMessage());
    76     }
    77 
    78     try {
    79         $api_logs_migration = new ContaiCreateAPILogsTable();
    80         $api_logs_migration->up();
    81     } catch (Exception $e) {
    82         contai_log("ContaiCreateAPILogsTable migration error: " . $e->getMessage());
    83     }
    84 
    85     try {
    86         $jobs_migration = new ContaiCreateJobsTable();
    87         $jobs_migration->up();
    88     } catch (Exception $e) {
    89         contai_log("ContaiCreateJobsTable migration error: " . $e->getMessage());
    90     }
    91 
    92     try {
    93         $update_keywords_status = new ContaiUpdateKeywordsTableStatus();
    94         $update_keywords_status->up();
    95     } catch (Exception $e) {
    96         contai_log("ContaiUpdateKeywordsTableStatus migration error: " . $e->getMessage());
    97     }
    98 
    99     try {
    100         $internal_links_migration = new ContaiCreateInternalLinksTable();
    101         $internal_links_migration->up();
    102     } catch (Exception $e) {
    103         contai_log("ContaiCreateInternalLinksTable migration error: " . $e->getMessage());
     90    $runner = contai_build_migration_runner();
     91    $result = $runner->run();
     92
     93    if (!$result['success']) {
     94        contai_log('Migration batch failed: ' . $result['message']);
    10495    }
    10596
     
    309300}
    310301add_action('admin_notices', 'contai_display_auth_error_notices');
     302
     303/**
     304 * Display admin notice when database migrations have failed.
     305 */
     306function contai_display_migration_error_notice(): void {
     307    if (!current_user_can('manage_options')) {
     308        return;
     309    }
     310
     311    $screen = get_current_screen();
     312    if (!$screen || strpos($screen->id, 'contai') === false) {
     313        return;
     314    }
     315
     316    require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php';
     317
     318    $error = ContaiMigrationRunner::getError();
     319    if ($error === null) {
     320        return;
     321    }
     322
     323    printf(
     324        '<div class="notice notice-error"><p><strong>%s</strong> %s</p></div>',
     325        esc_html__('Content AI Database Error:', '1platform-content-ai'),
     326        esc_html($error)
     327    );
     328}
     329add_action('admin_notices', 'contai_display_migration_error_notice');
  • 1platform-content-ai/tags/2.10.8/includes/database/migrations/UpdateKeywordsTableStatus.php

    r3483422 r3491436  
    2727        return $this->db->query($sql);
    2828    }
     29
     30    public function down(): bool {
     31        if (!$this->db->tableExists($this->tableName)) {
     32            return true;
     33        }
     34
     35        $table = $this->db->getTableName($this->tableName);
     36
     37        $sql = "ALTER TABLE {$table}
     38                MODIFY COLUMN status ENUM('active', 'inactive', 'pending', 'processing', 'done')
     39                NOT NULL DEFAULT 'pending'";
     40
     41        return $this->db->query($sql);
     42    }
     43
     44    public function getTableName(): string {
     45        return $this->tableName;
     46    }
    2947}
  • 1platform-content-ai/tags/2.10.8/readme.txt

    r3491387 r3491436  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.10.7
     7Stable tag: 2.10.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • 1platform-content-ai/trunk/.git/FETCH_HEAD

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53        branch 'main' of https://github.com/1platformlabs/1platform-content-ai
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2        branch 'main' of https://github.com/1platformlabs/1platform-content-ai
  • 1platform-content-ai/trunk/.git/ORIG_HEAD

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/trunk/.git/config

    r3491387 r3491436  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2JpMkwzbDZTTzZTc0tSN0U3WEt3V0c3UHJlajRNazJQZEFJcg==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzXzRUeUVBeWhUbkpHaGdyUmNJd3JXYWJnOUtwS1ZzbDJoV01sQg==
    1313[branch "main"]
    1414    remote = origin
  • 1platform-content-ai/trunk/.git/logs/HEAD

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    checkout: moving from master to main
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000    checkout: moving from master to main
  • 1platform-content-ai/trunk/.git/logs/refs/heads/main

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    branch: Created from refs/remotes/origin/main
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501701 +0000    branch: Created from refs/remotes/origin/main
  • 1platform-content-ai/trunk/.git/logs/refs/remotes/origin/main

    r3491387 r3491436  
    1 0000000000000000000000000000000000000000 32f778d7f2194e62750f526bf1a6ad8607dc9d53 runner <runner@runnervmrg6be.sxgrb1ocwjxexfz2ozgtx0m0bd.cx.internal.cloudapp.net> 1774493518 +0000    fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head
     10000000000000000000000000000000000000000 82ce57dfe5e688db3d8f22d859787e9afae5d6c2 runner <runner@runnervm46oaq.4qvv0lt3cckengxra1ydaipxhh.ex.internal.cloudapp.net> 1774501700 +0000    fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*: storing head
  • 1platform-content-ai/trunk/.git/refs/heads/main

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/trunk/.git/refs/remotes/origin/main

    r3491387 r3491436  
    1 32f778d7f2194e62750f526bf1a6ad8607dc9d53
     182ce57dfe5e688db3d8f22d859787e9afae5d6c2
  • 1platform-content-ai/trunk/1platform-content-ai.php

    r3491387 r3491436  
    55 * Plugin URI: https://1platform.pro/
    66 * Description: SaaS client for AI-powered content generation, SEO optimization, and site management. All AI processing happens on 1Platform external servers. Includes free local tools: Table of Contents and Internal Links.
    7  * Version: 2.10.7
     7 * Version: 2.10.8
    88 * Author: 1Platform
    99 * License: GPLv2 or later
     
    6262require_once plugin_dir_path( __FILE__ ) . 'includes/cron/agent-actions-cron.php';
    6363
     64require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php';
    6465require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateKeywordsTable.php';
    6566require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateAPILogsTable.php';
     
    6869require_once plugin_dir_path(__FILE__) . 'includes/database/migrations/CreateInternalLinksTable.php';
    6970
     71/**
     72 * Build the migration runner with all registered migrations.
     73 *
     74 * Each migration is assigned a sequential version number.
     75 * New migrations MUST be appended at the end with the next version number.
     76 */
     77function contai_build_migration_runner(): ContaiMigrationRunner {
     78    $runner = new ContaiMigrationRunner();
     79
     80    $runner->register(1, new ContaiCreateKeywordsTable());
     81    $runner->register(2, new ContaiCreateAPILogsTable());
     82    $runner->register(3, new ContaiCreateJobsTable());
     83    $runner->register(4, new ContaiUpdateKeywordsTableStatus());
     84    $runner->register(5, new ContaiCreateInternalLinksTable());
     85
     86    return $runner;
     87}
     88
    7089function contai_activate_plugin() {
    71     try {
    72         $keywords_migration = new ContaiCreateKeywordsTable();
    73         $keywords_migration->up();
    74     } catch (Exception $e) {
    75         contai_log("ContaiCreateKeywordsTable migration error: " . $e->getMessage());
    76     }
    77 
    78     try {
    79         $api_logs_migration = new ContaiCreateAPILogsTable();
    80         $api_logs_migration->up();
    81     } catch (Exception $e) {
    82         contai_log("ContaiCreateAPILogsTable migration error: " . $e->getMessage());
    83     }
    84 
    85     try {
    86         $jobs_migration = new ContaiCreateJobsTable();
    87         $jobs_migration->up();
    88     } catch (Exception $e) {
    89         contai_log("ContaiCreateJobsTable migration error: " . $e->getMessage());
    90     }
    91 
    92     try {
    93         $update_keywords_status = new ContaiUpdateKeywordsTableStatus();
    94         $update_keywords_status->up();
    95     } catch (Exception $e) {
    96         contai_log("ContaiUpdateKeywordsTableStatus migration error: " . $e->getMessage());
    97     }
    98 
    99     try {
    100         $internal_links_migration = new ContaiCreateInternalLinksTable();
    101         $internal_links_migration->up();
    102     } catch (Exception $e) {
    103         contai_log("ContaiCreateInternalLinksTable migration error: " . $e->getMessage());
     90    $runner = contai_build_migration_runner();
     91    $result = $runner->run();
     92
     93    if (!$result['success']) {
     94        contai_log('Migration batch failed: ' . $result['message']);
    10495    }
    10596
     
    309300}
    310301add_action('admin_notices', 'contai_display_auth_error_notices');
     302
     303/**
     304 * Display admin notice when database migrations have failed.
     305 */
     306function contai_display_migration_error_notice(): void {
     307    if (!current_user_can('manage_options')) {
     308        return;
     309    }
     310
     311    $screen = get_current_screen();
     312    if (!$screen || strpos($screen->id, 'contai') === false) {
     313        return;
     314    }
     315
     316    require_once plugin_dir_path(__FILE__) . 'includes/database/MigrationRunner.php';
     317
     318    $error = ContaiMigrationRunner::getError();
     319    if ($error === null) {
     320        return;
     321    }
     322
     323    printf(
     324        '<div class="notice notice-error"><p><strong>%s</strong> %s</p></div>',
     325        esc_html__('Content AI Database Error:', '1platform-content-ai'),
     326        esc_html($error)
     327    );
     328}
     329add_action('admin_notices', 'contai_display_migration_error_notice');
  • 1platform-content-ai/trunk/includes/database/migrations/UpdateKeywordsTableStatus.php

    r3483422 r3491436  
    2727        return $this->db->query($sql);
    2828    }
     29
     30    public function down(): bool {
     31        if (!$this->db->tableExists($this->tableName)) {
     32            return true;
     33        }
     34
     35        $table = $this->db->getTableName($this->tableName);
     36
     37        $sql = "ALTER TABLE {$table}
     38                MODIFY COLUMN status ENUM('active', 'inactive', 'pending', 'processing', 'done')
     39                NOT NULL DEFAULT 'pending'";
     40
     41        return $this->db->query($sql);
     42    }
     43
     44    public function getTableName(): string {
     45        return $this->tableName;
     46    }
    2947}
  • 1platform-content-ai/trunk/readme.txt

    r3491387 r3491436  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 2.10.7
     7Stable tag: 2.10.8
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.