Plugin Directory

Changeset 1040088


Ignore:
Timestamp:
12/08/2014 01:41:59 AM (11 years ago)
Author:
ulih
Message:

Version 2.2.2

Location:
woocommerce-poor-guys-swiss-knife
Files:
150 added
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-poor-guys-swiss-knife/trunk/classes/woocommerce-poor-guys-swiss-knife.php

    r1036794 r1040088  
    325325                endswitch;
    326326            endif;
    327             if ( $product->managing_stock() ) :
     327            if ( $product->managing_stock() && $product->product_type != 'variable' ) :
    328328                $hdl_backorder = $product->get_availability();
    329329                $options = get_option( 'wcpgsk_settings' );                 
    330                 if ( isset( $hdl_backorder ) && $hdl_backorder['class'] == 'available-on-backorder' && isset( $options['process']['backorderlabel'] ) && !empty( $options['process']['backorderlabel'] ) ) :
     330                if ( isset( $hdl_backorder ) && isset( $hdl_backorder['class'] ) && $hdl_backorder['class'] == 'available-on-backorder' && isset( $options['process']['backorderlabel'] ) && !empty( $options['process']['backorderlabel'] ) ) :
    331331                    $price = $price . '<div class="wcpgsk-extend-price-data">' . __( $options['process']['backorderlabel'], WCPGSK_DOMAIN ) . '</div>';
    332332                endif;
    333333            endif;
     334           
    334335            return $price;
    335336        }
     
    19161917                                <td>
    19171918                                    <span class="description"><?php _e('Use alternative presentation for time picker fields.', WCPGSK_DOMAIN); ?></span>
     1919                                </td>
     1920                            </tr>
     1921                           
     1922                            <tr>
     1923                                <td><?php _e('AM/PM for calendar style time picker', WCPGSK_DOMAIN); ?>:</td>
     1924                                <td>
     1925                                    <input name="wcpgsk_settings[checkoutform][caltimepicker]" type="hidden" value="0" />
     1926                                    <input name="wcpgsk_settings[checkoutform][caltimepicker]" type="checkbox" value="1" <?php if ( isset( $options['checkoutform']['caltimeampm'] ) && 1 == ($options['checkoutform']['caltimeampm'])) echo "checked='checked'"; ?> />
     1927                                </td>
     1928                                <td>
     1929                                    <span class="description"><?php _e('Activate AM/PM support for calendar style time picker.', WCPGSK_DOMAIN); ?></span>
    19181930                                </td>
    19191931                            </tr>
     
    23042316                </td>
    23052317            </tr>
     2318            <tr class="field_option">
     2319                <td class="label">
     2320                    <label><?php _e('Null value option text', WCRGSK_DOMAIN) ; ?></label>
     2321                    <p><?php _e('Specify text like "Please select an option..."', WCRGSK_DOMAIN) ; ?></p>
     2322                </td>
     2323                <td>
     2324                    <input type="text" for="wcpgsk_add_nulllabel" value="" />
     2325                </td>
     2326            </tr>           
    23062327            <tr class="field_option field_option_select">
    23072328                <td class="label">
     
    39233944                                break;
    39243945                            case 'options':
     3946                                $nulllabel = isset( $params['nulllabel'] ) ? $params['nulllabel'] : __( 'Select an option', WCRGSK_DOMAIN );
     3947                                $custom_attributes['data-placeholder'] = esc_attr( $nulllabel );
     3948                                $chosen_select = "";
     3949                                if ( get_option( 'woocommerce_enable_chosen' ) == 'yes' ) :
     3950                                    $chosen_select = "wcrgsk-chosen-select";
     3951                                    $class[] = $chosen_select;
     3952                                endif;
     3953                                if ( isset( $params['allow_null'] ) && $params['allow_null'] ) :
     3954                                    //data-nulloption                               
     3955                                    $seloptions[''] = empty( $chosen_select ) ? $nulllabel : '';                                   
     3956                                endif;
    39253957                               
    39263958                                foreach($value as $keyval => $option) {
     
    41094141                                break;
    41104142                            case 'options':
     4143                                $nulllabel = isset( $params['nulllabel'] ) ? $params['nulllabel'] : __( 'Select an option', WCRGSK_DOMAIN );
     4144                                $custom_attributes['data-placeholder'] = esc_attr( $nulllabel );
     4145                                $chosen_select = "";
     4146                                if ( get_option( 'woocommerce_enable_chosen' ) == 'yes' ) :
     4147                                    $chosen_select = "wcrgsk-chosen-select";
     4148                                    $class[] = $chosen_select;
     4149                                endif;
     4150                                if ( isset( $params['allow_null'] ) && $params['allow_null'] ) :
     4151                                    //data-nulloption                               
     4152                                    $seloptions[''] = empty( $chosen_select ) ? $nulllabel : '';                                   
     4153                                endif;
    41114154                               
    41124155                                foreach($value as $keyval => $option) {
     
    41154158                                break;
    41164159                            case 'selected':
     4160                           
    41174161                                if ( !empty($value) ) :
    41184162                                    foreach($value as $keyval => $option) {
     
    45344578                        'maxdate' => 450,
    45354579                        'caltimepicker' => 0,
     4580                        'caltimeampm' => 0,
    45364581                        'enabletooltips' => 1,
    45374582                        'enabletimesliders' => 1,
  • woocommerce-poor-guys-swiss-knife/trunk/readme.txt

    r1036794 r1040088  
    55Requires at least: Wordpress 3.1 and WooCommerce 2.0
    66Tested up to: 4.0
    7 Stable tag: 2.2.1
     7Stable tag: 2.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    303303== Changelog ==
    304304
     305= 2.2.2 =
     306
     307* Enhancement: Add AM/PM support for time picker fields
     308* Improve compatibility for WooCommerce Rich and Extra Guys
     309
    305310= 2.2.1 =
    306311
  • woocommerce-poor-guys-swiss-knife/trunk/wcpgsk-af.php

    r1035117 r1040088  
    882882                });
    883883            ';
    884             if ( isset( $options['checkoutform']['caltimepicker'] ) && 1 == $options['checkoutform']['caltimepicker'] ) :
     884            if ( isset( $options['checkoutform']['caltimepicker'] ) && 1 == $options['checkoutform']['caltimepicker'] ) :               
     885                $showLeadingZero = 'true';
     886                $showPeriod = 'false';
     887                $showPeriodLabels = 'false';
     888                if ( isset( $options['checkoutform']['caltimeampm'] ) && 1 == $options['checkoutform']['caltimeampm'] ) :
     889                    $showPeriod = 'true';
     890                    $showPeriodLabels = 'true';
     891                endif;
     892
    885893                echo '  jQuery("input[display=\'time\']").each(function() {
    886894                    var hMax = 23;
     
    893901                        minuteText: "' . __( 'Minute', WCPGSK_DOMAIN ) . '",                   
    894902                        hours: { starts: hMin, ends: hMax  },
    895                         minutes: { interval: parseInt(jQuery(this).attr("minutesteps")) },
     903                        minutes: { interval: parseInt(jQuery(this).attr("minutesteps")) },                     
    896904                        rows: ( parseInt(jQuery(this).attr("minutesteps")) < 5 ? 6 : ( parseInt(jQuery(this).attr("minutesteps")) < 10 ? 4 : 3 ) ),
    897                         showPeriodLabels: false,
     905                        showPeriod: ' . $showPeriod . ',
     906                        showLeadingZero: ' . $showLeadingZero . ',                     
     907                        showPeriodLabels: ' . $showPeriodLabels . ',
    898908                        closeButtonText: "' . __( 'Close', WCPGSK_DOMAIN ) . '",
    899909                        showCloseButton: true,
  • woocommerce-poor-guys-swiss-knife/trunk/woocommerce-poor-guys-swiss-knife.php

    r1036794 r1040088  
    88 * Author: Uli Hake
    99 * Author URI: http://takebarcelona.com/authorship/uli-hake
    10  * Version: 2.2.1
     10 * Version: 2.2.2
    1111 * @package WordPress
    1212 * @subpackage WooCommerce Poor Guys Swiss Knife
     
    121121        //load into our global
    122122        $wcpgsk = new WCPGSK_Main( __FILE__ );
    123         $wcpgsk->version = '2.2.1';
     123        $wcpgsk->version = '2.2.2';
    124124        $wcpgsk->wcpgsk_hook_woocommerce_filters();
    125125       
Note: See TracChangeset for help on using the changeset viewer.