Block only external access to wp-cron.php on OpenLiteSpeed

I use OpenLitespeed server with multiple WordPress installation and want to restrict external access to some files, only allowing server itself to access them (for example to call cron), so: What I did: RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 RewriteCond %{REQUEST_URI} wp-trackback.php|xmlrpc.php|wp-cron.php [NC] RewriteRule .* – [F,L] Result: /xmlrpc.php – returns 403 as expected; /wp-trackback.php – returns 403 … Read more

Create a new post in wordpress with XML-RPC with the correct GUID?

When I use XML-RPC to create a new post instead of wp_insert_post the post is created with wrong guid/URL. With XML-RPC the guid is created with ID not slug. // Input data $my_page = array(); $my_page[“post_title”] = $alternatename_main; $my_page[“post_content”] = $postcontent; $my_page[“post_excerpt”] = $postexcerpt; $my_page[“post_status”] = “publish”; $my_page[“post_date”] = date(“Y-m-d H:i:s”); $my_page[“post_author”] = 1; $my_page[‘post_type’] … Read more

wordpress inserting posts programatically through a url

I have to insert posts programatically in WordPress. I want that I should be able to publish posts via a url. Something like www.mypage.com/insertnewpost.php?title=blah&content=blahblahblah&category=1,2,3 The following code works only if I use it inside the functions.php file of the themes. include ‘../../../wp-includes/post.php’; global $user_ID; $new_post = array( ‘post_title’ => ‘My New Post’, ‘post_content’ => ‘Lorem … Read more

How pull wordpress blog data using Blogger API using python

WordPress mentioned that it supports Blogger API (link). So, can anyone tell me how to use Blogger API (using python) v3 to pull wordpress public blogs data. Or, is there any wordpress API to pull public data from its blogs? (Lang: Python). Any useful documentation that clearly explains the procedure would also be appreciated. 1 … Read more

Unescape HTML entities in JavaScript?

I have some JavaScript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form: <img src=”https://stackoverflow.com/questions/3700326/myimage.jpg”> However, when I use the JavaScript to insert the strings into HTML, they render literally. I don’t see an image, I literally see the string: <img src=”https://stackoverflow.com/questions/3700326/myimage.jpg”> My guess is that the HTML is being … Read more

Is it possible to change a blog’s theme through XML-RPC command? (and if so how?)

I can’t seem to find such an option listed here: http://codex.wordpress.org/XML-RPC_wp#wp.setOptions Does it exist? Thanks. 2 Answers 2 No, that option does not currently exist through XML-RPC. However, you can always create your own method in a plugin and hook it up to XML-RPC. Update There’s an upcoming Google Summer of Code project that will … Read more