Changeset 6208 for widgets/trunk/gsearch.php
- Timestamp:
- 07/04/2006 02:22:03 AM (20 years ago)
- File:
-
- 1 edited
-
widgets/trunk/gsearch.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
widgets/trunk/gsearch.php
r5614 r6208 45 45 $options = get_option('widget_gsearch'); 46 46 if ( !is_array($options) ) 47 $options = array('title'=>'', 'buttontext'=> 'Google Search');47 $options = array('title'=>'', 'buttontext'=>__('Google Search', 'widgets')); 48 48 if ( $_POST['gsearch-submit'] ) { 49 49 … … 60 60 // Here is our little form segment. Notice that we don't need a 61 61 // complete form. This will be embedded into the existing form. 62 echo '<p style="text-align:right;"><label for="gsearch-title"> Title:<input style="width: 200px;" id="gsearch-title" name="gsearch-title" type="text" value="'.$title.'" /></label></p>';63 echo '<p style="text-align:right;"><label for="gsearch-buttontext"> Button Text:<input style="width: 200px;" id="gsearch-buttontext" name="gsearch-buttontext" type="text" value="'.$buttontext.'" /></label></p>';62 echo '<p style="text-align:right;"><label for="gsearch-title">' . __('Title:') . ' <input style="width: 200px;" id="gsearch-title" name="gsearch-title" type="text" value="'.$title.'" /></label></p>'; 63 echo '<p style="text-align:right;"><label for="gsearch-buttontext">' . __('Button Text:', 'widgets') . ' <input style="width: 200px;" id="gsearch-buttontext" name="gsearch-buttontext" type="text" value="'.$buttontext.'" /></label></p>'; 64 64 echo '<input type="hidden" id="gsearch-submit" name="gsearch-submit" value="1" />'; 65 65 } … … 67 67 // This registers our widget so it appears with the other available 68 68 // widgets and can be dragged and dropped into any active sidebars. 69 register_sidebar_widget( 'Google Search', 'widget_gsearch');69 register_sidebar_widget(array('Google Search', 'widgets'), 'widget_gsearch'); 70 70 71 71 // This registers our optional widget control form. Because of this 72 72 // our widget will have a button that reveals a 300x100 pixel form. 73 register_widget_control( 'Google Search', 'widget_gsearch_control', 300, 100);73 register_widget_control(array('Google Search', 'widgets'), 'widget_gsearch_control', 300, 100); 74 74 } 75 75
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)