' . esc_html(__('Update failed:', 'ai-webmaster-studio')) . ' ' . esc_html($result->get_error_message()) . '
'; } else { $summary = isset($result['summary']) ? $result['summary'] : __('The content has been updated.', 'ai-webmaster-studio'); $notice = '' . esc_html(__('The content has been updated.', 'ai-webmaster-studio')) . ' ' . esc_html($summary) . ' ' . esc_html(__('Edit', 'ai-webmaster-studio')) . ' | ' . esc_html(__('Preview', 'ai-webmaster-studio')) . '
' . esc_html(__('Could not add links:', 'ai-webmaster-studio')) . ' ' . esc_html($result->get_error_message()) . '
' . esc_html(__('Internal links have been added.', 'ai-webmaster-studio')) . ' ' . esc_html(__('Edit', 'ai-webmaster-studio')) . ' | ' . esc_html(__('View', 'ai-webmaster-studio')) . '
' . esc_html($result['message'] ?? __('No new links were added.', 'ai-webmaster-studio')) . '
' . esc_html(__('Could not undo changes:', 'ai-webmaster-studio')) . ' ' . esc_html($result->get_error_message()) . '
' . esc_html(__('The latest AI changes have been undone.', 'ai-webmaster-studio')) . ' ' . esc_html(__('Edit', 'ai-webmaster-studio')) . ' | ' . esc_html(__('Preview', 'ai-webmaster-studio')) . '
' . esc_html(__('The image was not added:', 'ai-webmaster-studio')) . ' ' . esc_html($message) . '
' . esc_html(__('The featured image from the Media Library has been assigned.', 'ai-webmaster-studio')) . ' ' . esc_html(__('Attachment ID:', 'ai-webmaster-studio')) . ' ' . intval($result['attachment_id']) . '. ' . esc_html(__('Edit content', 'ai-webmaster-studio')) . '
' . esc_html(__('The image was not added:', 'ai-webmaster-studio')) . ' ' . esc_html($result->get_error_message()) . '
' . esc_html(__('The AI featured image has been generated and assigned.', 'ai-webmaster-studio')) . ' ' . esc_html(__('Attachment ID:', 'ai-webmaster-studio')) . ' ' . intval($result) . '. ' . esc_html(__('Edit content', 'ai-webmaster-studio')) . '
' . esc_html(__('AI — enabled', 'ai-webmaster-studio')) . ''; } elseif ($aiwest_graphics_source === 'library') { echo '' . esc_html(__('Media Library — enabled', 'ai-webmaster-studio')) . ''; } else { echo '' . esc_html(__('Disabled — enable in Settings', 'ai-webmaster-studio')) . ''; } ?>