Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#33618 closed defect (bug) (invalid)

Trigger publish_post in XMLRPC API wp_newPost function

Reported by: k776's profile k776 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3
Component: XML-RPC Keywords:
Focuses: Cc:

Description

Currently, the only action triggered when creating a post via the XMLRPC API is:

do_action( 'xmlrpc_call', 'wp.newPost' );

However, a lot of plugins depend on publish_post or wp_insert_post actions being triggered with the new post id.

What is the rationale behind not triggering these via API post creations as it seems like a bug/oversight?

Change History (3)

#1 @SergeyBiryukov
10 years ago

Hi @k776, welcome to Trac!

wp_newPost() does call wp_insert_post() via _insert_post(), so all the standard hooks should apply.

#2 @k776
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I see, ok. I think what made me thing this was that it appears plugins are not operational in the XMLRPC API? As plugins don't seem to be running when adding via API, however they do when adding posts through the web interface.

Since it's unrelated to this ticket, I'll close this off and if you could take a look at this instead. You help is much appreciated. https://wordpress.org/support/topic/plugins-not-operational-in-xmlrpc?replies=1#post-7366404

Last edited 10 years ago by k776 (previous) (diff)

#3 @DrewAPicture
10 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.