=== Oriole One Custom Fields ===

Contributors: rashidsharafat
Tags: seo, meta title, meta description, lightweight, meta tags
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight SEO plugin for custom meta titles and automatic meta descriptions, with simple backend controls.

== Description ==

**Oriole One Custom Fields** is a focused, lightweight SEO plugin for WordPress. It lets you add a custom meta title on posts, pages, and public custom post types, and automatically generates and injects a `<meta name="description">` tag into your post `<head>` using the post excerpt as the primary source, with intelligent fallback generation from content.

**How it works:**

1. Add an optional custom **Meta Title** on any supported edit screen. When set, it overrides the front-end document title for that singular post, page, or custom post type.
2. If a post has a manually written excerpt, that excerpt is used as the meta description (HTML stripped, whitespace normalised, trimmed to about 155 characters).
3. If no excerpt exists, the plugin auto-generates a description from content by stripping shortcodes, HTML, and excessive whitespace, then trimming intelligently to avoid breaking mid-word.
4. If no title or description content is available, the plugin leaves the normal WordPress output alone.

**Key features:**

* Adds a custom meta title field to posts, pages, and public custom post types.
* Overrides the front-end document title when a custom meta title is set.
* Outputs meta descriptions for posts, pages, and public custom post types.
* Smart description fallback: manual excerpt to content to nothing.
* Strips shortcodes, HTML, and excess whitespace automatically.
* Trims descriptions to about 155 characters on word boundaries.
* Includes a Settings page to enable or disable meta title and meta description output.
* Detects and defers to major SEO plugins to prevent duplicate SEO output.
* No database tables, no cron jobs.
* No frontend CSS or JavaScript.
* Translation-ready with full i18n support.
* PHP 8.0+ and WordPress 6.0+ compatible.

**Conflict detection - compatible with:**

* Yoast SEO (free and premium)
* Rank Math SEO
* All in One SEO (AIOSEO)
* SEOPress
* Slim SEO
* The SEO Framework

When any of the above plugins are active, Oriole One Custom Fields silently steps aside so you never get duplicate SEO title or description output.

**Not output on:**

* Archives, category pages, tag pages
* Search results
* The homepage / static front page
* RSS and Atom feeds
* WordPress admin
* REST API requests

**Lightweight by design:**

This plugin follows a strict "do one thing well" philosophy. It includes only the settings needed to control title and description output, with no tracking, no ads, and no upsells.

== Installation ==

**Automatic installation (recommended):**

1. In your WordPress admin, navigate to **Plugins > Add New**.
2. Search for **Oriole One Custom Fields**.
3. Click **Install Now**, then **Activate**.

**Manual installation:**

1. Download the plugin zip file.
2. Upload and extract the `oriole-one-custom-fields` folder to `/wp-content/plugins/`.
3. Activate the plugin through **Plugins > Installed Plugins** in WordPress admin.

== Frequently Asked Questions ==

= Does this plugin conflict with Yoast SEO, Rank Math, or other SEO plugins? =

No. Oriole One Custom Fields automatically detects the presence of Yoast SEO, Rank Math SEO, All in One SEO, SEOPress, Slim SEO, and The SEO Framework. If one is active, this plugin disables its own title and description output to avoid conflicts.

= Does this plugin add a settings page? =

Yes. Go to **Settings > Oriole One Custom Fields** to enable or disable custom meta title output and automatic meta description output.

= How do I set a custom meta title? =

Edit a post, page, or public custom post type and use the **Meta Title** box. Leave it blank to use the normal WordPress title.

= Which post types does this plugin support? =

The plugin supports posts, pages, and all public custom post types that are registered to appear in the front end. It does not output titles or descriptions on archives, search results, the homepage, or feeds.

= What if my post has no excerpt and no content? =

The plugin will not output a `<meta name="description">` tag in that case. It is better to omit the tag than to output an empty or meaningless one.

= How long will the meta description be? =

The plugin trims descriptions to approximately 155 characters, breaking at the last complete word before that limit to avoid awkward mid-word cuts. An ellipsis is appended when the text is truncated.

= Does this plugin store any data? =

The plugin stores one settings option and custom meta title values when you enter them. It creates no database tables and registers no cron events.

= Is this plugin compatible with multisite? =

The plugin has not been specifically tested in a multisite environment, but it contains no single-site-specific runtime logic and should work in multisite installations.

= Will this affect my site's performance? =

No. The plugin executes a minimal number of operations per page load, outputs no frontend CSS or JavaScript, and performs no extra database queries beyond fetching the current post meta when needed.

== Screenshots ==

1. Example `<meta name="description">` tag output in page source.
2. Meta Title box on the post edit screen.
3. Settings page for title and description output.

== Changelog ==

= 1.0.0 - 2024-01-01 =
* Initial release.
* Automatic meta description output for singular posts, pages, and custom post types.
* Custom meta title fields for posts, pages, and public custom post types.
* Settings page controls for meta title and meta description output.
* Manual excerpt priority with content fallback.
* Conflict detection for Yoast SEO, Rank Math, All in One SEO, SEOPress, Slim SEO, and The SEO Framework.
* Uninstall cleanup for plugin settings and custom meta title data.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps required.
