Sacconi69

//AGGIUNGI IL LINK EMAIL IN POST TABLE senza urlencode

Oct 23rd, 2024
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. //AGGIUNGI IL LINK EMAIL IN POST TABLE
  2.  
  3. add_filter( 'post_row_actions', 'modify_list_row_actions3', 10, 2 );
  4.  
  5. function modify_list_row_actions3( $actions, $post ) {
  6. // Check for your post type (e.g., 'post').
  7. if ( $post->post_type == 'post' ) {
  8.  
  9.  
  10. $name= get_post_meta( $post->ID, 'function_name', true );
  11. $post = $post->ID;
  12.  
  13.  
  14. $recipient = get_the_author_meta ( 'email_richiesta');
  15.  
  16. $subject = get_the_author_meta ( 'soggetto_richiesta');
  17. $message = get_the_author_meta( 'mia_richiesta' ) ;
  18.  
  19.  
  20. $actions[email] = "<a href=\"mailto:$recipient?subject=$subject&body=$message\">email</a>";
  21.  
  22. }
  23.  
  24. return $actions;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment