| @@ -212,8 +212,23 @@ | ||
| 212 | 212 | </div> |
| 213 | 213 | |
| 214 | 214 | <div class="merchant-module-page-actions-links"> |
| 215 | 215 | |
| 216 | + <?php if ( ! empty( $merchant_module_info['ai_examples']['blurb'] ) ) : ?> | |
| 217 | + <button | |
| 218 | + type="button" | |
| 219 | + class="merchant-module-page-link merchant-module-page-link-ai merchant-ai-badge" | |
| 220 | + data-ai-title="<?php echo esc_attr( $merchant_module_info['title'] ); ?>" | |
| 221 | + data-ai-blurb="<?php echo esc_attr( $merchant_module_info['ai_examples']['blurb'] ); ?>" | |
| 222 | + data-ai-prompts="<?php echo esc_attr( wp_json_encode( $merchant_module_info['ai_examples']['prompts'] ?? array() ) ); ?>" | |
| 223 | + > | |
| 224 | + <svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| 225 | + <path d="M8 1L10.5 5.5L15 8L10.5 10.5L8 15L5.5 10.5L1 8L5.5 5.5Z" fill="currentColor"/> | |
| 226 | + </svg> | |
| 227 | + <span><?php esc_html_e( 'Try with AI', 'merchant' ); ?></span> | |
| 228 | + </button> | |
| 229 | + <?php endif; ?> | |
| 230 | + | |
| 216 | 231 | <?php if ( ! empty( $merchant_module_info['tutorial_url'] ) ) : ?> |
| 217 | 232 | <a href="<?php echo esc_url( $merchant_module_info['tutorial_url'] ); ?>" class="merchant-module-page-link merchant-module-page-link-tutorial" target="_blank"> |
| 218 | 233 | <span><?php echo esc_html__( 'Tutorial', 'merchant' ); ?></span> |
| 219 | 234 | <svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| @@ -354,8 +369,10 @@ | ||
| 354 | 369 | |
| 355 | 370 | <div class="merchant-module-footer-text"> |
| 356 | 371 | <?php esc_html_e( 'Copyright © aThemes ' . gmdate( 'Y' ) . '. All Rights Reserved.', 'merchant' ); ?> |
| 357 | 372 | </div> |
| 373 | + | |
| 374 | + <?php require MERCHANT_DIR . 'admin/components/ai-prompts-modal.php'; ?> | |
| 358 | 375 | |
| 359 | 376 | <?php else : ?> |
| 360 | 377 | |
| 361 | 378 | <?php wp_safe_redirect( add_query_arg( array( 'page' => 'merchant' ), admin_url( 'admin.php' ) ) ); ?> |