Plugin Directory

Changeset 3426982


Ignore:
Timestamp:
12/24/2025 05:34:22 PM (3 months ago)
Author:
ansera01
Message:

Release version 1.1.20

Location:
ansera-search
Files:
2 deleted
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • ansera-search/tags/1.1.20/ansera_search.php

    r3426293 r3426982  
    33 * Plugin Name: Ansera Search
    44 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content.
    5  * Version: 1.1.19
     5 * Version: 1.1.20
    66 * Author: Ansera.AI
    77 * Author URI:  https://www.ansera.ai/
     
    5656
    5757add_action('plugins_loaded', 'ansera_search_run_updates');
     58
     59$ansera_web_content_type = 'generic';
    5860
    5961function ansera_search_run_updates() {
     
    23132315function ansera_fetch_page_content($post)
    23142316{
     2317    global $ansera_web_content_type;
     2318
     2319    $ansera_web_content_type = 'wordpress';
    23152320    $type = ansera_get_builder_type($post->ID);
    23162321    $web_data = '';
     
    23182323    {
    23192324        case "bricks":
     2325            $ansera_web_content_type = 'bricks';
    23202326            //$web_data = Bricks\Helpers::get_bricks_data( $post->ID, 'content' );
    23212327            $web_data = get_post_meta( $post->ID, '_bricks_page_content', true );
     
    23242330                $web_data = get_post_meta( $post->ID, '_bricks_page_content_2', true );
    23252331            }
    2326             $web_data = ansera_maybe_unserialize_data($web_data);
     2332            if(empty($web_data))
     2333            {
     2334                $web_data = get_post_meta( $post->ID, '_bricks_page_content', true );
     2335            }
     2336            /* $web_data = ansera_maybe_unserialize_data($web_data);
    23272337
    23282338            $html_blocks = array_column(
     
    23352345
    23362346            $html_only = array_column($html_blocks, 'text');
    2337             $web_data = implode("\n\n", $html_only);
     2347            $web_data = implode("\n\n", $html_only); */
    23382348            break;
    23392349        case "oxygen":
     
    23532363function ansera_search_send_post_to_rag($post)
    23542364{
     2365    global $ansera_web_content_type;
    23552366    if (empty($post->page_title)) {
    23562367        ansera_search_mark_post_as_synced_with_status($post->ID, 'error',"Post ID: " . $post->ID . " is missing data(title or web_data). Skipping...");
     
    23772388    {
    23782389        $web_data = ansera_fetch_page_content($post);
    2379        
    2380     }
    2381    
     2390    }
     2391   
     2392    global $ansera_web_content_type;
     2393
    23822394    $page_title = $post->page_title; // Post title
    23832395    $json_array =  [
     
    23862398        "page_title" => $page_title,
    23872399        "page_id" => $post_id,
     2400        "web_content_type" => $ansera_web_content_type
    23882401    ];
    23892402    $json = ($json_array);
  • ansera-search/tags/1.1.20/readme.txt

    r3426293 r3426982  
    55Tested up to: 6.8
    66Requires PHP: 7.2
    7 Stable tag: 1.1.19
     7Stable tag: 1.1.20
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
    98 = 1.1.19 =
     98= 1.1.20 =
    9999* Given support to Divi, Bricks, Oxygen, Beaver theme builders.
    100100
  • ansera-search/trunk/ansera_search.php

    r3426293 r3426982  
    33 * Plugin Name: Ansera Search
    44 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content.
    5  * Version: 1.1.19
     5 * Version: 1.1.20
    66 * Author: Ansera.AI
    77 * Author URI:  https://www.ansera.ai/
     
    5656
    5757add_action('plugins_loaded', 'ansera_search_run_updates');
     58
     59$ansera_web_content_type = 'generic';
    5860
    5961function ansera_search_run_updates() {
     
    23132315function ansera_fetch_page_content($post)
    23142316{
     2317    global $ansera_web_content_type;
     2318
     2319    $ansera_web_content_type = 'wordpress';
    23152320    $type = ansera_get_builder_type($post->ID);
    23162321    $web_data = '';
     
    23182323    {
    23192324        case "bricks":
     2325            $ansera_web_content_type = 'bricks';
    23202326            //$web_data = Bricks\Helpers::get_bricks_data( $post->ID, 'content' );
    23212327            $web_data = get_post_meta( $post->ID, '_bricks_page_content', true );
     
    23242330                $web_data = get_post_meta( $post->ID, '_bricks_page_content_2', true );
    23252331            }
    2326             $web_data = ansera_maybe_unserialize_data($web_data);
     2332            if(empty($web_data))
     2333            {
     2334                $web_data = get_post_meta( $post->ID, '_bricks_page_content', true );
     2335            }
     2336            /* $web_data = ansera_maybe_unserialize_data($web_data);
    23272337
    23282338            $html_blocks = array_column(
     
    23352345
    23362346            $html_only = array_column($html_blocks, 'text');
    2337             $web_data = implode("\n\n", $html_only);
     2347            $web_data = implode("\n\n", $html_only); */
    23382348            break;
    23392349        case "oxygen":
     
    23532363function ansera_search_send_post_to_rag($post)
    23542364{
     2365    global $ansera_web_content_type;
    23552366    if (empty($post->page_title)) {
    23562367        ansera_search_mark_post_as_synced_with_status($post->ID, 'error',"Post ID: " . $post->ID . " is missing data(title or web_data). Skipping...");
     
    23772388    {
    23782389        $web_data = ansera_fetch_page_content($post);
    2379        
    2380     }
    2381    
     2390    }
     2391   
     2392    global $ansera_web_content_type;
     2393
    23822394    $page_title = $post->page_title; // Post title
    23832395    $json_array =  [
     
    23862398        "page_title" => $page_title,
    23872399        "page_id" => $post_id,
     2400        "web_content_type" => $ansera_web_content_type
    23882401    ];
    23892402    $json = ($json_array);
  • ansera-search/trunk/readme.txt

    r3426293 r3426982  
    55Tested up to: 6.8
    66Requires PHP: 7.2
    7 Stable tag: 1.1.19
     7Stable tag: 1.1.20
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    9696
    9797== Changelog ==
    98 = 1.1.19 =
     98= 1.1.20 =
    9999* Given support to Divi, Bricks, Oxygen, Beaver theme builders.
    100100
Note: See TracChangeset for help on using the changeset viewer.