Authentication/API Questions

Why don’t you write a quick plugin … called “is user logged in” that registers a URL call. So the user hits the page, then the Flash or Java could just hit: http://mysite.com/customurl?hash=wordpress_logged_in_[hash] Then the plugin would run and return true or false. References: http://codex.wordpress.org/WordPress_Cookies#WP_.3E_3 This way you keep everything within reach of the WordPress … Read more

Sync posts from one WordPress site to another

Have you tried codex.wordpress.org/XML-RPC_Support. This code works, in conjunction with the IXR library found at incutio: include(‘IXR_Library.php’); $usr=”theusername”; $pwd = ‘thepassword’; $xmlrpc=”http://not-therealurl.com/xmlrpc.php”; $client = new IXR_Client($xmlrpc); $client -> debug = true; //optional but useful $params = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘draft’, ‘post_title’ => ‘Test Post’, ‘post_author’ => 4, ‘post_excerpt’ => ‘This is my … Read more

WordPress.org Support Forum API

That´s no big deal if you got the RSS feed, have a look at it. There is a pubDate which you can use to check for the age of the topic. strtotime() or anything alike will help you to check if that´s older than 30 days. And you also got a link-element. This leads you … Read more

get WP-API by page id

If you want to use v2 of the API (which is the current one you should be using), the endpoint is mysite.me/wp-json/wp/v2/pages/1234 where 1234 is the page ID. https://developer.wordpress.org/rest-api/reference/pages/#retrieve-a-page

Unrendered content Cornerstone through REST API

This is expected, as it depends on the context. The raw content will show up for the edit but not the view or embed context. It’s filtered through the WP_REST_Controller::filter_response_by_context() method. You can always add a new field to the response with register_rest_field() where the get_callback callback receives an input array with post data, including … Read more

Gutenberg internal page link search box

I found a solution and thought to post it here as others might need it el(URLInput, { className: props.className, value: attributes.linkURL, placeholder: i18n.__(‘Set the specific url’), onChange: function( url ) { props.setAttributes({ linkURL: url }); } }) Does exactly what I need.

WP API : date_query parameter

As of WP >= 4.7 filter[] is not supported and have been removed. Also WP REST API Plugin became part of WordPress Core. According docs your link should be: https://wptest.enguerranweiss.com/wp-json/wp/v2/posts?orderby=date&order=desc&after=2016-10-13T17:00:00 EDIT As enguerranws mentioned the date should be in ISO8601 format

How to get the attached gallery in the rest API?

To my knowledge this can’t be done out of the box. So you could make use of what get_post_galleries() or get_post_gallery(), the latter is just making use of the former, are doing by adding an endpoint. A minimal example could look like shown below. function rest_get_post_gallery( $data ) { //set FALSE for data output $gallery … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)