19

How to Disable CSS Lint in CodeMirror for WordPress

Powered by WPCodeBox

Learn how to easily disable CSS Lint in CodeMirror for WordPress with this simple solution.


<?php 

// Disable CSS Lint in CodeMirror

function my_disable_csslint($settings) {
    if ($settings['codemirror']['mode'] === 'text/css') {
        $settings['codemirror']['lint'] = false;
    }
    
    return $settings;
}

add_filter('wp_code_editor_settings', 'my_disable_csslint', 11);

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.