Title: Core APIs
Author: kpdesign
Published: May 25, 2013
Last modified: August 20, 2021

---

# Core APIs

## In this article

 * [Why You Should Use The Core APIs](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#why-you-should-use-the-core-apis)
 * [WordPress Core APIs](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#wordpress-core-apis)
    - [Dashboard Widgets API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#dashboard-widgets-api)
    - [Database API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#database-api)
    - [File Header API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#file-header-api)
    - [Filesystem API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#filesystem-api)
    - [HTTP API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#http-api)
    - [Metadata API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#metadata-api)
    - [Options API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#options-api)
    - [Plugin API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#plugin-api)
    - [Quicktags API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#quicktags-api)
    - [Rewrite API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#rewrite-api)
    - [Settings API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#settings-api)
    - [Shortcode API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#shortcode-api)
    - [Theme Modification API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#theme-modification-api)
    - [Theme Customization API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#theme-customization-api)
    - [Transients API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#transients-api)
    - [Widgets API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#widgets-api)
    - [XML-RPC WordPress API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#xml-rpc-wordpress-api)
 * [WordPress.org API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#wordpress-org-api)
 * [Other Resources](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#other-resources)

The [WordPress Core Application Programming Interface (API)](https://codex.wordpress.org/WordPress_APIs)
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](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#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 WordPress.org Plugin Directory [https://wordpress.org/plugins/](https://wordpress.org/plugins/)
   or can be cost-based plugin from a third-party./theme options pages, inline help
   documentation, etc.

## 󠀁[WordPress Core APIs](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#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.

### 󠀁[Dashboard Widgets API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#dashboard-widgets-api)󠁿

The [Dashboard Widgets API](https://developer.wordpress.org/apis/handbook/dashboard-widgets/),
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.

### 󠀁[Database API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#database-api)󠁿

The [Database API](https://developer.wordpress.org/apis/handbook/database/), added
in WordPress 0.71, provides the correct method for accessing data as named values
which are stored in the database layer.

### 󠀁[File Header API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#file-header-api)󠁿

The [File Header API](https://codex.wordpress.org/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.

### 󠀁[Filesystem API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#filesystem-api)󠁿

The [Filesystem API](https://codex.wordpress.org/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.

### 󠀁[HTTP API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#http-api)󠁿

The [HTTP API](https://developer.wordpress.org/plugins/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.

### 󠀁[Metadata API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#metadata-api)󠁿

The [Metadata API](https://codex.wordpress.org/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.

### 󠀁[Options API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#options-api)󠁿

The [Options API](https://codex.wordpress.org/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.

### 󠀁[Plugin API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#plugin-api)󠁿

The [Plugin API](https://codex.wordpress.org/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 [https://codex.wordpress.org/Plugin_API/Hooks](https://codex.wordpress.org/Plugin_API/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.

### 󠀁[Quicktags API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#quicktags-api)󠁿

The [Quicktags API](https://codex.wordpress.org/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.

### 󠀁[Rewrite API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#rewrite-api)󠁿

The [Rewrite API](https://codex.wordpress.org/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 www.wordpress.org 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.

### 󠀁[Settings API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#settings-api)󠁿

The [Settings API](https://codex.wordpress.org/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.

### 󠀁[Shortcode API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#shortcode-api)󠁿

The [Shortcode API](https://codex.wordpress.org/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.

### 󠀁[Theme Modification API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#theme-modification-api)󠁿

The [Theme Modification API](https://codex.wordpress.org/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.

### 󠀁[Theme Customization API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#theme-customization-api)󠁿

The [Theme Customization API](https://codex.wordpress.org/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.).

### 󠀁[Transients API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#transients-api)󠁿

The [Transients API](https://developer.wordpress.org/apis/handbook/transients/),
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.

### 󠀁[Widgets API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#widgets-api)󠁿

The [Widgets API](https://codex.wordpress.org/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.

### 󠀁[XML-RPC WordPress API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#xml-rpc-wordpress-api)󠁿

The [XML-RPC WordPress API](https://codex.wordpress.org/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.

## 󠀁[WordPress.org API](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#wordpress-org-api)󠁿

There are also APIs available for the [WordPress.org site](https://codex.wordpress.org/WordPress.org_API):

 * **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 WordPress.orgWordPress.
   org 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.
   [https://wordpress.org/](https://wordpress.org/), and allows WordPress to check
   the repository for updates to those plugins.
 * **Themes API**: Provides information on themes hosted on WordPress.org, 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 [https://www.meetup.com/](https://www.meetup.com/). 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 meetup.com 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 7.4 or higher version compatibility
   matrix.

## 󠀁[Other Resources](https://make.wordpress.org/core/handbook/best-practices/core-apis/?output_format=md#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](https://central.wordcamp.org/about/).
   Sofia 2012) [[Read](http://kovshenin.com/2012/the-wordpress-settings-api/)] [
   [Watch](http://wordpress.tv/2012/10/31/konstantin-kovshenin-settings-api/)]

First published

May 25, 2013

Last updated

August 20, 2021

[  Previous: Browser support](https://make.wordpress.org/core/handbook/best-practices/browser-support/)

[  Next: Spelling](https://make.wordpress.org/core/handbook/best-practices/spelling/)