Changeset 50953 for trunk/src/wp-includes/class-wp-widget.php
- Timestamp:
- 05/23/2021 08:50:44 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-widget.php
r49946 r50953 161 161 */ 162 162 public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) { 163 $this->id_base = empty( $id_base ) ? preg_replace( '/(wp_)?widget_/', '', strtolower( get_class( $this ) ) ) : strtolower( $id_base ); 163 if ( ! empty( $id_base ) ) { 164 $id_base = strtolower( $id_base ); 165 } else { 166 $id_base = preg_replace( '/(wp_)?widget_/', '', strtolower( get_class( $this ) ) ); 167 $id_base = str_replace( '\\', '-', $id_base ); 168 } 169 170 $this->id_base = $id_base; 164 171 $this->name = $name; 165 172 $this->option_name = 'widget_' . $this->id_base;
Note: See TracChangeset
for help on using the changeset viewer.