WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#4766 closed defect (bug) (invalid)

publish_post action called on subsequent post edits

Reported by: YellowSwordfish Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3.1
Component: Administration Keywords: spam publish_post save_post
Focuses: Cc:

Description

Well maybe it's intentional but surely you can't 'publish' a post more than once. I would have expected the 'publish_post' action to only be called when the post is first published. Later edits are not 'publishing'. They are handled with the 'save_post' hook.

If this is intentonal can someone explain the rationale?

Change History (4)

comment:1 westi7 years ago

  • Milestone 2.4 (future) deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I believe this is not true on trunk now.

Changes in [5797] for #4620 changed the way post status transition actions occur.

comment:2 JacquesChester6 years ago

  • Keywords spam publish_post save_post added
  • Resolution worksforme deleted
  • Status changed from closed to reopened
  • Version changed from 2.2.2 to 2.3.1

This issue is not fixed as of 2.3.1. The cat2email plugin uses the publish_post action to email out posts in selected categories when a post is published. Since 2.2 it has fired every time a post is edited, leading people to accuse our site of spamming. The issue is not resolved.

comment:3 lloydbudd6 years ago

  • Milestone set to 2.5

comment:4 Denis-de-Bernardy5 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

has been fixed now. or rather, use one of the new hooks.

Note: See TracTickets for help on using tickets.