Changeset 3426241
- Timestamp:
- 12/23/2025 01:44:07 PM (3 months ago)
- Location:
- ansera-search
- Files:
-
- 2 deleted
- 2 edited
- 5 copied
-
tags/1.1.14 (copied) (copied from ansera-search/trunk)
-
tags/1.1.14/ansera_search.php (copied) (copied from ansera-search/trunk/ansera_search.php) (4 diffs)
-
tags/1.1.14/css/ansera_search_admin_settings.css (copied) (copied from ansera-search/trunk/css/ansera_search_admin_settings.css)
-
tags/1.1.14/embed.js (deleted)
-
tags/1.1.14/includes/action-scheduler (deleted)
-
tags/1.1.14/js/ansera_search_admin.js (copied) (copied from ansera-search/trunk/js/ansera_search_admin.js)
-
tags/1.1.14/readme.txt (copied) (copied from ansera-search/trunk/readme.txt) (2 diffs)
-
trunk/ansera_search.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ansera-search/tags/1.1.14/ansera_search.php
r3425403 r3426241 3 3 * Plugin Name: Ansera Search 4 4 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content. 5 * Version: 1.1.1 35 * Version: 1.1.14 6 6 * Author: Ansera.AI 7 7 * Author URI: https://www.ansera.ai/ … … 1217 1217 1218 1218 /> 1219 Search Icon <div class="ansera-wp-plugin-help-container"><span class="dashicons dashicons-editor-help"></span><span class="ansera-wp-plugin-tooltip-text"><?php _e( 'Search Icon will work only in supported themes.', 'text-domain' ); ?></span></div>1220 1219 </td> 1221 1220 … … 2273 2272 } 2274 2273 2274 function ansera_get_builder_type( $post_id ) { 2275 2276 if ( class_exists( '\Bricks\Helpers' ) ) return 'bricks'; 2277 if ( metadata_exists( 'post', $post_id, '_elementor_data' ) ) return 'elementor'; 2278 if ( metadata_exists( 'post', $post_id, 'ct_builder_json' ) ) return 'oxygen'; 2279 if ( metadata_exists( 'post', $post_id, '_fl_builder_data' ) ) return 'beaver'; 2280 $theme = wp_get_theme(); 2281 if( ($theme->get( 'Name' ) === 'Divi' || $theme->get_template() === 'Divi') && function_exists('do_shortcode')) return 'divi'; 2282 2283 return 'classic'; 2284 } 2285 2286 function ansera_fetch_page_content($post) 2287 { 2288 $type = ansera_get_builder_type($post->ID); 2289 $web_data = ''; 2290 switch($type) 2291 { 2292 case "bricks": 2293 $web_data = Bricks\Helpers::get_bricks_data( $post_id, 'content' ); 2294 break; 2295 case "oxygen": 2296 $oxygen = get_post_meta( $post->ID, 'ct_builder_json', true ); 2297 $web_data = json_decode( $oxygen, true ); 2298 break; 2299 case "beaver": 2300 $web_data = get_post_meta( $post->ID, '_fl_builder_data', true ); 2301 break; 2302 case "divi": 2303 $web_data = do_shortcode( get_post_field( 'post_content', $post->ID ) ); 2304 break; 2305 } 2306 return $web_data; 2307 } 2308 2275 2309 function ansera_search_send_post_to_rag($post) 2276 2310 { … … 2298 2332 if(empty($web_data)) 2299 2333 { 2300 $bricks_content = get_post_meta($post->ID, '_bricks_page_content', true); 2301 if (!empty($bricks_content)) { 2302 $web_data = json_decode($bricks_content, true); 2303 } 2334 $web_data = ansera_fetch_page_content($post); 2304 2335 } 2305 2336 -
ansera-search/tags/1.1.14/readme.txt
r3425403 r3426241 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.1.1 37 Stable tag: 1.1.14 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 96 96 97 97 == Changelog == 98 = 1.1.14 = 99 * Given support to Divi, Bricks, Oxygen, Beaver theme builders. 100 98 101 = 1.1.13 = 99 102 * Given support to enable Google/Zoho/Calendly Meeting module. Enable it from Ansera customer portal -
ansera-search/trunk/ansera_search.php
r3425403 r3426241 3 3 * Plugin Name: Ansera Search 4 4 * Description: Ansera AI-powered search plugin provides answers based on your existing Wordpress content. 5 * Version: 1.1.1 35 * Version: 1.1.14 6 6 * Author: Ansera.AI 7 7 * Author URI: https://www.ansera.ai/ … … 1217 1217 1218 1218 /> 1219 Search Icon <div class="ansera-wp-plugin-help-container"><span class="dashicons dashicons-editor-help"></span><span class="ansera-wp-plugin-tooltip-text"><?php _e( 'Search Icon will work only in supported themes.', 'text-domain' ); ?></span></div>1220 1219 </td> 1221 1220 … … 2273 2272 } 2274 2273 2274 function ansera_get_builder_type( $post_id ) { 2275 2276 if ( class_exists( '\Bricks\Helpers' ) ) return 'bricks'; 2277 if ( metadata_exists( 'post', $post_id, '_elementor_data' ) ) return 'elementor'; 2278 if ( metadata_exists( 'post', $post_id, 'ct_builder_json' ) ) return 'oxygen'; 2279 if ( metadata_exists( 'post', $post_id, '_fl_builder_data' ) ) return 'beaver'; 2280 $theme = wp_get_theme(); 2281 if( ($theme->get( 'Name' ) === 'Divi' || $theme->get_template() === 'Divi') && function_exists('do_shortcode')) return 'divi'; 2282 2283 return 'classic'; 2284 } 2285 2286 function ansera_fetch_page_content($post) 2287 { 2288 $type = ansera_get_builder_type($post->ID); 2289 $web_data = ''; 2290 switch($type) 2291 { 2292 case "bricks": 2293 $web_data = Bricks\Helpers::get_bricks_data( $post_id, 'content' ); 2294 break; 2295 case "oxygen": 2296 $oxygen = get_post_meta( $post->ID, 'ct_builder_json', true ); 2297 $web_data = json_decode( $oxygen, true ); 2298 break; 2299 case "beaver": 2300 $web_data = get_post_meta( $post->ID, '_fl_builder_data', true ); 2301 break; 2302 case "divi": 2303 $web_data = do_shortcode( get_post_field( 'post_content', $post->ID ) ); 2304 break; 2305 } 2306 return $web_data; 2307 } 2308 2275 2309 function ansera_search_send_post_to_rag($post) 2276 2310 { … … 2298 2332 if(empty($web_data)) 2299 2333 { 2300 $bricks_content = get_post_meta($post->ID, '_bricks_page_content', true); 2301 if (!empty($bricks_content)) { 2302 $web_data = json_decode($bricks_content, true); 2303 } 2334 $web_data = ansera_fetch_page_content($post); 2304 2335 } 2305 2336 -
ansera-search/trunk/readme.txt
r3425403 r3426241 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.1.1 37 Stable tag: 1.1.14 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 96 96 97 97 == Changelog == 98 = 1.1.14 = 99 * Given support to Divi, Bricks, Oxygen, Beaver theme builders. 100 98 101 = 1.1.13 = 99 102 * Given support to enable Google/Zoho/Calendly Meeting module. Enable it from Ansera customer portal
Note: See TracChangeset
for help on using the changeset viewer.