Replying to mjdewitt:
My issue here is that the way it is now is counter-intuitive or backwards: if disabled is checked, disabled is true meaning that codemirror does not load up features.
That still sounds totally right to me. If the "Disable ..." checkbox is checked, the value of syntax_highlighting
is false
. If the value of syntax_highlighting
is false
, WordPress will not load the CodeMirror integration (as the function wp_enqueue_code_editor()
will be left early).
If plugins like Code Snippet also interpret the syntax_highlighting
value, it's on them to load relevant JavaScript files (like for CodeMirror) themselves.
Given that these checkboxes have been in WordPress for multiple years (see https://core.trac.wordpress.org/changeset/41376#file12), I believe that any functional issues would already have been detected.
That said, I do agree that the wording of the checkbox texts can be improved. I have added a patch that reverses the checkbox behavior and adjusts the wording of the checkbox texts, and brings some consistency to the handling of that code.
I think that this might indeed make sense here, and I'll move this suggestion for potential inclusion in WP 6.2, if a Core committer agrees, and I'll update the ticket title and description to reflect the suggested changes.