=== FajaedeSEO AI ===
Contributors: fajaede
Tags: seo, ai, sitemap, metadata, schema
Requires at least: 6.0
Tested up to: 6.8
Stable tag: 2.0.16
Requires PHP: 7.4
Plugin URI: https://www.fajaede.nl
Text Domain: fajaedeseo-ai
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://www.fajaede.nl

A complete and lightweight SEO package for WordPress (automation).

== Description ==

FajaedeSEO AI is your Full AI solution for WordPress SEO. It integrates seamlessly into the block editor, providing real-time feedback and powerful tools to improve your search engine rankings. From on-page content analysis to technical SEO automation, this plugin gives you the control you need in a lightweight and performant package.

== Features ==

**On-Page SEO & Content Optimization (Gutenberg Sidebar)**

*   **Real-time SEO Score**: Get instant feedback on your content with a score based on key SEO metrics.
*   **Focus Keyword Analysis**: Set a focus keyword and get suggestions to improve its usage in your title, description, and content.
*   **AI-Powered Suggestions**: Generate optimized meta titles and descriptions with a single click.
*   **Content Analysis**: Checks for heading structure, internal links, and images with alt text.
*   **Readability Analysis**: Get insights on keyword density, sentence length, and passive voice usage to improve user engagement.
*   **Link Analysis**: Automatically detects internal, external, and broken links within your content.
*   **Social Preview**: See how your page will look when shared on social media, with a preview of the Open Graph image.
*   **Automatic canonical URL Control**: Easily set or change the canonical URL for any page to prevent duplicate content issues.
*   **Full Post Type Support**: All sidebar features work for Posts, Pages, and any public Custom Post Type (e.g., Products, Portfolio).

**Technical SEO & Site Management**

*   **Automatic XML Sitemap**: Generates a compliant XML sitemap at `/fajaede_sitemap/`, including all public post types. Includes `priority` and `changefreq` tags.
*   **Virtual Robots.txt Editor**: Manage your `robots.txt` file directly from the WordPress dashboard.
*   **Automated Schema.org Markup**: Adds `Article` and `WebSite` JSON-LD structured data to your pages for richer search results.
*   **Automatic Meta Tags**: Outputs optimized meta titles, descriptions, Open Graph, and Twitter Card tags on the front end.
*   **Site-Wide Audits**: A dashboard provides a site-wide SEO score, indexed page count, and page speed insights via the REST API.

**Performance & Security**

*   **Lightweight & Fast**: Built with a modern React-based interface that is highly performant and doesn't slow down the editor.
*   **Smart Caching**: Sitemap and page speed scores are cached using transients to ensure minimal impact on server performance.
*   **Secure by Design**: All API and AJAX requests are secured with WordPress nonces to protect against vulnerabilities.
*   **Clean Code**: Follows WordPress coding standards for stability and compatibility.

== Installation ==

1.  Upload the `fajaedeseo-ai` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Navigate to 'Settings > Fajaede SEO' to configure homepage SEO, social handles, and your `robots.txt`.
4.  Open any post or page in the block editor to access the FajaedeSEO sidebar.
5.  (Recommended) Go to 'Settings > Permalinks' and click 'Save Changes' to ensure the sitemap URL works correctly.

== Frequently Asked Questions ==

= How can I set focus keywords? =
Use the 'Focus Keyword' field in the FajaedeSEO sidebar when editing any post or page. The SEO score and suggestions will update in real-time.

= Can I adjust the canonical URL? =
Yes, open the 'Canonical URL' panel in the sidebar to set a custom canonical URL for the page you are editing.

= How do I activate the XML sitemap? =
The sitemap is enabled by default and available at `yourdomain.com/fajaede_sitemap/`. No extra steps are needed.

= How do I update the Meta Title and Meta Description of the Home page? =
Go to 'Settings > Fajaede SEO' and click on the 'Homepage' tab. Here you can set the specific meta title and description for your site's homepage.

== Changelog ==

= 2.0.16 - 2026-02-25 =
*   **Fix**: Ensured admin menu titles are translatable with the correct text domain.

