Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/04/2011 08:54:42 PM (13 years ago)
Author:
djpaul
Message:

Change styling for activity items and comments.
Fix several pre-existing RTL issues.
Fix gravatar size inconsistencies.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/functions.php

    r4597 r4611  
    420420        $avatar_size = 50;
    421421    else
    422         $avatar_size = 20;
     422        $avatar_size = 25;
    423423    ?>
    424424
     
    440440                <p>
    441441                    <?php
    442                         if ( 1 == $depth )
    443                             $links = sprintf( '<a href="#comment-%1$d">%2$s</a>', get_comment_ID(), __( 'View', 'buddypress' ) );
     442                        if ( current_user_can( 'edit_comment', get_comment_ID() ) )
     443                            $links = get_comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) );
    444444                        else
    445                             $links = get_comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) );
    446 
    447                         $links .= sprintf( ' <a class="comment-edit-link" href="%1$s" title="%2$s">%3$s</a>', get_edit_comment_link( $comment->comment_ID ), esc_attr__( 'Edit comment', 'buddypress' ), __( 'Edit', 'buddypress' ) );
    448                         $noun = _n( 'said:', 'replied:', $depth, 'buddypress' );
    449 
    450                         /* translators: 1: comment author url, 2: comment author name, 3: "said:" or "replied:", 4: comment date/timestamp, 5: view/reply & edit comment links */
    451                         printf( __( '<a href="%1$s" rel="nofollow">%2$s</a> %3$s <span class="time-since">&nbsp; %4$s</span> %5$s', 'buddypress' ), get_comment_author_url(), get_comment_author(), $noun, get_comment_date(), $links );
     445                            $links = '';
     446
     447                        /* translators: 1: comment author url, 2: comment author name, 3: comment permalink, 4: comment date/timestamp, 5: view/reply & edit comment links */
     448                        printf( __( '<a href="%1$s" rel="nofollow">%2$s</a> said on <a href="%3$s"><span class="time-since">%4$s</span></a> %5$s', 'buddypress' ), get_comment_author_url(), get_comment_author(), get_comment_link(), get_comment_date(), $links );
    452449                    ?>
    453450                </p>
    454451
    455                 <?php if ( 1 == $depth && -1 != $args['max_depth'] && comments_open() ) : ?>
    456                     <div class="comment-options"><?php comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?></div>
     452                <?php if ( comments_open() ) : ?>
     453                    <div class="comment-options"><?php printf( '<a class="comment-edit-link bp-secondary-action" href="%1$s" title="%2$s">%3$s</a> ', get_edit_comment_link( $comment->comment_ID ), esc_attr__( 'Edit comment', 'buddypress' ), __( 'Edit', 'buddypress' ) ) ?></div>
    457454                <?php endif; ?>
    458455            </div>
Note: See TracChangeset for help on using the changeset viewer.