#42753 closed defect (bug) (invalid)
possible bug in filter wp_code_editor_setting
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
Using $args instead produces the right results from the filter. The class gets renamed and styling is overridden with linting\hinting intact.