Changeset 11308
- Timestamp:
- 05/12/2009 05:56:04 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r11229 r11308 80 80 /** 81 81 * PHP5 constructor 82 * widget_options: passed to wp_register_sidebar_widget() 83 * - description 82 * 83 * @param string $id_base Optional Base ID for the widget, lower case, 84 * if left empty a portion of the widget's class name will be used. Has to be unique. 85 * @param string $name Name for the widget displayed on the configuration page. 86 * @param array $widget_options Optional Passed to wp_register_sidebar_widget() 87 * - description: shown on the configuration page 84 88 * - classname 85 * control_options: passed to wp_register_widget_control()86 * - width 87 * - height 89 * @param array $control_options Optional Passed to wp_register_widget_control() 90 * - width: required if more than 250px 91 * - height: currently not used but may be needed in the future 88 92 */ 89 93 function __construct( $id_base = false, $name, $widget_options = array(), $control_options = array() ) { 90 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : $id_base;94 $this->id_base = empty($id_base) ? preg_replace( '/(wp_)?widget_/', '', strtolower(get_class($this)) ) : strtolower($id_base); 91 95 $this->name = $name; 92 96 $this->option_name = 'widget_' . $this->id_base; … … 95 99 } 96 100 97 /** Constructs name attributes for use in form() fields 101 /** 102 * Constructs name attributes for use in form() fields 98 103 * 99 104 * This function should be used in form() methods to create name attributes for fields to be saved by update() … … 106 111 } 107 112 108 /** Constructs id attributes for use in form() fields 113 /** 114 * Constructs id attributes for use in form() fields 109 115 * 110 116 * This function should be used in form() methods to create id attributes for fields to be saved by update()
Note: See TracChangeset
for help on using the changeset viewer.