Ticket #4169: move-stuff-around.diff
| File move-stuff-around.diff, 4.5 KB (added by , 19 years ago) |
|---|
-
wp-includes/default-filters.php
173 173 add_action('admin_print_scripts', 'wp_print_scripts', 20); 174 174 add_action('mce_options', '_mce_set_direction'); 175 175 add_action('init', 'smilies_init', 5); 176 add_action('init', 'wp_widgets_init', 1); 177 ?> 176 177 add_action( 'plugins_loaded', 'wp_load_widgets', 0 ); 178 179 ?> 180 No newline at end of file -
wp-includes/widgets.php
1 1 <?php 2 2 3 /* 4 Check if another widget plugin is active. If this is so, 5 then bail out. 6 */ 7 8 if ( function_exists( 'dynamic_sidebars' ) ) { 9 return; 10 } 11 3 12 /* Global Variables */ 4 13 14 global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_styles, $wp_registered_widget_defaults; 15 5 16 $wp_registered_sidebars = array(); 6 17 $wp_registered_widgets = array(); 7 18 $wp_registered_widget_controls = array(); … … 10 21 11 22 /* Template tags & API functions */ 12 23 13 if ( !function_exists( 'register_sidebars' ) ):14 24 function register_sidebars($number = 1, $args = array()) { 15 25 $number = (int) $number; 16 26 … … 31 41 ++$i; 32 42 } 33 43 } 34 endif;35 44 36 if ( !function_exists( 'register_sidebar' ) ):37 45 function register_sidebar($args = array()) { 38 46 global $wp_registered_sidebars; 39 47 … … 57 65 58 66 return $sidebar['id']; 59 67 } 60 endif;61 68 62 if ( !function_exists( 'unregister_sidebar' ) ):63 69 function unregister_sidebar( $name ) { 64 70 global $wp_registered_sidebars; 65 71 66 72 if ( isset( $wp_registered_sidebars[$name] ) ) 67 73 unset( $wp_registered_sidebars[$name] ); 68 74 } 69 endif;70 75 71 if ( !function_exists( 'register_sidebar_widget' ) ):72 76 function register_sidebar_widget($name, $output_callback, $classname = '', $id = '') { 73 77 global $wp_registered_widgets, $wp_register_widget_defaults; 74 78 … … 100 104 elseif ( is_callable($output_callback) && ( !isset($wp_registered_widgets[$id]) || !$wp_register_widget_defaults) ) 101 105 $wp_registered_widgets[$id] = $widget; 102 106 } 103 endif;104 107 105 if ( !function_exists( 'unregister_sidebar_widget' ) ):106 108 function unregister_sidebar_widget($id) { 107 109 $id = sanitize_title($id); 108 110 register_sidebar_widget('', '', '', $id); 109 111 unregister_widget_control($id); 110 112 } 111 endif;112 113 113 if ( !function_exists( 'register_widget_control' ) ):114 114 function register_widget_control($name, $control_callback, $width = 300, $height = 200, $id = '') { 115 115 global $wp_registered_widget_controls, $wp_register_widget_defaults; 116 116 … … 142 142 'params' => array_slice(func_get_args(), 5) 143 143 ); 144 144 } 145 endif;146 145 147 if ( !function_exists( 'unregister_widget_control' ) ):148 146 function unregister_widget_control($id) { 149 147 $id = sanitize_title($id); 150 148 return register_widget_control($id, ''); 151 149 } 152 endif;153 150 154 if ( !function_exists( 'dynamic_sidebar' ) ):155 151 function dynamic_sidebar($index = 1) { 156 152 global $wp_registered_sidebars, $wp_registered_widgets; 157 153 … … 185 181 186 182 return $did_one; 187 183 } 188 endif;189 184 190 if ( !function_exists( 'is_active_widget' ) ):191 185 function is_active_widget($callback) { 192 186 global $wp_registered_widgets; 193 187 … … 200 194 201 195 return false; 202 196 } 203 endif;204 197 205 if ( !function_exists( 'is_dynamic_sidebar' ) ):206 198 function is_dynamic_sidebar() { 207 199 global $wp_registered_widgets, $wp_registered_sidebars; 208 200 $sidebars_widgets = get_option('sidebars_widgets'); … … 215 207 } 216 208 return false; 217 209 } 218 endif;219 210 220 211 /* Internal Functions */ 221 212 … … 909 900 do_action('widgets_init'); 910 901 } 911 902 912 ?> 903 add_action('init', 'wp_widgets_init', 1); 904 905 ?> 906 No newline at end of file -
wp-includes/functions.php
1502 1502 endif; 1503 1503 } 1504 1504 1505 ?> 1505 function wp_load_widgets() { 1506 require_once ABSPATH . WPINC . '/widgets.php'; 1507 } 1508 1509 ?> 1510 No newline at end of file -
wp-settings.php
168 168 require (ABSPATH . WPINC . '/version.php'); 169 169 require (ABSPATH . WPINC . '/deprecated.php'); 170 170 require (ABSPATH . WPINC . '/script-loader.php'); 171 require (ABSPATH . WPINC . '/widgets.php');172 171 173 172 if (strpos($_SERVER['PHP_SELF'], 'install.php') === false) { 174 173 // Used to guarantee unique hash cookies
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)