Changeset 3470237
- Timestamp:
- 02/26/2026 11:49:19 AM (5 weeks ago)
- Location:
- ai-builder
- Files:
-
- 8 edited
- 54 copied
-
tags/2.5.1 (copied) (copied from ai-builder/trunk)
-
tags/2.5.1/admin/menu.php (copied) (copied from ai-builder/trunk/admin/menu.php)
-
tags/2.5.1/admin/pages/agent-chat.php (copied) (copied from ai-builder/trunk/admin/pages/agent-chat.php)
-
tags/2.5.1/admin/pages/credits.php (copied) (copied from ai-builder/trunk/admin/pages/credits.php)
-
tags/2.5.1/admin/pages/headers-footers.php (copied) (copied from ai-builder/trunk/admin/pages/headers-footers.php) (4 diffs)
-
tags/2.5.1/admin/pages/multi-page.php (copied) (copied from ai-builder/trunk/admin/pages/multi-page.php)
-
tags/2.5.1/admin/pages/settings.php (copied) (copied from ai-builder/trunk/admin/pages/settings.php)
-
tags/2.5.1/admin/pages/translation-settings.php (copied) (copied from ai-builder/trunk/admin/pages/translation-settings.php)
-
tags/2.5.1/admin/pages/tuto.php (copied) (copied from ai-builder/trunk/admin/pages/tuto.php) (3 diffs)
-
tags/2.5.1/aibui-builder.php (copied) (copied from ai-builder/trunk/aibui-builder.php) (3 diffs)
-
tags/2.5.1/assets/css/account.css (copied) (copied from ai-builder/trunk/assets/css/account.css)
-
tags/2.5.1/assets/css/chat-widget.css (copied) (copied from ai-builder/trunk/assets/css/chat-widget.css)
-
tags/2.5.1/assets/css/credits.css (copied) (copied from ai-builder/trunk/assets/css/credits.css)
-
tags/2.5.1/assets/css/language-switcher.css (copied) (copied from ai-builder/trunk/assets/css/language-switcher.css)
-
tags/2.5.1/assets/css/multi-page.css (copied) (copied from ai-builder/trunk/assets/css/multi-page.css)
-
tags/2.5.1/assets/css/settings.css (copied) (copied from ai-builder/trunk/assets/css/settings.css)
-
tags/2.5.1/assets/css/translation.css (copied) (copied from ai-builder/trunk/assets/css/translation.css)
-
tags/2.5.1/assets/js/account.js (copied) (copied from ai-builder/trunk/assets/js/account.js)
-
tags/2.5.1/assets/js/agent-chat.js (copied) (copied from ai-builder/trunk/assets/js/agent-chat.js)
-
tags/2.5.1/assets/js/build/index.asset.php (copied) (copied from ai-builder/trunk/assets/js/build/index.asset.php)
-
tags/2.5.1/assets/js/build/index.js (copied) (copied from ai-builder/trunk/assets/js/build/index.js)
-
tags/2.5.1/assets/js/chat-widget.js (copied) (copied from ai-builder/trunk/assets/js/chat-widget.js) (1 diff)
-
tags/2.5.1/assets/js/credits.js (copied) (copied from ai-builder/trunk/assets/js/credits.js)
-
tags/2.5.1/assets/js/language-switcher-block.js (copied) (copied from ai-builder/trunk/assets/js/language-switcher-block.js)
-
tags/2.5.1/assets/js/multi-page-apply.js (copied) (copied from ai-builder/trunk/assets/js/multi-page-apply.js)
-
tags/2.5.1/assets/js/multi-page.js (copied) (copied from ai-builder/trunk/assets/js/multi-page.js)
-
tags/2.5.1/assets/js/pattern-translation.js (copied) (copied from ai-builder/trunk/assets/js/pattern-translation.js) (2 diffs)
-
tags/2.5.1/assets/js/review-banner.js (copied) (copied from ai-builder/trunk/assets/js/review-banner.js)
-
tags/2.5.1/assets/js/settings.js (copied) (copied from ai-builder/trunk/assets/js/settings.js)
-
tags/2.5.1/assets/js/src/editor-blocks/ai-block/ai-block.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/ai-block/ai-block.js)
-
tags/2.5.1/assets/js/src/editor-blocks/image-ai-blocks/image-ai-controls.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/image-ai-blocks/image-ai-controls.js)
-
tags/2.5.1/assets/js/src/editor-blocks/text-ai-blocks/text-ai-controls.js (copied) (copied from ai-builder/trunk/assets/js/src/editor-blocks/text-ai-blocks/text-ai-controls.js)
-
tags/2.5.1/assets/js/translation.js (copied) (copied from ai-builder/trunk/assets/js/translation.js)
-
tags/2.5.1/composer.json (copied) (copied from ai-builder/trunk/composer.json)
-
tags/2.5.1/composer.lock (copied) (copied from ai-builder/trunk/composer.lock)
-
tags/2.5.1/config.js (copied) (copied from ai-builder/trunk/config.js)
-
tags/2.5.1/debug-language.log (copied) (copied from ai-builder/trunk/debug-language.log)
-
tags/2.5.1/debug-template-part.log (copied) (copied from ai-builder/trunk/debug-template-part.log) (1 diff)
-
tags/2.5.1/debug-unescape.log (copied) (copied from ai-builder/trunk/debug-unescape.log)
-
tags/2.5.1/includes/class-agent-chat-handler.php (copied) (copied from ai-builder/trunk/includes/class-agent-chat-handler.php)
-
tags/2.5.1/includes/class-agent-discovery-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-discovery-service.php)
-
tags/2.5.1/includes/class-agent-execution-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-execution-service.php)
-
tags/2.5.1/includes/class-agent-security-service.php (copied) (copied from ai-builder/trunk/includes/class-agent-security-service.php)
-
tags/2.5.1/includes/class-ajax-handler.php (copied) (copied from ai-builder/trunk/includes/class-ajax-handler.php)
-
tags/2.5.1/includes/class-css-handler.php (copied) (copied from ai-builder/trunk/includes/class-css-handler.php)
-
tags/2.5.1/includes/class-generations-storage.php (copied) (copied from ai-builder/trunk/includes/class-generations-storage.php)
-
tags/2.5.1/includes/class-js-handler.php (copied) (copied from ai-builder/trunk/includes/class-js-handler.php)
-
tags/2.5.1/includes/class-translation-handler.php (copied) (copied from ai-builder/trunk/includes/class-translation-handler.php)
-
tags/2.5.1/includes/class-translation-manager.php (copied) (copied from ai-builder/trunk/includes/class-translation-manager.php) (1 diff)
-
tags/2.5.1/includes/class-translation-settings.php (copied) (copied from ai-builder/trunk/includes/class-translation-settings.php)
-
tags/2.5.1/includes/class-translation-switcher.php (copied) (copied from ai-builder/trunk/includes/class-translation-switcher.php)
-
tags/2.5.1/package-lock.json (copied) (copied from ai-builder/trunk/package-lock.json)
-
tags/2.5.1/readme.txt (copied) (copied from ai-builder/trunk/readme.txt) (1 diff)
-
tags/2.5.1/templates (copied) (copied from ai-builder/trunk/templates)
-
trunk/admin/pages/headers-footers.php (modified) (4 diffs)
-
trunk/admin/pages/tuto.php (modified) (3 diffs)
-
trunk/aibui-builder.php (modified) (3 diffs)
-
trunk/assets/js/chat-widget.js (modified) (1 diff)
-
trunk/assets/js/pattern-translation.js (modified) (2 diffs)
-
trunk/debug-template-part.log (modified) (1 diff)
-
trunk/includes/class-translation-manager.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ai-builder/tags/2.5.1/admin/pages/headers-footers.php
r3460851 r3470237 8 8 return; 9 9 } 10 11 // Check if the active theme is a supported FSE theme 12 $supported_fse_themes = array( 13 'twentytwentytwo', 14 'twentytwentythree', 15 'twentytwentyfour', 16 'twentytwentyfive', 17 'spectra-one', 18 'neve-fse', 19 'raft', 20 'ollie', 21 'ona', 22 'ona-studio', 23 'ona-fashion', 24 'ona-architecture', 25 'ona-photography', 26 'blockbase', 27 'bricksy', 28 'poe', 29 'beaumont', 30 'abisko', 31 'hideo', 32 'quadrat', 33 'videomaker', 34 'axton', 35 'artsylens', 36 'catch-fse', 37 'inspiro-blocks', 38 'plover', 39 'jace', 40 'miniblock-ooak', 41 'yith-wonder', 42 ); 43 44 $current_theme = wp_get_theme(); 45 $current_theme_slug = $current_theme ? $current_theme->get_stylesheet() : ''; 46 $is_supported_fse = in_array($current_theme_slug, $supported_fse_themes, true); 10 47 11 48 // Get Site Editor URLs for header and footer pattern selection … … 15 52 <div class="wrap ai-builder-headers-footers"> 16 53 <div class="ai-headers-footers-container"> 54 <?php if (!$is_supported_fse) : ?> 55 <div class="ai-message ai-message-theme-warning"> 56 <p> 57 <?php esc_html_e("Le thème actuellement installé n'est pas un thème FSE (Full Site Editing). Il n'est donc pas possible de modifier l'en-tête (header) et le pied de page (footer) avec AI Builder.", 'ai-builder'); ?> 58 </p> 59 <p> 60 <?php esc_html_e("Pour activer cette fonctionnalité, installez et activez un thème compatible FSE, par exemple Twenty Twenty-Five, puis revenez sur cette page.", 'ai-builder'); ?> 61 </p> 62 </div> 63 <?php endif; ?> 17 64 <!-- Header --> 18 65 <div class="ai-headers-footers-header"> … … 22 69 23 70 <!-- Main Content --> 24 <div class="ai-headers-footers-content ">71 <div class="ai-headers-footers-content <?php echo !$is_supported_fse ? 'ai-headers-footers-disabled' : ''; ?>"> 25 72 <!-- Step 1: Header --> 26 73 <div class="ai-step-card"> … … 173 220 } 174 221 222 .ai-headers-footers-disabled { 223 opacity: 0.5; 224 filter: grayscale(1); 225 pointer-events: none; 226 user-select: none; 227 } 228 175 229 .ai-step-card { 176 230 background: #ffffff; -
ai-builder/tags/2.5.1/admin/pages/tuto.php
r3412592 r3470237 168 168 <div class="ai-tip-icon">💡</div> 169 169 <div class="ai-tip-content"> 170 <strong>Pro Tip:</strong> The more detailed your prompt, the better the AI-generated content 171 will be. Include information about your target audience, tone, and specific sections you want. 170 <strong>Pro Tip:</strong> If you don’t like how a block looks, you can reset it to the default style by removing the text in the right-hand sidebar under Block → Advanced → Additional CSS class(es). 172 171 </div> 173 172 </div> … … 216 215 <div class="ai-tip-icon">💡</div> 217 216 <div class="ai-tip-content"> 218 <strong>Pro Tip:</strong> AI Blocks are perfect for creating testimonials, product descriptions, 219 FAQ sections, and any other content that needs to be generated dynamically. 217 <strong>Pro Tip:</strong>AI blocks are perfect for adding content in a specific spot while keeping the rest of the page intact. 220 218 </div> 221 219 </div> … … 257 255 <div class="ai-tip-icon">💡</div> 258 256 <div class="ai-tip-content"> 259 <strong>Pro Tip:</strong> Be specific about style, mood, colors, and composition. Include 260 details like "professional", "vintage", "minimalist", or "colorful" to get better results. 257 <strong>Pro Tip:</strong> You can select the aspect ratio when generating the image. 261 258 </div> 262 259 </div> -
ai-builder/tags/2.5.1/aibui-builder.php
r3460851 r3470237 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. 06 * Version: 2.5.1 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. 0');20 define('AIBUI_VERSION', '2.5.1'); 21 21 22 22 /** … … 968 968 array('wp-blocks', 'wp-block-editor', 'wp-element', 'wp-components', 'wp-i18n'), 969 969 filemtime(plugin_dir_path(__FILE__) . 'assets/js/language-switcher-block.js'), 970 true 971 ); 972 973 // Unregister legacy/unused AI Builder blocks from the inserter 974 wp_enqueue_script( 975 'ai-builder-unregister-ai-blocks', 976 plugin_dir_url(__FILE__) . 'assets/js/unregister-ai-blocks.js', 977 array('ai-builder-blocks', 'wp-blocks'), 978 AIBUI_VERSION, 970 979 true 971 980 ); -
ai-builder/tags/2.5.1/assets/js/chat-widget.js
r3460851 r3470237 68 68 // Sinon, si p contient un template/pattern spécifique (ex: /wp_template_part/...), afficher le widget 69 69 return true; 70 }71 72 // Vérifier initialement si on doit afficher le widget73 if (!shouldShowWidgetInSiteEditor()) {74 return; // Ne pas afficher le chat widget75 70 } 76 71 -
ai-builder/tags/2.5.1/assets/js/pattern-translation.js
r3404221 r3470237 79 79 document.body.appendChild(button); 80 80 } 81 } 82 83 // Same visibility logic as the chat widget: 84 // hide the floating button on the pattern selection screen (p=/pattern) 85 // and only show it when a specific template part is being edited. 86 function shouldShowPatternTranslateButton() { 87 const isSiteEditor = window.location.pathname.includes('site-editor.php'); 88 if (!isSiteEditor) { 89 return true; // Always allow outside Site Editor (for safety/future use) 90 } 91 92 const urlParams = new URLSearchParams(window.location.search); 93 const pParam = urlParams.get('p'); 94 95 // Do not show on: 96 // 1. No "p" parameter 97 // 2. p === '/pattern' (pattern chooser screen) 98 if (!pParam || pParam === '/pattern') { 99 return false; 100 } 101 102 return true; 81 103 } 82 104 … … 179 201 const { id, type } = getEditedPostContext(); 180 202 const isPart = id && type === 'wp_template_part'; 181 button.disabled = !isPart; 182 button.style.display = isPart ? '' : 'none'; 203 const shouldShow = isPart && shouldShowPatternTranslateButton(); 204 205 button.disabled = !shouldShow; 206 button.style.display = shouldShow ? '' : 'none'; 183 207 } 184 208 -
ai-builder/tags/2.5.1/debug-template-part.log
r3422788 r3470237 77 77 [2025-12-09 09:41:22][Template Part Translation][found_post] {"post_id":323,"post_title":"Footer"} 78 78 [2025-12-09 09:41:22][Template Part Translation][calling_handle_translation] {"post_id":323,"target_lang":"es"} 79 [2026-02-26 11:22:33][Template Part Translation][start] {"POST":{"action":"aibui_translate_template_part","nonce":"c91aec5dc3","template_part_id":"spectra-one\/\/footer","target_lang":"fr"}} 80 [2026-02-26 11:22:33][Template Part Translation][template_part_id] spectra-one//footer 81 [2026-02-26 11:22:33][Template Part Translation][parsed] {"theme":"spectra-one","slug":"footer"} 82 [2026-02-26 11:22:33][Template Part Translation][query_result] {"found_posts":0,"post_count":1} 83 [2026-02-26 11:22:33][Template Part Translation][found_post] {"post_id":176,"post_title":"Footer"} 84 [2026-02-26 11:22:33][Template Part Translation][calling_handle_translation] {"post_id":176,"target_lang":"fr"} -
ai-builder/tags/2.5.1/includes/class-translation-manager.php
r3404766 r3470237 97 97 } 98 98 if (!$post) { 99 return $permalink; 100 } 101 102 // Only append ai_lang if this post actually belongs to a translation group 103 // and has at least one other translation. Otherwise, keep the URL clean. 104 $group = get_post_meta($post->ID, '_ai_translation_group', true); 105 if (!$group) { 106 return $permalink; 107 } 108 109 $translations = $this->get_group_posts($group, get_post_type($post)); 110 if (empty($translations) || count($translations) <= 1) { 111 // No real translations available for this post 99 112 return $permalink; 100 113 } -
ai-builder/tags/2.5.1/readme.txt
r3460858 r3470237 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.5. 07 Stable tag: 2.5.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
ai-builder/trunk/admin/pages/headers-footers.php
r3460851 r3470237 8 8 return; 9 9 } 10 11 // Check if the active theme is a supported FSE theme 12 $supported_fse_themes = array( 13 'twentytwentytwo', 14 'twentytwentythree', 15 'twentytwentyfour', 16 'twentytwentyfive', 17 'spectra-one', 18 'neve-fse', 19 'raft', 20 'ollie', 21 'ona', 22 'ona-studio', 23 'ona-fashion', 24 'ona-architecture', 25 'ona-photography', 26 'blockbase', 27 'bricksy', 28 'poe', 29 'beaumont', 30 'abisko', 31 'hideo', 32 'quadrat', 33 'videomaker', 34 'axton', 35 'artsylens', 36 'catch-fse', 37 'inspiro-blocks', 38 'plover', 39 'jace', 40 'miniblock-ooak', 41 'yith-wonder', 42 ); 43 44 $current_theme = wp_get_theme(); 45 $current_theme_slug = $current_theme ? $current_theme->get_stylesheet() : ''; 46 $is_supported_fse = in_array($current_theme_slug, $supported_fse_themes, true); 10 47 11 48 // Get Site Editor URLs for header and footer pattern selection … … 15 52 <div class="wrap ai-builder-headers-footers"> 16 53 <div class="ai-headers-footers-container"> 54 <?php if (!$is_supported_fse) : ?> 55 <div class="ai-message ai-message-theme-warning"> 56 <p> 57 <?php esc_html_e("Le thème actuellement installé n'est pas un thème FSE (Full Site Editing). Il n'est donc pas possible de modifier l'en-tête (header) et le pied de page (footer) avec AI Builder.", 'ai-builder'); ?> 58 </p> 59 <p> 60 <?php esc_html_e("Pour activer cette fonctionnalité, installez et activez un thème compatible FSE, par exemple Twenty Twenty-Five, puis revenez sur cette page.", 'ai-builder'); ?> 61 </p> 62 </div> 63 <?php endif; ?> 17 64 <!-- Header --> 18 65 <div class="ai-headers-footers-header"> … … 22 69 23 70 <!-- Main Content --> 24 <div class="ai-headers-footers-content ">71 <div class="ai-headers-footers-content <?php echo !$is_supported_fse ? 'ai-headers-footers-disabled' : ''; ?>"> 25 72 <!-- Step 1: Header --> 26 73 <div class="ai-step-card"> … … 173 220 } 174 221 222 .ai-headers-footers-disabled { 223 opacity: 0.5; 224 filter: grayscale(1); 225 pointer-events: none; 226 user-select: none; 227 } 228 175 229 .ai-step-card { 176 230 background: #ffffff; -
ai-builder/trunk/admin/pages/tuto.php
r3412592 r3470237 168 168 <div class="ai-tip-icon">💡</div> 169 169 <div class="ai-tip-content"> 170 <strong>Pro Tip:</strong> The more detailed your prompt, the better the AI-generated content 171 will be. Include information about your target audience, tone, and specific sections you want. 170 <strong>Pro Tip:</strong> If you don’t like how a block looks, you can reset it to the default style by removing the text in the right-hand sidebar under Block → Advanced → Additional CSS class(es). 172 171 </div> 173 172 </div> … … 216 215 <div class="ai-tip-icon">💡</div> 217 216 <div class="ai-tip-content"> 218 <strong>Pro Tip:</strong> AI Blocks are perfect for creating testimonials, product descriptions, 219 FAQ sections, and any other content that needs to be generated dynamically. 217 <strong>Pro Tip:</strong>AI blocks are perfect for adding content in a specific spot while keeping the rest of the page intact. 220 218 </div> 221 219 </div> … … 257 255 <div class="ai-tip-icon">💡</div> 258 256 <div class="ai-tip-content"> 259 <strong>Pro Tip:</strong> Be specific about style, mood, colors, and composition. Include 260 details like "professional", "vintage", "minimalist", or "colorful" to get better results. 257 <strong>Pro Tip:</strong> You can select the aspect ratio when generating the image. 261 258 </div> 262 259 </div> -
ai-builder/trunk/aibui-builder.php
r3460851 r3470237 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. 06 * Version: 2.5.1 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. 0');20 define('AIBUI_VERSION', '2.5.1'); 21 21 22 22 /** … … 968 968 array('wp-blocks', 'wp-block-editor', 'wp-element', 'wp-components', 'wp-i18n'), 969 969 filemtime(plugin_dir_path(__FILE__) . 'assets/js/language-switcher-block.js'), 970 true 971 ); 972 973 // Unregister legacy/unused AI Builder blocks from the inserter 974 wp_enqueue_script( 975 'ai-builder-unregister-ai-blocks', 976 plugin_dir_url(__FILE__) . 'assets/js/unregister-ai-blocks.js', 977 array('ai-builder-blocks', 'wp-blocks'), 978 AIBUI_VERSION, 970 979 true 971 980 ); -
ai-builder/trunk/assets/js/chat-widget.js
r3460851 r3470237 68 68 // Sinon, si p contient un template/pattern spécifique (ex: /wp_template_part/...), afficher le widget 69 69 return true; 70 }71 72 // Vérifier initialement si on doit afficher le widget73 if (!shouldShowWidgetInSiteEditor()) {74 return; // Ne pas afficher le chat widget75 70 } 76 71 -
ai-builder/trunk/assets/js/pattern-translation.js
r3404221 r3470237 79 79 document.body.appendChild(button); 80 80 } 81 } 82 83 // Same visibility logic as the chat widget: 84 // hide the floating button on the pattern selection screen (p=/pattern) 85 // and only show it when a specific template part is being edited. 86 function shouldShowPatternTranslateButton() { 87 const isSiteEditor = window.location.pathname.includes('site-editor.php'); 88 if (!isSiteEditor) { 89 return true; // Always allow outside Site Editor (for safety/future use) 90 } 91 92 const urlParams = new URLSearchParams(window.location.search); 93 const pParam = urlParams.get('p'); 94 95 // Do not show on: 96 // 1. No "p" parameter 97 // 2. p === '/pattern' (pattern chooser screen) 98 if (!pParam || pParam === '/pattern') { 99 return false; 100 } 101 102 return true; 81 103 } 82 104 … … 179 201 const { id, type } = getEditedPostContext(); 180 202 const isPart = id && type === 'wp_template_part'; 181 button.disabled = !isPart; 182 button.style.display = isPart ? '' : 'none'; 203 const shouldShow = isPart && shouldShowPatternTranslateButton(); 204 205 button.disabled = !shouldShow; 206 button.style.display = shouldShow ? '' : 'none'; 183 207 } 184 208 -
ai-builder/trunk/debug-template-part.log
r3422788 r3470237 77 77 [2025-12-09 09:41:22][Template Part Translation][found_post] {"post_id":323,"post_title":"Footer"} 78 78 [2025-12-09 09:41:22][Template Part Translation][calling_handle_translation] {"post_id":323,"target_lang":"es"} 79 [2026-02-26 11:22:33][Template Part Translation][start] {"POST":{"action":"aibui_translate_template_part","nonce":"c91aec5dc3","template_part_id":"spectra-one\/\/footer","target_lang":"fr"}} 80 [2026-02-26 11:22:33][Template Part Translation][template_part_id] spectra-one//footer 81 [2026-02-26 11:22:33][Template Part Translation][parsed] {"theme":"spectra-one","slug":"footer"} 82 [2026-02-26 11:22:33][Template Part Translation][query_result] {"found_posts":0,"post_count":1} 83 [2026-02-26 11:22:33][Template Part Translation][found_post] {"post_id":176,"post_title":"Footer"} 84 [2026-02-26 11:22:33][Template Part Translation][calling_handle_translation] {"post_id":176,"target_lang":"fr"} -
ai-builder/trunk/includes/class-translation-manager.php
r3404766 r3470237 97 97 } 98 98 if (!$post) { 99 return $permalink; 100 } 101 102 // Only append ai_lang if this post actually belongs to a translation group 103 // and has at least one other translation. Otherwise, keep the URL clean. 104 $group = get_post_meta($post->ID, '_ai_translation_group', true); 105 if (!$group) { 106 return $permalink; 107 } 108 109 $translations = $this->get_group_posts($group, get_post_type($post)); 110 if (empty($translations) || count($translations) <= 1) { 111 // No real translations available for this post 99 112 return $permalink; 100 113 } -
ai-builder/trunk/readme.txt
r3460858 r3470237 5 5 Tested up to: 6.9 6 6 Requires PHP: 7.4 7 Stable tag: 2.5. 07 Stable tag: 2.5.1 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.