Last active
February 15, 2023 23:50
-
-
Save mennwebs/89f66246a80fde4e770becf77a71ed06 to your computer and use it in GitHub Desktop.
GenerateBlocks - Output CSS with Content (for Frontend, to get WordPress content via API)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // GENERATEBLOCKS CSS | |
| if (function_exists('generateblocks_get_frontend_block_css')) { | |
| add_filter('the_content', 'p_css'); | |
| } | |
| function p_css($content) { | |
| global $post; | |
| $css = wp_strip_all_tags(generateblocks_get_frontend_block_css()); | |
| return '<style id="gb-css">' . $css . '</style>' . $content; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment