Core APIs

The WordPress Core Application Programming Interface (API) is comprised of several individual APIs, each one covering the functions involved in, and use of, a given set of functionality. Together, these form the project interface which allows plugins and themes to interact with, alter, and extend WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. functionality.

Why You Should Use The Core APIs

Using the core APIs when developing for WordPress is strongly encouraged because:

  • Core APIs make building things for WordPress easier by providing hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same., actions, filters, helper functions.
  • WordPress does the “heavy lifting” for you (database calls, input validation, security, form building) so you don’t have to.
  • Using core APIs ensures your code will be both backward-compatible and future-proof.
  • The APIs allow seamless integration into wp-adminadmin (and super admin) for pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the Plugin Directory or can be cost-based plugin from a third-party/theme options pages, inline help documentation, etc.

Top ↑

WordPress Core APIs

The following is an overview of the individual APIs that make up the WordPress Core APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.. More information on each API can be found on their respective Codex pages.

Top ↑

Dashboard Widgets API

The Dashboard Widgets API, added in WordPress 2.7, makes it very simple for plugin or theme authors to add new widgets to the admin dashboard. Widgets created using the API will automatically appear on the admin dashboard, will contain all the standard custom features including drag/drop, minimize, and configure, and appear in the screen options so users can hide them, if desired.

Top ↑

Database API

The Database API, added in WordPress 0.71, provides the correct method for accessing data as named values which are stored in the database layer.

Top ↑

File Header API

The File Header API, added in WordPress 1.5 and extended in WordPress 2.9 and 3.0, consists of functions and hooks regarding the use of file headers in themes and plugins, and provides the ability to pull metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.-information (Name, Version, Author, URI, Description, etc.) from those files.

Top ↑

Filesystem API

The Filesystem API, added in WordPress 2.6, was originally created for WordPress’ own automatic updates feature. The API abstracts out the functionality needed for reading and writing local files to the filesystem to be done securely, on a variety of host types, using the WP_Filesystem_Base class, and several sub-classes which implement different ways of connecting to the local filesystem, depending on individual host support.

Top ↑


The HTTP API, added in WordPress 2.7 and extended further in WordPress 2.8, standardizes the HTTPHTTP HTTP is an acronym for Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World Wide Web and this protocol defines how messages are formatted and transmitted, and what actions Web servers and browsers should take in response to various commands. requests for WordPress. The API handles cookies, gzip encoding and decoding, chunk decoding (if HTTP 1.1), and various other HTTP protocol implementations. The API standardizes requests, tests each method prior to sending, and, based on your server configuration, uses the appropriate method to make the request.

Top ↑

Metadata API

The Metadata API, added in WordPress 2.9, is a simple and standardized way for retrieving and manipulating metadata of various WordPress object types. Metadata for an object is a represented by a simple key-value pair. Objects may contain multiple metadata entries that share the same key, and differ only in their value.

Top ↑

Options API

The Options API, added in WordPress 1.0 and extended in versions 1.2 and 1.5, is a simple and standardized way of storing data in the database. The API makes it easy to create, access, update, and delete those options. All the data is being stored in the wp_options table under a given custom name.

Top ↑

Plugin API

The Plugin API, added in WordPress 1.5, allows for creating actions and filters in hooking functions and methods. The functions or methods will then be run when the action or filterFilter Filters are one of the two types of Hooks They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. is called. Hooks are provided by WordPress to allow your plugin to hook into the rest of WordPress; that is, to call functions in your plugin at specific times, and set your plugin in motion.

Top ↑

Quicktags API

The Quicktags API, added in WordPress 3.3, allows you to include additional buttons in the Text (HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers.) mode of the WordPress editor.

Top ↑

Rewrite API

The Rewrite API, added in WordPress 2.1, is used to manage the rewrite rules that allow you to use the Pretty Permalinks feature. It has several methods that generate the rewrite rules from values in the database. It is used internally when updating the rewrite rules, and also to find the URLURL A specific web address of a website or web page on the Internet, such as a website’s URL of a specific post, page, categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. archive, etc. It also allows theme and plugin developers to specify new, custom rewrite rules.

Top ↑

Settings API

The Settings API, added in WordPress 2.7, allows admin pages containing settings forms to be created and managed semi-automatically. It lets plugin and theme developers define settings pages, sections within those pages, and fields within the sections. New settings pages can be registered, and new settings sections or fields can be added to existing settings pages.

Top ↑

Shortcode API

The Shortcode API, added in WordPress 2.5, is a set of functions that create a simple hook used to pull in content. Using the API, plugin developers can create special kinds of content (e.g. forms, content generators, galleries, etc.) that users can add to posts or pages by inserting the corresponding [shortcodeShortcode A shortcode is a placeholder used within a WordPress post, page, or widget to insert a form or function generated by a plugin in a specific location on your site.] into the content.

Top ↑

Theme Modification API

The Theme Modification API, added in WordPress 2.1, consists of the functions and hooks related to the use of theme modification values. These functions can be used by theme authors to save and retrieve modifications to their themes as options.

Top ↑

Theme Customization API

The Theme Customization API, added in WordPress 3.4, allows theme developers to add custom options specific to their theme to the Theme Customization admin screen (aka Theme CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings.).

Top ↑

Transients API

The Transients API, added in WordPress 2.8, offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe, after which it will expire and be deleted. The Transients API is very similar to the Options API, but with the added feature of an expiration time, which simplifies the process of using the wp_options database table to temporarily store cached information.

Top ↑

Widgets API

The Widgets API, added in WordPress 2.8, allows developers to build custom widgets for use in sidebars and other widgetized areas of a theme. The API simplifies the widgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. creation process, and makes all widgets multiple instance capable.

Top ↑


The XML-RPC WordPress API, added in WordPress 1.5, allows other systems to connect to and communicate with WordPress, even remotely, including publishing clients (desktop and mobile), and other software that perform batch tasks like creating multiple posts from a file, etc.

Top ↑ API

There are also APIs available for the site:

  • Secret Key: Secret key and salt generator for wp-config.php.
  • Stats API: Stats about the systems websites are running WordPress on.
  • Version Check API: WordPress version checker.
  • Translations API: Provides information on available translations for plugins and themes.
  • Credits API: Details about the various individuals who contribute to the WordPress code base, which are used in the Credits screen in /wp-admin/.
  • Popular Import Plugin API: List of popular import plugins in the WordPress Plugin Directory, which is used by the Tools > Import screen in /wp-admin/.
  • Plugins API: Provides information on plugins hosted on The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization., and allows WordPress to check the repository for updates to those plugins.
  • Themes API: Provides information on themes hosted on, and allows WordPress to check the repository for updates to those themes.
  • Editor API: Used by the theme and plugin editor to get a reference to documentation generated with phpDocumentor..
  • Events API: Upcoming WordCamps and meetupMeetup All local/regional gatherings that are officially a part of the WordPress world but are not WordCamps are organized through A meetup is typically a chance for local WordPress users to get together and share new ideas and seek help from one another. Searching for ‘WordPress’ on will help you find options in your area. events, filterable by location.
  • Browse Happy API: Latest browser release matrix.
  • Serve Happy API: WordPress PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher version compatibility matrix.

Top ↑

Other Resources

  • The WordPress Settings API (WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what they’ve learned throughout the year and share the joy. Learn more. Sofia 2012) [Read] [Watch]

Last updated: