mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Theme Editor: Disable CodeMirror CSS linting.
Being a good idea in theory, in practice it does not always work reliably, may not recognize newer CSS properties, and sometimes displays phantom errors with no particular error message. A plugin can re-enable CSS linting via the `wp_code_editor_settings` filter. Props skypressatx, ThemeZee, johnbillion, ianbelanger, ZanderZ, starvoters1, raoulunger, prashantvatsh, SergeyBiryukov. Fixes #44471. Built from https://develop.svn.wordpress.org/trunk@47305 git-svn-id: http://core.svn.wordpress.org/trunk@47105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d1054fcb48
commit
306d804d86
@ -3721,17 +3721,7 @@ function wp_get_code_editor_settings( $args ) {
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'text/css' === $type ) {
|
||||
$settings['codemirror'] = array_merge(
|
||||
$settings['codemirror'],
|
||||
array(
|
||||
'mode' => 'css',
|
||||
'lint' => true,
|
||||
'autoCloseBrackets' => true,
|
||||
'matchBrackets' => true,
|
||||
)
|
||||
);
|
||||
} elseif ( 'text/x-scss' === $type || 'text/x-less' === $type || 'text/x-sass' === $type ) {
|
||||
if ( in_array( $type, array( 'text/css', 'text/x-scss', 'text/x-less', 'text/x-sass' ), true ) ) {
|
||||
$settings['codemirror'] = array_merge(
|
||||
$settings['codemirror'],
|
||||
array(
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-beta1-47304';
|
||||
$wp_version = '5.4-beta1-47305';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user