• Today I added a code that was suggested from another plugin developer.
    The code I add to functions.php using your plugin was:

    add_shortcode( 'note', 'sc_note' );
    
    function sc_note( $atts, $content = null ) {
    	 if ( current_user_can( 'publish_posts' ) )
    		return '<div class="note">'.$content.'</div>';
    	return '';
    }

    this was already added and working by me but if to this I add

    add_filter("wpdiscuz_after_label", function ($afterLabelHtml, $comment) {
        global $post;
        if ($comment->user_id == $post->post_author) {
            $afterLabelHtml =  "<span class='wpd-comment-label'> Admin </span>";
        }
        return $afterLabelHtml;
    }, 110, 2);

    that was suggested to me here my website get broken.

    I’m using Hestia theme.

    So what I do?
    I disabled your plugin and I create a Child theme with Child Theme Configurator, edited functions.php with the full code and all works.

    The crash behavior is just created with your plugin that now has been disabled by me and maybe will be erased, deleted.

  • The topic ‘[BUG] Something seems not correct in your plugin that cause crash’ is closed to new replies.