Changeset 6717 for trunk/wp-admin/includes/widgets.php
- Timestamp:
- 02/04/2008 08:38:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/widgets.php
r6679 r6717 22 22 $already_shown = array(); 23 23 foreach ( $wp_registered_widgets as $name => $widget ) : 24 if ( in_array( $widget['callback'], $already_shown ) ) 24 if ( in_array( $widget['callback'], $already_shown ) ) // We already showed this multi-widget 25 25 continue; 26 $already_shown[] = $widget['callback'];27 26 28 27 if ( $search_terms ) { … … 53 52 54 53 if ( !$sidebar || false !== strpos( $widget_control_template, '%i%' ) ) { 54 $already_shown[] = $widget['callback']; // it's a multi-widget. We only need to show it in the list once. 55 55 $action = 'add'; 56 56 $add_url = wp_nonce_url( add_query_arg( array( … … 67 67 'key' => array_search( $widget['id'], $sidebars_widgets[$sidebar] ), 68 68 ) ); 69 $widget_control_template = "<textarea>$widget_control_template</textarea>";69 $widget_control_template = '<textarea>' . htmlspecialchars( $widget_control_template ) . '</textarea>'; 70 70 } 71 71
Note: See TracChangeset
for help on using the changeset viewer.