Problem with Create Post using metaWeblog.newPost or wp_insert_post
Probably because your post is saved as draft. Try to set the post status to publish inside your $content array. E.g. $content[‘post_status’] = ‘publish’;
Probably because your post is saved as draft. Try to set the post status to publish inside your $content array. E.g. $content[‘post_status’] = ‘publish’;
Actually, that hook just lets you tie in to the beginning of executing that function, it doesn’t let you override anything. If you want to replace this function entirely, I recommend two different options: 1. Don’t use it Just define your own XMLRPC method (myNamespace.newMediaObject) and call that instead. 2. Replace it You can tie … Read more
You could use a custom field for a post which is saved via XMLRPC by using the action hook xmlrpc_publish_post. wpse_from_xmlrpc() could than check this custom field. <?php add_action( ‘xmlrpc_publish_post’, ‘add_xmlrpc_postmeta’ ); function add_xmlrpc_postmeta( $post_id ){ update_post_meta( $post_id, ‘send-by-xmlrpc’, 1 ); } function wpse_from_xmlrpc( $post_id ){ $xmlrpc = get_post_meta( $post_id, ‘send-by-xmlrpc’, true ); if( $xmlrpc … Read more
I am trying to replicate the same output you have provided in your example above and I am only able to achieve output along the lines of; <p class=MsoNormal> <span class=MsoIntenseReference> <span style=”color:red;text-transform:none;letter-spacing:0pt;font-weight:normal;text-decoration:none”> Red Example text </span> </span> </p> As you can see Microsoft Word (2010) is inserting predefined class names for the paragraph and … Read more
On nginx, to block access to the xmlrpc.php file, add this location block to the server block of your configuration file: location ~ ^/(xmlrpc\.php) { deny all; }
According to this ticket: Cannot serialize object wrapping 3rd party library structs. Must serialize the xml (to a string) and store that to session and reload the xml when restoring from session When you are storing object in transient it gets serialized and not all objects are capable of that correctly. Store textual XML data … Read more
One option is to use the add_rewrite_endpoint technique I mention in my comment. Another option is to use the admin_post_{action} hook. For example, you can POST data to your URL with an action GET parameter: http://www.example.com/wp-admin/admin-post.php?action=my_plugin_action Then hook that action via admin_post_nopriv_my_plugin_action to receive that request and process the data: function wpd_my_plugin_action() { status_header(200); // … Read more
You shouldn’t delete that file – it will be restored after update – so deleting it makes no sense (and it shouldn’t be treated as security fix). You can disable XMLRPC using filter: add_filter(‘xmlrpc_enabled’, ‘__return_false’); And even block access to that file. Below code for Apache (sandrodz showed code for nginx): <Files xmlrpc.php> Order deny,allow … Read more
There are plugins for that: e.g. http://wordpress.org/plugins/disable-xml-rpc/ You can also write a filter yourself add_filter(‘xmlrpc_enabled’, ‘__return_false’); You can simply add this code your theme functions.php (located in wp-content/themes/your_theme). However, you are advised to create a child theme (http://codex.wordpress.org/Theme_Development) so that your modification does not disappear when you update the theme. Alternatively, you can create your … Read more
If the plugin works the way I think it does, you could try changing the priority of your gateway_set_post_format function being added to the save_post action. Your plugin may have a larger priority number which would make it fire later than yours. If the plugin does not change the custom field value until after your … Read more