Whats the safest way to output custom JavaScript and Css code entered by the admin in the Theme Settings?

Allowing user to control code is explicitly unsafe operation. As you note the purpose of sanitization is pretty much to not let user slip in anything executable and/or with malicious intent. To “sanitize” executable code you would need programmatic understanding of it (code parser) and criteria engine to distinguish what is safe and what is … Read more

How to change Parent Themes in Child Theme CSS

I think you are confused about this. Let me explain. The @import url(“../responsive/style.css”); is telling the Child theme to import the Responsive themes style.css. This is important because without this the Child theme doesn’t know what its Parent theme is. So the @import url(“../responsive/style.css”); points the Child theme to the default (main) file in the … Read more

How to get WordPress to accept the tag in articles (or other alternatives)

The <style> tag needs to be added to tinyMCE’s extended_valid_elements array to prevent on that tag from being stomped: function wpse211235_add_tiny_mce_before_init( $options ) { if ( ! isset( $options[‘extended_valid_elements’] ) ) { $options[‘extended_valid_elements’] = ‘style’; } else { $options[‘extended_valid_elements’] .= ‘,style’; } return $options; } add_filter( ‘tiny_mce_before_init’, ‘wpse211235_add_tiny_mce_before_init’ );