Adding Extra Required Classes To Oxywind Worker

Use the following code to add extra required classes during Oxywind worker compiling / cache generation when you are ready for production. You may want to do this if you want to use tailwind classes in your HTML code outside of oxygen elsewhere in wordpress or a 3rd party / custom plugin.

This will save classes you need from the purge.

<?php
add_filter( 'f!Wakaloka\\Oxywind\\Core\\Worker::content_of_posts', 'hb_tailwind_addclasses' );
  
function hb_tailwind_addclasses( $content ) {
    $content =  "p-4 flex flex-col p-0 px-4" . " \n" . $content; //example - add classes you need here
    return $content;
}
?>

// newsletter

Three tested WordPress snippets a week

Blocks, security, performance, Tailwind, PHP and React. Copy, paste, ship. You’ll also get DPlugins product updates. No spam, and you can unsubscribe anytime.

// newsletter

Three tested WordPress snippets a week

Blocks, security, performance, Tailwind, PHP and React. Copy, paste, ship. You'll also get DPlugins product updates. No spam, and you can unsubscribe anytime.

Click to Copy