Tag Info

New answers tagged

0

You can use the template tag is_feed() to determine if the current request is for a feed: if ( is_feed() ) { // It's a feed! } else { // Regular 'ol WordPress } Note you'll need to use the function after the request has been parsed (i.e. on or after the parse_query hook).


1

Anything to do with using the Google Places API is going to be off-topic here, but the best place to start would be the developer docs. However, how you interact with the API data within WordPress is certainly on-topic. I would suggest a wrapper function that caches the results periodically: /** * Get places data for a post. * * @param int|WP_Post ...


0

Yes, Wordpress does provide Theme API function. I know the question is asked a year ago, but if you want it still, here's the solution. A brief explanation of usage of Theme API is given here: http://code.tutsplus.com/articles/interacting-with-wordpress-plug-in-theme-api--wp-25805 [Go to the Themes API section which is after half of the article] Along ...


1

If you want a more user-friendly URL structure, you could add a rewrite endpoint. This will add the rules for and intercept requests to /my-api/: function wpd_add_api_endpoint() { add_rewrite_endpoint( 'my-api', EP_ROOT ); } add_action( 'init', 'wpd_add_api_endpoint' ); function wpd_api_request( $request ){ if( isset( ...


0

Yes, init is good for this purpose. In codex is written: init is useful for intercepting $_GET or $_POST triggers.


1

Guys I found the answer. Well, after a lot of changes in codes, I finally did it through API. Through that PHP page, you can search in any plugin which exist in Wordpress Repository. Sorry, I cannot include the code because it's too long. Basically, I am just listing down in short what exactly I did. First of all I included a PHP cURL script through ...


0

You can not get "list of all" wordpress plugin from api.wordpress , this api is set to display information about single plugin when you pass it a plugin slug. To get list of all published wordpress plugins you can try this page http://plugins.svn.wordpress.org/ or You can scrape plugin slug from this page https://wordpress.org/plugins



Top 50 recent answers are included