這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Extended API over XMLRPC

描述

A WordPress plugin that allows access to the whole WP API via XML-RPC.

What does it do?

The full WP API is comprehensive, but most of it is only available to plugin code, not remotely. The official WP XML-RPC API is much smaller. This plugin opens up access to that full internal API remotely so that you can do whatever you want over XML-RPC.

Which methods does it allow me to call?

Anything in the WordPress Function Reference that your username has access to.

How do I use it?

First you should make sure that you have working code that can interact with the standard supported methods in the XML-RPC WordPress API. Once you do, you are ready to use this plugin. See also About WordPress XML-RPC Support.

Simply set the method name to wpext.callWpMethod, and then pass the WP API method name that you want to call as the first parameter, followed by any other parameters meeded by that method. Exactly how you do this depends upon the XML-RPC client library you are using in your code. So (for example), if you are currently using the XML-RPC API like this:

$xmlrpc_client->call('wp.getComment', 5);

then instead do this:

$xmlrpc_client->call('wpext.callWpMethod', 'wp_create_user', $new_username, $new_password, $new_email);

or

$xmlrpc_client->call('wpext.callWpMethod', 'wp_delete_user', $id_to_delete);

These examples are pseudo-code: they do not relate to a specific XML-RPC client.

Settings

There is only one, and that is the list of functions that should be allowed over XML-RPC. See Settings > Extended API in your dashboard to set it. To allow one additional function, simply set it to the name of that function:

wp_create_user

To specify multiple functions, separate with commas:

wp_create_user,wp_delete_user[,method3]...

To protect you from yourself, this setting comes with a dummy value that does not correspond to a real method. This is to force you to think about what methods you really need to enable. If you set this value to the empty string (blank), all methods are allowed.

Security

There are good reasons why the XML-RPC API only has limited methods. Think carefully about whether this plugin is right for your situation, and only enable the methods you really need.

螢幕截圖

  • Example code - how I use this plugin.

安裝

  1. Upload the plugin files to the /wp-content/plugins/plugin-name directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Use the Settings > Extended API screen to configure the plugin.

常見問題

Where are all the FAQs?

Nobody has asked any questions yet, so there are none that are frequently asked.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Extended API over XMLRPC” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Extended API over XMLRPC 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.9.9

  • Corrected plugin version so that everything matches *

0.9.8

  • Corrected plugin name

0.9.7

  • Put an actual plugin name in the readme

0.9.6

  • Handle methods that require a list of arguments instead of an array

0.9

  • Added missing settings screen
  • Removed namespace setting
  • Defaulted to disallowing all methods
  • Added documentation
  • Separated “not permitted” and “doesn’t exist” errors

0.5

  • Original version by Michael Grosser