= 2.0.15 - 2026-02-03
*   **UX**: Improved sitemap cache flushing handling (PRG pattern) to prevent re-submission on refresh.
*   **UX**: Added confirmation notice after successfully refreshing the sitemap cache.


= 2.0.14 - 2026-01-13 =
*   **Maintenance**: Transition to new version and directory structure.
*   **Fix**: Finalized text domain and folder name consistency.

= 2.0.13 - 2026-01-11 =
*   **Security**: Improved REST API permission callbacks to check capabilities for specific post IDs.
*   **Security**: Added late escaping to robots.txt output.
*   **Fix**: Corrected Text Domain to match plugin slug for full internationalization support.
*   **Fix**: Ensured all admin strings are properly translatable.

= 2.0.12 - 2026-01-06 =
*   **Security**: Hardened REST API and AJAX endpoints with strict permission callbacks and nonce verification.
*   **Fix**: Resolved issue where Facebook handle was not generating meta tags.
*   **Fix**: Improved site name detection in Gutenberg sidebar.
*   **Improvement**: Excluded password-protected posts from the XML sitemap.
*   **Improvement**: Improved word count accuracy in Page Audit API by stripping shortcodes.
*   **Code Quality**: Modernized date handling in AJAX responses.

= 2.0.11 - 2025-12-06 =
*   **Feature**: Added `changefreq` and `priority` tags to the XML sitemap for better search engine guidance.
*   **Enhancement**: Translated all admin-facing strings and code comments to English for international use.
*   **Enhancement**: Refactored admin settings page into a tabbed interface for better organization and future scalability.
*   **Enhancement**: Enabled SEO meta fields and front-end tags for all public post types, not just posts and pages.
*   **Feature**: Added option to disable automatic JSON-LD Schema output to prevent conflicts with other plugins.
*   **Refactor**: Centralized the logic for counting indexed pages to remove code duplication and ensure consistency.

= 2.0.10 - 2025-11-15 =
*   **Security**: Hardened REST API and AJAX endpoints with strict permission callbacks and nonce verification.
*   **Fix**: Replaced hardcoded URLs with dynamic WordPress functions (`admin_url`, `home_url`) for better compatibility.
*   **Fix**: Improved JSON-LD output encoding to ensure proper escaping of data.

= 2.0.9 - 2025-11-01 =
*   **Feature**: Implemented a robust page speed score using the Site Health API with transient caching.

= 2.0.8 - 2025-10-25 =
*   **Feature**: Added REST API endpoints for site-wide and page-specific audits.

= 2.0 - 2025-10-08 =
= 1.0 - 2025-07-15 =
*   Initial release with focus keyword and meta tag management.

== Screenshots ==

1. **Virtual Robots.txt Editor**: Manage your site's crawling directives directly from the admin interface.
2. **Social Media Configuration**: Easily set up Facebook and Twitter handles for optimized Open Graph and Twitter Card previews.
3. **Styled XML Sitemap**: A clean, human-readable, and search-engine-compliant sitemap generated automatically.
4. **Technical SEO Settings**: Manage global options including Schema.org JSON-LD output and sitemap cache flushing.
5. **Gutenberg SEO Sidebar**: The primary interactive panel for real-time meta tag management and keyword targeting.
6. **On-Page Writing Analysis**: Instant feedback on readability, sentence structure, and keyword density.
7. **Comprehensive Link Monitor**: Detailed insights into internal, external, and broken links within your content.
8. **Live SEO Dashboard**: A visual overview of your site's overall SEO health, indexed pages, and speed performance.
9. **SEO Audit & Recommendations**: In-depth analysis with actionable tips to boost your search engine visibility.
10. **Homepage Search Appearance**: Specialized controls to fine-tune the meta title and description for your front page.

== Upgrade Notice ==

= 2.0.16 =
Internationalization fixes for the admin menu.

= 2.0.15 =
Improved sitemap caching behavior and added confirmation notices.

= 2.0.14 =
Maintenance update for directory structure consistency.  