Changeset 3360532
- Timestamp:
- 09/12/2025 12:45:23 PM (7 months ago)
- Location:
- ansera-search/trunk
- Files:
-
- 2 edited
-
ansera_search.php (modified) (6 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ansera-search/trunk/ansera_search.php
r3349746 r3360532 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. 45 * Version: 1.1.5 6 6 * Author: Ansera.AI 7 7 * Author URI: https://www.ansera.ai/ … … 26 26 add_action('admin_enqueue_scripts', 'ansera_search_enqueue_admin_assets'); 27 27 register_activation_hook(__FILE__, "ansera_search_registration"); 28 register_deactivation_hook(__FILE__, 'ansera_search_on_uninstall'); 28 29 add_filter('wp_nav_menu_items', 'ansera_search_add_to_menu', 10, 2); 29 30 add_action('wp_ajax_ansera_search_likedislike_request', 'ansera_search_likedislike_request'); … … 92 93 } 93 94 94 95 95 function ansera_search_on_uninstall() 96 { 97 ansera_search_send_status('uninstalled'); 98 } 96 99 97 100 const ANSERA_SEARCH_SYNC_COUNT = 'ansera_search_sync_count'; … … 1877 1880 } 1878 1881 1882 function ansera_search_send_status($status) 1883 { 1884 try { 1885 $option_name = "ansera_search_api_key"; 1886 $token = get_option($option_name); 1887 if (!$token) { 1888 throw new Exception("No Token Found!!!"); 1889 } 1890 $headers = [ 1891 'Content-Type' => 'application/json', 1892 'DOMAIN-TOKEN' => $token, 1893 ]; 1894 1895 1896 $url = esc_url(get_option("ansera_search_host_url") . "/api/domain-status"); 1897 $postParameter = ["status" => $status]; 1898 1899 1900 $response = wp_remote_post( $url, array( 1901 'body' => wp_json_encode($postParameter), 1902 'headers' => $headers, 1903 'timeout' => 15, 1904 ) ); 1905 } 1906 catch(Exception $e) 1907 { 1908 1909 } 1910 } 1879 1911 1880 1912 function ansera_search_register_token() … … 1911 1943 ); 1912 1944 } 1945 } 1946 else { 1947 ansera_search_send_status('installed'); 1913 1948 } 1914 1949 } … … 2627 2662 "page_id" => $post_id, 2628 2663 ]; 2629 $json = json_encode($json_array);2664 $json = ($json_array); 2630 2665 2631 2666 $response = ansera_search_send_synchronous_request(esc_url(get_option("ansera_search_host_url") . "/api/web-content"),$json,$url,$post_id); -
ansera-search/trunk/readme.txt
r3349746 r3360532 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.2 7 Stable tag: 1.1. 47 Stable tag: 1.1.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 93 93 94 94 == Changelog == 95 = 1.1.5 = 96 * Fixed DataSync issue bug 97 95 98 = 1.1.4 = 96 99 * Added support for external documents syncing (Google Drive or Direct File URLs)
Note: See TracChangeset
for help on using the changeset viewer.