AnsPress_Profile_Hooks::ap_user_link( string $link, integer $user_id, array|string $sub )
Description #
Filter ap_user_link function.
Parameters #
- $linkstring (Required) Link.
- $user_idinteger (Required) User id.
- $subarray | string (Required) Sub page.
Source #
File: addons/free/profile.php
public static function ap_user_link( $link, $user_id, $sub ) { $user = get_user_by( 'id', $user_id ); // If permalink is enabled. if ( $user_id > 0 && get_option( 'permalink_structure' ) !== '' ) { if ( false === $sub ) { $sub = array( 'ap_page' => 'user', 'ap_user' => $user->user_login ); } elseif ( is_array( $sub ) ) { $sub['ap_page'] = 'user'; $sub['ap_user'] = $user->user_login; } elseif ( ! is_array( $sub ) ) { $sub = array( 'ap_page' => 'user', 'ap_user' => $user->user_login, 'user_page' => $sub ); } $link = ap_get_link_to( $sub ); } return $link; }
Expand full source code Collapse full source code View on GitHub: addons/free/profile.php:252
Add your comment