Email data from php output
-
Hi all currently I get data displaying the users posts on the users admin table for each user row in a custom column. I’d like to be able to have a button instead of the row content to be able to click and send an email with the ouput of my user posts function.. I know wp_mail is the route..
Thanks! — Function below
function new_modify_user_table_row_send_inv($value='', $column_name, $user_id ) { if ($column_name =='send_inventory') { $posts = get_posts(array('author' => $user_id)); $tmpdata = array(); if(isset($posts) && !empty($posts)) foreach($posts as $post){ $tmpdata[] = "<li>".$post->post_title."</li>"."TEST"; } $varnew = implode("\n",$tmpdata); } return $varnew; } add_filter( 'manage_users_custom_column', 'new_modify_user_table_row_send_inv', 90, 3 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Email data from php output’ is closed to new replies.