Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/13/2010 01:08:31 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Committing patch from #2566 for easier review and testing. Adds BP_Button class and associated template tags. Also includes code formatting fixes, phpdoc, widget fixes when friends component is disabled, and possibly the kitchen sink.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-xprofile/bp-xprofile-templatetags.php

    r3145 r3260  
    686686    global $bp;
    687687
    688     ?>
    689     <div class="generic-button">
    690         <a class="edit" title="<?php _e( 'Edit Profile', 'buddypress' ) ?>" href="<?php echo $bp->displayed_user->domain . $bp->profile->slug ?>/edit"><?php _e( 'Edit Profile', 'buddypress' ) ?></a>
    691     </div>
    692     <?php
    693 }
    694 
     688    bp_button( array (
     689        'id'                => 'edit_profile',
     690        'component'         => 'xprofile',
     691        'must_be_logged_in' => true,
     692        'block_self'        => true,
     693        'link_href'         => trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit' ),
     694        'link_class'        => 'edit',
     695        'link_text'         => __( 'Edit Profile', 'buddypress' ),
     696        'link_title'        => __( 'Edit Profile', 'buddypress' ),
     697    ) );
     698}
    695699
    696700?>
Note: See TracChangeset for help on using the changeset viewer.