2

Yesterday, this question was asked: How to pass arguments to add_action()

After I answered it, the question was marked as a duplicate to this one: Passing a parameter to filter and action functions

Looking at just the titles, these appear to be the same question. (The simple answer to that question is "You can't pass a parameter via the add_action function.") However, the situations that the OPs were in are totally different. In yesterday's question, the OP was calling add_action from inside an object class, and was confused about passing the parameter to the callback function, also inside the object class. In addition, he was using wp_schedule_single_event, not do_action, to perform the action. He got an answer that worked for him and did not have anything to do with the "duplicate" question.

Are these really duplicate questions? Does the question need to be edited to make it look less like a duplicate?

1

Yes.

The questions are duplicate.

The answers are completely different.

That is my opinion at least.

  • If the title of yesterday's question got changed to "Calling add_action inside an object class", would that make the question no longer a duplicate? – Ben Miller - Reinstate Monica Aug 14 '13 at 17:35
  • 3
    Probably. Such is the way of judgement. And perception. And speculation. And all three things are at play here. And none of them are constant. – GhostToast Aug 14 '13 at 17:40
  • 3
    So, if the Titles are duplicate, but the actual questions are distinct, wouldn't the correct course of action be to modify the title, rather than to close a non-duplicate question as duplicate? – Chip Bennett Sep 17 '13 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .