Changes between Initial Version and Version 1 of Ticket #57393
- Timestamp:
- 12/28/2022 06:59:12 PM (21 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #57393 – Description
initial v1 2 2 3 3 Here is the condition in question: 4 4 {{{ 5 5 function wp_enqueue_code_editor( $args ) { 6 if ( is_user_logged_in() && 'false' === wp_get_current_user()->syntax_highlighting ) { 7 return false; 8 } 6 if ( is_user_logged_in() && 'false' === wp_get_current_user()->syntax_highlighting ) { 7 return false; 8 } 9 }}} 9 10 10 11 I believe that the user-form-variable syntax_highlighting is probably misnamed as it should be something like disable_syntax_highlighting to reflect the choice being made. 11 12 12 13 As it is, when ticked (true), highlighting should be disabled. When un-ticked (false), highlighting should be enabled. 13 14 if ( ! is_user_logged_in() or 'true' === wp_get_current_user()->syntax_highlighting ) { 15 return false; 16 } 17 18 NB: Pipe symbol is filtered and so replaced with "or" 14 {{{ 15 if ( ! is_user_logged_in() || 'true' === wp_get_current_user()->syntax_highlighting ) { 16 return false; 17 } 18 }}}