Skip to:
Content

bbPress.org

Changeset 3247


Ignore:
Timestamp:
05/28/2011 06:31:55 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Exclude forums, topics, and replies from site wide post and page search.

We have our own search queries for each post type, and it's not currently possible to adjust the look of individual search results on the fly via theme compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbpress.php

    r3243 r3247  
    531531        // Forum filter
    532532        $bbp_cpt['forum'] = apply_filters( 'bbp_register_forum_post_type', array(
    533             'labels'            => $forum['labels'],
    534             'rewrite'           => $forum['rewrite'],
    535             'supports'          => $forum['supports'],
    536             'description'       => __( 'bbPress Forums', 'bbpress' ),
    537             'capabilities'      => bbp_get_forum_caps(),
    538             'capability_type'   => 'forum',
    539             'menu_position'     => 56,
    540             'has_archive'       => !empty( $this->root_slug ) ? $this->root_slug : false,
    541             'show_in_nav_menus' => true,
    542             'public'            => true,
    543             'show_ui'           => true,
    544             'can_export'        => true,
    545             'hierarchical'      => true,
    546             'query_var'         => true,
    547             'menu_icon'         => ''
     533            'labels'              => $forum['labels'],
     534            'rewrite'             => $forum['rewrite'],
     535            'supports'            => $forum['supports'],
     536            'description'         => __( 'bbPress Forums', 'bbpress' ),
     537            'capabilities'        => bbp_get_forum_caps(),
     538            'capability_type'     => 'forum',
     539            'menu_position'       => 56,
     540            'has_archive'         => !empty( $this->root_slug ) ? $this->root_slug : false,
     541            'exclude_from_search' => true,
     542            'show_in_nav_menus'   => true,
     543            'public'              => true,
     544            'show_ui'             => true,
     545            'can_export'          => true,
     546            'hierarchical'        => true,
     547            'query_var'           => true,
     548            'menu_icon'           => ''
    548549        ) );
    549550
     
    585586        // Topic Filter
    586587        $bbp_cpt['topic'] = apply_filters( 'bbp_register_topic_post_type', array(
    587             'labels'            => $topic['labels'],
    588             'rewrite'           => $topic['rewrite'],
    589             'supports'          => $topic['supports'],
    590             'description'       => __( 'bbPress Topics', 'bbpress' ),
    591             'capabilities'      => bbp_get_topic_caps(),
    592             'capability_type'   => 'topic',
    593             'menu_position'     => 57,
    594             'has_archive'       => get_page_by_path( $this->topic_archive_slug ) ? false : $this->topic_archive_slug,
    595             'show_in_nav_menus' => false,
    596             'public'            => true,
    597             'show_ui'           => true,
    598             'can_export'        => true,
    599             'hierarchical'      => false,
    600             'query_var'         => true,
    601             'menu_icon'         => ''
     588            'labels'              => $topic['labels'],
     589            'rewrite'             => $topic['rewrite'],
     590            'supports'            => $topic['supports'],
     591            'description'         => __( 'bbPress Topics', 'bbpress' ),
     592            'capabilities'        => bbp_get_topic_caps(),
     593            'capability_type'     => 'topic',
     594            'menu_position'       => 57,
     595            'has_archive'         => get_page_by_path( $this->topic_archive_slug ) ? false : $this->topic_archive_slug,
     596            'exclude_from_search' => true,
     597            'show_in_nav_menus'   => false,
     598            'public'              => true,
     599            'show_ui'             => true,
     600            'can_export'          => true,
     601            'hierarchical'        => false,
     602            'query_var'           => true,
     603            'menu_icon'           => ''
    602604        ) );
    603605
     
    639641        // Reply filter
    640642        $bbp_cpt['reply'] = apply_filters( 'bbp_register_reply_post_type', array(
    641             'labels'            => $reply['labels'],
    642             'rewrite'           => $reply['rewrite'],
    643             'supports'          => $reply['supports'],
    644             'description'       => __( 'bbPress Replies', 'bbpress' ),
    645             'capabilities'      => bbp_get_reply_caps(),
    646             'capability_type'   => 'reply',
    647             'menu_position'     => 58,
    648             'has_archive'       => false,
    649             'show_in_nav_menus' => false,
    650             'public'            => true,
    651             'show_ui'           => true,
    652             'can_export'        => true,
    653             'hierarchical'      => false,
    654             'query_var'         => true,
    655             'menu_icon'         => ''
     643            'labels'              => $reply['labels'],
     644            'rewrite'             => $reply['rewrite'],
     645            'supports'            => $reply['supports'],
     646            'description'         => __( 'bbPress Replies', 'bbpress' ),
     647            'capabilities'        => bbp_get_reply_caps(),
     648            'capability_type'     => 'reply',
     649            'menu_position'       => 58,
     650            'exclude_from_search' => true,
     651            'has_archive'         => false,
     652            'show_in_nav_menus'   => false,
     653            'public'              => true,
     654            'show_ui'             => true,
     655            'can_export'          => true,
     656            'hierarchical'        => false,
     657            'query_var'           => true,
     658            'menu_icon'           => ''
    656659        ) );
    657660
Note: See TracChangeset for help on using the changeset viewer.