WP Manifestindependent plugin directory
manifest / content / wp-word-filter-plugin

Our World Filter Plugin

A lightweight WordPress plugin for filtering selected words in post and page content through a simple admin settings page.

by ashrafi · github.com/atta3554/wp-word-filter-plugin

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/atta3554/wp-word-filter-plugin/archive/refs/heads/main.zip

Readme

Word Filter Plugin

A lightweight WordPress plugin that lets administrators define a comma-separated list of words and automatically replace those words in post and page content.

This is a small WordPress plugin project created to demonstrate basic plugin development concepts, including admin menus, WordPress options, hooks, nonce verification, capability checks, sanitization, and custom admin styling.

Features

  • Adds a dedicated Word Filter menu to the WordPress admin dashboard
  • Accepts a comma-separated list of words
  • Stores the configured word list using the WordPress Options API
  • Filters post and page content using the the_content hook
  • Replaces matching words with &&&&
  • Includes nonce verification and administrator capability checks
  • Loads custom CSS only on the plugin's admin page
  • Uses a custom SVG admin menu icon

Installation

  1. Download or clone this repository.

  2. Copy the plugin folder into:

    wp-content/plugins/word-filter
  3. Log in to the WordPress admin dashboard.

  4. Go to Plugins and activate Our Word Filter Plugin.

  5. Open Word Filter from the admin menu.

  6. Enter the words you want to filter, separated by commas.

  7. Click Save Changes.

Example

Enter the following value in the plugin settings:

book, tree, table

When one of these words appears in post or page content, it will be replaced with:

&&&&

Project Structure

wordFilter/
├── custom.svg
├── index.php
├── styles.css
└── README.md

WordPress Concepts Demonstrated

  • Plugin headers
  • Actions and filters
  • Admin menu and submenu pages
  • WordPress Options API
  • Nonce verification
  • User capability checks
  • Input sanitization and output escaping
  • Conditional admin asset loading
  • Object-oriented plugin structure

Notes

This is a simple educational project and is not intended to provide advanced moderation features. Matching is currently case-sensitive, and the replacement text is fixed to &&&&.

License

This project is available for educational and portfolio purposes.

Read the full README on GitHub →