=== FLEX SMM & SEO ===
Contributors: flexfields, hovoqoch
Tags: seo, sitemap, open-graph, schema, social
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

On-page SEO, social cards, XML sitemap, schema, Insights, and webmaster tools for WordPress.

== Description ==

**FLEX SMM & SEO** is part of the FLEX plugin suite from **FLEX LLC** (https://flexible.am/). The display name leads with SMM, not “Flex SEO”. It is not affiliated with third-party plugins such as Flex SEO Meta Updater.

It covers everyday SEO and social sharing without a bulky suite:

* Overview dashboard with missing titles/descriptions and a setup checklist
* Per-post Google / Facebook / X preview, color length meters, and on-page checks
* Category, tag, and custom taxonomy SEO fields
* Title templates (`%%title%% %%sep%% %%sitename%%` and related tokens)
* Open Graph, Twitter/X cards, Facebook App ID, and social profile URLs (schema `sameAs`)
* XML sitemap with selectable post types and taxonomy archives
* Organization, Article/WebPage, BreadcrumbList, and WooCommerce Product JSON-LD
* Optional Insights (Search Console + GA4) via your Google Cloud OAuth client
* Tools: on-page audit, bulk titles, IndexNow, validators
* Webmaster verification tags (Google, Bing, Pinterest, Yandex)
* Breadcrumbs shortcode `[flex_seo_breadcrumb]`

Use Flex Redirects for URL redirects.

Admin CSS and JavaScript ship with the plugin. There is no telemetry and no remote update checker. Google APIs and IndexNow run only after you save credentials or turn those options on.

= Privacy =

Titles, descriptions, robots, social settings, and webmaster codes are stored in your WordPress database (site options plus per-post and per-term meta). Only administrators can edit them.

**Google Insights** (off until you connect): Client ID, Client Secret, and optional GA4 property ID are stored in site options. Access and refresh tokens are stored in a non-autoloaded option. When you click Connect Google, this site sends you to Google to authorize read-only Search Console and Analytics access, then stores tokens locally. Report requests go to Google’s APIs. Disconnect revokes the tokens. FLEX SMM & SEO does not send this data to FLEX.

**IndexNow** (off by default): when enabled, published or updated public URLs are posted to IndexNow so Bing and Yandex can recrawl them. A key file is served at `/{key}.txt` on your site.

Per-post and per-term SEO meta is left in the database if you delete the plugin, so you do not lose editor work on reinstall.

See **Third-party services** for URLs, terms, and privacy policies.

== Installation ==

1. Upload the `flex-smm-seo` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate **FLEX SMM & SEO**.
3. Go to **FLEX SMM & SEO → Settings**. Set the title template, homepage title and description, and default social image.
4. Choose which post types and taxonomies belong in the sitemap.
5. Optional: paste webmaster verification codes. Submit `/flex-seo-sitemap.xml` in Google Search Console and Bing Webmaster Tools.
6. Optional: open **Insights** to paste a Google Cloud OAuth client and connect Search Console / GA4.
7. If the sitemap 404s, use **Tools → Flush rewrite rules**, or save Permalinks once.

== Frequently Asked Questions ==

= Does this replace Yoast or Rank Math? =

It covers everyday on-page SEO, social cards, a sitemap, and schema. It does not manage redirects (use Flex Redirects) and does not replace Google Site Kit.

= What about the default WordPress sitemap? =

FLEX SMM & SEO serves `/flex-seo-sitemap.xml` and turns off the core `/wp-sitemap.xml` sitemap so search engines get one list. noindex and password-protected URLs are omitted.

= Do I have to connect Google? =

No. Titles, social tags, schema, and the sitemap work without Google. Insights is optional.

= Where do I put the OAuth redirect URI? =

On **Insights**, copy the Redirect URI into your Google Cloud OAuth web client. It must match exactly, including `https`.

= Does FLEX SMM & SEO send data to FLEX? =

No. CSS and JavaScript load from this plugin. Remote calls go only to Google or IndexNow after you opt in.

= What happens when I uninstall? =

Deleting the plugin removes site settings and Google OAuth tokens. Per-post and per-term SEO meta is left in the database. Deactivating alone keeps your data.

== Third-party services ==

These services are optional. No Google or IndexNow request is made until you save credentials and connect, or you enable IndexNow.

= Google OAuth, Search Console, and Analytics =

When you save a Client ID and Secret on Insights and click Connect Google, the admin is sent to `https://accounts.google.com/o/oauth2/v2/auth`. Tokens are exchanged and revoked at `https://oauth2.googleapis.com/token` and `https://oauth2.googleapis.com/revoke`. Connected reports use the Search Console API (`https://www.googleapis.com/webmasters/v3/`) and, if you set a GA4 property ID, the Analytics Data API (`https://analyticsdata.googleapis.com/`). Google receives the OAuth grant and read-only Search Console / Analytics queries for the account you authorize.

* Search Console API: [https://developers.google.com/webmaster-tools](https://developers.google.com/webmaster-tools)
* Analytics Data API: [https://developers.google.com/analytics/devguides/reporting/data/v1](https://developers.google.com/analytics/devguides/reporting/data/v1)
* Terms: [https://policies.google.com/terms](https://policies.google.com/terms)
* Privacy: [https://policies.google.com/privacy](https://policies.google.com/privacy)

= IndexNow =

When IndexNow is enabled, this site posts published URLs to `https://api.indexnow.org/indexnow`. IndexNow (Bing / Yandex) receives the URL list and your key location. Google does not use IndexNow.

* Service: [https://www.indexnow.org/](https://www.indexnow.org/)
* Terms / privacy: [https://www.bing.com/indexnow/getstarted](https://www.bing.com/indexnow/getstarted)

== Changelog ==

= 1.2.5 =
* Keep the plugin folder and Text Domain header on the WordPress.org slug flex-smm-seo.

= 1.2.4 =
* Set the gettext text domain to flex-smm-seo so it matches the WordPress.org plugin slug.

= 1.2.3 =
* Rename the display name to FLEX SMM & SEO so it does not lead with “Flex SEO”.

= 1.2.2 =
* Encode JSON-LD with JSON_HEX_TAG and related flags so user content cannot break out of the script element.
* Clarify FLEX LLC suite ownership in the description.

= 1.2.1 =
* WordPress.org review readiness: complete readme (privacy, installation, FAQ, service terms).
* Disable the core WordPress sitemap so `/flex-seo-sitemap.xml` is the single sitemap.
* Rename the plugin display name to FLEX SMM & SEO.
* Tested up to WordPress 7.1.

= 1.2.0 =
* Add Insights with Search Console (totals, queries, pages, improvement list) and GA4 reports. Google OAuth credentials live on Insights, not Settings.
* Editor: pixel-aware SERP truncation, color length bars, character/word counts, Google/Facebook/X previews, richer on-page checks.
* Tools: on-page audit, bulk title/description editor, IndexNow pings, validator links.

= 1.1.0 =
* Add Overview and Tools screens (health stats, rewrite flush, robots.txt preview, missing descriptions).
* Add title templates, term SEO, webmaster verification, Twitter/X site, Facebook App ID, and social profile URLs.
* Add SERP preview, character counts, and focus keyword checks in the post editor.
* Expand sitemap (post types and taxonomies), schema (breadcrumbs, author, Product), and attachment 301s.

= 1.0.2 =
* Fix homepage vs Posts page titles, descriptions, and canonicals (including static front pages).
* Exclude noindex and password-protected posts from the sitemap; avoid a duplicate homepage URL.
* Output noindex on 404s; skip revision/autosave meta saves; walk page parents in breadcrumbs.
* Character-safe description trimming; og:type is article only for posts; advertise the sitemap in robots.txt.
* Expand the Usage page with homepage, meta box, robots, sitemap, schema, and breadcrumb details.

= 1.0.1 =
* Refreshed admin UI with a cleaner, card-based layout (local CSS only).
* Media library picker for default OG image, organization logo, and per-post OG image.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.2.5 =
Plugin folder and text domain match the WordPress.org slug flex-smm-seo.

= 1.2.4 =
Text domain now matches the WordPress.org slug flex-smm-seo.

= 1.2.3 =
Display name is now FLEX SMM & SEO.

= 1.2.2 =
Safer JSON-LD output.

= 1.2.1 =
Ready for WordPress.org: privacy and service docs in the readme. The core /wp-sitemap.xml sitemap is turned off in favor of /flex-seo-sitemap.xml.

== License ==

FLEX SMM & SEO is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

For more details, see https://www.gnu.org/licenses/gpl-2.0.html.
