Advertisement
Guest User

Untitled

a guest
Sep 17th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function my_bp_opengraph() {
  2. // see if the activity component is active and if we're currently on an activity permalink page
  3. if ( bp_is_active( 'activity' ) && bp_is_single_activity() ) :
  4. // add our mini activity loop
  5. if ( bp_has_activities( 'include=' . bp_current_action() ) ) :
  6. while ( bp_activities() ) : bp_the_activity();
  7. ?>
  8.  
  9. <meta property="og:description" content="<?php bp_activity_content_body(); ?>"/>
  10.  
  11. <?php
  12. endwhile;
  13. endif;
  14. endif;
  15. }
  16. add_action( 'bp_head', 'my_bp_opengraph' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement