_wp_credits_add_profile_link

Retrieve the link to a contributor's WordPress.org profile page.

Description

_wp_credits_add_profile_link( (string) &$display_name, (string) $username, (string) $profiles ); 

Parameters (3)

0. $display_name (string) => &$display_name
The contributor's display name, passed by reference.
1. $username (string)
The contributor's username.
2. $profiles (string)
URL to the contributor's WordPress.org profile page.

Usage

  1. if ( !function_exists( '_wp_credits_add_profile_link' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/credits.php'; 
  3.  
  4. // The contributor's display name, passed by reference. 
  5. $display_name = &$display_name; 
  6.  
  7. // The contributor's username. 
  8. $username = ''; 
  9.  
  10. // URL to the contributor's WordPress.org profile page. 
  11. $profiles = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = _wp_credits_add_profile_link($display_name, $username, $profiles); 
  15.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/credits.php  
  1. function _wp_credits_add_profile_link( &$display_name, $username, $profiles ) { 
  2. $display_name = '<a href="' . esc_url( sprintf( $profiles, $username ) ) . '">' . esc_html( $display_name ) . '</a>';