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-activity/bp-activity-template.php

    r4589 r4611  
    700700        global $activities_template, $bp;
    701701
    702         // Strip any legacy time since placeholders -- TODO: Remove this in 1.3
     702        // Strip any legacy time since placeholders from BP 1.0-1.1
    703703        $content = str_replace( '<span class="time-since">%s</span>', '', $content );
    704704
    705705        // Insert the time since.
    706         $content .= ' ' . apply_filters_ref_array( 'bp_activity_time_since', array( '<span class="time-since">' . sprintf( __( '&nbsp; %s ago', 'buddypress' ), bp_core_time_since( $activities_template->activity->date_recorded ) ) . '</span>', &$activities_template->activity ) );
    707 
     706        $time_since = apply_filters_ref_array( 'bp_activity_time_since', array( '<span class="time-since">' . sprintf( __( ' %s ago ', 'buddypress' ), bp_core_time_since( $activities_template->activity->date_recorded ) ) . '</span>', &$activities_template->activity ) );
     707   
    708708        // Insert the permalink
    709709        if ( !bp_is_single_activity() )
    710             $content .= apply_filters_ref_array( 'bp_activity_permalink', array( ' &middot; <a href="' . bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ) . '" class="view" title="' . __( 'View Thread / Permalink', 'buddypress' ) . '">' . __( 'View', 'buddypress' ) . '</a>', &$activities_template->activity ) );
    711 
    712         // Add the delete link if the user has permission on this item
    713         if ( bp_activity_user_can_delete() )
    714              $content .= apply_filters_ref_array( 'bp_activity_delete_link', array( ' &middot; ' . bp_get_activity_delete_link(), &$activities_template->activity ) );
     710            $content .= apply_filters_ref_array( 'bp_activity_permalink', array( sprintf( ' about <a href="%1$s" class="view" title="%2$s">%3$s</a>', bp_activity_get_permalink( $activities_template->activity->id, $activities_template->activity ), esc_attr__( 'View Discussion', 'buddypress' ), $time_since ), &$activities_template->activity ) );
     711        else
     712            $content .= $time_since;
     713
     714        if ( is_user_logged_in() && bp_activity_can_comment() )
     715            $content .= sprintf( '<a href="%1$s" class="acomment-reply bp-primary-action" id="acomment-comment-%2$d">%3$s</a>', bp_get_activity_comment_link(), bp_get_activity_id(), sprintf( __( 'Reply (<span>%s</span>)', 'buddypress' ), bp_activity_get_comment_count() ) );
    715716
    716717        return apply_filters( 'bp_insert_activity_meta', $content );
     
    12171218        }
    12181219
    1219         $link = '<a href="' . wp_nonce_url( $url, 'bp_activity_delete_link' ) . '" class="item-button ' . $class . ' confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>';
     1220        $link = '<a href="' . wp_nonce_url( $url, 'bp_activity_delete_link' ) . '" class="item-button bp-secondary-action ' . $class . ' confirm" rel="nofollow">' . __( 'Delete', 'buddypress' ) . '</a>';
    12201221        return apply_filters( 'bp_get_activity_delete_link', $link );
    12211222    }
Note: See TracChangeset for help on using the changeset viewer.