-
-
Save neilgee/bc08d3c03f6ff387bc65 to your computer and use it in GitHub Desktop.
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
<?php | |
function string_body_class($classes) { | |
if ( isset($_GET) && isset( $_GET['class'] ) ) : | |
$classes[] = sanitize_html_class( $_GET['class'] ); | |
endif; | |
return $classes; | |
} | |
add_filter('body_class', 'string_body_class'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment