'Sidebar',
'before_widget' => '
',
'after_widget' => '
',
'before_title' => ''
)
);
/* Load the AJAX functions for the theme */
require_once( TEMPLATEPATH . '/_inc/ajax.php' );
/* Load the javascript for the theme */
wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ) );
/* Make sure the blog index page shows under /[HOME_BLOG_SLUG] if enabled */
function bp_dtheme_show_home_blog() {
global $bp, $query_string, $paged;
if ( $bp->current_component == BP_HOME_BLOG_SLUG && ( !$bp->current_action || 'page' == $bp->current_action ) ) {
unset( $query_string );
if ( ( 'page' == $bp->current_action && $bp->action_variables[0] ) && false === strpos( $query_string, 'paged' ) ) {
$query_string .= '&paged=' . $bp->action_variables[0];
$paged = $bp->action_variables[0];
}
query_posts($query_string);
bp_core_load_template( 'index', true );
}
}
add_action( 'wp', 'bp_dtheme_show_home_blog', 2 );
function bp_dtheme_firstname( $name = false, $echo = false ) {
global $bp;
if ( !$name )
$name = $bp->loggedin_user->fullname;
$fullname = (array)explode( ' ', $name );
if ( $echo )
echo $fullname[0];
else
return $fullname[0];
}
function bp_dtheme_add_blog_comments_js() {
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
}
add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' );
function bp_dtheme_blog_comments( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
$comment_type = get_comment_type();
if ( $comment->user_id )
$userlink = bp_core_get_user_domain( $comment->user_id );
if ( $comment_type == 'comment' ) { ?>
id="comment-">
blogs->slug, 'my-blogs' );
bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-posts' );
bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-comments' );
bp_core_remove_subnav_item( $bp->activity->slug, 'just-me' );
bp_core_remove_subnav_item( $bp->activity->slug, 'my-friends' );
}
add_action( 'init', 'bp_dtheme_remove_redundant' );
function bp_dtheme_show_notice() { ?>
customization options and custom header image support. Sidebar widgets are also supported.', 'buddypress' ), admin_url( 'themes.php?page=theme-options-page' ), admin_url( 'themes.php?page=custom-header' ), admin_url( 'widgets.php' ) ) ?>