Comment Opt Out doesn’t work on admin form
-
When editing an existing comment as an administrator, this plugin forces the tinymce editor.
There is a setting in the plugin called “Activate Pastacode for comments”, but this setting is not checked in the function
pastacode_admin_comment_editor_settings()
.Here is a rough patch for the change needed to fix.
diff --git a/wp-content/plugins/pastacode/pastacode.php b/wp-content/plugins/pastacode/pastacode.php index 4b8a3542..8e4e4e93 100644 --- a/wp-content/plugins/pastacode/pastacode.php +++ b/wp-content/plugins/pastacode/pastacode.php @@ -991,7 +991,7 @@ function pastacode_shortcode_in_comments( $content ) { add_filter( 'wp_editor_settings', 'pastacode_admin_comment_editor_settings', 10, 2 ); function pastacode_admin_comment_editor_settings( $settings, $editor_id ) { - if ( is_admin() && 'content' == $editor_id ) { + if ( is_admin() && 'content' == $editor_id && 'y' == get_option( 'pastacode_comments_opt' ) ) { $screen = get_current_screen(); if ( 'comment' == $screen->base && 'edit-comments' == $screen->parent_base ) { wp_enqueue_script( 'mce-view' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Comment Opt Out doesn’t work on admin form’ is closed to new replies.