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