• Resolved vukadinsu

    (@vukadinsu)


    in glossaryPro.php, in following two functions, setting for removing comments is never checked.

    public static function cmtt_comments_number( $count, $post_id ) {
    $removeComments = get_option( ‘cmtt_glossaryRemoveCommentsTermPage’, 0 );
    $_post = get_post( $post_id );
    if ( ‘glossary’ === $_post->post_type ) {
    $count = 0;
    }
    return $count;
    }

    /**
    * Function removing the comments functionality from the Term Page pt2.
    */
    public static function cmtt_comments_open( $open, $post_id ) {
    $removeComments = get_option( ‘cmtt_glossaryRemoveCommentsTermPage’, 0 );
    $_post = get_post( $post_id );
    if ( ‘glossary’ === $_post->post_type ) {
    $open = !$removeComments;
    }
    return $open;
    }

    It should be like this so that it actually works.

    public static function cmtt_comments_number( $count, $post_id ) {
    $removeComments = get_option( ‘cmtt_glossaryRemoveCommentsTermPage’, 0 );
    $_post = get_post( $post_id );
    if ( $removeComments && ‘glossary’ === $_post->post_type ) {
    $count = 0;
    }
    return $count;
    }

    /**
    * Function removing the comments functionality from the Term Page pt2.
    */
    public static function cmtt_comments_open( $open, $post_id ) {
    $removeComments = get_option( ‘cmtt_glossaryRemoveCommentsTermPage’, 0 );
    $_post = get_post( $post_id );
    if ( $removeComments && ‘glossary’ === $_post->post_type ) {
    $open = !$removeComments;
    }
    return $open;
    }

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Comments on Terms page not properly coded’ is closed to new replies.