Changeset 30776
- Timestamp:
- 12/07/2014 08:10:37 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r30774 r30776 850 850 851 851 /** 852 * Register widget for use in sidebars.852 * Register an instance of a widget. 853 853 * 854 854 * The default widget option is 'classname' that can be overridden. 855 855 * 856 * The function can also be used to un-register widgets when $output_callback856 * The function can also be used to un-register widgets when `$output_callback` 857 857 * parameter is an empty string. 858 858 * 859 859 * @since 2.2.0 860 860 * 861 * @uses $wp_registered_widgets Uses stored registered widgets. 862 * @uses $wp_register_widget_defaults Retrieves widget defaults. 863 * 864 * @param int|string $id Widget ID. 865 * @param string $name Widget display title. 866 * @param callback $output_callback Run when widget is called. 867 * @param array|string $options Optional. Widget Options. 868 * @param mixed $params,... Widget parameters to add to widget. 869 * @return null Will return if $output_callback is empty after removing widget. 870 */ 871 function wp_register_sidebar_widget($id, $name, $output_callback, $options = array()) { 861 * @global array $wp_registered_widgets Uses stored registered widgets. 862 * @global array $wp_register_widget_defaults Retrieves widget defaults. 863 * 864 * @param int|string $id Widget ID. 865 * @param string $name Widget display title. 866 * @param callback $output_callback Run when widget is called. 867 * @param array $options { 868 * Optional. An array of supplementary widget options for the instance. 869 * 870 * @type string $classname Class name for the widget's HTML container. Default is a shortened 871 * version of the output callback name. 872 * @type string $description Widget description for display in the widget administration 873 * panel and/or theme. 874 * } 875 * @return null Will return if `$output_callback` is empty after removing widget. 876 */ 877 function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array() ) { 872 878 global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks; 873 879
Note: See TracChangeset
for help on using the changeset viewer.