Bug: generic_ping() called twice when editing (2 posts)

  1. hades
    Posted 12 years ago #

    In post.php (version 1.2), we have this:

    // are we going from draft/private to published?
    if ($prev_status != 'publish' && $post_status == 'publish') {
    if ($post_pingback) {
    pingback($content, $post_ID);
    } // end if moving from draft/private to published
    if ($post_status == 'publish') {
    do_action('publish_post', $post_ID);

    But in functions.php, we have this:

    add_action('publish_post', 'generic_ping');

    Unless I'm reading that wrong, it means that when a private/draft post gets edited to be published, generic_ping() gets called twice. That first call to generic_ping() can be safely removed, can't it?

  2. Ryan Boren
    WordPress Dev
    Posted 12 years ago #

    Right you are. Thanks. Fixed in CVS.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.