Plugin Directory

wpSpoiler

A plugin designed to protect the reader against spoilers.

Download Version 1.2

Usage

To mark a text as spoiler, enclose the passage with [spoiler] and [/spoiler]. Example: Spoiler: [spoiler]Bruce Willis is a ghost![/spoiler]

The result is shown in the screenshot section.

Customize

The language of the link text has to be changed in the pluginfile itself: wpSpoiler.php.

CSS can be used to style the spoiler box and the links. The spoiler-div is identified by the classname spoiler_div. The link's class is spoiler_link_show or spoiler_link_hide, depending on the current state.

An example stylesheet code snippet:

/* wpSpoiler */
a.spoiler_link_show,
a.spoiler_link_hide {
    background-repeat:      no-repeat;
    background-position:    left center;
    padding-left:           18px;
}
a.spoiler_link_show {
    background-image:       url(images/add.png);
}
a.spoiler_link_hide {
    background-image:       url(images/delete.png);
}
div.spoiler_div {
    background-color:       #ddd;
    margin-top:             -10px;
    padding:                2px;
}

Requires: 2.0 or higher
Compatible up to: 2.5.1
Last Updated: 2008-5-31 Downloads: 9,129

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5 ratings)

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

Log in to vote.

0,1,0
100,1,1
100,1,1