WordPress.org API

来自WordPress中文文档
跳转至: 导航搜索

WordPress.org API's is a set of API's on WordPress.org web site.

Secret Key

Secret key generator for wp-config.php.

Stats

Stats about the systems websites are running WordPress on.

Version Check

WordPress Version Checker.

Credits

Details about the various individuals who contribute to the WordPress code base. Used in Credits Screen. Available since WordPress 3.2, Locale may optionally be specified.

Translations

Available translations.

Themes

v1.0 will return its content in PHP serialized form, v1.1 as a JSON object.

Parameter:

tt$action/tt
(string) (required) Possible actions are:
  • query_themes - A a list of themes.
  • theme_information - Information about a specific theme.
  • hot_tags - List of the most popular theme tags.
  • feature_list - List of valid theme tags.
Default: Nonenoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

tt$request/tt
(array) (optional) Arguments to alter the output of this endpoint.
Default: emptynoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

The arguments outlined for each endpoint should be passed in the $request parameter.

List of Themes

Returns a list of themes with their associated information, as well as meta information about the request.

tt$action/tt
(string) (required) query_themes
Default: Nonenoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

Arguments:

ttpage/tt
(int) (optional)
Default: 1noinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

ttper_page/tt
(int) (optional) Amount of themes per page.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

ttbrowse/tt
(string) (optional) Predefined queries, disregarding all subsequent arguments. Possible values are:
  • popular - Themes ordered by popularity.
  • featured - Set of featured themes.
  • updated - Recently updated themes.
  • new - Latest themes.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

tttag/tt
(array|string) (optional) Filter to return themes with a specified tag or set of tags.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

ttsearch/tt
(string) (optional) Search query.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

tttheme/tt
(string) (optional) Slug of a specific theme to return.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

ttauthor/tt
(string) (optional) WordPress.org username of the author. Filter to return only themes authored by them.
Default: nullnoinclude

div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

Notes

This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

name
The name of the parameter.
datatype
The datatype that should be given for this parameter when called.
  • string
  • integer
  • boolean
  • mixed
description
A short description of the parameter.
importance
Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
  • required
  • optional
default
If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

wordpress.org.cn /div /noinclude

ttfields/tt
(array) (optional) Theme information to return. Associative array with field names as keys and a boolean whether to include that field or not, as value.
Default:
  • description - false
  • sections - false
  • rating - true
  • ratings - false
  • downloaded - true
  • downloadlink - true
  • last_updated - true
  • homepage - true
  • tags - true
  • template - true
  • parent - false
  • versions - false
  • screenshot_url - true
  • active_installs - false
  • noinclude

    div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

    Notes

    This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

    The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

    name
    The name of the parameter.
    datatype
    The datatype that should be given for this parameter when called.
    • string
    • integer
    • boolean
    • mixed
    description
    A short description of the parameter.
    importance
    Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
    • required
    • optional
    default
    If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

    wordpress.org.cn /div /noinclude

    Theme Information

    Returns information about a specific theme.

    tt$action/tt
    (string) (required) theme_information
    Default: Nonenoinclude

    div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

    Notes

    This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

    The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

    name
    The name of the parameter.
    datatype
    The datatype that should be given for this parameter when called.
    • string
    • integer
    • boolean
    • mixed
    description
    A short description of the parameter.
    importance
    Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
    • required
    • optional
    default
    If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

    wordpress.org.cn /div /noinclude

    Arguments:

    ttslug/tt
    (string) (null) Slug of a specific theme to return.
    Default: Nonenoinclude

    div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

    Notes

    This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

    The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

    name
    The name of the parameter.
    datatype
    The datatype that should be given for this parameter when called.
    • string
    • integer
    • boolean
    • mixed
    description
    A short description of the parameter.
    importance
    Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
    • required
    • optional
    default
    If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

    wordpress.org.cn /div /noinclude

    ttfields/tt
    (array) (optional) Theme information to return. Associative array with field names as keys and a boolean whether to include that field or not, as value.
    Default:
    • description - false
    • sections - false
    • rating - true
    • ratings - false
    • downloaded - true
    • downloadlink - true
    • last_updated - true
    • homepage - true
    • tags - true
    • template - true
    • parent - false
    • versions - false
    • screenshot_url - true
    • active_installs - false
    • noinclude

      div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

      Notes

      This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

      The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

      name
      The name of the parameter.
      datatype
      The datatype that should be given for this parameter when called.
      • string
      • integer
      • boolean
      • mixed
      description
      A short description of the parameter.
      importance
      Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
      • required
      • optional
      default
      If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

      wordpress.org.cn /div /noinclude

      Popular theme tags

      Returns a list of the most popular theme tags.

      tt$action/tt
      (string) (required) hot_tags
      Default: Nonenoinclude

      div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

      Notes

      This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

      The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

      name
      The name of the parameter.
      datatype
      The datatype that should be given for this parameter when called.
      • string
      • integer
      • boolean
      • mixed
      description
      A short description of the parameter.
      importance
      Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
      • required
      • optional
      default
      If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

      wordpress.org.cn /div /noinclude

      Arguments:

      ttnumber/tt
      (int) (optional) The amount of tags to return.
      Default: -1 (all tags)noinclude

      div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

      Notes

      This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

      The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

      name
      The name of the parameter.
      datatype
      The datatype that should be given for this parameter when called.
      • string
      • integer
      • boolean
      • mixed
      description
      A short description of the parameter.
      importance
      Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
      • required
      • optional
      default
      If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

      wordpress.org.cn /div /noinclude

      Feature list

      Returns a list of valid theme tags.

      tt$action/tt
      (string) (required) feature_list
      Default: Nonenoinclude

      div class=template-description style=padding: 0 1.5em; border: 1px solid #eeeeee; background-color: #f9f9f9

      Notes

      This template is for standardizing how parameters look in the Function Reference and in Template Tags. Here is an example of this template being called: prenowiki检查到模板循环:模板:Parameter/nowiki/pre 检查到模板循环:模板:Parameter

      The usage of this template is below: prenowiki检查到模板循环:模板:Parameter/nowiki/pre Let's take a closer look at the parameters..

      name
      The name of the parameter.
      datatype
      The datatype that should be given for this parameter when called.
      • string
      • integer
      • boolean
      • mixed
      description
      A short description of the parameter.
      importance
      Set this parameter to optional if the parameter is optional. Otherwise, do not declare this parameter—it defaults to required.
      • required
      • optional
      default
      If this parameter is optional, ttdefault/tt is the value that will be used if the parameter is not declared.

      wordpress.org.cn /div /noinclude

      Update Check

      Plugins

      Note: Some docs on this api can be found here: http://dd32.id.au/projects/wordpressorg-plugin-information-api-docs/

      Example: Basic Example of getting total download count of a plugin - http://wp.tutsplus.com/tutorials/plugins/communicating-with-the-wordpress-org-plugin-api/

      Popular Import Plugin

      List of popular import plugins in the WordPress Plugin Directory used by Tools → Import Screen.

      Checksum

      Returns a JSON encoded array of file MD5 checksums for a given WordPress release / locale. Although english is the default, it's suggested to pass it for 100% compatibility with core.

      Editor

      Used by the theme and plugin editor to get a reference to documentation generated with phpDocumentor.