[wp-trac] [WordPress Trac] #42753: possible bug in filter wp_code_editor_setting
WordPress Trac
noreply at wordpress.org
Thu Nov 30 07:56:46 UTC 2017
#42753: possible bug in filter wp_code_editor_setting
--------------------------+-----------------------------
Reporter: willrad | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.9
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
{{{
function readonly_wp_code_editor_settings( $settings ) {
$new_settings =
array( 'codemirror' => array( 'readOnly' => 'true' ) );
$settings = array_merge( $settings, $new_settings );
return $settings;
}
add_filter( 'wp_code_editor_settings', 'readonly_wp_code_editor_settings'
);
}}}
{{{
function theme_code_editor_settings( $settings ) {
$new_settings =
array( 'codemirror' => array( 'theme' => 'vibrant-ink' )
);
$settings = array_merge( $settings, $new_settings );
return $settings;
}
add_filter( 'wp_code_editor_settings', 'theme_code_editor_settings' );
wp_enqueue_style( 'vibrant-ink', plugin_dir_url( __FILE__ ) . 'vibrant-
ink.css' );
}}}
Trying to set this filter turns off linting, bracket matching etc in the
plugin and theme editors. The setting is set correctly as expected but no
bracket matching.
Anyone have this problem? I want to set a custom theme and the above
happens. There is an optional argument for the filter but it doesn't
change what I'm after anyways.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42753>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list