New answers tagged

0

Looks like I found a snippet that do exactly that. It's from Daniel Bachhuber, the API developer. add_filter( 'rest_authentication_errors', function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( ! is_user_logged_in() ) { return new WP_Error( 'restx_logged_out', 'Sorry, you must be logged in to make a request.', ...


0

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 to the topic, which has its own RSS feed, too. Example: ...


2

Note: I am posting an answer to my own question with hopes of it being useful for developers trying to solve the same problem that my initial query proposes. As it turns out, I was viewing this with the wrong lens. The solution was not to add my entire AngularJS app and use that while trying to disguise the WordPress front-end and themes. The solution is ...


-1

function mysite_woocommerce_order_status_processing( $order_id ) { $mobile="123456"; $url="****/api.php?username=******&password=1234&source=UPDATE&dmobile=".$mobile."&message='.$msg.' "; $response = file_get_contents( $url ); //print_r($response); } add_action( ...


1

Ok, I just stumbled upon the answer buried deep in the github issues page: https://github.com/WP-API/WP-API/issues/1403 The answer is: the reason is that the terms / meta etc are different objects, and in typical REST design going a GET on a single resource, will give you that resource, not that resource and a bunch of other ones too. However, ...


0

You can inspire from this tutorial here: http://www.sitepoint.com/adding-a-media-button-to-the-content-editor/ For videos you can change the library type to 'video': function open_media_window() { var window = wp.media({ title: 'Insert a media', library: {type: 'video'}, multiple: false, button: {text: 'Insert'} }); ...



Top 50 recent answers are included