mirror of
https://gh.wpcy.net/https://github.com/buddypress/buddypress.git
synced 2026-05-31 05:04:29 +08:00
git-svn-id: https://buddypress.svn.wordpress.org/tags/buddypress-theme@424 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
66 lines
No EOL
1.4 KiB
PHP
66 lines
No EOL
1.4 KiB
PHP
<?php
|
|
|
|
/* Register the widget columns */
|
|
register_sidebars( 1,
|
|
array(
|
|
'name' => 'left-column',
|
|
'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</li>',
|
|
'before_title' => '<h2 class="widgettitle">',
|
|
'after_title' => '</h2>'
|
|
)
|
|
);
|
|
|
|
register_sidebars( 1,
|
|
array(
|
|
'name' => 'center-column',
|
|
'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</li>',
|
|
'before_title' => '<h2 class="widgettitle">',
|
|
'after_title' => '</h2>'
|
|
)
|
|
);
|
|
|
|
register_sidebars( 1,
|
|
array(
|
|
'name' => 'right-column',
|
|
'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</li>',
|
|
'before_title' => '<h2 class="widgettitle">',
|
|
'after_title' => '</h2>'
|
|
)
|
|
);
|
|
|
|
register_sidebars( 1,
|
|
array(
|
|
'name' => 'blog-sidebar',
|
|
'before_widget' => '<li id="%1$s" class="widget %2$s">',
|
|
'after_widget' => '</li>',
|
|
'before_title' => '<h2 class="widgettitle">',
|
|
'after_title' => '</h2>'
|
|
)
|
|
);
|
|
|
|
/* Catch specific URLs */
|
|
|
|
function bp_home_theme_catch_urls() {
|
|
global $bp;
|
|
|
|
if ( $bp['current_component'] == 'news' && $bp['current_action'] == '' ) {
|
|
query_posts('showposts=15');
|
|
bp_catch_uri('index');
|
|
}
|
|
}
|
|
add_action('wp', 'bp_home_theme_catch_urls', 1 );
|
|
|
|
function bp_is_page($page) {
|
|
global $bp;
|
|
|
|
if ( $page == $bp['current_component'] || $page == 'home' && $bp['current_component'] == '' )
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
|
|
?>
|