Created
December 12, 2022 14:49
-
-
Save mwhiteley16/b78da1f07b0b711513bdd41d73537477 to your computer and use it in GitHub Desktop.
CSS Output for Feast
This file contains 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
<?php | |
// function to output all the CSS | |
function feast_output_css() { | |
if ( function_exists( 'feast_css' ) ) { | |
$output = ''; | |
$output .= '<style id="id-goes-here">'; | |
feast_css(); | |
$output .= '</style>'; | |
echo $output; | |
} | |
} | |
add_action( 'wp_head', 'feast_output_css' ); | |
// example function for how to add CSS to the inline CSS output | |
function example_css_output() { | |
$output = <<<'EOD' | |
.my-selector { | |
color: blue; | |
} | |
EOD; | |
echo $output; | |
} | |
add_action ( 'feast_css', 'example_css_output' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment