Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('transition_post_status','first_publish_set',10,3);
- function first_publish_set($new, $old, $post) {
- if ($new == 'publish' && $old != 'publish' && isset($post->post_type)) {
- FWP()->indexer->index( $post->ID);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement