Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: private_to_published

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
421      }
422      
423      // Add any?
424      foreach ($post_categories as $new_cat) {
425           if (!in_array($new_cat, $old_categories))
426                $wpdb->query("INSERT INTO $wpdb->post2cat (post_id, category_id) VALUES ($post_ID, $new_cat)");
427      }
428
429      if ($prev_status != 'publish' && $post_status == 'publish')
430           do_action('private_to_published', $post_ID);
431
432      do_action('edit_post', $post_ID);
433
434      if ($post_status == 'publish') {
435           do_action('publish_post', $post_ID);
436           register_shutdown_function('do_trackbacks', $post_ID);
437           register_shutdown_function('do_enclose', $content, $post_ID );
438           if ( get_option('default_pingback_flag') )
439                register_shutdown_function('pingback', $content, $post_ID);