Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

justbishop on "Adding Custom Action Link to Admin User List"

$
0
0

I'm trying to add a link to each user's author archive from the back end user list, in the list of links that appear for each user when their row is moused over. Here's the code I have so far:

function frontend_profile_action_link($actions, $user_object) {

	$actions['view profile'] = "<a class='view_frontend_profile' href='" . home_url( "/archives/author/" ) . get_the_author_meta( 'user_login' ) . "'>" . __( 'View Profile', 'frontend_profile' ) . "</a>";

	return $actions;

}

add_filter('user_row_actions', 'frontend_profile_action_link', 11, 2);

It works as far as displaying the link, but only to a point. It returns nothing after the "archives/author/" part of the URL, so every user's "View Profile" link ends up being http://www.mysite.com/archives/author/ when it should be http://www.mysite.com/archives/author/user_login

I'm not sure what I'm doing wrong. Is it my syntax in building the URL, or is get_the_author_meta not the function I need?

TIA :)


Viewing all articles
Browse latest Browse all 8245

Trending Articles