CSS Naked Day

CSS Naked Day plugin for WordPress automatically strips off XML/HTML stylesheet references, embedded stylesheets and inline styles—all without editing your template! It also provides a function to determine whether it is the 9th of April on the recommended worldwide 48-hour CSS Naked Day period or just your local 24-hour period if ever you want to automate a message telling viewers why your site is in the nude.

Download Plugin

Usable Functions

bool is_naked_day(void)

returns true when it is the 9th of April on the time span you’ve set, false otherwise. Sample usage:

<?php
  if (is_naked_day()) {
?>  <h3>What happened to the design?</h3>
    <p>To know more about why styles are disabled on this website
      visit the <a href="http://naked.dustindiaz.com" title="Web
      Standards Naked Day Host Website">Annual CSS Naked Day</a>
      website for more information.</p>
<?php
  }
?>

Known Issues

The plugin would also delete occurences of inline styles (style="") that are intended as text and not as the attribute for styling markup itself. For example, in CSS tutorial pages.

Resolved in Version 1.1.2

In versions prior to 1.1.2, the plugin would cause errors for some inline styles that have escaped quotation marks of the same type as the attribute value delimiter.

For example:

style="font-family:\"Lucida Grande\",\"Lucida Sans Unicode\",sans-serif;"

… would leave …

Lucida Grande\",\"Lucida Sans Unicode\",sans-serif;"

… in the markup, as the regular expression could only remove code from the style attribute only up to the first matching quotation mark without regard to the escaped ones.

Change Log

Version 1.2
Released 4 April 2008

Changes:

  • Changed CSS Naked Day date to reflect event move from April 5 to 9.
Version 1.1.2
Released 6 April 2007

Changes:

  • Fixed regex for patterns to avoid possible conflicts.
  • Fixed known issue about escaped quotation marks in inline styles.
Version 1.1.1
Released 5 April 2007

Changes:

  • Fixed stylesheet reference regex/consuming all <link> elements before targetted one.
Version 1.1
Released 31 March 2007

Changes:

  • Added option to activate only during the 24-hour local time.
  • Added configuration page.
Version 1.0.1
Released 30 March 2007:

Changes:

  • Fixed embedded stylesheet regex/conflict with delimiter.
Version 1.0
Released 28 March 2007
  • First release of the CSS Naked Day plugin.

License

Copyright © 2007-2008 Aja Lorenzo Lapus

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Read the full license

Comments

