elements before targetted one. v1.1 31-Mar-2007: - Added option to activate only during the 24-hour local time. - Added configuration page. v1.0.1 30-Mar-2007: - Fixed embedded stylesheet regex/conflict with delimiter. v1.0 28-Mar-2007: - First release of the CSS Naked Day plugin. */ function is_naked_day() { if (get_option('aja_naked_day_rechrs')) { $aja_stime = gmmktime(-12, 0, 0, 4, 9); // Start of April 9 on GMT+12 $aja_etime = gmmktime(36, 0, 0, 4, 9); // End of April 9 on GMT-12 } else { $aja_offset = get_option('gmt_offset') * 3600; $aja_stime = gmmktime(0, 0, 0, 4, 9) - $aja_offset; // Start of local April 9 $aja_etime = gmmktime(24, 0, 0, 4, 9) - $aja_offset; // End of local April 9 } $aja_ntime = time(); // Time now if ($aja_ntime >= $aja_stime && $aja_ntime <= $aja_etime) return true; else return false; } /* Configuration Panel Function */ function aja_naked_day_subpanel() { if (isset($_POST['aja_update'])) { $aja_setting = ($_POST['aja_rechours'] == 'true') ? true : false; update_option('aja_naked_day_rechrs', $aja_setting); ?>

Options saved.

CSS Naked Day

Activation Time Span

CSS Naked Day plugin should strip stylesheets off your site for hours.

@sU', // x(ht)ml reference '@@isU', // (x)html reference " '@@isU', // (x)html reference ' '@@isU', // (x)html embedded '@style\s*=\s*".*(?:(?:\x5C").*)*?"@iU', // (x)html inline " '@style\s*=\s*\'.*(?:(?:\x5C\').*)*?\'@iU' // (x)html inline ' ); return preg_replace($aja_pattern, '', $aja_buffer); } function aja_buffer() { if (is_naked_day()) ob_start('aja_replace'); } /* WordPress Hooks */ add_action('admin_menu', 'aja_options_page'); add_action('activate_css-naked-day.php', 'aja_activate'); add_action('deactivate_css-naked-day.php', 'aja_deactivate'); add_action('template_redirect', 'aja_buffer');