Skip to:
Content

bbPress.org

Ticket #1670: 1670.1.diff

File 1670.1.diff, 1.6 KB (added by Ipstenu, 15 years ago)

If there's a topic/reply in spam, link to spam. Otherwise, link to all topics/replies

  • bbp-metaboxes.php

     
    149149                                                $num  = $topic_count_hidden;
    150150                                                $text = _n( 'Hidden Topic', 'Hidden Topics', $topic_count_hidden, 'bbpress' );
    151151                                                $link = add_query_arg( array( 'post_type' => bbp_get_topic_post_type() ), get_admin_url( null, 'edit.php' ) );
    152                                                 $num  = '<a href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $num  . '</a>';
     152                                                if ( $num != '0' ) { $link = add_query_arg( array( 'post_status' => 'spam'), $link );}
     153                        $num  = '<a href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $num  . '</a>';
    153154                                                $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_topic_title ) . '">' . $text . '</a>';
    154155                                        ?>
    155156
    … …  
    168169                                                $num  = $reply_count_hidden;
    169170                                                $text = _n( 'Hidden Reply', 'Hidden Replies', $reply_count_hidden, 'bbpress' );
    170171                                                $link = add_query_arg( array( 'post_type' => bbp_get_reply_post_type() ), get_admin_url( null, 'edit.php' ) );
    171                                                 $num  = '<a href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $num  . '</a>';
     172                                                if ( $num != '0' ) { $link = add_query_arg( array( 'post_status' => 'spam'), $link );}
     173                        $num  = '<a href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $num  . '</a>';
    172174                                                $text = '<a class="waiting" href="' . $link . '" title="' . esc_attr( $hidden_reply_title ) . '">' . $text . '</a>';
    173175                                        ?>
    174176