2007-04-23 21:05:17 -04:00
|
|
|
<?php
|
2008-09-18 21:41:18 -04:00
|
|
|
/**
|
2015-09-02 23:14:20 -04:00
|
|
|
* Core Widgets API
|
|
|
|
*
|
|
|
|
* This API is used for creating dynamic sidebar without hardcoding functionality into
|
2015-08-26 04:01:20 -04:00
|
|
|
* themes
|
|
|
|
*
|
2015-09-02 23:14:20 -04:00
|
|
|
* Includes both internal WordPress routines and theme-use routines.
|
2008-09-18 21:41:18 -04:00
|
|
|
*
|
2015-09-02 23:14:20 -04:00
|
|
|
* This functionality was found in a plugin before the WordPress 2.2 release, which
|
2008-09-18 21:41:18 -04:00
|
|
|
* included it in the core from that point on.
|
|
|
|
*
|
2015-04-12 17:29:32 -04:00
|
|
|
* @link https://codex.wordpress.org/Plugins/WordPress_Widgets WordPress Widgets
|
|
|
|
* @link https://codex.wordpress.org/Plugins/WordPress_Widgets_Api Widgets API
|
2008-09-18 21:41:18 -04:00
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Widgets
|
2015-09-02 23:14:20 -04:00
|
|
|
* @since 2.2.0
|
2008-09-18 21:41:18 -04:00
|
|
|
*/
|
2007-04-23 21:05:17 -04:00
|
|
|
|
2015-08-26 04:01:20 -04:00
|
|
|
//
|
|
|
|
// Global Variables
|
|
|
|
//
|
2009-03-19 18:10:18 -04:00
|
|
|
|
|
|
|
/** @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();
|
2015-05-28 12:20:25 -04:00
|
|
|
/**
|
|
|
|
* @global array $wp_registered_widget_updates
|
|
|
|
*/
|
2009-03-19 18:10:18 -04:00
|
|
|
$wp_registered_widget_updates = array();
|
|
|
|
|
2009-04-24 02:27:06 -04:00
|
|
|
/**
|
|
|
|
* Private
|
2015-05-28 12:20:25 -04:00
|
|
|
*
|
|
|
|
* @global array $_wp_sidebars_widgets
|
2009-04-24 02:27:06 -04:00
|
|
|
*/
|
|
|
|
$_wp_sidebars_widgets = array();
|
|
|
|
|
2009-05-29 12:32:20 -04:00
|
|
|
/**
|
|
|
|
* Private
|
2015-05-28 12:20:25 -04:00
|
|
|
*
|
|
|
|
* @global array $_wp_deprecated_widgets_callbacks
|
2009-05-29 12:32:20 -04:00
|
|
|
*/
|
2014-04-06 14:50:14 -04:00
|
|
|
$GLOBALS['_wp_deprecated_widgets_callbacks'] = array(
|
|
|
|
'wp_widget_pages',
|
2009-05-29 12:32:20 -04:00
|
|
|
'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'
|
2014-04-06 14:50:14 -04:00
|
|
|
);
|
2009-05-29 12:32:20 -04:00
|
|
|
|
2015-08-26 04:01:20 -04:00
|
|
|
/** WP_Widget class */
|
2015-08-25 22:40:23 -04:00
|
|
|
require_once( ABSPATH . WPINC . '/class-wp-widget.php' );
|
2015-08-26 04:01:20 -04:00
|
|
|
|
|
|
|
/** WP_Widget_Factory class */
|
2015-08-25 22:40:23 -04:00
|
|
|
require_once( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
|
2015-08-26 04:01:20 -04:00
|
|
|
|
|
|
|
/** Core widgets functionality */
|
|
|
|
require_once( ABSPATH . WPINC . '/widget-functions.php' );
|