I use this function to get some information to the user columns,
function column_company( $defaults ) {
$defaults['usercolumn-company'] = __('Company', 'user-column');
$defaults['usercolumn-myoffers'] = __('Applied Offers', 'user-column');
$defaults['usercolumn-totaloffers'] = __('Total Offers', 'user-column');
return $defaults;
}
function custom_column_company($value, $column_name, $id) {
if( $column_name == 'usercolumn-company' ) {
return get_the_author_meta( 'company', $id );
}
elseif( $column_name == 'usercolumn-myoffers' ) {
return get_the_author_meta( 'offersiget', $id );
}
elseif( $column_name == 'usercolumn-totaloffers' ) {
return get_the_author_meta( 'totaloffers', $id );
}
}
add_action('manage_users_custom_column', 'custom_column_company', 15, 3);
add_filter('manage_users_columns', 'column_company', 15, 1);
i return the get_the_author_meta( 'offersiget', $id );
and here i get from the db some post id's as text, like: 8,12,51
is it possible to return this, not as a text but as a link to the edit post
(/wp-admin/post.php?post=(8)&action=edit)?
I try this by @hakre
return sprintf('<a href="/wp-admin/post.php?post='.get_the_author_meta( 'offersiget', $id ).'&action=edit">'.get_the_author_meta( 'offersiget', $id ).'</a>');
and it works but it return one link with all the post id's inside, is it possible to split them?
any help?
Thanks,
Philip