Support » Requests and Feedback » Bug: generic_ping() called twice when editing

  • 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?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bug: generic_ping() called twice when editing’ is closed to new replies.