2007-04-23 21:05:17 -04:00
|
|
|
<?php
|
2008-09-18 21:41:18 -04:00
|
|
|
/**
|
|
|
|
* API 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 WordPress 2.2 release which
|
|
|
|
* 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
|
|
|
|
*/
|
2007-04-23 21:05:17 -04:00
|
|
|
|
2009-03-19 18:10:18 -04:00
|
|
|
/* 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();
|
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-25 22:40:23 -04:00
|
|
|
require_once( ABSPATH . WPINC . '/class-wp-widget.php' );
|
|
|
|
require_once( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
|
|
|
|
require_once( ABSPATH . WPINC . '/widget-functions.php' );
|