Plugin Directory


Ignore:
Timestamp:
07/04/2006 02:22:03 AM (20 years ago)
Author:
skeltoac
Message:

Merged patch from Sewar Jul 1 (#439)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • widgets/trunk/gsearch.php

    r5614 r6208  
    4545                $options = get_option('widget_gsearch');
    4646                if ( !is_array($options) )
    47                         $options = array('title'=>'', 'buttontext'=>'Google Search');
     47                        $options = array('title'=>'', 'buttontext'=>__('Google Search', 'widgets'));
    4848                if ( $_POST['gsearch-submit'] ) {
    4949
    … …  
    6060                // Here is our little form segment. Notice that we don't need a
    6161                // 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>';
    6464                echo '<input type="hidden" id="gsearch-submit" name="gsearch-submit" value="1" />';
    6565        }
    … …  
    6767        // This registers our widget so it appears with the other available
    6868        // 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');
    7070
    7171        // This registers our optional widget control form. Because of this
    7272        // 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);
    7474}
    7575
Note: See TracChangeset for help on using the changeset viewer.