AnsPress_Reputation_Hooks::display_name( string $name, array $args )
Description #
Append user reputations in display name.
Parameters #
- $namestring (Required) User display name.
- $argsarray (Required) Arguments.
Source #
File: addons/free/reputation.php
public static function display_name( $name, $args ) { if ( $args['user_id'] > 0 ) { if ( $args['html'] ) { $reputation = ap_get_user_reputation_meta( $args['user_id'] ); if( ap_is_addon_active( 'free/buddypress.php' ) && function_exists( 'bp_core_get_userlink' ) ) { return $name . '<a href="' . ap_user_link( $args['user_id'] ) . 'qa/reputations" class="ap-user-reputation" title="' . __( 'Reputation', 'anspress-question-answer' ) . '">' . $reputation . '</a>'; } else { return $name . '<a href="' . ap_user_link( $args['user_id'] ) . '?tab=reputations" class="ap-user-reputation" title="' . __( 'Reputation', 'anspress-question-answer' ) . '">' . $reputation . '</a>'; } } } return $name; }
Expand full source code Collapse full source code View on GitHub: addons/free/reputation.php:374
Add your comment