An application programming interface (API) specifies how some software components should interact with each other. In addition to accessing databases or computer hardware, such as hard disk drives or video cards, an API can be used to ease the work of programming graphical user interface components. ...

learn more… | top users | synonyms

1
vote
1answer
541 views

How can I add an options page for my class based plugin?

I'm trying to use the new Settings API with a class based plugin to add a settings page. This is the code I have so far: class simple_sample_plugin{ function simple_sample_plugin() { ...
5
votes
2answers
336 views

WordPress.org API - Get plugin authors favorite plugins

There have been some recent additions to the WordPress.org plugin repository. Most notably the changes to the plugin page and the author profile page which now shows an authors favorite plugins. I ...
3
votes
1answer
2k views

[Plugin WPML] : How to create a translation of a post using the WPML API?

I'm trying to figure out how to create a translation for a post using the internal WPML API (inc/wpml-api.php) I simply want to create a translation for post ID xx, set some content and publish it. ...
1
vote
1answer
230 views

Exposing data using a custom Wordpress API

I'm attempting to create an API through Wordpress exposing some of my back-end data. I've come to the conclusion that I cannot have a stand alone page (plugin) exposing this data because Wordpress is ...
0
votes
2answers
362 views

Multiple sub directories for theme template pages

I apologize if this questions has already been answered, I have a feeling I'm just not using the right terminology for my search. I'm in the process of building a base theme for my employer. One of ...
0
votes
1answer
327 views

Plugin options will not save in database

I'm not sure what's happening here, since this has worked in another plugin I've created. I'm simply trying to store data in the options table. Here is the code I'm using: function on_myplugin_start ...
0
votes
1answer
338 views

how do I delete (not exclude) a menu item from navigation bar

