#25264 closed feature request (invalid)
The "do_action"s in class-wp-xmlrpc-server.php do not pass in useable arguments.
Reported by: | jtsternberg | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | XML-RPC | Keywords: | dev-feedback |
Focuses: | Cc: |
Description
It seems it should be possible to use hooks like do_action( 'xmlrpc_call', 'wp.newPost' );
to manipulate xmlrpc-inserted posts, terms, etc.
These would be infinitely more useable.
do_action( 'xmlrpc_call', 'wp.newPost', $user, $content_struct );
do_action( 'xmlrpc_call', 'wp.editPost', $blog_id, $user, $post_id, $content_struct );
do_action( 'xmlrpc_call', 'wp.newTerm', $user, $content_struct );
Change History (4)
#3
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
The only purpose of the xmlrpc_call
actions is to announce that a method is being used. As maxcutler says, there are other ways.
#4
in reply to:
↑ 2
@
9 years ago
Replying to maxcutler:
XML-RPC uses wp_insert_post internally, so you can use the usual 'save_post' action to do work after it has been saved.
Or if you want to manipulate it before it is saved, look at the 'xmlrpc_prepare_post' filter.
'wp_insert_post' hooks are not useful here. Because XML-RPC uses 'get_default_post_to_edit' first.
XML-RPC uses wp_insert_post internally, so you can use the usual 'save_post' action to do work after it has been saved.
Or if you want to manipulate it before it is saved, look at the 'xmlrpc_prepare_post' filter.