Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WordPress.org API

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.

Version Stability

Check if a version of WordPress is latest, outdated, or insecure.

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.

Fallbacks are also supported, for example:

Themes

v1.0 will return its content in PHP serialized form, v1.1 and v.1.2 as JSON objects.

The major changes between 1.1 and 1.2 are:

  • Only accepts GET requests
  • The `request` keys can passed as parent keys
  • Greater number of fields are included by default (See source-code below)

The source-code behind this API is available here: https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

Parameter:

$action
(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: None
$request
(array) (optional) Arguments to alter the output of this endpoint.
Default: empty

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. It provides multiple filters to search: text string, feature tags, author, and provides some capability for sorting (popular, featured, updated, new).

$action
(string) (required) query_themes
Default: None

Example query: api.wordpress.org/themes/info/1.1/?action=query_themes&request[tag]=sticky-post&request[tag]=two-columns&request[search]=food&request[page]=2


Arguments:

search
(string) (optional) Textual search, using a free-form string.
Default: null
tag
(string) (optional) Filter to return themes with a specified tag or set of tags (pass an array of string).
Default: null
theme
(string) (optional) Slug of a specific theme to return.
Default: null
author
(string) (optional) WordPress.org username of the author. Filter to return only themes authored by them.
Default: null
page
(int) (optional) The page currently returned.
Default: 1
per_page
(int) (optional) Amount of themes returned per page.
Default: null (24)
browse
(string) (optional) Predefined query ordering. Possible values are:
  • (no value) - Query all themes by default order.
  • popular - Themes ordered by popularity.
  • featured - Set of featured themes.
  • updated - Recently updated themes.
  • new - Latest themes.
Default: null
fields
(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
  • download_link - true
  • last_updated - true
  • homepage - true
  • tags - true
  • template - true
  • parent - false
  • versions - false
  • screenshot_url - true
  • active_installs - false
  • Theme Information

    Returns information about a specific theme.

    $action
    (string) (required) theme_information
    Default: None

    Arguments:

    slug
    (string) (null) Slug of a specific theme to return.
    Default: None
    fields
    (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
    • download_link - true
    • last_updated - true
    • homepage - true
    • tags - true
    • template - true
    • parent - false
    • versions - false
    • screenshot_url - true
    • active_installs - false

    • Popular theme tags

      Returns a list of the most popular theme tags.

      $action
      (string) (required) hot_tags
      Default: None

      Arguments:

      number
      (int) (optional) The amount of tags to return.
      Default: -1 (all tags)

      Feature list

      Returns a list of valid theme tags.

      $action
      (string) (required) feature_list
      Default: None

      Update Check

      Plugins

      1.1 & 1.2

      The main difference is that 1.1 uses JSON by default, where as 1.0 used PHP Serialized by default. The 1.2 Info endpoints only accepts GET requests, and includes a different set of default fields - as used by WordPress 5.0+.

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

      Examples:

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

      A blog post about how to use the WordPress.org API to search for plugins and themes - https://orbisius.com/blog/use-wordpress-org-api-search-plugins-themes-p4477

      Block Patterns

      Patterns from the Block Pattern Directory. Also used in Gutenberg's Inserter control.


      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.

      Note that MD5 hashes are not cryptographically secure and should not be relied on to detect malicious changes to WordPress files.

      Editor

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

      Events

      Upcoming WordCamps and meetup events, filterable by location.

      The date and end_date fields in the response are in the event's local timezone, not UTC.


      Browse Happy

      Serve Happy