WordPress as a web service only
WordPress as a web service only
WordPress as a web service only
As I hinted at in my comment, I would use the rewrite API to handle this, specifically by adding a rewrite endpoint. That way you don’t have to deal with working out what’s an actual 404, and what’s a request for one of your dynamically generated pages. It doesn’t give you exactly the URL structure … Read more
Yes, you can write php code, potentially in the form of a plugin, to access a remote web service. Presumably you want to use a web service accessed via https (or http). WordPress provides the wp_remote_request() function to do that. You can call it from your php code (in your plugin). When your server runs … Read more
That’s probably because the “JSON API plugin” htmlescapes your text. So if you would just display it on site it should print OK, but if you need to work with it on the backend than just use html_entity_decode()
Try to save jQuery.noConflict(); as jquery-no-conflict.js. Then enqueue everything with proper dependencies: <?php function img_scripts_with_jquery() { wp_enqueue_script( ‘jquery-no-conflict’, ‘path/to/jquery-no-conflict.js’, array( ‘jquery’ ), ‘version’, true ); wp_enqueue_script( ‘aws-cba’, ‘https://images-na.ssl-images-amazon.com/images/G/01/cba/js/common/cba_shared.js’, array( ‘jquery-no-conflict’ ), ‘version’, true ); wp_enqueue_script( ‘aws-merchant-cart’, ‘https://images-na.ssl-images-amazon.com/images/G/01/cba/js/shoppingcart/merchant_cart.js’, array( ‘jquery-no-conflict’ ), ‘version’, true ); } add_action( ‘wp_enqueue_scripts’, ‘img_scripts_with_jquery’ );
That’s pretty simple, just use your website home url 🙂 After that, just fire an action when the page is loaded via POST HTTP method and hook with a callback. add_action( ‘wp_loaded’, function() { if ( $_SERVER[‘REQUEST_METHOD’] === ‘POST’ ) { // fire the custom action do_action(‘onchangeapi’, new PostListener($_POST)); } } ); And now the … Read more
I can’t speak to SOAP specifically, but I did build a plugin (private) for a client once that had to communicate with a proprietary third-party web service. In this case, it was a non-RESTful interface which used a mix of querystrings and XML POST requests for submitting queries (depending on the complexity of the type … Read more
I will give you a small answer to your update, doing this with the WP API. The API have the possibilities to use the WP_Query like also in core, but about the get parameters in the url. A URL to pull content from Post Status would look like this: http://example.com/wp-json/posts To pull content with WP_Query … Read more
I would abstract the specific SOAP library away, so you can add support for more clients later. Similar to how WP_Http is a proxy for multiple HTTP implementations, and chooses depending on the server capabilities. I must have played with some of these libraries before but I don’t remember which one. In general I prefer … Read more
You can use the oEmbed functionality baked into WordPress. Typically any video host on this list will return a thumbnail to you using oembed. Here is a list of default providers that WordPress uses for auto embedding in the content area. I’ve included non-video sources as well for the convenience of others. http://www.youtube.com/oembed http://blip.tv/oembed/ http://vimeo.com/api/oembed.xml … Read more