BP_Component

BP_Component

Codex Home → Developer Resources → BP_Component
BP_Component

The BP_Component class is the basis of getting your plugin initiated into BuddyPress. You extend this class to create custom components. In fact, the core components extend this class to create each core component (members, activity, groups etc.)
This is the members component class which extends BP_Component:
class BP_Members_Component extends BP_Component {

/**
* Start the members component creation process
*
* @since BuddyPress (1.5)
*/
function __construct() {
parent::start(
'members',
__( 'Members', 'buddypress' ),
BP_PLUGIN_DIR
);
}

/**
* Include files
*
* @global BuddyPress $bp The one true BuddyPress instance
*/
function includes() {
$includes = array(
'actions',
'filters',
'screens',
'template',
'buddybar',
'adminbar',
'functions',
'notifications',
);
parent::includes( $includes );
}

/**
* Setup globals
*
* The BP_MEMBERS_SLUG constant is deprecated, and only used here for
* backwards compatibility.
*
* @since BuddyPress (1.5)
* @global BuddyPress $bp The one true BuddyPress instance
*/
function setup_globals() {
global $bp;

// Define a slug, if necessary
if ( !defined( 'BP_MEMBERS_SLUG' ) )
define( 'BP_MEMBERS_SLUG', $this->id );

$globals = array(
'slug' => BP_MEMBERS_SLUG,
'root_slug' => isset( $bp->pages->members->slug ) ? $bp->pages->members->slug : BP_MEMBERS_SLUG,
'has_directory' => true,
'search_string' => __( 'Search Members...', 'buddypress' ),
);

parent::setup_globals( $globals );

/** Logged in user ****************************************************/

// Fetch the full name for the logged in user
$bp->loggedin_user->fullname = bp_core_get_user_displayname( bp_loggedin_user_id() );

// Hits the DB on single WP installs so get this separately
$bp->loggedin_user->is_super_admin = $bp->loggedin_user->is_site_admin = is_super_admin( bp_loggedin_user_id() );

// The domain for the user currently logged in. eg: http://domain.com/members/andy
$bp->loggedin_user->domain = bp_core_get_user_domain( bp_loggedin_user_id() );

// The core userdata of the user who is currently logged in.
$bp->loggedin_user->userdata = bp_core_get_core_userdata( bp_loggedin_user_id() );

/** Displayed user ****************************************************/

// The domain for the user currently being displayed
$bp->displayed_user->domain = bp_core_get_user_domain( bp_displayed_user_id() );

// The core userdata of the user who is currently being displayed
$bp->displayed_user->userdata = bp_core_get_core_userdata( bp_displayed_user_id() );

// Fetch the full name displayed user
$bp->displayed_user->fullname = bp_core_get_user_displayname( bp_displayed_user_id() );

/** Profiles Fallback *************************************************/

if ( !bp_is_active( 'xprofile' ) ) {
$bp->profile = new stdClass;
$bp->profile->slug = 'profile';
$bp->profile->id = 'profile';
}

/** Default Profile Component *****************************************/
if ( !defined( 'BP_DEFAULT_COMPONENT' ) ) {
if ( bp_is_active( 'activity' ) && isset( $bp->pages->activity ) )
$bp->default_component = bp_get_activity_slug();
else
$bp->default_component = ( 'xprofile' == $bp->profile->id ) ? 'profile' : $bp->profile->id;

} else {
$bp->default_component = BP_DEFAULT_COMPONENT;
}

if ( bp_displayed_user_id() ) {
$bp->canonical_stack['base_url'] = bp_displayed_user_domain();

if ( bp_current_component() ) {
$bp->canonical_stack['component'] = bp_current_component();
}

if ( bp_current_action() ) {
$bp->canonical_stack['action'] = bp_current_action();
}

if ( !empty( $bp->action_variables ) ) {
$bp->canonical_stack['action_variables'] = bp_action_variables();
}

if ( !bp_current_component() ) {
$bp->current_component = $bp->default_component;
} else if ( bp_is_current_component( $bp->default_component ) && !bp_current_action() ) {
// The canonical URL will not contain the default component
unset( $bp->canonical_stack['component'] );
}
}
}

/**
* Setup BuddyBar navigation
*
* @global BuddyPress $bp The one true BuddyPress instance
*/
function setup_nav() {
global $bp;

// Add 'Profile' to the main navigation
if ( !bp_is_active( 'xprofile' ) ) {

// Don't set up navigation if there's no user
if ( !is_user_logged_in() && !bp_is_user() )
return;

$sub_nav = array();
$main_nav = array(
'name' => __( 'Profile', 'buddypress' ),
'slug' => $bp->profile->slug,
'position' => 20,
'screen_function' => 'bp_members_screen_display_profile',
'default_subnav_slug' => 'public', //bp 1.7 requires a default subnav. If no subnav use same slug as parent slug.
'item_css_id' => $bp->profile->id
);

// User links
$user_domain = bp_displayed_user_domain() ? bp_displayed_user_domain() : bp_loggedin_user_domain();
$profile_link = trailingslashit( $user_domain . $bp->profile->slug );

// Add the subnav items to the profile
$sub_nav[] = array(
'name' => __( 'Public', 'buddypress' ),
'slug' => 'public',
'parent_url' => $profile_link,
'parent_slug' => $bp->profile->slug,
'screen_function' => 'bp_members_screen_display_profile',
'position' => 10
);

parent::setup_nav( $main_nav, $sub_nav );
}
}

/**
* Sets up the title for pages and <br /> *<br /> * @global BuddyPress $bp The one true BuddyPress instance<br /> */<br /> function setup_title() {<br /> global $bp;</p> <p>if ( bp_is_my_profile() ) {<br /> $bp->bp_options_title = __( 'You', 'buddypress' );<br /> } elseif( bp_is_user() ) {<br /> $bp->bp_options_avatar = bp_core_fetch_avatar( array(<br /> 'item_id' => bp_displayed_user_id(),<br /> 'type' => 'thumb',<br /> 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )<br /> ) );<br /> $bp->bp_options_title = bp_get_displayed_user_fullname();<br /> }</p> <p>parent::setup_title();<br /> }<br /> }</p> <p>function bp_setup_members() {<br /> global $bp;<br /> $bp->members = new BP_Members_Component();<br /> }<br /> add_action( 'bp_setup_components', 'bp_setup_members', 1 );</p> </div><!-- .entry-content --> <footer class="entry-footer"> <span class="posted-on"><span class="screen-reader-text">釋出於 </span><a href="https://buddypress.wpwenku.com/zh-tw/document/bp_component" rel="bookmark"><time class="entry-date published" datetime="2021-12-25T06:19:23+08:00">2021 年 12 月 25 日</time><time class="updated" datetime="2021-12-31T14:06:00+08:00">2021 年 12 月 31 日</time></a></span> </footer><!-- .entry-footer --> </article><!-- #post-122 --> <div id="comments" class="comments-area"> <div id="respond" class="comment-respond"> <h3 id="reply-title" class="comment-reply-title">發表回覆 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/zh-tw/document/bp_component#respond" style="display:none;">取消回覆</a></small></h3><form action="https://buddypress.wpwenku.com/wp-comments-post.php" method="post" id="commentform" class="comment-form" novalidate><p class="comment-notes"><span id="email-notes">您的電子郵箱地址不會被公開。</span> <span class="required-field-message">必填項已用 <span class="required">*</span> 標註</span></p><p class="comment-form-comment"><label for="comment">評論 <span class="required">*</span></label> <textarea id="comment" name="comment" cols="45" rows="8" maxlength="65525" required></textarea></p><p class="comment-form-author"><label for="author">顯示名稱 <span class="required">*</span></label> <input id="author" name="author" type="text" value="" size="30" maxlength="245" autocomplete="name" required /></p> <p class="comment-form-email"><label for="email">電子郵箱地址 <span class="required">*</span></label> <input id="email" name="email" type="email" value="" size="30" maxlength="100" aria-describedby="email-notes" autocomplete="email" required /></p> <p class="comment-form-url"><label for="url">網站</label> <input id="url" name="url" type="url" value="" size="30" maxlength="200" autocomplete="url" /></p> <p class="comment-form-cookies-consent"><input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes" /> <label for="wp-comment-cookies-consent">在此瀏覽器中儲存我的顯示名稱、郵箱地址和網站地址,以便下次評論時使用。</label></p> <p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="發表評論" /> <input type='hidden' name='comment_post_ID' value='122' id='comment_post_ID' /> <input type='hidden' name='comment_parent' id='comment_parent' value='0' /> </p><input type="hidden" name="variant" value="zh-tw" /></form> </div><!-- #respond --> </div><!-- .comments-area --> <nav class="navigation post-navigation" aria-label="文章"> <h2 class="screen-reader-text">文章導航</h2> <div class="nav-links"><div class="nav-previous"><a href="https://buddypress.wpwenku.com/zh-tw/document/bp_core_new_nav_default" rel="prev"><span class="meta-nav" aria-hidden="true">上一篇</span> <span class="screen-reader-text">上篇文章:</span> <span class="post-title">bp_core_new_nav_default()</span></a></div><div class="nav-next"><a href="https://buddypress.wpwenku.com/zh-tw/document/groups" rel="next"><span class="meta-nav" aria-hidden="true">下一篇</span> <span class="screen-reader-text">下篇文章:</span> <span class="post-title">群組 (Groups)</span></a></div></div> </nav> </main><!-- .site-main --> </div><!-- .content-area --> </div><!-- .site-content --> <footer id="colophon" class="site-footer" role="contentinfo"> <div class="site-info"> <p class="copyright">Copyright © 2024 <a href="https://buddypress.wpwenku.com/zh-tw/">BuddyPress 文件</a>, All Rights Reserved. 自豪地採用文派。</p> </div><!-- .site-info --> </footer><!-- .site-footer --> </div><!-- .site --> <!--<p style="font-size:20px;color:red;">WP Chinese Switcher Plugin Debug Output: <br />預設 URL: <a href="https://buddypress.wpwenku.com/document/bp_component">https://buddypress.wpwenku.com/document/bp_component</a><br />當前語言 (空則是不轉換): zh-tw<br />Query String: <br />Request URI: /zh-tw/document/bp_component<br />zh-tw URL: <a href="https://buddypress.wpwenku.com/zh-tw/document/bp_component">https://buddypress.wpwenku.com/zh-tw/document/bp_component</a><br />zh-hk URL: <a href="https://buddypress.wpwenku.com/zh-hk/document/bp_component">https://buddypress.wpwenku.com/zh-hk/document/bp_component</a><br />Category feed link: https://buddypress.wpwenku.com/zh-tw/category/document/feed<br />Search feed link: https://buddypress.wpwenku.com/zh-tw/search/test/feed/rss2/Rewrite Rules: <br />array (<br /> '(zh-tw|zh-hk|zh|zh-reset)/^wp-json/?$' => 'index.php?rest_route=/&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/^index.php/wp-json/?$' => 'index.php?rest_route=/&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/category/(.+?)/embed/?$' => 'index.php?category_name=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/category/(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/category/(.+?)/?$' => 'index.php?category_name=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?tag=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?tag=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/tag/([^/]+)/embed/?$' => 'index.php?tag=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/tag/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?tag=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/tag/([^/]+)/?$' => 'index.php?tag=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?post_format=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?post_format=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/type/([^/]+)/embed/?$' => 'index.php?post_format=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/type/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?post_format=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/type/([^/]+)/?$' => 'index.php?post_format=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/embed/?$' => 'index.php?&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/page/?([0-9]{1,})/?$' => 'index.php?&paged=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/comment-page-([0-9]{1,})/?$' => 'index.php?&page_id=2&cpage=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/comments/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[2]&withcomments=1&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/comments/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[2]&withcomments=1&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/comments/embed/?$' => 'index.php?&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?s=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/search/(.+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?s=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/search/(.+)/embed/?$' => 'index.php?s=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/search/(.+)/page/?([0-9]{1,})/?$' => 'index.php?s=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/search/(.+)/?$' => 'index.php?s=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?author_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?author_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/author/([^/]+)/embed/?$' => 'index.php?author_name=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/author/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/author/([^/]+)/?$' => 'index.php?author_name=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&feed=$matches[5]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&paged=$matches[5]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&day=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&feed=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/embed/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&paged=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/([0-9]{1,2})/?$' => 'index.php?year=$matches[2]&monthnum=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/embed/?$' => 'index.php?year=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/([0-9]{4})/?$' => 'index.php?year=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.?.+?/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[2]&cpage=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.?.+?/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)/embed/?$' => 'index.php?pagename=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)/page/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)/comment-page-([0-9]{1,})/?$' => 'index.php?pagename=$matches[2]&cpage=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.?.+?)(?:/([0-9]+))?/?$' => 'index.php?pagename=$matches[2]&page=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[2]&cpage=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)/embed/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&feed=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&feed=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&paged=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&cpage=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/([^/]+)(?:/([0-9]+))?/?$' => 'index.php?category_name=$matches[2]&name=$matches[3]&page=$matches[4]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/([^/]+)/?$' => 'index.php?attachment=$matches[2]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[2]&cpage=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/.+?/[^/]+/([^/]+)/embed/?$' => 'index.php?attachment=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[2]&feed=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/embed/?$' => 'index.php?category_name=$matches[2]&embed=true&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[2]&paged=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/comment-page-([0-9]{1,})/?$' => 'index.php?category_name=$matches[2]&cpage=$matches[3]&variant=$matches[1]',<br /> '(zh-tw|zh-hk|zh|zh-reset)/(.+?)/?$' => 'index.php?category_name=$matches[2]&variant=$matches[1]',<br /> '^(zh-tw|zh-hk|zh|zh-reset)/?$' => 'index.php?variant=$matches[1]',<br /> 'sitemap_index\\.xml$' => 'index.php?sitemap=1',<br /> '([^/]+?)-sitemap([0-9]+)?\\.xml$' => 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]',<br /> '([a-z]+)?-?sitemap\\.xsl$' => 'index.php?yoast-sitemap-xsl=$matches[1]',<br /> '^wp-json/?$' => 'index.php?rest_route=/',<br /> '^wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]',<br /> '^index.php/wp-json/?$' => 'index.php?rest_route=/',<br /> '^index.php/wp-json/(.*)?' => 'index.php?rest_route=/$matches[1]',<br /> '^wp-sitemap\\.xml$' => 'index.php?sitemap=index',<br /> '^wp-sitemap\\.xsl$' => 'index.php?sitemap-stylesheet=sitemap',<br /> '^wp-sitemap-index\\.xsl$' => 'index.php?sitemap-stylesheet=index',<br /> '^wp-sitemap-([a-z]+?)-([a-z\\d_-]+?)-(\\d+?)\\.xml$' => 'index.php?sitemap=$matches[1]&sitemap-subtype=$matches[2]&paged=$matches[3]',<br /> '^wp-sitemap-([a-z]+?)-(\\d+?)\\.xml$' => 'index.php?sitemap=$matches[1]&paged=$matches[2]',<br /> '^(zh-tw|zh-cn|zh-hk|zh-sg|zh-hans|zh-hant)/sitemap\\.xml$' => 'index.php?lang=$matches[1]',<br /> 'category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]',<br /> 'category/(.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]',<br /> 'category/(.+?)/embed/?$' => 'index.php?category_name=$matches[1]&embed=true',<br /> 'category/(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&paged=$matches[2]',<br /> 'category/(.+?)/?$' => 'index.php?category_name=$matches[1]',<br /> 'tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?tag=$matches[1]&feed=$matches[2]',<br /> 'tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?tag=$matches[1]&feed=$matches[2]',<br /> 'tag/([^/]+)/embed/?$' => 'index.php?tag=$matches[1]&embed=true',<br /> 'tag/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?tag=$matches[1]&paged=$matches[2]',<br /> 'tag/([^/]+)/?$' => 'index.php?tag=$matches[1]',<br /> 'type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?post_format=$matches[1]&feed=$matches[2]',<br /> 'type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?post_format=$matches[1]&feed=$matches[2]',<br /> 'type/([^/]+)/embed/?$' => 'index.php?post_format=$matches[1]&embed=true',<br /> 'type/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?post_format=$matches[1]&paged=$matches[2]',<br /> 'type/([^/]+)/?$' => 'index.php?post_format=$matches[1]',<br /> 'robots\\.txt$' => 'index.php?robots=1',<br /> 'favicon\\.ico$' => 'index.php?favicon=1',<br /> '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2)\\.php$' => 'index.php?feed=old',<br /> '.*wp-app\\.php(/.*)?$' => 'index.php?error=403',<br /> '.*wp-register.php$' => 'index.php?register=true',<br /> 'feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[1]',<br /> '(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[1]',<br /> 'embed/?$' => 'index.php?&embed=true',<br /> 'page/?([0-9]{1,})/?$' => 'index.php?&paged=$matches[1]',<br /> 'comment-page-([0-9]{1,})/?$' => 'index.php?&page_id=2&cpage=$matches[1]',<br /> 'comments/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[1]&withcomments=1',<br /> 'comments/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?&feed=$matches[1]&withcomments=1',<br /> 'comments/embed/?$' => 'index.php?&embed=true',<br /> 'search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?s=$matches[1]&feed=$matches[2]',<br /> 'search/(.+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?s=$matches[1]&feed=$matches[2]',<br /> 'search/(.+)/embed/?$' => 'index.php?s=$matches[1]&embed=true',<br /> 'search/(.+)/page/?([0-9]{1,})/?$' => 'index.php?s=$matches[1]&paged=$matches[2]',<br /> 'search/(.+)/?$' => 'index.php?s=$matches[1]',<br /> 'author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?author_name=$matches[1]&feed=$matches[2]',<br /> 'author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?author_name=$matches[1]&feed=$matches[2]',<br /> 'author/([^/]+)/embed/?$' => 'index.php?author_name=$matches[1]&embed=true',<br /> 'author/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?author_name=$matches[1]&paged=$matches[2]',<br /> 'author/([^/]+)/?$' => 'index.php?author_name=$matches[1]',<br /> '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]',<br /> '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]',<br /> '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/embed/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&embed=true',<br /> '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]',<br /> '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]',<br /> '([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]',<br /> '([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]',<br /> '([0-9]{4})/([0-9]{1,2})/embed/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&embed=true',<br /> '([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]',<br /> '([0-9]{4})/([0-9]{1,2})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]',<br /> '([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&feed=$matches[2]',<br /> '([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?year=$matches[1]&feed=$matches[2]',<br /> '([0-9]{4})/embed/?$' => 'index.php?year=$matches[1]&embed=true',<br /> '([0-9]{4})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&paged=$matches[2]',<br /> '([0-9]{4})/?$' => 'index.php?year=$matches[1]',<br /> '.?.+?/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[1]',<br /> '.?.+?/attachment/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',<br /> '.?.+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.?.+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.?.+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',<br /> '.?.+?/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',<br /> '(.?.+?)/embed/?$' => 'index.php?pagename=$matches[1]&embed=true',<br /> '(.?.+?)/trackback/?$' => 'index.php?pagename=$matches[1]&tb=1',<br /> '(.?.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[1]&feed=$matches[2]',<br /> '(.?.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?pagename=$matches[1]&feed=$matches[2]',<br /> '(.?.+?)/page/?([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&paged=$matches[2]',<br /> '(.?.+?)/comment-page-([0-9]{1,})/?$' => 'index.php?pagename=$matches[1]&cpage=$matches[2]',<br /> '(.?.+?)(?:/([0-9]+))?/?$' => 'index.php?pagename=$matches[1]&page=$matches[2]',<br /> '.+?/[^/]+/attachment/([^/]+)/?$' => 'index.php?attachment=$matches[1]',<br /> '.+?/[^/]+/attachment/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',<br /> '.+?/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.+?/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.+?/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',<br /> '.+?/[^/]+/attachment/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',<br /> '(.+?)/([^/]+)/embed/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&embed=true',<br /> '(.+?)/([^/]+)/trackback/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&tb=1',<br /> '(.+?)/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&feed=$matches[3]',<br /> '(.+?)/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&feed=$matches[3]',<br /> '(.+?)/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&paged=$matches[3]',<br /> '(.+?)/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&cpage=$matches[3]',<br /> '(.+?)/([^/]+)(?:/([0-9]+))?/?$' => 'index.php?category_name=$matches[1]&name=$matches[2]&page=$matches[3]',<br /> '.+?/[^/]+/([^/]+)/?$' => 'index.php?attachment=$matches[1]',<br /> '.+?/[^/]+/([^/]+)/trackback/?$' => 'index.php?attachment=$matches[1]&tb=1',<br /> '.+?/[^/]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.+?/[^/]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?attachment=$matches[1]&feed=$matches[2]',<br /> '.+?/[^/]+/([^/]+)/comment-page-([0-9]{1,})/?$' => 'index.php?attachment=$matches[1]&cpage=$matches[2]',<br /> '.+?/[^/]+/([^/]+)/embed/?$' => 'index.php?attachment=$matches[1]&embed=true',<br /> '(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]',<br /> '(.+?)/(feed|rdf|rss|rss2|atom)/?$' => 'index.php?category_name=$matches[1]&feed=$matches[2]',<br /> '(.+?)/embed/?$' => 'index.php?category_name=$matches[1]&embed=true',<br /> '(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&paged=$matches[2]',<br /> '(.+?)/comment-page-([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&cpage=$matches[2]',<br /> '(.+?)/?$' => 'index.php?category_name=$matches[1]',<br /> )<br />Debug Data: <br />array (<br /> )</p>--><script src="https://buddypress.wpwenku.com/wp-includes/js/comment-reply.min.js?ver=6.6.2" id="comment-reply-js" async data-wp-strategy="async"></script> <script src="https://buddypress.wpwenku.com/wp-content/plugins/wpchinese-switcher/assets/js/search-variant.min.js?ver=1.1" id="wpcs-search-js-js"></script> </body> </html> <!-- WP Chinese Switcher Full Page Converted. Target Lang: zh-tw --> <!-- Dynamic page generated in 0.705 seconds. --> <!-- Cached page generated by WP-Super-Cache on 2024-11-25 01:42:41 --> <!-- super cache --> <!-- plugin=object-cache-pro client=phpredis metric#hits=7368 metric#misses=47 metric#hit-ratio=99.4 metric#bytes=2327519 metric#prefetches=9 metric#store-reads=113 metric#store-writes=22 metric#store-hits=207 metric#store-misses=41 metric#sql-queries=37 metric#ms-total=534.61 metric#ms-cache=9.36 metric#ms-cache-avg=0.0699 metric#ms-cache-ratio=1.8 -->