bp_blogs_blog_tabs()

Output navigation tabs for a user Blogs page.


Description Description

Currently unused by BuddyPress.


Source Source

File: bp-blogs/bp-blogs-template.php

function bp_blogs_blog_tabs() {

	// Don't show these tabs on a user's own profile.
	if ( bp_is_my_profile() ) {
		return false;
	} ?>

	<ul class="content-header-nav">
		<li<?php if ( bp_is_current_action( 'my-blogs' ) || !bp_current_action() ) : ?> class="current"<?php endif; ?>>
			<a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/my-blogs' ); ?>">
				<?php
				/* translators: %s: the User Display Name */
				printf( __( "%s's Sites", 'buddypress' ), bp_get_displayed_user_fullname() );
				?>
			</a>
		</li>
		<li<?php if ( bp_is_current_action( 'recent-posts' ) ) : ?> class="current"<?php endif; ?>>
			<a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-posts'    ); ?>">
				<?php
				/* translators: %s: the User Display Name */
				printf( __( "%s's Recent Posts", 'buddypress' ), bp_get_displayed_user_fullname() );
				?>
			</a>
		</li>
		<li<?php if ( bp_is_current_action( 'recent-comments' ) ) : ?> class="current"<?php endif; ?>>
			<a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-comments' ); ?>">
				<?php
				/* translators: %s: the User Display Name */
				printf( __( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() );
				?>
			</a>
		</li>
	</ul>

<?php

	/**
	 * Fires after the markup for the navigation tabs for a user Blogs page.
	 *
	 * @since 1.0.0
	 */
	do_action( 'bp_blogs_blog_tabs' );
}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.