WP Manifestindependent plugin directory
manifest / content / find-junk-html

Find Junk HTML

A WordPress plugin that helps you find the junk HTML that careless editors copy pasted into your beautiful site.

★ 16stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/brugman/find-junk-html/archive/refs/heads/develop.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin to find undesired HTML in your posts.

screenshot

Installation

  1. Download the ZIP.
  2. Extract the folder to /wp-content/plugins/.

or

cd /wp-content/plugins/
git clone https://github.com/Brugman/find-junk-html.git

Update

  1. Download the new ZIP.
  2. Replace the old folder in /wp-content/plugins/.

or

cd /wp-content/plugins/find-junk-html/
git pull

Optional configuration

Add custom types of junk

The code field will be searched for. The tag field is the key used when saving settings, and for display. The desc is displayed on hover, to explain why this tag can be junk.

add_filter( 'fjh_needles', function ( $needles ) {

    $custom_needles = [
        [
            'code' => '<h2',
            'tag'  => 'h2',
            'desc' => 'The reason for why this can be junk.', // optional
        ],
        [
            'code' => '<h3',
            'tag'  => 'h3',
            'desc' => 'The reason for why this can be junk.', // optional
        ],
    ];

    return array_merge( $needles, $custom_needles );
});

Contributing

Found a bug? Anything you would like to ask, add or change? Please open an issue so we can talk about it.

Pull requests are welcome. Please try to match the current code formatting.

Author

Tim Brugman