mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Separate default widgets from widgets API. Always load API. fixes #9349
git-svn-id: http://svn.automattic.com/wordpress/trunk@10795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
64e36ff286
commit
48000c9225
1357
wp-includes/default-widgets.php
Normal file
1357
wp-includes/default-widgets.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -2614,11 +2614,11 @@ function wp_parse_args( $args, $defaults = '' ) {
|
|||||||
* @uses add_action() Calls '_admin_menu' hook with 'wp_widgets_add_menu' value.
|
* @uses add_action() Calls '_admin_menu' hook with 'wp_widgets_add_menu' value.
|
||||||
*/
|
*/
|
||||||
function wp_maybe_load_widgets() {
|
function wp_maybe_load_widgets() {
|
||||||
if ( !function_exists( 'dynamic_sidebar' ) ) {
|
if ( ! apply_filters('load_default_widgets', true) )
|
||||||
require_once( ABSPATH . WPINC . '/widgets.php' );
|
return;
|
||||||
|
require_once( ABSPATH . WPINC . '/default-widgets.php' );
|
||||||
add_action( '_admin_menu', 'wp_widgets_add_menu' );
|
add_action( '_admin_menu', 'wp_widgets_add_menu' );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append the Widgets menu to the themes main menu.
|
* Append the Widgets menu to the themes main menu.
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -327,6 +327,7 @@ require (ABSPATH . WPINC . '/canonical.php');
|
|||||||
require (ABSPATH . WPINC . '/shortcodes.php');
|
require (ABSPATH . WPINC . '/shortcodes.php');
|
||||||
require (ABSPATH . WPINC . '/media.php');
|
require (ABSPATH . WPINC . '/media.php');
|
||||||
require (ABSPATH . WPINC . '/http.php');
|
require (ABSPATH . WPINC . '/http.php');
|
||||||
|
require (ABSPATH . WPINC . '/widgets.php');
|
||||||
|
|
||||||
if ( !defined('WP_CONTENT_URL') )
|
if ( !defined('WP_CONTENT_URL') )
|
||||||
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
|
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
|
||||||
|
Loading…
Reference in New Issue
Block a user