WordPress/wp-includes/widgets.php
Drew Jaynes 31f52091ec Docs: Clarify the file header summary for wp-includes/widgets.php, the top-level file for the core Widgets API.
Also fixes some minor grammar issues in the file description.

See #33413. See #33701.

Built from https://develop.svn.wordpress.org/trunk@33872


git-svn-id: http://core.svn.wordpress.org/trunk@33840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-03 03:14:20 +00:00

101 lines
2.3 KiB
PHP

<?php
/**
* Core Widgets API
*
* This API is used for creating dynamic sidebar without hardcoding functionality into
* themes
*
* Includes both internal WordPress routines and theme-use routines.
*
* This functionality was found in a plugin before the WordPress 2.2 release, which
* included it in the core from that point on.
*
* @link https://codex.wordpress.org/Plugins/WordPress_Widgets WordPress Widgets
* @link https://codex.wordpress.org/Plugins/WordPress_Widgets_Api Widgets API
*
* @package WordPress
* @subpackage Widgets
* @since 2.2.0
*/
//
// Global Variables
//
/** @ignore */
global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates;
/**
* Stores the sidebars, since many themes can have more than one.
*
* @global array $wp_registered_sidebars
* @since 2.2.0
*/
$wp_registered_sidebars = array();
/**
* Stores the registered widgets.
*
* @global array $wp_registered_widgets
* @since 2.2.0
*/
$wp_registered_widgets = array();
/**
* Stores the registered widget control (options).
*
* @global array $wp_registered_widget_controls
* @since 2.2.0
*/
$wp_registered_widget_controls = array();
/**
* @global array $wp_registered_widget_updates
*/
$wp_registered_widget_updates = array();
/**
* Private
*
* @global array $_wp_sidebars_widgets
*/
$_wp_sidebars_widgets = array();
/**
* Private
*
* @global array $_wp_deprecated_widgets_callbacks
*/
$GLOBALS['_wp_deprecated_widgets_callbacks'] = array(
'wp_widget_pages',
'wp_widget_pages_control',
'wp_widget_calendar',
'wp_widget_calendar_control',
'wp_widget_archives',
'wp_widget_archives_control',
'wp_widget_links',
'wp_widget_meta',
'wp_widget_meta_control',
'wp_widget_search',
'wp_widget_recent_entries',
'wp_widget_recent_entries_control',
'wp_widget_tag_cloud',
'wp_widget_tag_cloud_control',
'wp_widget_categories',
'wp_widget_categories_control',
'wp_widget_text',
'wp_widget_text_control',
'wp_widget_rss',
'wp_widget_rss_control',
'wp_widget_recent_comments',
'wp_widget_recent_comments_control'
);
/** WP_Widget class */
require_once( ABSPATH . WPINC . '/class-wp-widget.php' );
/** WP_Widget_Factory class */
require_once( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
/** Core widgets functionality */
require_once( ABSPATH . WPINC . '/widget-functions.php' );