Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/15/2013 06:44:45 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Tweak author link functions to only perform 1 anonymous check. Also, only use author link functions in widgets when show_user is on. Props GargajCNS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/topics/template-tags.php

    r4791 r4814  
    13841384                if ( !empty( $topic_id ) ) {
    13851385
     1386                        // Get some useful topic information
     1387                        $author_url = bbp_get_topic_author_url( $topic_id );
     1388                        $anonymous  = bbp_is_topic_anonymous( $topic_id );
     1389
    13861390                        // Tweak link title if empty
    13871391                        if ( empty( $r['link_title'] ) ) {
    1388                                 $link_title = sprintf( !bbp_is_topic_anonymous( $topic_id ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_topic_author_display_name( $topic_id ) );
     1392                                $link_title = sprintf( empty( $anonymous ) ? __( 'View %s\'s profile', 'bbpress' ) : __( 'Visit %s\'s website', 'bbpress' ), bbp_get_topic_author_display_name( $topic_id ) );
    13891393
    13901394                        // Use what was passed if not
     
    13931397                        }
    13941398
     1399                        // Setup title and author_links array
    13951400                        $link_title   = !empty( $link_title ) ? ' title="' . $link_title . '"' : '';
    1396                         $author_url   = bbp_get_topic_author_url( $topic_id );
    1397                         $anonymous    = bbp_is_topic_anonymous( $topic_id );
    13981401                        $author_links = array();
    13991402
Note: See TracChangeset for help on using the changeset viewer.