This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

CSS Naked Day


The idea behind CSS Naked Day is to promote Web Standards. Plain and simple.
This includes proper use of (X)HTML, semantic markup, a good hierarchy structure, and; well, a fun play on words.
I mean, who doesn’t want to get naked? —Dustin Diaz, Founder of CSS Naked Day

This CSS Naked Day plugin automatically strips off the following code from your site
without you having to edit your themes:

  • X(HT)ML stylesheet directives: <?xml-stylesheet … ?>
  • (X)HTML stylesheet references: <link rel="stylesheet" … /> or <link rel='stylesheet' … />
  • (X)HTML embedded stylesheets: <style> … </style>
  • (X)HTML inline stylesheets: style="…" or style='…'

Since version 1.1, you have an option to activate it during the recommended worldwide 48-hour CSS Naked Day period,
or just the local 24-hour period.

For more information about the event, visit: The Official CSS Naked Day Page.

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.


What differences does this plugin have compared to other CSS Naked Day plugins?
  1. This plugin removes all CSS stylesheets from the page before it sends the data to the viewers’ browsers.
  2. It doesn’t use client-side scripting to remove styles, which may be turned off or unsupported in other browsers,
    so everyone would see your page in its natural, naked form.
  3. It doesn’t require the user to edit his/her theme files.
How could I display a message only on the 9th of April telling why my site is naked?

Use the is_naked_day() function inside an if () block. is_naked_day() returns true when it is April 9,
otherwise it returns false.


<?php if (is_naked_day()) { ?> Message why my site is naked. <?php } ?>

Contributors & Developers

This is open source software. The following people have contributed to this plugin.


Browse the code