| @@ -512,56 +512,28 @@ | ||
| 512 | 512 | <label class="mxch-field-label" for="mxch-content-model"><?php esc_html_e('Content Model', 'mxchat'); ?></label> |
| 513 | 513 | <div class="mxch-field-control"> |
| 514 | 514 | <select id="mxch-content-model" data-field="content_model" class="mxch-cg-select"> |
| 515 | 515 | <?php |
| 516 | - $content_model = $options['content_model'] ?? ($options['model'] ?? 'gpt-5.6-sol'); | |
| 517 | - // gpt-5.1-chat-latest removed 2026-08-02: OpenAI retires | |
| 518 | - // it 2026-08-10 (plan e46b8f); saved values migrate via | |
| 519 | - // mxchat_migrate_deprecated_models(). | |
| 516 | + $content_model = $options['content_model'] ?? ($options['model'] ?? 'gpt-5.1-chat-latest'); | |
| 520 | 517 | $models = array( |
| 521 | 518 | 'OpenAI' => array( |
| 522 | - 'gpt-5.6-sol' => 'GPT-5.6 Sol', | |
| 523 | - 'gpt-5.6-terra' => 'GPT-5.6 Terra', | |
| 524 | - 'gpt-5.6-luna' => 'GPT-5.6 Luna', | |
| 525 | - 'gpt-5.5' => 'GPT-5.5', | |
| 526 | 519 | 'gpt-5.4' => 'GPT-5.4', |
| 527 | 520 | 'gpt-5.2' => 'GPT-5.2', |
| 521 | + 'gpt-5.1-chat-latest' => 'GPT-5.1', | |
| 528 | 522 | 'gpt-5' => 'GPT-5', |
| 529 | 523 | ), |
| 530 | 524 | 'Anthropic' => array( |
| 531 | - 'claude-fable-5' => 'Claude Fable 5', | |
| 532 | - 'claude-opus-5' => 'Claude Opus 5', | |
| 533 | - 'claude-opus-4-8' => 'Claude Opus 4.8', | |
| 534 | - 'claude-opus-4-7' => 'Claude Opus 4.7', | |
| 535 | 525 | 'claude-opus-4-6' => 'Claude Opus 4.6', |
| 536 | - 'claude-sonnet-5' => 'Claude Sonnet 5', | |
| 537 | 526 | 'claude-sonnet-4-6' => 'Claude Sonnet 4.6', |
| 538 | 527 | 'claude-haiku-4-5-20251001' => 'Claude Haiku 4.5', |
| 539 | 528 | ), |
| 540 | 529 | 'Google' => array( |
| 541 | - 'gemini-3.5-flash' => 'Gemini 3.5 Flash', | |
| 542 | - 'gemini-3.1-pro-preview' => 'Gemini 3.1 Pro', | |
| 543 | - 'gemini-3-flash-preview' => 'Gemini 3 Flash', | |
| 544 | - 'gemini-3.1-flash-lite' => 'Gemini 3.1 Flash-Lite', | |
| 545 | - 'gemini-3.1-flash-lite-preview' => 'Gemini 3.1 Flash-Lite (Preview)', | |
| 546 | - 'gemini-2.5-pro' => 'Gemini 2.5 Pro', | |
| 547 | - 'gemini-2.5-flash' => 'Gemini 2.5 Flash', | |
| 548 | - 'gemini-2.5-flash-lite' => 'Gemini 2.5 Flash-Lite', | |
| 530 | + 'gemini-3-pro-preview' => 'Gemini 3 Pro', | |
| 531 | + 'gemini-2.5-pro' => 'Gemini 2.5 Pro', | |
| 549 | 532 | ), |
| 550 | - // xAI lineup refreshed 2026-08-14 (plan e1aa4a) against a | |
| 551 | - // live /v1/models pull: none of the three ids previously | |
| 552 | - // here appear in xAI's listing any more. The old ids are | |
| 553 | - // KEPT below the current generation because xAI still | |
| 554 | - // serves them and deleting one would blank the selection | |
| 555 | - // of an install saved on it. | |
| 556 | 533 | 'xAI' => array( |
| 557 | - 'grok-4.6' => 'Grok 4.6', | |
| 558 | - 'grok-4.5' => 'Grok 4.5', | |
| 559 | - 'grok-4.3' => 'Grok 4.3', | |
| 560 | - 'grok-4.20-0309-reasoning' => 'Grok 4.20 (Reasoning)', | |
| 561 | - 'grok-4.20-0309-non-reasoning' => 'Grok 4.20 (Non-Reasoning)', | |
| 562 | - 'grok-4-0709' => 'Grok 4 (previous generation)', | |
| 563 | - 'grok-4-1-fast-non-reasoning' => 'Grok 4.1 Fast (previous generation)', | |
| 534 | + 'grok-4-0709' => 'Grok 4', | |
| 535 | + 'grok-4-1-fast-non-reasoning' => 'Grok 4.1 Fast', | |
| 564 | 536 | 'grok-code-fast-1' => 'Grok Code Fast', |
| 565 | 537 | ), |
| 566 | 538 | ); |
| 567 | 539 | foreach ($models as $group => $group_models) { |
| @@ -584,9 +556,8 @@ | ||
| 584 | 556 | <div class="mxch-field-control"> |
| 585 | 557 | <?php $image_model = $options['content_image_model'] ?? 'gpt-image-1.5'; ?> |
| 586 | 558 | <select id="mxch-image-model" data-field="content_image_model" class="mxch-cg-select"> |
| 587 | 559 | <optgroup label="<?php esc_attr_e('OpenAI', 'mxchat'); ?>"> |
| 588 | - <option value="gpt-image-2" <?php selected($image_model, 'gpt-image-2'); ?>><?php esc_html_e('GPT Image 2 (Latest)', 'mxchat'); ?></option> | |
| 589 | 560 | <option value="gpt-image-1.5" <?php selected($image_model, 'gpt-image-1.5'); ?>><?php esc_html_e('GPT Image 1.5', 'mxchat'); ?></option> |
| 590 | 561 | </optgroup> |
| 591 | 562 | <optgroup label="<?php esc_attr_e('xAI', 'mxchat'); ?>"> |
| 592 | 563 | <option value="grok-imagine-image-pro" <?php selected($image_model, 'grok-imagine-image-pro'); ?>><?php esc_html_e('Grok Imagine Pro', 'mxchat'); ?></option> |
| @@ -600,32 +571,8 @@ | ||
| 600 | 571 | </div> |
| 601 | 572 | <p class="mxch-field-description"><?php esc_html_e('Select the AI model used for generating images within your content.', 'mxchat'); ?></p> |
| 602 | 573 | </div> |
| 603 | 574 | |
| 604 | - <!-- Image Quality (GPT Image only) --> | |
| 605 | - <div class="mxch-field"> | |
| 606 | - <label class="mxch-field-label" for="mxch-image-quality"><?php esc_html_e('Image Quality', 'mxchat'); ?></label> | |
| 607 | - <div class="mxch-field-control"> | |
| 608 | - <?php $image_quality = $options['content_image_quality'] ?? 'auto'; ?> | |
| 609 | - <?php $quality_supported = (strpos($image_model, 'gpt-image') === 0); ?> | |
| 610 | - <select id="mxch-image-quality" data-field="content_image_quality" class="mxch-cg-select"<?php echo $quality_supported ? '' : ' disabled'; ?>> | |
| 611 | - <option value="auto" <?php selected($image_quality, 'auto'); ?>><?php esc_html_e('Auto (default)', 'mxchat'); ?></option> | |
| 612 | - <option value="low" <?php selected($image_quality, 'low'); ?>><?php esc_html_e('Low (fastest, cheapest)', 'mxchat'); ?></option> | |
| 613 | - <option value="medium" <?php selected($image_quality, 'medium'); ?>><?php esc_html_e('Medium', 'mxchat'); ?></option> | |
| 614 | - <option value="high" <?php selected($image_quality, 'high'); ?>><?php esc_html_e('High (best, slowest)', 'mxchat'); ?></option> | |
| 615 | - </select> | |
| 616 | - </div> | |
| 617 | - <p class="mxch-field-description"><?php esc_html_e('Quality control for OpenAI GPT Image models only. Grok Imagine and Gemini image models ignore this setting (their APIs do not expose an equivalent parameter).', 'mxchat'); ?></p> | |
| 618 | - </div> | |
| 619 | - <script>(function(){ | |
| 620 | - var m = document.getElementById('mxch-image-model'); | |
| 621 | - var q = document.getElementById('mxch-image-quality'); | |
| 622 | - if (!m || !q || q._wired) { return; } q._wired = true; | |
| 623 | - function sync(){ q.disabled = (m.value || '').indexOf('gpt-image') !== 0; } | |
| 624 | - m.addEventListener('change', sync); | |
| 625 | - sync(); | |
| 626 | - })();</script> | |
| 627 | - | |
| 628 | 575 | <!-- Enable Image Generation --> |
| 629 | 576 | <div class="mxch-field"> |
| 630 | 577 | <label class="mxch-toggle"> |
| 631 | 578 | <?php $enable_images = $options['content_enable_images'] ?? 'on'; ?> |
| @@ -635,35 +582,8 @@ | ||
| 635 | 582 | </label> |
| 636 | 583 | <p class="mxch-field-description"><?php esc_html_e('When enabled, AI will generate and place images throughout your content. When disabled, pages are generated with text-only layouts.', 'mxchat'); ?></p> |
| 637 | 584 | </div> |
| 638 | 585 | |
| 639 | - <!-- Images per Article --> | |
| 640 | - <div class="mxch-field"> | |
| 641 | - <label class="mxch-field-label" for="mxch-image-count"><?php esc_html_e('Images per Article', 'mxchat'); ?></label> | |
| 642 | - <div class="mxch-field-control"> | |
| 643 | - <?php $image_count = max(1, min(5, (int) ($options['content_image_count'] ?? 3))); ?> | |
| 644 | - <?php $images_on = ($options['content_enable_images'] ?? 'on') === 'on'; ?> | |
| 645 | - <div class="mxch-cg-slider-row"> | |
| 646 | - <input type="range" min="1" max="5" step="1" value="<?php echo esc_attr($image_count); ?>" | |
| 647 | - data-field="content_image_count" id="mxch-image-count" class="mxch-cg-slider"<?php echo $images_on ? '' : ' disabled'; ?>> | |
| 648 | - <span id="mxch-image-count-val" class="mxch-cg-slider-value"><?php echo esc_html($image_count); ?></span> | |
| 649 | - </div> | |
| 650 | - </div> | |
| 651 | - <p class="mxch-field-description"><?php esc_html_e('How many images to generate and place in each article (1–5). Default 3. The AI may generate fewer if the article has few sections suited to imagery.', 'mxchat'); ?></p> | |
| 652 | - </div> | |
| 653 | - <script>(function(){ | |
| 654 | - var s = document.getElementById('mxch-image-count'); | |
| 655 | - var v = document.getElementById('mxch-image-count-val'); | |
| 656 | - if (!s || !v || s._wired) { return; } s._wired = true; | |
| 657 | - s.addEventListener('input', function(){ v.textContent = s.value; }); | |
| 658 | - var e = document.querySelector('[data-field="content_enable_images"]'); | |
| 659 | - if (e) { | |
| 660 | - var syncCount = function(){ s.disabled = !e.checked; }; | |
| 661 | - e.addEventListener('change', syncCount); | |
| 662 | - syncCount(); | |
| 663 | - } | |
| 664 | - })();</script> | |
| 665 | - | |
| 666 | 586 | <!-- Internal Linking (Pro) --> |
| 667 | 587 | <div class="mxch-field mxch-cg-pro-field<?php echo $pro_internal_linking ? '' : ' mxch-cg-pro-locked'; ?>"> |
| 668 | 588 | <label class="mxch-toggle"> |
| 669 | 589 | <?php $internal_linking_val = $options['content_internal_linking'] ?? 'off'; ?> |
| @@ -708,29 +628,8 @@ | ||
| 708 | 628 | <?php endif; ?> |
| 709 | 629 | <?php endif; ?> |
| 710 | 630 | </div> |
| 711 | 631 | |
| 712 | - </div> | |
| 713 | - </div> | |
| 714 | - | |
| 715 | - <!-- ── Editor Assistant (moved from Settings → Behavior, plan-f7df40) ── --> | |
| 716 | - <div class="mxch-card"> | |
| 717 | - <div class="mxch-card-header"> | |
| 718 | - <h3 class="mxch-card-title"> | |
| 719 | - <svg class="mxch-card-title-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 4V2"/><path d="M15 16v-2"/><path d="M8 9h2"/><path d="M20 9h2"/><path d="M17.8 11.8 19 13"/><path d="M15 9h.01"/><path d="M17.8 6.2 19 5"/><path d="m3 21 9-9"/><path d="M12.2 6.2 11 5"/></svg> | |
| 720 | - <?php esc_html_e('Editor Assistant', 'mxchat'); ?> | |
| 721 | - </h3> | |
| 722 | - </div> | |
| 723 | - <?php // mxchat-autosave-section: this toggle saves through the shared | |
| 724 | - // settings transport (mxchat-admin.js + the ajax-handler's | |
| 725 | - // mxchat_editor_assistant_enabled case), NOT the data-field | |
| 726 | - // transport the rest of this tab uses — keep those apart. ?> | |
| 727 | - <div class="mxch-card-body mxchat-autosave-section"> | |
| 728 | - <?php | |
| 729 | - mxchat_render_field_wrapper('mxchat_editor_assistant_enabled', __('Editor Assistant', 'mxchat'), function() use ($admin_instance) { | |
| 730 | - $admin_instance->mxchat_editor_assistant_toggle_callback(); | |
| 731 | - }, __('Add magic-wand AI writing actions (rewrite, summarize, translate, continue, fix grammar) to the WordPress block editor. Opens a sidebar in the post editor. Uses the chat AI model configured in MxChat Settings. Off by default.', 'mxchat')); | |
| 732 | - ?> | |
| 733 | 632 | </div> |
| 734 | 633 | </div> |
| 735 | 634 | |
| 736 | 635 | <!-- ── SEO Settings ── --> |