Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove moderation links on frontend

  • @newtech1

    Participant

    I want to remove the moderation links that appear within a topic post.

    moderator links

    I believe this is controlled by the following in bbpress/includes/topics/template.php. What edit would I do if this is the correct area to edit:

    function bbp_get_topic_admin_links( $args = array() ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'     => bbp_get_topic_id(),
    			'before' => '<span class="bbp-admin-links">',
    			'after'  => '</span>',
    			'sep'    => ' | ',
    			'links'  => array()
    		), 'get_topic_admin_links' );
    
    		if ( empty( $r['links'] ) ) {
    			$r['links'] = apply_filters( 'bbp_topic_admin_links', array(
    				'edit'    => bbp_get_topic_edit_link   ( $r ),
    				'merge'   => bbp_get_topic_merge_link  ( $r ),
    				'close'   => bbp_get_topic_close_link  ( $r ),
    				'stick'   => bbp_get_topic_stick_link  ( $r ),
    				'trash'   => bbp_get_topic_trash_link  ( $r ),
    				'spam'    => bbp_get_topic_spam_link   ( $r ),
    				'approve' => bbp_get_topic_approve_link( $r ),
    				'reply'   => bbp_get_topic_reply_link  ( $r )
    			), $r['id'] );
    		}
    
Viewing 1 replies (of 1 total)
  • @newtech1

    Participant

    Well thus far it looks like this works:
    Remove this code:

    if ( empty( $r['links'] ) ) {
    			$r['links'] = apply_filters( 'bbp_topic_admin_links', array(
    				'edit'    => bbp_get_topic_edit_link   ( $r ),
    				'merge'   => bbp_get_topic_merge_link  ( $r ),
    				'close'   => bbp_get_topic_close_link  ( $r ),
    				'stick'   => bbp_get_topic_stick_link  ( $r ),
    				'trash'   => bbp_get_topic_trash_link  ( $r ),
    				'spam'    => bbp_get_topic_spam_link   ( $r ),
    				'approve' => bbp_get_topic_approve_link( $r ),
    				'reply'   => bbp_get_topic_reply_link  ( $r )
    			), $r['id'] );
    		}
    
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar