Wordpress Plugin: GK HTML Post Stripper

in #utopian-io9 years ago

Today I present you with another wordpress plugin that I recently created for the purposes of assisting in data cleanups on wordpress sites. I named the plugin GK HTML Post Stripper, and no unfortunately it has nothing to do with strippers :D

image.png

Purpose of the plugin

Essentially, the plugin allows via a single run to remove any HTML formatting across all your posts' content, while only maintaining image and a href links as removing those might lose critical data/links. This can come in handy if you malformatted content within your posts, such as the case of one of my clients who approached me to get rid of all their problems

Coding the plugin

As a standard wordpress plugin, the language used is always PHP for backend processing, while front end relies on HTML+JS/JQuery code.
In order to strip the HTML content, we relied on performing a query via WP_Query built in function to grab all published posts, and then utilized strip_tags built-in function to also cleanup the content, passing as params the img and a tags so that those are left untouched.
Then those modifications are saved via the wp_update_post on each post run.

Utilizing the plugin

The plugin menu can be accessed via the back end's screen via the left tab called HTML Stripper

image.png

Clicking on it will take the user to the relevant screen, with a single button which allows performing the stripping action via a single click. A confirmation box will popup before taking action to ensure the user is performing the action intentionally.

Downloading the plugin

The plugin can be obtained from the official GitHub repository
Being the sole contributor (and creator) of the plugin, there are currently no branches/forks/gists/pull requests, and all the code is openly accessible via above link.
Feel free to check it out, and let me know should you have any questions :)

Thank you

@mcfarhat



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

My friend @mcfarhat.

This is too tech for my understanding. Maybe I will take time and go through it. Maybe you will be of help in some point, won't you?

haha glad you read through. With pleasure, feel free to ask

It's good to see, what you create for all html contact and it's sounds very cool . Hay you are really doing great.

Hay my friend, you are working in something new and well I don't have much knowledge about that. But it's to read about your project.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @mcfarhat I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

I just enjoy reading your posts and will never stop upvoting you. I am to old to understand but out son did sort of explain lol he says it is great.

Good plugin!

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.075
BTC 64496.87
ETH 1680.70
USDT 1.00
SBD 0.42