Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. add_filter( 'mailster_auto_post', function ( $data, $post ){
  2.     //Get Author ID
  3.     $author_id=$post->post_author;
  4.     //Get the categories
  5.     $categories = get_the_category( $post->ID );
  6.     $data['title'] = array(
  7.              $post->post_title,
  8.              get_the_author_meta( 'display_name', $author_id ),
  9.              $categories->name,
  10.      );
  11.      return $data;
  12. }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement