Skip to:
Content

BuddyPress.org

Changeset 607


Ignore:
Timestamp:
12/04/2008 08:32:44 PM (17 years ago)
Author:
apeatling
Message:

Adding bp_post_author_avatar() function to match bp_comment_author_avatar() function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r597 r607  
    199199}
    200200
     201function bp_post_author_avatar() {
     202    global $post;
     203   
     204    var_dump($post);
     205   
     206    if ( function_exists('bp_core_get_avatar') ) {
     207        echo bp_core_get_avatar( $post->post_author, 1 );   
     208    } else if ( function_exists('get_avatar') ) {
     209        get_avatar();
     210    }
     211}
     212
    201213function bp_loggedinuser_avatar( $width = false, $height = false ) {
    202214    global $bp;
     
    386398}
    387399
     400function bp_is_page($page) {
     401    global $bp;
     402
     403    if ( $bp['current_userid'] )
     404        return false;
     405
     406    if ( $page == $bp['current_component'] || $page == 'home' && $bp['current_component'] == $bp['default_component'] )
     407        return true;
     408   
     409    return false;
     410}
     411
    388412/* Template functions for fetching globals, without querying the DB again
    389413   also means we dont have to use the $bp variable in the template (looks messy) */
Note: See TracChangeset for help on using the changeset viewer.