Plugin Directory

Changeset 989783


Ignore:
Timestamp:
09/15/2014 01:15:16 AM (12 years ago)
Author:
vendocrat
Message:

Fixed an error in widget class, added placement option to tooltips, updated language files.

Location:
woocommerce-payment-methods/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-payment-methods/trunk/classes/class-widget-payment-methods.php

    r988346 r989783  
    77 *
    88 * @since       2014-09-08
    9  * @version     2014-09-08
     9 * @version     2014-09-15
    1010 *
    1111 * @author      Poellmann Alexander Manfred <alex@vendocr.at>
     
    5252     *
    5353     * @since 2014-09-08
    54      * @version 2014-09-08
     54     * @version 2014-09-15
    5555     **************************************************/
    5656    public function widget( $args, $instance ) {
    5757        $title = apply_filters( 'widget_title', $instance['title'] );
    5858
    59         $tooltip = ($instance['tooltip'] != 'true') ? false : true;
    60         $style   = $instance['style'];
    61         $xclass  = $instance['xclass'];
     59        $style     = $instance['style'];
     60        $tooltip   = ($instance['tooltip'] != 'true') ? false : true;
     61        $placement = $instance['placement'];
     62        $xclass    = $instance['xclass'];
    6263
    63         echo $tooltip;
    6464        extract($args);
    6565
     
    8888     *
    8989     * @since 2014-09-08
    90      * @version 2014-09-08
     90     * @version 2014-09-15
    9191     **************************************************/
    9292    public function form( $instance ) {
     
    119119        </p>
    120120        <p>
     121            <label for="<?php echo $this->get_field_id( 'placement' ); ?>"><?php _e( 'Placement', 'vendocrat-payment-methods' ); ?>:</label>
     122            <select name="<?php echo $this->get_field_name( 'placement' ); ?>" class="widefat" id="<?php echo $this->get_field_id( 'placement' ); ?>">
     123                <option value="top"<?php selected( $instance['placement'], 'top' ); ?>><?php _e( 'Top', 'vendocrat-payment-methods' ); ?></option>
     124                <option value="right"<?php selected( $instance['placement'], 'right' ); ?>><?php _e( 'Right', 'vendocrat-payment-methods' ); ?></option>
     125                <option value="bottom"<?php selected( $instance['placement'], 'bottom' ); ?>><?php _e( 'Bottom', 'vendocrat-payment-methods' ); ?></option>
     126                <option value="left"<?php selected( $instance['placement'], 'left' ); ?>><?php _e( 'Left', 'vendocrat-payment-methods' ); ?></option>
     127            </select>
     128        </p>
     129        <p>
    121130            <label for="<?php echo $this->get_field_id('xclass'); ?>"><?php _e( 'Extra classes', 'vendocrat-payment-methods' ); ?>:</label>
    122131            <input class="widefat" id="<?php echo $this->get_field_id('xclass'); ?>" name="<?php echo $this->get_field_name('xclass'); ?>" type="text" value="<?php echo esc_attr( $instance['xclass'] ); ?>" />
     
    135144        $instance = $old_instance;
    136145
    137         $instance['title']   = strip_tags( $new_instance['title'] );
    138         $instance['style']   = esc_attr( $new_instance['style'] );
    139         $instance['tooltip'] = esc_attr( $new_instance['tooltip'] );
    140         $instance['xclass']  = esc_attr( $new_instance['xclass'] );
     146        $instance['title']     = strip_tags( $new_instance['title'] );
     147        $instance['style']     = esc_attr( $new_instance['style'] );
     148        $instance['tooltip']   = esc_attr( $new_instance['tooltip'] );
     149        $instance['placement'] = esc_attr( $new_instance['placement'] );
     150        $instance['xclass']    = esc_attr( $new_instance['xclass'] );
    141151
    142152        return $instance;
  • woocommerce-payment-methods/trunk/languages/de_AT.po

    r988346 r989783  
    22msgstr ""
    33"Project-Id-Version: WooCommerce Payment Methods\n"
    4 "POT-Creation-Date: 2014-09-08 01:40+0100\n"
    5 "PO-Revision-Date: 2014-09-08 01:44+0100\n"
     4"POT-Creation-Date: 2014-09-15 03:06+0100\n"
     5"PO-Revision-Date: 2014-09-15 03:07+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: vendocrat <hello@vendocr.at>\n"
     8"Language: de\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
     
    1314"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1415"X-Poedit-KeywordsList: __;_e\n"
    15 "Language: de\n"
    1616"X-Poedit-SearchPath-0: ..\n"
    1717
     
    6161
    6262#: ../classes/class-widget-payment-methods.php:121
     63msgid "Placement"
     64msgstr "Platzierung"
     65
     66#: ../classes/class-widget-payment-methods.php:123
     67msgid "Top"
     68msgstr "Oben"
     69
     70#: ../classes/class-widget-payment-methods.php:124
     71msgid "Right"
     72msgstr "Rechts"
     73
     74#: ../classes/class-widget-payment-methods.php:125
     75msgid "Bottom"
     76msgstr "Unten"
     77
     78#: ../classes/class-widget-payment-methods.php:126
     79msgid "Left"
     80msgstr "Links"
     81
     82#: ../classes/class-widget-payment-methods.php:130
    6383msgid "Extra classes"
    6484msgstr "Zusätzliche Klassen"
    6585
    66 #: ../payment-methods.php:220 ../payment-methods.php:260
    67 #: ../payment-methods.php:266 ../payment-methods.php:271
     86#: ../payment-methods.php:221 ../payment-methods.php:261
     87#: ../payment-methods.php:267 ../payment-methods.php:272
    6888msgid "Bank Transfer"
    6989msgstr "Bank-Überweisung"
    7090
    71 #: ../payment-methods.php:224
     91#: ../payment-methods.php:225
    7292msgid "Pay with Cheque"
    7393msgstr "Mit Scheck bezahlen"
    7494
    75 #: ../payment-methods.php:292
     95#: ../payment-methods.php:293
    7696msgid "Cash on Delivery"
    7797msgstr "Nachname"
  • woocommerce-payment-methods/trunk/languages/de_DE.po

    r988346 r989783  
    22msgstr ""
    33"Project-Id-Version: WooCommerce Payment Methods\n"
    4 "POT-Creation-Date: 2014-09-08 01:40+0100\n"
    5 "PO-Revision-Date: 2014-09-08 01:44+0100\n"
     4"POT-Creation-Date: 2014-09-15 03:06+0100\n"
     5"PO-Revision-Date: 2014-09-15 03:07+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: vendocrat <hello@vendocr.at>\n"
     8"Language: de\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
     
    1314"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1415"X-Poedit-KeywordsList: __;_e\n"
    15 "Language: de\n"
    1616"X-Poedit-SearchPath-0: ..\n"
    1717
     
    6161
    6262#: ../classes/class-widget-payment-methods.php:121
     63msgid "Placement"
     64msgstr "Platzierung"
     65
     66#: ../classes/class-widget-payment-methods.php:123
     67msgid "Top"
     68msgstr "Oben"
     69
     70#: ../classes/class-widget-payment-methods.php:124
     71msgid "Right"
     72msgstr "Rechts"
     73
     74#: ../classes/class-widget-payment-methods.php:125
     75msgid "Bottom"
     76msgstr "Unten"
     77
     78#: ../classes/class-widget-payment-methods.php:126
     79msgid "Left"
     80msgstr "Links"
     81
     82#: ../classes/class-widget-payment-methods.php:130
    6383msgid "Extra classes"
    6484msgstr "Zusätzliche Klassen"
    6585
    66 #: ../payment-methods.php:220 ../payment-methods.php:260
    67 #: ../payment-methods.php:266 ../payment-methods.php:271
     86#: ../payment-methods.php:221 ../payment-methods.php:261
     87#: ../payment-methods.php:267 ../payment-methods.php:272
    6888msgid "Bank Transfer"
    6989msgstr "Bank-Überweisung"
    7090
    71 #: ../payment-methods.php:224
     91#: ../payment-methods.php:225
    7292msgid "Pay with Cheque"
    7393msgstr "Mit Scheck bezahlen"
    7494
    75 #: ../payment-methods.php:292
     95#: ../payment-methods.php:293
    7696msgid "Cash on Delivery"
    7797msgstr "Nachname"
  • woocommerce-payment-methods/trunk/languages/it_IT.po

    r988346 r989783  
    22msgstr ""
    33"Project-Id-Version: WooCommerce Payment Methods\n"
    4 "POT-Creation-Date: 2014-09-08 01:40+0100\n"
    5 "PO-Revision-Date: 2014-09-08 02:12+0100\n"
     4"POT-Creation-Date: 2014-09-15 03:08+0100\n"
     5"PO-Revision-Date: 2014-09-15 03:10+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: vendocrat <hello@vendocr.at>\n"
     8"Language: it\n"
    89"MIME-Version: 1.0\n"
    910"Content-Type: text/plain; charset=UTF-8\n"
     
    1314"Plural-Forms: nplurals=2; plural=(n != 1);\n"
    1415"X-Poedit-KeywordsList: __;_e\n"
    15 "Language: it\n"
    1616"X-Poedit-SearchPath-0: ..\n"
    1717
     
    6161
    6262#: ../classes/class-widget-payment-methods.php:121
     63msgid "Placement"
     64msgstr "Posizione"
     65
     66#: ../classes/class-widget-payment-methods.php:123
     67msgid "Top"
     68msgstr "Sopra"
     69
     70#: ../classes/class-widget-payment-methods.php:124
     71msgid "Right"
     72msgstr "Destra"
     73
     74#: ../classes/class-widget-payment-methods.php:125
     75msgid "Bottom"
     76msgstr "Abbasso"
     77
     78#: ../classes/class-widget-payment-methods.php:126
     79msgid "Left"
     80msgstr "Sinistra"
     81
     82#: ../classes/class-widget-payment-methods.php:130
    6383msgid "Extra classes"
    6484msgstr "Classi extra"
    6585
    66 #: ../payment-methods.php:220 ../payment-methods.php:260
    67 #: ../payment-methods.php:266 ../payment-methods.php:271
     86#: ../payment-methods.php:221 ../payment-methods.php:261
     87#: ../payment-methods.php:267 ../payment-methods.php:272
    6888msgid "Bank Transfer"
    6989msgstr "Trasferimento bancario"
    7090
    71 #: ../payment-methods.php:224
     91#: ../payment-methods.php:225
    7292msgid "Pay with Cheque"
    7393msgstr "Paga con assegno"
    7494
    75 #: ../payment-methods.php:292
     95#: ../payment-methods.php:293
    7696msgid "Cash on Delivery"
    7797msgstr "Pagamento con contrassegno"
  • woocommerce-payment-methods/trunk/languages/woocommerce-payment-methods.pot

    r988346 r989783  
    22msgstr ""
    33"Project-Id-Version: WooCommerce Payment Methods\n"
    4 "POT-Creation-Date: 2014-09-08 01:40+0100\n"
    5 "PO-Revision-Date: 2014-09-08 01:40+0100\n"
     4"POT-Creation-Date: 2014-09-15 03:10+0100\n"
     5"PO-Revision-Date: 2014-09-15 03:10+0100\n"
    66"Last-Translator: \n"
    77"Language-Team: vendocrat <hello@vendocr.at>\n"
     
    6161
    6262#: ../classes/class-widget-payment-methods.php:121
     63msgid "Placement"
     64msgstr ""
     65
     66#: ../classes/class-widget-payment-methods.php:123
     67msgid "Top"
     68msgstr ""
     69
     70#: ../classes/class-widget-payment-methods.php:124
     71msgid "Right"
     72msgstr ""
     73
     74#: ../classes/class-widget-payment-methods.php:125
     75msgid "Bottom"
     76msgstr ""
     77
     78#: ../classes/class-widget-payment-methods.php:126
     79msgid "Left"
     80msgstr ""
     81
     82#: ../classes/class-widget-payment-methods.php:130
    6383msgid "Extra classes"
    6484msgstr ""
    6585
    66 #: ../payment-methods.php:220 ../payment-methods.php:260
    67 #: ../payment-methods.php:266 ../payment-methods.php:271
     86#: ../payment-methods.php:221 ../payment-methods.php:261
     87#: ../payment-methods.php:267 ../payment-methods.php:272
    6888msgid "Bank Transfer"
    6989msgstr ""
    7090
    71 #: ../payment-methods.php:224
     91#: ../payment-methods.php:225
    7292msgid "Pay with Cheque"
    7393msgstr ""
    7494
    75 #: ../payment-methods.php:292
     95#: ../payment-methods.php:293
    7696msgid "Cash on Delivery"
    7797msgstr ""
  • woocommerce-payment-methods/trunk/payment-methods.php

    r988387 r989783  
    44 * Plugin URI:  http://vendocr.at/
    55 * Description: <strong>Easily display your accepted payment methods from WooCommerce.</strong> Handcrafted with &hearts; by <a href='http://vendocr.at/'>vendocrat</a> in Vienna.
    6  * Version:     0.1.1
     6 * Version:     0.1.2
    77 * Author:      vendocrat
    88 * Author URI:  http://vendocr.at/
     
    129129     *
    130130     * @since 2014-09-07
    131      * @version 2014-09-08
     131     * @version 2014-09-15
    132132     **************************************************/
    133133    function get_payment_methods( $atts = array(), $content = null ) {
     
    135135            shortcode_atts(
    136136                array(
    137                     'methods' => array(),   // keys are the gateway slugs (lowercase) for the icon class, values are the title attributes
    138                     'style'   => 'default', // default, inverse, o/outline
    139                     'tooltip' => false,     // adds data attributes to icon to be used for diplaying tooltips (made for Bootstrap)
    140                     'xclass'  => false,     // add any extra classes, seperated by a space
     137                    'methods'   => array(),   // keys are the gateway slugs (lowercase) for the icon class, values are the title attributes
     138                    'style'     => 'default', // default, inverse, o/outline
     139                    'tooltip'   => false,     // adds data attributes to icon to be used for diplaying tooltips (made for Bootstrap)
     140                    'placement' => 'bottom',  // set tooltip placement (new since 0.1.2)
     141                    'xclass'    => false,     // add any extra classes, seperated by a space
    141142                ), $atts
    142143            )
     
    184185                    $icon.= ($class) ? ' class="'. esc_attr( trim($class) ) .'"' : '';
    185186                    $icon.= ($title) ? ' title="'. esc_attr( trim($title) ) .'"' : '';
    186                     $icon.= ($tooltip) ? ' data-toggle="tooltip" data-placement="bottom"' : '';
     187                    $icon.= ($tooltip AND $placement) ? ' data-toggle="tooltip" data-placement="'. $placement .'"' : '';
    187188                    $icon.= '></i>';
    188189                    break;
  • woocommerce-payment-methods/trunk/readme.txt

    r988392 r989783  
    55Requires at least: 3.5
    66Tested up to:      4.1
    7 Stable tag:        0.1.1
     7Stable tag:        0.1.2
    88License:           GNU General Public License v3.0
    99License URI:       http://www.gnu.org/licenses/gpl-3.0.html
     
    5656= 0.1.1 =
    5757Fixed wrong url and typo in readme, updated shortcode and screenshots.
     58
     59= 0.1.2 =
     60Fixed an error in widget class, added placement option to tooltips, updated language files.
Note: See TracChangeset for help on using the changeset viewer.