193 responses to “CSS Naked Day”

  1. […] for the said day when Aja reminded me about the big event a couple of days ago. He has also written a plugin for WordPress-powered blogs that “strips out XML/HTML stylesheet references, embedded and […]

  2. Jonathan Avatar

    Great plugin! One question: shouldn’t there be a closing ?> at the end of the code?

  3. Aja Avatar

    @Jonathan:

    It isn’t necessary, an EOF is an automatic closing PHP tag. It ensures that no whitespace or any character for that matter would be sent to the browser before the HTTP headers are processed.

  4. […] WordPress user, there is two plugin that help participant auto removing their stylesheet for 24-48 hours. If you did not want to […]

  5. […] you cannot do it manually, wordpress plugins can help out. The Aja’s 48 hour naked day plugin can help you strip off XML/HTML stylesheet references, embedded stylesheets and inline styles—all […]

  6. […] BLOG 安装了 Aja’s 48 hour naked day plugin […]

  7. […] are several plugins that help you getting naked in this day, one to mention is Aja`s CSS Naked Day plugin. It`ll strip off XML/HTML stylesheet references, embedded stylesheets and inline styles—all […]

  8. […] too and use WordPress like I do for your blog – I would like to recommend using Aja’s CSS Naked Day […]

  9. […] Aja’s 48 hour naked day plugin. […]

  10. […] Por cierto, hay algunos plugins que pueden interesaros para este objeto; yo he escogido el plugin de Alex Concha; pero hay millares de opciones. […]

  11. […] tutti indicati nella sezione del suo sito che Diaz dedica all’evento: disponibile persino un plugin per la diffusa piattaforma WordPress. I promotori suggeriscono inoltre di registrarsi per comparire […]

  12. […] on April 5th, and turn it back on April 6th so you don’t have to. There is also the 48 Hour Naked Day Plugin. Unfortunately, WordPress.com bloggers will not be able to participate, as they have no access to […]

  13. […] If you would like to participate, for full version WordPress blogs there’s a Naked Day WordPress Plugin which will automatically disable your WordPress Theme’s stylesheet on April 5th, and turn it back on April 6th so you don’t have to. There is also the 48 Hour Naked Day Plugin. […]

  14. […] anche alcuni plugin che consentono di rimuovere lo stile automaticamente: QuickOnlineTips consiglia 48 hours naked day plugin e WP:naked day […]

  15. […] chi usa la piattaforma WordPress c’è un plugin per spogliare il sito a questo indirizzo. Technorati Tags: accessibilità, css, css naked day, plugin, wordpress […]

  16. […] see if I’ll be on time for next year, I’ve put a note in my calendar and downloaded this plugin already. Will you be there in […]

  17. […] on April 5th, and turn it back on April 6th so you don’t have to. There is also the 48 Hour Naked Day Plugin. Unfortunately, WordPress.com bloggers will not be able to participate, as they have no access to […]

  18. Steve Avatar

    UH OH!

    Just so you know, CSS Naked day has been changed to April 9th this year. (Naked Day Homepage) So if you are able, you may want to get an update out there pronto so all the nudists with your plugin don’t reveal themselves too early.

  19. Aja Avatar

    Thanks for that Steve. I was actually watching the CSS Naked Day homepage earlier today, but it seemed to me that Dustin wasn’t updating the day before the event. Now I know why. I’ll be changing that immediately. 🙂

  20. Aja Avatar

    Plugin and plugin page updated, and submitted to Dustin. We’re good to go, guys! 🙂

  21. […] you’re running WordPress, you automate your site’s undressing using the CSS Naked Day Plugin by Aja […]

  22. joshnunn Avatar

    Thanks for updating this – I awoke to a naked site thismorning, only to learn that the date had moved, and found your plugin was ready to be updated on the spot.

    I wonder though – I have some javascript that makes my naked page look ugly. How might I go about getting that removed on the day with your plugin? I tried to alter it myself, but all those lines of regex look complicated. The line is:

    What do you think, is this something I can add to the plugin?

  23. […] WordPress Naked Day Plugin (作者Aja’s) […]

  24. […] user, there is a great little extension that will do this for you. It’s simply called The CSS Naked Day plugin. It’s great if you don’t want to mess with your blog’s […]

  25. […] 还好,裸体日对于WP很简单,你不必按照官方或者是其他方法来去掉你的CSS,Aja’s做了一个WP插件,而且可以用于WP2.5了:http://www.ajalapus.com/downloads/css-naked-day/ […]

  26. […] automatizar o processo, há uma opção de plugin para WordPress (que estou utilizando), fazendo o CSS desaparecer todo da 9 de Abril […]

  27. […] a cualquier hoja de estilos del sitio, si usan WordPress en un servidor propio pueden usar este plugin del CSS Naked Day que hará todo el trabajo sin editar código, o hacer lo a mano editando la […]

  28. Dave Avatar

    Yey! CSS Naked Day!

    Will use your plugin this year, Aja. Thanks.

  29. […] Aja’s 48 hour naked day plugin. […]

  30. […] April 9th this year. If you’re using WordPress, there are various plugins available such as this one by Aja Lapus. Plugins and scripts for other CMSes and platforms are also available. Digg […]

  31. Nikola Avatar

    Aja, great plugin. Works like charm.

    I’ve just thrown in a small change allowing to test-drive one’s nudity. Here is a diff.

    43a44,47
    > if (get_option('aja_naked_day_testdrive')) {
    > return true;
    > }
    >
    66a71,72
    > $aja_setting = ($_POST['aja_textdrive']) ? true : false;
    > update_option('aja_naked_day_testdrive', $aja_setting);
    80a87,90
    >
    > You could also test drive your nudity any time you want. Now?
    > <input type="checkbox" name="aja_textdrive" checked="checked" />
    >

  32. Nikola Avatar

    P.S. The sentence in the options pane and the checkbox should be surrounded by p-tags but they obviously got stripped.

  33. […] options last year on how to turn off your blog’s stylesheet using WordPress Plugins with WordPress Naked Day Plugin for all WordPress versions, CSS Naked Day WordPress Plugin for pre-WordPress 2x blogs, the Naked […]

  34. […] Datei functions.php oder direkt im Template, die header.php. Alternativ kann auch das Plugin „WordPress Naked Day“ genutzt werden. <?php function is_naked_day($d) {   $start = […]

  35. Aja Avatar

    Maybe I’ll try to incorporate “nudity testing” with authorization, so that only administrators would see the site naked before the scheduled date and time. Thanks for that suggestion! It would really be useful. 🙂

  36. […] about the past years, or find out a little more about the event. WordPress users can download a plugin that will disable the CSS automatically for the event without modifying the actual […]

  37. […] mer om Css Naked Day her, og hvis du har en WordPress-blogg (og det har du vel), sÃ¥ kan du bruke dette innstikket som fikser strippingen for deg. Hvis du fant denne posten interessant, sÃ¥ vil du […]

  38. Nikola Avatar

    @Aja, a very valid point 🙂

    Just add this in the is_naked_day() funtion.

    And you’re good to go 🙂

    reference

  39. Nikola Avatar

    A? It maybe got stripped because of the PHP tags. Now it must work fine.

    global $user_ID;
    if ( $user_ID && current_user_can('level_10') && get_option('aja_naked_day_testdrive') ) {
    return true;
    }

  40. […] you are, don’t forget to sign up. It’s very simple. There are directions, and even a WordPress Plugin that will do all the work for […]

  41. […] auch mitmachen will, kann sich dafür ein Plugin runterladen. Das für WordPress-Blogger gibt es hier. Plugins für weitere Blog-Software findet ihr bei bueltge.de. Mehr oder weniger ähnliche […]

  42. […] Ce peut être une bonne raison de redesigner complètement son site. Si vous utilisez WordPress un plugin existe pour vous rendre la tâche plus […]

  43. Douglas Bell Avatar

    Question:

    I’m trying to figure out the 24 hour vs. 48 hour thing and haven’t found any answers. I assume that the 24 hour option makes the naked view active for the day of April 9th as defined by the timezone settings of my WordPress installation, and that the 48 hour thing does it based on a range of when it’s April 9th anywhere in the world. Am I correct about this? If so, at what precise time does the 48 hour option turn the site naked?

  44. […] you’re interested in joining, head over to Dustin’s page! You can also pick up Aja’s CSS Naked Day plugin for WP which will automatically strip your blog on April 9th. This entry was written by addone, […]

  45. Aja Avatar

    Yes, you are correct, Douglas. That date/time of the 48-hour option would be from 12 noon of the 8th of April, up to 12 noon of the 10th of April—both times in GMT/UTC. 🙂

  46. […] a note for all you wordpress users there is a plugin you can use to automatically strip your css for ya.  I installed it and am ready to go. Share […]

  47. […] Blog-Systeme ein Script/Anleitung gebastelt haben…(PHP Naked Day Timer Class, API doc, WordPress Naked Day Plugin, Rails Helper, ASP.net Naked Day Class, Naked Day plugin for the LifeType Blogging platform, […]

  48. […] There’s even a WordPress plugin for it! […]

Leave a Reply

Your email address will not be published. Required fields are marked *