Changeset 3583938
- Timestamp:
- 06/24/2026 01:37:16 AM (4 months ago)
- Location:
- popaeo-llms-txt
- Files:
-
- 2 edited
- 4 copied
-
tags/0.2.7 (copied) (copied from popaeo-llms-txt/trunk )
-
tags/0.2.7/README.md (copied) (copied from popaeo-llms-txt/trunk/README.md )
-
tags/0.2.7/popaeo-llms-txt.php (copied) (copied from popaeo-llms-txt/trunk/popaeo-llms-txt.php ) (4 diffs)
-
tags/0.2.7/readme.txt (copied) (copied from popaeo-llms-txt/trunk/readme.txt ) (2 diffs)
-
trunk/popaeo-llms-txt.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
popaeo-llms-txt/tags/0.2.7/popaeo-llms-txt.php
r3583930 r3583938 4 4 * Plugin URI: https://www.popaeo.com/docs 5 5 * Description: Publishes AI-readable llms.txt content for WooCommerce stores through PopAEO. 6 * Version: 0.2. 66 * Version: 0.2.7 7 7 * Author: PopAEO 8 8 * Author URI: https://www.popaeo.com … … 47 47 $settings = get_option(POPAEO_LLMS_OPTION, []); 48 48 return wp_parse_args(is_array($settings) ? $settings : [], popaeo_llms_default_settings()); 49 } 50 51 function popaeo_llms_is_valid_endpoint_url($endpoint_url) { 52 $parts = wp_parse_url($endpoint_url); 53 if (empty($parts['scheme']) || empty($parts['host']) || !in_array($parts['scheme'], ['http', 'https'], true)) { 54 return false; 55 } 56 57 $path = $parts['path'] ?? ''; 58 return $path === '' || $path === '/'; 59 } 60 61 function popaeo_llms_is_connected($settings) { 62 if (empty($settings['endpoint_url']) || empty($settings['connection_id']) || empty($settings['shared_secret'])) { 63 return false; 64 } 65 66 return popaeo_llms_is_valid_endpoint_url($settings['endpoint_url']); 49 67 } 50 68 … … 222 240 'popaeo_llms_start_connect' 223 241 ); 224 $is_connected = !empty($settings['endpoint_url']) && !empty($settings['connection_id']) && !empty($settings['shared_secret']); 242 $has_saved_connection = !empty($settings['endpoint_url']) && !empty($settings['connection_id']) && !empty($settings['shared_secret']); 243 $is_connected = popaeo_llms_is_connected($settings); 225 244 $dashboard_url = $is_connected 226 245 ? untrailingslashit($settings['endpoint_url']) . '/connections/woocommerce/dashboard/' . rawurlencode($settings['connection_id']) … … 262 281 <?php if (!class_exists('WooCommerce')) : ?> 263 282 <div class="notice notice-error"><p><?php echo esc_html__('WooCommerce is required. Install and activate WooCommerce before connecting PopAEO.', 'popaeo-llms-txt'); ?></p></div> 283 <?php endif; ?> 284 285 <?php if ($has_saved_connection && !$is_connected) : ?> 286 <div class="notice notice-warning"><p><?php echo esc_html__('PopAEO found an incomplete or outdated connection setting. Click Start AEO Audit to reconnect and repair it automatically.', 'popaeo-llms-txt'); ?></p></div> 264 287 <?php endif; ?> 265 288 -
popaeo-llms-txt/tags/0.2.7/readme.txt
r3583930 r3583938 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 0.2. 67 Stable tag: 0.2.7 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 89 89 == Changelog == 90 90 91 = 0.2.7 = 92 * Added validation for saved PopAEO endpoint settings so outdated or incomplete connection data cannot trap merchants inside the embedded connection page. 93 * Shows a reconnect prompt when existing connection settings need to be repaired. 94 91 95 = 0.2.6 = 92 96 * Moved WooCommerce connection start into a native WordPress admin redirect so the PopAEO connection form is no longer embedded inside WordPress. -
popaeo-llms-txt/trunk/popaeo-llms-txt.php
r3583930 r3583938 4 4 * Plugin URI: https://www.popaeo.com/docs 5 5 * Description: Publishes AI-readable llms.txt content for WooCommerce stores through PopAEO. 6 * Version: 0.2. 66 * Version: 0.2.7 7 7 * Author: PopAEO 8 8 * Author URI: https://www.popaeo.com … … 47 47 $settings = get_option(POPAEO_LLMS_OPTION, []); 48 48 return wp_parse_args(is_array($settings) ? $settings : [], popaeo_llms_default_settings()); 49 } 50 51 function popaeo_llms_is_valid_endpoint_url($endpoint_url) { 52 $parts = wp_parse_url($endpoint_url); 53 if (empty($parts['scheme']) || empty($parts['host']) || !in_array($parts['scheme'], ['http', 'https'], true)) { 54 return false; 55 } 56 57 $path = $parts['path'] ?? ''; 58 return $path === '' || $path === '/'; 59 } 60 61 function popaeo_llms_is_connected($settings) { 62 if (empty($settings['endpoint_url']) || empty($settings['connection_id']) || empty($settings['shared_secret'])) { 63 return false; 64 } 65 66 return popaeo_llms_is_valid_endpoint_url($settings['endpoint_url']); 49 67 } 50 68 … … 222 240 'popaeo_llms_start_connect' 223 241 ); 224 $is_connected = !empty($settings['endpoint_url']) && !empty($settings['connection_id']) && !empty($settings['shared_secret']); 242 $has_saved_connection = !empty($settings['endpoint_url']) && !empty($settings['connection_id']) && !empty($settings['shared_secret']); 243 $is_connected = popaeo_llms_is_connected($settings); 225 244 $dashboard_url = $is_connected 226 245 ? untrailingslashit($settings['endpoint_url']) . '/connections/woocommerce/dashboard/' . rawurlencode($settings['connection_id']) … … 262 281 <?php if (!class_exists('WooCommerce')) : ?> 263 282 <div class="notice notice-error"><p><?php echo esc_html__('WooCommerce is required. Install and activate WooCommerce before connecting PopAEO.', 'popaeo-llms-txt'); ?></p></div> 283 <?php endif; ?> 284 285 <?php if ($has_saved_connection && !$is_connected) : ?> 286 <div class="notice notice-warning"><p><?php echo esc_html__('PopAEO found an incomplete or outdated connection setting. Click Start AEO Audit to reconnect and repair it automatically.', 'popaeo-llms-txt'); ?></p></div> 264 287 <?php endif; ?> 265 288 -
popaeo-llms-txt/trunk/readme.txt
r3583930 r3583938 5 5 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 0.2. 67 Stable tag: 0.2.7 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 89 89 == Changelog == 90 90 91 = 0.2.7 = 92 * Added validation for saved PopAEO endpoint settings so outdated or incomplete connection data cannot trap merchants inside the embedded connection page. 93 * Shows a reconnect prompt when existing connection settings need to be repaired. 94 91 95 = 0.2.6 = 92 96 * Moved WooCommerce connection start into a native WordPress admin redirect so the PopAEO connection form is no longer embedded inside WordPress.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)