Changeset 3490088
- Timestamp:
- 03/24/2026 02:06:50 PM (8 days ago)
- Location:
- ai-builder
- Files:
-
- 5 edited
- 9 copied
-
tags/2.5.9 (copied) (copied from ai-builder/trunk)
-
tags/2.5.9/admin/pages/account.php (copied) (copied from ai-builder/trunk/admin/pages/account.php)
-
tags/2.5.9/admin/pages/credits.php (copied) (copied from ai-builder/trunk/admin/pages/credits.php)
-
tags/2.5.9/aibui-builder.php (copied) (copied from ai-builder/trunk/aibui-builder.php) (6 diffs)
-
tags/2.5.9/assets/css/account.css (copied) (copied from ai-builder/trunk/assets/css/account.css)
-
tags/2.5.9/assets/css/chat-widget.css (copied) (copied from ai-builder/trunk/assets/css/chat-widget.css)
-
tags/2.5.9/assets/js/account.js (copied) (copied from ai-builder/trunk/assets/js/account.js)
-
tags/2.5.9/assets/js/chat-widget.js (copied) (copied from ai-builder/trunk/assets/js/chat-widget.js) (3 diffs)
-
tags/2.5.9/assets/js/multi-page.js (modified) (1 diff)
-
tags/2.5.9/readme.txt (copied) (copied from ai-builder/trunk/readme.txt) (1 diff)
-
trunk/aibui-builder.php (modified) (6 diffs)
-
trunk/assets/js/chat-widget.js (modified) (3 diffs)
-
trunk/assets/js/multi-page.js (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ai-builder/tags/2.5.9/aibui-builder.php
r3489975 r3490088 4 4 * Plugin URI: https://website-ai-builder.com/ 5 5 * Description: This plugin is used to build your website with AI. 6 * Version: 2.5. 86 * Version: 2.5.9 7 7 * Author: enkic 8 8 * Author URI: https://enkicorbin.fr/ … … 18 18 19 19 // Définir la version du plugin 20 define('AIBUI_VERSION', '2.5. 8');20 define('AIBUI_VERSION', '2.5.9'); 21 21 22 22 /** … … 227 227 } 228 228 return ''; 229 } 230 231 /** 232 * Get up to 15 active plugin names for AI context. 233 * 234 * @return array<int, string> 235 */ 236 function aibui_get_active_plugins_context() 237 { 238 // Ensure WordPress plugin helpers are available. 239 if (!function_exists('get_plugins')) { 240 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 241 } 242 243 $installed_plugins = function_exists('get_plugins') ? get_plugins() : array(); 244 $active_plugins = (array) get_option('active_plugins', array()); 245 $active_plugins = array_slice($active_plugins, 0, 15); 246 247 $plugin_names = array(); 248 foreach ($active_plugins as $plugin_file) { 249 $plugin_file = (string) $plugin_file; 250 if (isset($installed_plugins[$plugin_file]['Name']) && $installed_plugins[$plugin_file]['Name'] !== '') { 251 $plugin_names[] = sanitize_text_field($installed_plugins[$plugin_file]['Name']); 252 } else { 253 $plugin_names[] = sanitize_text_field($plugin_file); 254 } 255 } 256 257 return array_values(array_slice($plugin_names, 0, 15)); 258 } 259 260 /** 261 * Get current WordPress version. 262 * 263 * @return string 264 */ 265 function aibui_get_wordpress_version() 266 { 267 return (string) get_bloginfo('version'); 229 268 } 230 269 … … 519 558 // Active theme name 520 559 'activeThemeName' => aibui_get_active_theme_name(), 560 // Active plugins context (max 15) 561 'sitePlugins' => aibui_get_active_plugins_context(), 562 // Current WordPress version 563 'wordpressVersion' => aibui_get_wordpress_version(), 521 564 ) 522 565 ); … … 536 579 'ajaxurl' => admin_url('admin-ajax.php'), 537 580 'nonce' => wp_create_nonce('aibui_nonce'), 581 // Keep editor context keys to avoid overriding data needed by chat-widget. 582 'isPatternEditor' => ($hook === 'site-editor.php'), 583 'wooCommerceInstalled' => aibui_is_woocommerce_installed(), 538 584 // Active theme name 539 585 'activeThemeName' => aibui_get_active_theme_name(), 586 // Active plugins context (max 15) 587 'sitePlugins' => aibui_get_active_plugins_context(), 588 // Current WordPress version 589 'wordpressVersion' => aibui_get_wordpress_version(), 540 590 ) 541 591 ); … … 719 769 // Active theme name 720 770 'activeThemeName' => aibui_get_active_theme_name(), 771 // Active plugins context (max 15) 772 'sitePlugins' => aibui_get_active_plugins_context(), 773 // Current WordPress version 774 'wordpressVersion' => aibui_get_wordpress_version(), 721 775 ) 722 776 ); -
ai-builder/tags/2.5.9/assets/js/chat-widget.js
r3489975 r3490088 1378 1378 const wooCommerceInstalled = !!(typeof aiBuilderEditorVars !== 'undefined' && aiBuilderEditorVars.wooCommerceInstalled && aiBuilderEditorVars.wooCommerceInstalled !== '0'); 1379 1379 const activeThemeName = (typeof aiBuilderEditorVars !== 'undefined' && aiBuilderEditorVars.activeThemeName) ? aiBuilderEditorVars.activeThemeName : ((typeof aiBuilderVars !== 'undefined' && aiBuilderVars.activeThemeName) ? aiBuilderVars.activeThemeName : ''); 1380 const sitePlugins = (typeof aiBuilderVars !== 'undefined' && Array.isArray(aiBuilderVars.sitePlugins)) ? aiBuilderVars.sitePlugins.slice(0, 15) : []; 1381 const wordpressVersion = (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wordpressVersion) ? String(aiBuilderVars.wordpressVersion) : ''; 1380 1382 // return; 1381 1383 … … 1389 1391 wooCommerceInstalled: wooCommerceInstalled, 1390 1392 activeThemeName: activeThemeName, 1393 sitePlugins: sitePlugins, 1394 wordpressVersion: wordpressVersion, 1391 1395 }; 1392 1396 res = await fetch( … … 1408 1412 wooCommerceInstalled: wooCommerceInstalled, 1409 1413 activeThemeName: activeThemeName, 1414 sitePlugins: sitePlugins, 1415 wordpressVersion: wordpressVersion, 1410 1416 }; 1411 1417 res = await fetch( -
ai-builder/tags/2.5.9/assets/js/multi-page.js
r3443896 r3490088 478 478 wooCommerceInstalled: !!(typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wooCommerceInstalled && aiBuilderVars.wooCommerceInstalled !== '0'), 479 479 activeThemeName: (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.activeThemeName) ? aiBuilderVars.activeThemeName : '', 480 sitePlugins: (typeof aiBuilderVars !== 'undefined' && Array.isArray(aiBuilderVars.sitePlugins)) ? aiBuilderVars.sitePlugins.slice(0, 15) : [], 481 wordpressVersion: (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wordpressVersion) ? String(aiBuilderVars.wordpressVersion) : '', 480 482 }), 481 483 }); -
ai-builder/tags/2.5.9/readme.txt
r3489975 r3490088 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.5. 87 Stable tag: 2.5.9 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
ai-builder/trunk/aibui-builder.php
r3489975 r3490088 4 4 * Plugin URI: https://website-ai-builder.com/ 5 5 * Description: This plugin is used to build your website with AI. 6 * Version: 2.5. 86 * Version: 2.5.9 7 7 * Author: enkic 8 8 * Author URI: https://enkicorbin.fr/ … … 18 18 19 19 // Définir la version du plugin 20 define('AIBUI_VERSION', '2.5. 8');20 define('AIBUI_VERSION', '2.5.9'); 21 21 22 22 /** … … 227 227 } 228 228 return ''; 229 } 230 231 /** 232 * Get up to 15 active plugin names for AI context. 233 * 234 * @return array<int, string> 235 */ 236 function aibui_get_active_plugins_context() 237 { 238 // Ensure WordPress plugin helpers are available. 239 if (!function_exists('get_plugins')) { 240 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 241 } 242 243 $installed_plugins = function_exists('get_plugins') ? get_plugins() : array(); 244 $active_plugins = (array) get_option('active_plugins', array()); 245 $active_plugins = array_slice($active_plugins, 0, 15); 246 247 $plugin_names = array(); 248 foreach ($active_plugins as $plugin_file) { 249 $plugin_file = (string) $plugin_file; 250 if (isset($installed_plugins[$plugin_file]['Name']) && $installed_plugins[$plugin_file]['Name'] !== '') { 251 $plugin_names[] = sanitize_text_field($installed_plugins[$plugin_file]['Name']); 252 } else { 253 $plugin_names[] = sanitize_text_field($plugin_file); 254 } 255 } 256 257 return array_values(array_slice($plugin_names, 0, 15)); 258 } 259 260 /** 261 * Get current WordPress version. 262 * 263 * @return string 264 */ 265 function aibui_get_wordpress_version() 266 { 267 return (string) get_bloginfo('version'); 229 268 } 230 269 … … 519 558 // Active theme name 520 559 'activeThemeName' => aibui_get_active_theme_name(), 560 // Active plugins context (max 15) 561 'sitePlugins' => aibui_get_active_plugins_context(), 562 // Current WordPress version 563 'wordpressVersion' => aibui_get_wordpress_version(), 521 564 ) 522 565 ); … … 536 579 'ajaxurl' => admin_url('admin-ajax.php'), 537 580 'nonce' => wp_create_nonce('aibui_nonce'), 581 // Keep editor context keys to avoid overriding data needed by chat-widget. 582 'isPatternEditor' => ($hook === 'site-editor.php'), 583 'wooCommerceInstalled' => aibui_is_woocommerce_installed(), 538 584 // Active theme name 539 585 'activeThemeName' => aibui_get_active_theme_name(), 586 // Active plugins context (max 15) 587 'sitePlugins' => aibui_get_active_plugins_context(), 588 // Current WordPress version 589 'wordpressVersion' => aibui_get_wordpress_version(), 540 590 ) 541 591 ); … … 719 769 // Active theme name 720 770 'activeThemeName' => aibui_get_active_theme_name(), 771 // Active plugins context (max 15) 772 'sitePlugins' => aibui_get_active_plugins_context(), 773 // Current WordPress version 774 'wordpressVersion' => aibui_get_wordpress_version(), 721 775 ) 722 776 ); -
ai-builder/trunk/assets/js/chat-widget.js
r3489975 r3490088 1378 1378 const wooCommerceInstalled = !!(typeof aiBuilderEditorVars !== 'undefined' && aiBuilderEditorVars.wooCommerceInstalled && aiBuilderEditorVars.wooCommerceInstalled !== '0'); 1379 1379 const activeThemeName = (typeof aiBuilderEditorVars !== 'undefined' && aiBuilderEditorVars.activeThemeName) ? aiBuilderEditorVars.activeThemeName : ((typeof aiBuilderVars !== 'undefined' && aiBuilderVars.activeThemeName) ? aiBuilderVars.activeThemeName : ''); 1380 const sitePlugins = (typeof aiBuilderVars !== 'undefined' && Array.isArray(aiBuilderVars.sitePlugins)) ? aiBuilderVars.sitePlugins.slice(0, 15) : []; 1381 const wordpressVersion = (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wordpressVersion) ? String(aiBuilderVars.wordpressVersion) : ''; 1380 1382 // return; 1381 1383 … … 1389 1391 wooCommerceInstalled: wooCommerceInstalled, 1390 1392 activeThemeName: activeThemeName, 1393 sitePlugins: sitePlugins, 1394 wordpressVersion: wordpressVersion, 1391 1395 }; 1392 1396 res = await fetch( … … 1408 1412 wooCommerceInstalled: wooCommerceInstalled, 1409 1413 activeThemeName: activeThemeName, 1414 sitePlugins: sitePlugins, 1415 wordpressVersion: wordpressVersion, 1410 1416 }; 1411 1417 res = await fetch( -
ai-builder/trunk/assets/js/multi-page.js
r3443896 r3490088 478 478 wooCommerceInstalled: !!(typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wooCommerceInstalled && aiBuilderVars.wooCommerceInstalled !== '0'), 479 479 activeThemeName: (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.activeThemeName) ? aiBuilderVars.activeThemeName : '', 480 sitePlugins: (typeof aiBuilderVars !== 'undefined' && Array.isArray(aiBuilderVars.sitePlugins)) ? aiBuilderVars.sitePlugins.slice(0, 15) : [], 481 wordpressVersion: (typeof aiBuilderVars !== 'undefined' && aiBuilderVars.wordpressVersion) ? String(aiBuilderVars.wordpressVersion) : '', 480 482 }), 481 483 }); -
ai-builder/trunk/readme.txt
r3489975 r3490088 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.5. 87 Stable tag: 2.5.9 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.