Changeset 5360
- Timestamp:
- 05/01/2007 01:13:06 AM (18 years ago)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/wp-includes/default-filters.php
r5337 r5360 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); 176 177 add_action( 'plugins_loaded', 'wp_load_widgets', 0 ); 178 177 179 ?> -
branches/2.2/wp-includes/functions.php
r5289 r5360 1469 1469 } 1470 1470 1471 function wp_load_widgets() { 1472 require_once ABSPATH . WPINC . '/widgets.php'; 1473 } 1474 1471 1475 ?> -
branches/2.2/wp-includes/widgets.php
r5359 r5360 1 1 <?php 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 } 2 11 3 12 /* Global Variables */ 13 14 global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_styles, $wp_registered_widget_defaults; 4 15 5 16 $wp_registered_sidebars = array(); … … 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; … … 32 42 } 33 43 } 34 endif; 35 36 if ( !function_exists( 'register_sidebar' ) ): 44 37 45 function register_sidebar($args = array()) { 38 46 global $wp_registered_sidebars; … … 58 66 return $sidebar['id']; 59 67 } 60 endif; 61 62 if ( !function_exists( 'unregister_sidebar' ) ): 68 63 69 function unregister_sidebar( $name ) { 64 70 global $wp_registered_sidebars; … … 67 73 unset( $wp_registered_sidebars[$name] ); 68 74 } 69 endif; 70 71 if ( !function_exists( 'register_sidebar_widget' ) ): 75 72 76 function register_sidebar_widget($name, $output_callback, $classname = '', $id = '') { 73 77 global $wp_registered_widgets, $wp_register_widget_defaults; … … 101 105 $wp_registered_widgets[$id] = $widget; 102 106 } 103 endif; 104 105 if ( !function_exists( 'unregister_sidebar_widget' ) ): 107 106 108 function unregister_sidebar_widget($id) { 107 109 $id = sanitize_title($id); … … 109 111 unregister_widget_control($id); 110 112 } 111 endif; 112 113 if ( !function_exists( 'register_widget_control' ) ): 113 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; … … 143 143 ); 144 144 } 145 endif; 146 147 if ( !function_exists( 'unregister_widget_control' ) ): 145 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 154 if ( !function_exists( 'dynamic_sidebar' ) ): 150 155 151 function dynamic_sidebar($index = 1) { 156 152 global $wp_registered_sidebars, $wp_registered_widgets; … … 186 182 return $did_one; 187 183 } 188 endif; 189 190 if ( !function_exists( 'is_active_widget' ) ): 184 191 185 function is_active_widget($callback) { 192 186 global $wp_registered_widgets; … … 201 195 return false; 202 196 } 203 endif; 204 205 if ( !function_exists( 'is_dynamic_sidebar' ) ): 197 206 198 function is_dynamic_sidebar() { 207 199 global $wp_registered_widgets, $wp_registered_sidebars; … … 216 208 return false; 217 209 } 218 endif;219 210 220 211 /* Internal Functions */ … … 910 901 } 911 902 912 ?> 903 add_action('init', 'wp_widgets_init', 1); 904 905 ?> -
branches/2.2/wp-settings.php
r5337 r5360 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) { -
trunk/wp-includes/default-filters.php
r5336 r5360 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); 176 177 add_action( 'plugins_loaded', 'wp_load_widgets', 0 ); 178 177 179 ?> -
trunk/wp-includes/functions.php
r5308 r5360 1503 1503 } 1504 1504 1505 function wp_load_widgets() { 1506 require_once ABSPATH . WPINC . '/widgets.php'; 1507 } 1508 1505 1509 ?> -
trunk/wp-includes/widgets.php
r5358 r5360 1 1 <?php 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 } 2 11 3 12 /* Global Variables */ 13 14 global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_styles, $wp_registered_widget_defaults; 4 15 5 16 $wp_registered_sidebars = array(); … … 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; … … 32 42 } 33 43 } 34 endif; 35 36 if ( !function_exists( 'register_sidebar' ) ): 44 37 45 function register_sidebar($args = array()) { 38 46 global $wp_registered_sidebars; … … 58 66 return $sidebar['id']; 59 67 } 60 endif; 61 62 if ( !function_exists( 'unregister_sidebar' ) ): 68 63 69 function unregister_sidebar( $name ) { 64 70 global $wp_registered_sidebars; … … 67 73 unset( $wp_registered_sidebars[$name] ); 68 74 } 69 endif; 70 71 if ( !function_exists( 'register_sidebar_widget' ) ): 75 72 76 function register_sidebar_widget($name, $output_callback, $classname = '', $id = '') { 73 77 global $wp_registered_widgets, $wp_register_widget_defaults; … … 101 105 $wp_registered_widgets[$id] = $widget; 102 106 } 103 endif; 104 105 if ( !function_exists( 'unregister_sidebar_widget' ) ): 107 106 108 function unregister_sidebar_widget($id) { 107 109 $id = sanitize_title($id); … … 109 111 unregister_widget_control($id); 110 112 } 111 endif; 112 113 if ( !function_exists( 'register_widget_control' ) ): 113 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; … … 143 143 ); 144 144 } 145 endif; 146 147 if ( !function_exists( 'unregister_widget_control' ) ): 145 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 154 if ( !function_exists( 'dynamic_sidebar' ) ): 150 155 151 function dynamic_sidebar($index = 1) { 156 152 global $wp_registered_sidebars, $wp_registered_widgets; … … 186 182 return $did_one; 187 183 } 188 endif; 189 190 if ( !function_exists( 'is_active_widget' ) ): 184 191 185 function is_active_widget($callback) { 192 186 global $wp_registered_widgets; … … 201 195 return false; 202 196 } 203 endif; 204 205 if ( !function_exists( 'is_dynamic_sidebar' ) ): 197 206 198 function is_dynamic_sidebar() { 207 199 global $wp_registered_widgets, $wp_registered_sidebars; … … 216 208 return false; 217 209 } 218 endif;219 210 220 211 /* Internal Functions */ … … 910 901 } 911 902 912 ?> 903 add_action('init', 'wp_widgets_init', 1); 904 905 ?> -
trunk/wp-settings.php
r5336 r5360 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) {
Note: See TracChangeset
for help on using the changeset viewer.