I'm building a site's navigation bar programmatically, using the following code: wp_update_nav_menu_item($menu->term_id, 0, array( 'menu-item-title' => $page_data->post_title, ...
0
votes
1answer
362 views

get_pages and get_posts returning different data?

this is driving me crazy... I have an admin plugin page that lists pages for a wordpress website. I'm trying to list all the pages using get_pages() but for some reason once pages are published they ...
1
vote
1answer
1k views

How to create a drop down list with pages to a themes options page?

I'm building a themes options page using settings API. Everything is ok, but i now i want to create a drop down list populated with pages and i don't know how to! For example, i have this piece of ...
2
votes
1answer
313 views

What is the best way to move a plugin´s subdirectory+files to wp-content/uploads-directory?

I am developer of the plugin Leaflet Maps Marker (http://www.mapsmarker.com - "Pin, organize & show your favorite places through OpenStreetMap, OGD Vienna or any custom WMTS-map") and have one ...
0
votes
1answer
216 views

hybridauth (google OAuth integration) and WP problems

I'm trying to implement the script shown here: http://hybridauth.sourceforge.net/userguide/Integrating_HybridAuth_SignIn.html To allow people to sign in with Google to my site. However I am getting ...
1
vote
1answer
117 views

Custom Post-to-Post with multiple parents?

I currently have a custom post type of "Faculty" - each faculty can have zero or many custom post type "Bibliographies," and a bibliography can belong to one or more faculty. What is the best ...
1
vote
1answer
671 views

Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate

I've been asked to develop a website pretty much like (but not the same as): http://www.yoursingapore.com/ basically we need to allow people to add Wordpress posts (custom post types) into a sort of ...
12
votes
2answers
522 views

New WP_Customize API - how does it work under the hood?

I noticed that if you make changes trough the new "customize" feature, when you navigate on a different page within the iframe preview document, your changes still apply, even if they are unsaved. It ...
0
votes
1answer
237 views

Trying to integrate wordpress query on other website - getting redirection to wp-install

i'm trying to replace news system on my website with posts from wordpress site. I have main site in (example) /var/www/site and working Wordpress blog on /var/www/site/blog Tried to do that: ...
10
votes
2answers
4k views

Access WordPress API Outside of WordPress (command-line PHP)

I have a PHP script that I need to run as a cron job. However this script needs access to the WP API (get_pages(), get_post_meta() and get_permalink() specifically). I've followed the instructions ...
0
votes
1answer
240 views

term_exists returns NULL

According to the codex ( http://codex.wordpress.org/Function_Reference/term_exists ), term_exists returns some mixed results but not NULL. In my case, I'm getting NULL, what am I doing wrong? In ...
4
votes
2answers
1k views

What WordPress API function lists active/inactive plugins?

After seeing thousands of useful API functions in the WordPress core, I'm surprised to discover today that there ain't a function that would list the active plug-ins. I don't know you but I'm quite ...
2
votes
2answers
669 views

get post type plural

Currently I'm trying to get the post type labels plural. In detail: $GLOBALS['wp_post_types'][ get_current_screen()->post_type ]->labels->name This is how I'm trying to retrieve it - in ...
2
votes
3answers
1k views

How do I create a widget that only allows a single instance?

How do I create a widget that only allows a single instance of a widget to be added through the Wordpress interface? The default behaviour of widgets allows multiple instances to be added. I am ...
1
vote
1answer
106 views

Get the timout value of a saved transient?

Does anyone know if there is a Wordpress function to get the timeout value of a saved transient? I am using a transient with a 5 minute timeout to cache data from a web API call locally. Between ...
1
vote
1answer
1k views

POST to a REST API from a wordpress form

I dont want to use a REST API to publish to wordpress. I want to create a form on a wordpress page which will send a POST to an external REST API. Users will put in their information, and perhaps ...
1
vote
2answers
973 views

wp_localize_script escaping my url - fix or alternative

Here is my wp_enqueue_script and wp_localize_script - which i am using to run an Ajax call. wp_enqueue_script( 'function', plugin_dir_url( __FILE__ ) . 'function.js', array( 'jquery', 'json2' ) ); ...
1
vote
1answer
239 views

Sending WP posts to external API

What's the best method for sending all new Wordpress Posts to an external script on another server? It needs to include the full post information including the post content, so a simple ping is not ...
0
votes
2answers
246 views

Get Wordpress login functions without printing anything

I want to serve a dynamically-generated PDF with a "File Transfer" header header('Content-Description: File Transfer'); However, before I generate the document I need to verify the user's login ...
4
votes
2answers
1k views

How to use WP_Error $data argument?

The Call $error = new WP_Error( $code, $message, $data ); The Output Say I added three messages (msg A, msg B, msg C) to the code my_code and with the last message I added "Data" as $data, which ...
0
votes
2answers
225 views

What to hook into to check a value before a post is published?

My website is set up with pages as categories, meaning that if a user publishes without choosing a category, no one can see the post unless they know the specific address. What do I need to hook ...
0
votes
1answer
65 views

How do I query posts and have their related taxonomies returned in the results?

I have created a custom post type that contains television channel data. Each channel has its own post. I have also created a custom taxonomy of channel groups. What I want to do is query all the data ...
0
votes
1answer
38 views

Including content from legacy app: via plugin or custom content?

I am looking to integrate content that exist in a legacy system to a wordpress blog. The content can be accessed from the legacy system via SOAP. I have some PHP experience and some (limited) ...
0
votes
4answers
497 views

How to query WordPress from another application?

We're building an iOS app for BarbadosPropertyList.com. The iOS app needs to query the website and download recent listings data, including titles, datestamps, thumbnails and custom fields. We would ...
1
vote
1answer
47 views

Include default functions and methods

I'm starting a new service for a customer consisting in adding a input API in their WP website. I started by creating a blank page on the root but then I realized I couldn't access all methods and ...
2
votes
0answers
514 views

Wordpress JSON API Extend to Create Users [closed]

I have the JSON API Plugin installed on my wordpress blog and it works like a charm. However there is one functionality that i really need. A method called create_user which should take parameters ...
0
votes
1answer
370 views

get_option() fails to return binary result

For some reason, get_option() started to fail when returning binary results when I moved my website from localhost to the web server. I migrated my WordPress using an upload of the files on the FTP ...
1
vote
0answers
118 views

How to avoid directory name collisions with root Wordpress install [closed]

I need to know how I can keep the end-user of a wordpress site installed in the root directory from creating slugs that will interfere with sub-directories that are already present. I've Googled ...
0
votes
1answer
52 views

Widget internal hooks and functions

I am working on my 1st plugin, of some ideas to re-do the interface to how widget's are manage d and organized. Anyhow. I am struggling to get this information, either that or understand it. Create ...
0
votes
2answers
257 views

Encoding Method for URLs?

Is there a method or API that WordPress uses to encode the URLs similar to how it generates part of the URL when using the title in the URL? I am writing a plugin that generates URLs and would like to ...
0
votes
1answer
416 views

Add a new page to wordpress programmatically

Is there a function in the wordpress api that lets me programatically add pages ? something on the lines of : add_page($title,$content) Is there such a function ?
1
vote
1answer
683 views

Admin table list API?

wp-admin table lists - like post list Is there a API or something to build table lists in wp-admin? With table lists I mean like the list of posts for example. It has columns, sorting, paging and so ...
0
votes
2answers
292 views

Plugin is a widget, but I want to call it in the head, can I?

Full disclosure, PHP and Wordpress are not my specialties. I've got this plugin here -> http://wordpress.org/extend/plugins/ustream-status/ that adds a Widget that will show if my Ustream.tv channel ...
-1
votes
1answer
271 views

Integrating custom API for post content into Admin interface & Public Website [closed]

EDITED question to be more specific and added bounty in hopes someone has a solid coded solution: So, here is an interesting task I have been trying to find a solution for. I have added a bounty ...
2
votes
2answers
333 views

What is the official way to consume the Wordpress API? (api.wordpress.org)

Was wondering if anyone knows here if the API at api.wordpress.org is free to use without keys. I haven't really found any information about key registration. I'd like to use it to make a few ...
0
votes
2answers
1k views

Passing variables to new page

I'm trying to pass the variables to a new page, I made a function in my theme to get the results. Now when I use yelplist(); on the front page of my theme it gets the results and when i click on the ...
0
votes
2answers
281 views

Get paged category link programmatically

I want to get the link to a category (specified by id) but with a paged value (e.g. page 3 of category id 4). I was looking into get_category_link()Codex, but it only returns the link to the first ...
5
votes
2answers
1k views

How to store username and password to API in wordpress option DB?

I'm currently developing a plugin and the chances are that I will more than likely release it on the public plugin repository so others can use it. The plugin will be using an API and to use this API ...
2
votes
1answer
670 views

Custom routing for plugins

I am making a plugin that needs a page that can be accessed from the outside, pretty much like an API, and have the url like so, http://xxxxx/custom_method?parameter=xxxxx&something=xxxx is ...
1
vote
3answers
454 views

Possible to use wordpress as publishing platform but programmatically inject content?

I have user generated content that is created in a mobile app that is written to a SQL Database. I'd like to create a new site that allows this content to be viewed on a per user basis. So if I go ...
3
votes
2answers
729 views

Theme Options page with tabs

I have a theme that I'm developing from an HTML template I have. I'm also designing an options page along with a plethora of plugins built-into the theme itself. I've chosen a tabbed interface and I'm ...
1
vote
2answers
654 views

How to get title tag of an external page with http api?

What is the best method to retrieve the title tag of an external page using the http api? The snippet below will get the body but I can't find the right documentation about how to just get the tag. ...
0
votes
2answers
240 views

Use ColdFusion to pull in WP.com posts?

Is it possible to pull in Wordpress.com posts into an external site, in this instance, ColdFusion? Is there a REST API for it? If not, is there another solution to pull in content? Thanks!
1
vote
2answers
683 views

I Want to Get A Plugin Version Number Dynamically

Howdy, I recently cribbed W3TC to implement an "in-update" changelist display (very cool), in my plugin, but there's an awkward bit of code I'd prefer to avoid. If you look at the top of this file, ...