# Word Guard

**Contributors:** wpsqr  
**Tags:** editorial, styleguide, content scan, consistency, keyword replacement  
**Requires at least:** 5.0  
**Tested up to:** 6.9  
**Stable tag:** 1.0.0  
**Requires PHP:** 7.4  
**License:** GPLv2 or later  
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html  

Word Guard helps enforce editorial consistency by scanning post content against a configurable styleguide of keywords and suggested alternatives.

---

## Description

Word Guard is a lightweight editorial assistant for WordPress that helps site administrators and editors maintain consistent language and brand standards across content.

Administrators define a styleguide of keywords or phrases along with preferred alternatives. Editors can then scan post content directly from the editor to detect undesired terms, highlight them, and replace them with approved alternatives in just a few clicks.

Word Guard is designed to work seamlessly with both the **Classic Editor** and the **Gutenberg block editor**, making it suitable for a wide range of WordPress setups.

### Key features

- Define a customizable styleguide of keywords and phrases
- Assign:
  - A single suggested replacement, or
  - Multiple alternative replacements (comma-separated)
- Manual content scanning from the editor interface
- Highlights flagged keywords within post content
- One-click replacement with suggested alternatives
- Compatible with:
  - Gutenberg Editor
  - Classic Editor
- Uses WordPress capabilities and nonces for security
- Optimized to scan average-length posts (~3,000 words) in under 2 seconds

Word Guard is ideal for teams, publishers, and organizations that want to enforce consistent terminology and writing standards without slowing down their editorial workflow.

---

## Usage

### Managing the Styleguide

1. Log in as an administrator.
2. Go to **Word Guard**.
3. Add keywords or phrases you want to flag.
4. Define one or more preferred alternatives (comma-separated).
5. Save changes.

### Scanning Content

1. Open a post in the Classic Editor or Gutenberg editor.
2. Click the **Word Guard Scan** button.
3. Review highlighted keywords.
4. Replace flagged terms using the suggested alternatives.

---

## Installation

1. Download the plugin `.zip` file.
2. Upload to your WordPress site:
   - Go to **Plugins > Add New > Upload Plugin** and choose the `.zip` file.
3. Activate the plugin from the **Plugins** menu.
4. Go to **Word Guard** to configure your styleguide.
5. Edit or create a post and run a manual scan from the editor interface.

---

## Requirements

- WordPress 5.0+
- PHP 7.4+
- Compatible with Classic Editor plugin, Gutenberg.

---

## Security

- Uses WordPress capability checks (`manage_options`, `edit_posts`).
- All form submissions protected with WordPress nonces.

---

## Frequently Asked Questions

### Does Word Guard automatically change my content?

No. Scans are manual, and replacements are only applied when the editor chooses to do so.

### Is my content stored or sent externally?

No. All scans are performed locally within your WordPress installation.

### Does Word Guard affect site performance?

Word Guard is optimized for performance and scans typically complete in under 2 seconds for average-length posts.

---

## Changelog

### 1.0.0
- Initial release with styleguide management, content scanning, and editor integration.

---

## Upgrade Notice

### 1.0.0
First stable release of Word Guard.

---

## Documentation

Full documentation is available on our website:  
[Word Guard Documentation](https://www.wp-sqr.com/)

---

## Troubleshooting

1. Ensure the Word Guard plugin is activated and your WordPress version is at least 5.2.
2. Deactivate other plugins to check for conflicts.
