WordPress.org

Plugin Directory

Changeset 538817


Ignore:
Timestamp:
05/02/12 08:00:15 (2 years ago)
Author:
wet
Message:

WP 3.4 comp. Requires WP 2.8+

Location:
protein-shake-recipe-calculator/trunk
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • protein-shake-recipe-calculator/trunk/readme.txt

    r538438 r538817  
    11=== Protein Shake Recipe Calculator Widget === 
    22Contributors: wet 
    3 Tags: fitness, widget, widgets, sidebar, health, nutrition, abnehmen, gesundheit, shortcode, bodybuiling, recipe, rezept, protein, carbohydrate 
    4 Requires at least: 2.3 
     3Tags: fitness, widget, sidebar, health, nutrition,  shortcode, bodybuiling, protein, carbohydrate 
     4Requires at least: 2.8 
    55Tested up to: 3.4 
    66Stable tag: trunk 
     
    3939== Changelog == 
    4040 
     41= 1.3 = 
     42 
     431. WordPress 3.4 compatibility 
     44 
    4145= 1.2 = 
    4246 
  • protein-shake-recipe-calculator/trunk/wet_proteinshake-de_DE.po

    r367285 r538817  
    33"Project-Id-Version: wet_proteinshake\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2011-02-28 12:08+0100\n" 
    6 "PO-Revision-Date: \n" 
    7 "Last-Translator: Robert Wetzlmayr\n" 
     5"POT-Creation-Date: 2012-05-02 09:31+0200\n" 
     6"PO-Revision-Date: 2012-05-02 09:34+0100\n" 
     7"Last-Translator: \n" 
    88"Language-Team: \n" 
    99"MIME-Version: 1.0\n" 
     
    1111"Content-Transfer-Encoding: 8bit\n" 
    1212 
    13 #: wet_proteinshake.php:23 
    14 #: wet_proteinshake.php:31 
     13#: wet_proteinshake.php:22 
     14#: wet_proteinshake.php:30 
    1515msgid "Protein Shake Recipe" 
    1616msgstr "Protein-Shake-Rezept" 
    1717 
    18 #: wet_proteinshake.php:26 
     18#: wet_proteinshake.php:25 
    1919msgid "Allows the user to calculate her optimum post-workout protein shake recipe." 
    2020msgstr "Dient zur Berechnung des optimalen Post-Workout Protein-Shakes." 
    2121 
    22 #: wet_proteinshake.php:44 
     22#: wet_proteinshake.php:43 
    2323msgid "Calculate Your Protein Shake Recipe" 
    2424msgstr "Berechne dein Protein-Shake-Rezept" 
    25  
    26 msgid "US units:" 
    27 msgstr "US-Maße:" 
    28  
    29 msgid "Metric units:" 
    30 msgstr "Metrische Maße:" 
    3125 
    3226#: wet_proteinshake.php:44 
     
    3428msgstr "Berechnen" 
    3529 
    36 #: wet_proteinshake.php:53 
     30#: wet_proteinshake.php:60 
    3731msgid "Title:" 
    3832msgstr "Titel:" 
    3933 
    40 #: wet_proteinshake.php:55 
     34#: wet_proteinshake.php:62 
    4135msgid "Button Text:" 
    4236msgstr "Text der Schalftfläche:" 
    4337 
    44 #: wet_proteinshake.php:69 
     38#: wet_proteinshake.php:64 
     39msgid "Credit link:" 
     40msgstr "Link zur Quelle:" 
     41 
     42#: wet_proteinshake.php:66 
     43msgid "US units:" 
     44msgstr "US-Maße:" 
     45 
     46#: wet_proteinshake.php:68 
     47msgid "Metric units:" 
     48msgstr "Metrische Maße:" 
     49 
     50#: wet_proteinshake.php:84 
    4551msgid "Weight" 
    4652msgstr "Gewicht" 
    4753 
    48 #: wet_proteinshake.php:70 
     54#: wet_proteinshake.php:85 
    4955msgid "Carbohydrate" 
    5056msgstr "Kohlenhydrat" 
    5157 
    52 #: wet_proteinshake.php:71 
     58#: wet_proteinshake.php:86 
    5359msgid "Water" 
    5460msgstr "Wasser" 
    5561 
    56 #: wet_proteinshake.php:72 
     62#: wet_proteinshake.php:87 
    5763msgid "Protein" 
    5864msgstr "Protein" 
    5965 
    60 #: wet_proteinshake.php:73 
     66#: wet_proteinshake.php:88 
    6167msgid "Daily protein dose" 
    6268msgstr "Tägliche Proteinmenge" 
    6369 
    64 #: wet_proteinshake.php:76 
     70#: wet_proteinshake.php:95 
    6571msgid "." 
    6672msgstr "," 
     73 
     74#: wet_proteinshake.php:137 
     75msgid "This Widget requires Javascript" 
     76msgstr "Dieses Widget benötigt Javascript" 
     77 
     78#: wet_proteinshake.php:162 
     79msgid "by" 
     80msgstr "Von" 
     81 
     82#: wet_proteinshake.php:162 
     83msgid "Whey Protein Institut" 
     84msgstr "Whey Protein Institut" 
    6785 
    6886#~ msgid "Results in ounces:" 
  • protein-shake-recipe-calculator/trunk/wet_proteinshake-en_US.po

    r538438 r538817  
    33"Project-Id-Version: wet_protein\n" 
    44"Report-Msgid-Bugs-To: \n" 
    5 "POT-Creation-Date: 2011-02-28 12:08+0100\n" 
    6 "PO-Revision-Date: \n" 
    7 "Last-Translator: Robert Wetzlmayr\n" 
     5"POT-Creation-Date: 2012-05-02 09:31+0200\n" 
     6"PO-Revision-Date: 2012-05-02 09:35+0100\n" 
     7"Last-Translator: \n" 
    88"Language-Team: \n" 
    99"MIME-Version: 1.0\n" 
     
    1111"Content-Transfer-Encoding: 8bit\n" 
    1212 
    13 #: wet_proteinshake.php:23 
    14 #: wet_proteinshake.php:31 
     13#: wet_proteinshake.php:22 
     14#: wet_proteinshake.php:30 
    1515msgid "Protein Shake Recipe" 
    1616msgstr "Protein Shake Recipe" 
    1717 
    18 #: wet_proteinshake.php:26 
     18#: wet_proteinshake.php:25 
    1919msgid "Allows the user to calculate her optimum post-workout protein shake recipe." 
    2020msgstr "Allows the user to calculate her optimum post-workout protein shake recipe." 
    2121 
    22 #: wet_proteinshake.php:44 
     22#: wet_proteinshake.php:43 
    2323msgid "Calculate Your Protein Shake Recipe" 
    2424msgstr "Calculate Your Protein Shake Recipe" 
    25  
    26 msgid "US units:" 
    27 msgstr "US units:" 
    28  
    29 msgid "Metric units:" 
    30 msgstr "Metric units:" 
    3125 
    3226#: wet_proteinshake.php:44 
     
    3428msgstr "Calculate" 
    3529 
    36 #: wet_proteinshake.php:53 
     30#: wet_proteinshake.php:60 
    3731msgid "Title:" 
    3832msgstr "Title:" 
    3933 
    40 #: wet_proteinshake.php:55 
     34#: wet_proteinshake.php:62 
    4135msgid "Button Text:" 
    4236msgstr "Button Text:" 
    4337 
    44 #: wet_proteinshake.php:69 
     38#: wet_proteinshake.php:64 
     39msgid "Credit link:" 
     40msgstr "Credit link:" 
     41 
     42#: wet_proteinshake.php:66 
     43msgid "US units:" 
     44msgstr "US units:" 
     45 
     46#: wet_proteinshake.php:68 
     47msgid "Metric units:" 
     48msgstr "Metric units:" 
     49 
     50#: wet_proteinshake.php:84 
    4551msgid "Weight" 
    4652msgstr "Weight" 
    4753 
    48 #: wet_proteinshake.php:70 
     54#: wet_proteinshake.php:85 
    4955msgid "Carbohydrate" 
    5056msgstr "Carbohydrate" 
    5157 
    52 #: wet_proteinshake.php:71 
     58#: wet_proteinshake.php:86 
    5359msgid "Water" 
    5460msgstr "Water" 
    5561 
    56 #: wet_proteinshake.php:72 
     62#: wet_proteinshake.php:87 
    5763msgid "Protein" 
    5864msgstr "Protein" 
    5965 
    60 #: wet_proteinshake.php:73 
     66#: wet_proteinshake.php:88 
    6167msgid "Daily protein dose" 
    6268msgstr "Daily protein dose" 
    6369 
    64 #: wet_proteinshake.php:76 
     70#: wet_proteinshake.php:95 
    6571msgid "." 
    6672msgstr "." 
     73 
     74#: wet_proteinshake.php:137 
     75msgid "This Widget requires Javascript" 
     76msgstr "This Widget requires Javascript" 
     77 
     78#: wet_proteinshake.php:162 
     79msgid "by" 
     80msgstr "by" 
     81 
     82#: wet_proteinshake.php:162 
     83msgid "Whey Protein Institut" 
     84msgstr "Whey Protein Institute" 
    6785 
    6886#~ msgid "Results in ounces:" 
  • protein-shake-recipe-calculator/trunk/wet_proteinshake.php

    r487619 r538817  
    1313 
    1414    function init() { 
    15         // check for the required WP functions, die silently for pre-2.2 WP. 
    16         if (!function_exists('wp_register_sidebar_widget')) 
    17             return; 
     15        // check for the required WP functions, die silently for pre-2.8 WP. 
     16        if (!function_exists('esc_js')) return; 
    1817 
    1918        // load all l10n string upon entry 
     
    3029        // let WP know of this widget's controller entry 
    3130        wp_register_widget_control('wet_proteinshake', __('Protein Shake Recipe', 'wet_proteinshake'), array('wet_proteinshake', 'control'), 
    32             array('width' => 300) 
     31            array('width' => 400) 
    3332        ); 
    3433 
     
    4039    // back end options dialogue 
    4140    function control() { 
    42         $options = get_option('wet_proteinshake'); 
    43         if (!is_array($options)) 
    44             $options = array('title'=>__('Calculate Your Protein Shake Recipe', 'wet_proteinshake'), 'buttontext'=>__('Calculate'), 'useounces'=>FALSE); 
     41        $options = shortcode_atts( 
     42            array( 
     43                'title'     =>  __('Calculate Your Protein Shake Recipe', 'wet_bmicalc'), 
     44                'buttontext'=>  __('Calculate', 'wet_bmicalc'), 
     45                'useounces' =>  FALSE, 
     46                'infohref'  =>  'http://whey-proteine.org/' 
     47            ), 
     48            get_option('wet_proteinshake') 
     49        ); 
    4550        if ($_POST['wet_proteinshake-submit']) { 
    4651            $options['title'] = strip_tags(stripslashes($_POST['wet_proteinshake-title'])); 
    4752            $options['buttontext'] = strip_tags(stripslashes($_POST['wet_proteinshake-buttontext'])); 
    4853            $options['useounces'] = ($_POST['wet_proteinshake-useounces'] == 'us'); 
     54            $options['infohref'] = $_POST['wet_proteinshake-infohref']; 
     55 
    4956            update_option('wet_proteinshake', $options); 
    5057        } 
    51         $title = htmlspecialchars($options['title'], ENT_QUOTES); 
    52         $buttontext = htmlspecialchars($options['buttontext'], ENT_QUOTES); 
    53         $useounces = $options['useounces']; 
    5458 
    55         echo '<p style="text-align:right;"><label for="wet_proteinshake-title">' . __('Title:') . 
    56         ' <input style="width: 200px;" id="wet_proteinshake-title" name="wet_proteinshake-title" type="text" value="'.$title.'" /></label></p>'; 
    57         echo '<p style="text-align:right;"><label for="wet_proteinshake-buttontext">' .  __('Button Text:', 'widgets') . 
    58         ' <input style="width: 200px;" id="wet_proteinshake-buttontext" name="wet_proteinshake-buttontext" type="text" value="'.$buttontext.'" /></label></p>'; 
    59         echo '<p style="text-align:right;"><label for="wet_proteinshake-useounces">' .  __('US units:', 'wet_proteinshake') . 
    60         ' <input style="width: 20px;" id="wet_proteinshake-useounces" name="wet_proteinshake-useounces" value="us" type="radio"'.($useounces ? ' checked="checked"' : '').' /></label></p>'; 
    61         echo '<p style="text-align:right;"><label for="wet_proteinshake-usegrams">' .  __('Metric units:', 'wet_proteinshake') . 
    62         ' <input style="width: 20px;" id="wet_proteinshake-usegrams" name="wet_proteinshake-useounces" value="metric" type="radio"'.(!$useounces ? ' checked="checked"' : '').' /></label></p>'; 
    63         echo '<input type="hidden" id="wet_proteinshake-submit" name="wet_proteinshake-submit" value="1" />'; 
     59        echo 
     60        '<p style="text-align:right;"><label for="wet_proteinshake-title">' . __('Title:') . 
     61        ' <input style="width: 200px;" id="wet_proteinshake-title" name="wet_proteinshake-title" type="text" value="'.esc_html($options['title']).'" /></label></p>' . 
     62        '<p style="text-align:right;"><label for="wet_proteinshake-buttontext">' .  __('Button Text:', 'wet_proteinshake') . 
     63        ' <input style="width: 200px;" id="wet_proteinshake-buttontext" name="wet_proteinshake-buttontext" type="text" value="'.esc_html($options['buttontext']).'" /></label></p>' . 
     64        '<p style="text-align:right;"><label for="wet_proteinshake-infohref">' .  __('Credit link:', 'wet_proteinshake') . 
     65        ' <input style="width: 200px;" id="wet_proteinshake-infohref" name="wet_proteinshake-infohref" type="text" value="' .esc_url($options['infohref']). '" /></label></p>'. 
     66        '<p style="text-align:right;"><label for="wet_proteinshake-useounces">' .  __('US units:', 'wet_proteinshake') . 
     67        ' <input style="width: 20px;" id="wet_proteinshake-useounces" name="wet_proteinshake-useounces" value="us" type="radio"'.($options['useounces'] ? ' checked="checked"' : '').' /></label></p>' . 
     68        '<p style="text-align:right;"><label for="wet_proteinshake-usegrams">' .  __('Metric units:', 'wet_proteinshake') . 
     69        ' <input style="width: 20px;" id="wet_proteinshake-usegrams" name="wet_proteinshake-useounces" value="metric" type="radio"'.(!$options['useounces'] ? ' checked="checked"' : '').' /></label></p>' . 
     70        '<input type="hidden" id="wet_proteinshake-submit" name="wet_proteinshake-submit" value="1" />'; 
    6471    } 
    6572 
     
    6976        // get widget options 
    7077        $options = get_option('wet_proteinshake'); 
    71         $title = $options['title']; 
    72         $buttontext = $options['buttontext']; 
     78        $title = esc_js(esc_html($options['title'])); 
     79        $buttontext = esc_js(esc_html($options['buttontext'])); 
     80        $infohref = esc_url($options['infohref']); 
    7381        $useounces = ($options['useounces'] ? '1' : '0'); 
    7482 
     
    151159</form> 
    152160FORM; 
    153         $out[] = '<p style="text-align:right"><small>'.__('by').' <a href="http://whey-proteine.org/">Whey Protein Institut</a></small></p>'; 
     161        if (!empty($options['infohref'])) { 
     162            $out[] = '<p style="text-align:right"><small>'.__('by').' <a href="'.$infohref.'">'.__('Whey Protein Institut').'</a></small></p>'; 
     163        } 
    154164        $out[] = '</div>'; 
    155165        $out[] = $after_widget; 
Note: See TracChangeset for help on using the changeset viewer.