Skip to content

Instantly share code, notes, and snippets.

@vfowler
Created May 28, 2013 00:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vfowler/5659746 to your computer and use it in GitHub Desktop.
Save vfowler/5659746 to your computer and use it in GitHub Desktop.
My attempt to get imath's BP Bookmarklet 2 working in my theme (a child theme of bp_default).
<?php /* Template Name: hub bookmarklet */
/**
* Main and only template of the plugin
*
* @package BP Bookmarklet
*
*/
if( bp_bookmarklet_is_bp_default() )
get_header( 'buddypress' );
?>
<div id="buddypress" class="hub">
<h1 class="bookmarklet_title"><?php bkmklet_the_page_title();?></h1>
<?php do_action( 'template_notices' ); ?>
<?php if ( !is_user_logged_in() ) : ?>
<?php wp_login_form();?>
<?php else:?>
<?php do_action( 'bp_before_directory_bookmarklet' ); ?>
<?php bp_get_template_part( 'activity/post-form' );?>
<div id="link-result"></div>
<?php do_action( 'bp_after_directory_bookmarklet' ); ?>
<?php endif;?>
</div>
<?php
if( bp_bookmarklet_is_bp_default() )
get_footer( 'buddypress' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment