=== SEO for Ultimate Member ===
Contributors: userelements
Tags: ultimate member, seo, yoast, rank math, sitemap
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.2
Stable tag: 1.0.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.txt

Get Ultimate Member profiles into Google — correctly and safely. Yoast/Rank Math integration, privacy-aware sitemaps, and Person schema.

== Description ==

Ultimate Member powers member directories — but out of the box, profiles are poorly equipped for search engines. Profiles are missing from sitemaps. Yoast SEO is stripped from profile URLs. Meta descriptions use a single global template for every member.

**SEO for Ultimate Member** fixes the core pain: get member profiles into Google, correctly and safely. It keeps Yoast and Rank Math alive on profiles, builds a privacy-aware XML sitemap, outputs basic Person schema and Open Graph profile tags, and always respects Ultimate Member's full noindex cascade.

= Who is this for? =

* **Member directories** — lawyers, doctors, freelancers, agencies, or any site listing profiles that should rank in Google.
* **Community sites** starting with profiles — Activity, Photos, and Groups SEO are available in Pro.

= Free features =

* **Yoast SEO & Rank Math integration** — keeps them alive on profile pages; feeds title, description, canonical, robots, Open Graph, and Twitter.
* **Profile XML sitemap** — cached, paginated, privacy-aware `um-profiles-sitemap.xml` with Yoast/Rank Math/WordPress core index registration.
* **Full privacy / noindex cascade** — WordPress setting → UM global → role → user privacy → account preference. Never gated.
* **Basic Person schema** — name, URL, avatar, givenName, familyName.
* **Open Graph profile tags** — `og:type=profile`, `profile:first_name`, `profile:last_name`, `profile:username`.
* **Automatic social share image** — cover photo → avatar fallback.
* **`%um_*%` template variables** — display name, first/last name, username, bio for Yoast/Rank Math.
* **Author archive → profile canonical** — tells search engines the UM profile is preferred.
* **Basic BreadcrumbList** on profiles and the member directory.
* **Member directory SEO** — one global title/description + clean canonical; filtered views are noindexed.
* **Standalone meta output** when no SEO plugin is installed.

= Pro unlocks =

* Per-member SEO overrides (title, description, share image, noindex)
* Author archive 301 redirect + bulk tools
* Role-level sitemap inclusion control
* Enriched Person schema (job, company, location, sameAs)
* UM Social Activity / User Photos / Groups SEO (sitemaps, schema, crawler-friendly HTML)
* Advanced per-directory meta, image sitemaps, hreflang, upload protection, WP-CLI & diagnostics

*Free ranks your profiles; Pro ranks your whole community and lets you control every page.*

= Privacy always wins =

The plugin fully respects Ultimate Member's noindex cascade:

1. WordPress "Discourage search engines" setting
2. Ultimate Member global "Avoid indexing profile by search engines"
3. Role-level noindex override
4. User privacy / private profile setting
5. Per-user account "Avoid indexing my profile" option

If any of these say noindex, the profile is excluded from meta indexing, the profile sitemap, and Open Graph output.

== Installation ==

1. Install and activate **Ultimate Member**.
2. Upload and activate **SEO for Ultimate Member**.
3. Go to **Ultimate Member → SEO** — profile features are enabled by default.
4. If the profile sitemap returns a 404, visit **Settings → Permalinks** and click Save.
5. Open `yoursite.com/um-profiles-sitemap.xml` to verify.

= Recommended Yoast setup =

* In **Yoast → Settings → Archives**, disable **Author archives** — UM profiles use their own URLs and sitemap.
* In **UM → Settings → Misc**, set your **User Profile Title** and **User Profile Dynamic Meta Description** templates.
* Use `%%um_display_name%%`, `%%um_first_name%%`, `%%um_last_name%%`, `%%um_username%%`, or `%%um_bio%%` in Yoast templates.

= Recommended Rank Math setup =

* Enable the **Rank Math** module in **Ultimate Member → SEO**.
* Use `%um_display_name%`, `%um_first_name%`, `%um_last_name%`, `%um_username%`, or `%um_bio%` in Rank Math templates.

== Frequently Asked Questions ==

= Does it work without Yoast or Rank Math? =

Yes. Without any SEO plugin, the plugin enhances Ultimate Member's built-in meta output with Person schema, Open Graph profile tags, social share images, and a standalone XML sitemap registered with WordPress core sitemaps.

= Are private profiles kept out of Google? =

Yes. Any profile that Ultimate Member marks as noindex is excluded from meta indexing, the profile sitemap, and Open Graph output. Privacy is never a paid feature.

= Do I need UM Social Activity, User Photos, or Groups? =

No. Core profile SEO works with Ultimate Member alone. SEO for those extensions is available in Pro.

= Will it conflict with Ultimate Member's built-in SEO? =

No. When Yoast or Rank Math is active, the plugin removes UM's duplicate meta output so only one set of tags is rendered. When no SEO plugin is present, it enhances UM's existing output.

= Where are the settings? =

**Ultimate Member → SEO**.

== Changelog ==

= 1.0.1 =
* Aligned the text domain with the plugin slug: `seo-for-ultimate-member`.
* Renamed the plugin prefix from `umseo` to `seofoulm` for functions, classes, options, hooks, and filters.
* Fixed late escaping for BreadcrumbList JSON-LD output.
* Added automatic migration for legacy stored options and transients from earlier builds.
* Settings screen remains at **Ultimate Member → SEO**; the internal admin page slug is now `seofoulm-settings`.

= 1.0.0 =
* Initial free release: Yoast/Rank Math profile integration, privacy-aware profile sitemap, basic Person schema, Open Graph profile tags, cover→avatar share images, core `%um_*%` variables, author canonical, breadcrumbs, and member directory SEO.