Adding theme option values as custom body class
Review how the variable scope works.. Let’s not add yet another global variable, instead we can e.g. fetch the option values within the filter’s callback: function wpse251261_custom_body_classes( $classes ) { // Get option values $rounded_corner_radio = of_get_option( ’rounded_corner_radio’ ); $gradient_radio = of_get_option( ‘gradient_radio’ ); // Assign new body classes $classes[] = esc_attr( $rounded_corner_radio ); $classes[] … Read more