Last active
August 29, 2015 14:02
-
-
Save ntwb/a19b187f2170235f16bf to your computer and use it in GitHub Desktop.
bbPress - User Profile User URL - See also https://bbpress.trac.wordpress.org/ticket/2570
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: bbPress - User Profile User URL | |
Plugin URI: https://gist.github.com/ntwb/ | |
Description: bbPress - User Profile User URL | |
Version: 0.2 | |
Author: Stephen Edgar - Netweb | |
Author URI: http://netweb.com.au | |
*/ | |
function ntwb_bbpress_user_profile_user_url() { | |
if ( bbp_get_displayed_user_field( 'user_url' ) ) : ?> | |
<div id="bbp-user-profile" class="bbp-user-profile"> | |
<div class="bbp-user-section"> | |
<p class="bbp-user-user-url"> | |
<?php _e( 'Website:', 'bbpress' ) ?> <a href="<?php esc_url( bbp_displayed_user_field( 'user_url' ) ); ?>"><?php esc_url( bbp_displayed_user_field( 'user_url' ) ); ?></a> | |
</p> | |
</div> | |
</div> | |
<?php endif; | |
} | |
add_action( 'bbp_template_after_user_profile', 'ntwb_bbpress_user_profile_user_url' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment