Plugin Directory

Changeset 3027236


Ignore:
Timestamp:
01/26/2024 08:03:18 AM (2 years ago)
Author:
alphatrait
Message:

bug fixed

Location:
contentify-ai/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • contentify-ai/trunk/index.php

    r3026014 r3027236  
    33Plugin Name: Contentify AI
    44Description: This plugin is a Contentify Editor AI (Co-Editor). It publishes and optimize the content that Contentify Writer AI (Co-Writer) generates.
    5 Version: 1.4.2
     5Version: 1.4.3
    66Author: Contentify Team
    77Text Domain: contentify-ai
  • contentify-ai/trunk/js/onboarding.js

    r3026014 r3027236  
    3232                        setTimeout(function(){
    3333                            document.location.href = CAIOBData.redirectUrl;
    34                         },10000);
     34                        },2000);
    3535                        return false;
    3636                    }
  • contentify-ai/trunk/onboarding.php

    r3026013 r3027236  
    125125
    126126            $response = wp_remote_post( CONTENTIFY_AI_API_BASE_URL . 'seo-optimize', array(
     127                'timeout' => 60,
    127128                'headers' => array(
    128129                    'Content-Type' => 'application/json',
     
    145146            }
    146147
    147             if ( ! property_exists( $obj, 'keywords' ) || ! property_exists( $obj, 'title' ) || ! property_exists( $obj, 'description' ) ) {
     148            if ( ! property_exists( $obj, 'optimization' ) || property_exists( $obj->optimization, 'keywords' ) || ! property_exists( $obj->optimization, 'title' ) || ! property_exists( $obj->optimization, 'description' ) ) {
    148149                wp_send_json( __( 'Error (9)', 'contentify-ai' ) );
    149150            }
    150151
    151152            global $wpdb;
    152             $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}yoast_indexable SET title = %s, description = %s, primary_focus_keyword = %s WHERE object_type = %s AND object_id = %d", $obj->title, $obj->description, $obj->keywords, $_POST['type'] == 'category' ? 'term' : 'post', $id ) );
     153            $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}yoast_indexable SET title = %s, description = %s, primary_focus_keyword = %s WHERE object_type = %s AND object_id = %d", $obj->optimization->title, $obj->optimization->description, $obj->optimization->keywords, $_POST['type'] == 'category' ? 'term' : 'post', $id ) );
    153154
    154155            if ( $_POST['type'] == 'category' ) {
     
    163164                    $tax_meta['category'][$id] = array();
    164165                }
    165                 $tax_meta['category'][$id]['wpseo_focuskw'] = $obj->keywords;
    166                 $tax_meta['category'][$id]['wpseo_title'] = $obj->title;
    167                 $tax_meta['category'][$id]['wpseo_desc'] = $obj->description;
     166                $tax_meta['category'][$id]['wpseo_focuskw'] = $obj->optimization->keywords;
     167                $tax_meta['category'][$id]['wpseo_title'] = $obj->optimization->title;
     168                $tax_meta['category'][$id]['wpseo_desc'] = $obj->optimization->description;
    168169                update_option( 'wpseo_taxonomy_meta', $tax_meta );
    169170            } else {
     
    171172                    'ID' => ( int ) $_POST['id'],
    172173                    'meta_input' => array(
    173                         '_yoast_wpseo_focuskw' => $obj->keywords,
    174                         '_yoast_wpseo_title' => $obj->title,
    175                         '_yoast_wpseo_metadesc' => $obj->description
     174                        '_yoast_wpseo_focuskw' => $obj->optimization->keywords,
     175                        '_yoast_wpseo_title' => $obj->optimization->title,
     176                        '_yoast_wpseo_metadesc' => $obj->optimization->description
    176177                    )
    177178                ) );
  • contentify-ai/trunk/readme.txt

    r3026014 r3027236  
    11=== Contentify AI ===
    22Contributors: Contentify AI
    3 Tags: ai, chatgpt, contentify, ai writer, gpt-4, gpt, seo ai, marketing ai, ai seo
     3Tags: ai, chatgpt, contentify, ai writer, gpt-4, gpt
    44Requires at least: 5.9
    55Tested up to: 6.4.2
    66Requires PHP: 7.0
    7 Stable tag: 1.4.2
     7Stable tag: 1.4.3
    88License: MIT License
    99License URI: https://raw.githubusercontent.com/phosphor-icons/phosphor-home/master/LICENSE
Note: See TracChangeset for help on using the changeset viewer.