Innerdvations

1Sep/113

Make Safe For Work

Plugin status: Released. Get "Make Safe For Work"

I wasn’t satisfied with the Not-Safe-For-Work WordPress plugin I found, so I wrote one that has far more features than you’d ever imagine a silly plugin like this to have.

The default method, reload, doesn’t send any of the offending content to the user’s browser until they click on the reveal link, so if someone is behind a filter that prevents them from loading pages with certain words, they’ll still be able to view your page.

Here are some demos of the different types available. The spoiler type handles images and advanced styling about as well as you’d expect (exceedingly poorly) but it uses visibility:hidden instead of just trying to turn everything black, so at least it always works.

original text:
really seriously unbelievably long swear word that exceeds all expectations

Standard method (first tag):
                                                                    [NSFW]                                                                     

Standard method (after first tag):
                                                                    [NSFW]                                                                     

Spoiler method:
really seriously unbelievably long swear word that exceeds all expectations

Deleted (never show anything, no idea why you’d want this):
                                                                [redacted]                                                                 

Comment (view source):

Share and Enjoy:
  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks

flattr this!

Comments (3) Trackbacks (0)
  1. Hi!
    Your plugin is very useful!

    I’ve made a little change to get a way to hide the “not safe for work” content after showing it.
    It’s a very simple workaround but effective. ;)

    “$original_content = do_shortcode($content).”Click to hide not safe content.“;”

    Hope you like it! ;)

  2. Can I use a default image instead of the text?

  3. Its like you read my thoughts! You seem to grasp so much approximately this, such as you wrote the e-book in it or something. I feel that you simply can do with a few percent to power the message home a little bit, however instead of that, this is magnificent blog. An excellent read. I’ll definitely be back.


Leave a comment

Connect with Facebook

(required)

No trackbacks yet.