Skip to main content
edited tags
Link
fuxia
  • 107.1k
  • 38
  • 255
  • 459
Tweeted twitter.com/#!/StackWordPress/status/48255145401794560
deleted 43 characters in body
Source Link
idea
  • 181
  • 1
  • 1
  • 9

I am using the publish_post action to run some checks on a user after their post is approvedpublished:

// Where does $author_ID come= from???? 

add_action('publish_post', 'rhb_check_current_user', 10, $author_ID);

DoHow can I need to use $wpdb to get $author_ID or is there another waythe original author's ID?

I am using the publish_post action to run some checks on a user after their post is approved:

// Where does $author_ID come from???
add_action('publish_post', 'rhb_check_current_user', 10, $author_ID);

Do I need to use $wpdb to get $author_ID or is there another way?

I am using the publish_post action to run some checks on a user after their post is published:

$author_ID = ???? 

add_action('publish_post', 'rhb_check_current_user', 10, $author_ID);

How can I get the original author's ID?

Source Link
idea
  • 181
  • 1
  • 1
  • 9

get author of published post

I am using the publish_post action to run some checks on a user after their post is approved:

// Where does $author_ID come from???
add_action('publish_post', 'rhb_check_current_user', 10, $author_ID);

Do I need to use $wpdb to get $author_ID or is there another way?