Plugin Directory

Changeset 1308754


Ignore:
Timestamp:
12/15/2015 05:43:47 AM (10 years ago)
Author:
jond
Message:

Added 1.3.10 release

Location:
shopp/trunk
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • shopp/trunk/Shopp.php

    r1122729 r1308754  
    44 * Plugin URI: http://shopplugin.com
    55 * Description: An ecommerce framework for WordPress.
    6  * Version: 1.3.9
     6 * Version: 1.3.10
    77 * Author: Ingenesis Limited
    88 * Author URI: http://ingenesis.net
    99 * Requires at least: 3.5
    10  * Tested up to: 4.1
     10 * Tested up to: 4.4
    1111 *
    1212 *    Portions created by Ingenesis Limited are Copyright © 2008-2014 by Ingenesis Limited
  • shopp/trunk/api/theme/customer.php

    r1122729 r1308754  
    17711771        $Address = self::AddressObject($options['address']);
    17721772        if ( ! property_exists($Address, $options['property']) ) $options['property'] = 'address';
    1773         $options['value'] = $Address->{$options['property']};
     1773        if ( ! isset($options['value']) ) $options['value'] = $Address->{$options['property']};
    17741774        extract($options, EXTR_SKIP);
    17751775
     
    18001800        $options['address'] = self::valid_address($options['address']);
    18011801        $Address = self::AddressObject($options['address']);
    1802         $options['value'] = $Address->country;
     1802        if ( ! isset($options['value']) ) $options['value'] = $Address->country;
    18031803        $options['selected'] = $options['value'];
    18041804        $options['id'] = "{$options['address']}-country";
     
    18511851        $options['address'] = self::valid_address($options['address']);
    18521852        $Address = self::AddressObject($options['address']);
    1853         $options['value'] = $Address->state;
     1853        if ( ! isset($options['value']) ) $options['value'] = $Address->state;
    18541854        $options['selected'] = $options['value'];
    18551855        $options['id'] = "{$options['address']}-state";
  • shopp/trunk/api/theme/storefront.php

    r1122729 r1308754  
    13891389
    13901390        if ( empty($tags) ) return false;
     1391       
     1392        if ( ! empty($exclude) ) {
     1393            $excludes = explode(',', $exclude);
     1394           
     1395            foreach ( $tags as $key => $tag ) {
     1396                if ( in_array($tag->name, $excludes) )
     1397                    unset($tags[ $key ]);
     1398            }   
     1399        }
    13911400
    13921401        $min = $max = false;
  • shopp/trunk/core/flow/Admin.php

    r1023860 r1308754  
    10981098            $screen = convert_to_screen( $screen );
    10991099
    1100         $this->_screen = $screen;
     1100        $this->screen = $this->_screen = $screen;
    11011101
    11021102        if ( !empty( $columns ) ) {
     
    11581158    }
    11591159
     1160    public function page_navigation ( $which ) {
     1161        return call_user_func_array( array( $this, 'pagination' ), func_get_args() );
     1162    }
     1163
    11601164}
  • shopp/trunk/core/flow/Order.php

    r1122729 r1308754  
    399399    public function auth ( $Purchase ) {
    400400
     401        add_action('shopp_authed_order_event', array($this, 'accounts'));
    401402        add_action('shopp_authed_order_event', array($this, 'notify'));
    402         add_action('shopp_authed_order_event', array($this, 'accounts'));
    403403        add_action('shopp_authed_order_event', array($this, 'success'));
    404404
     
    420420    public function sale ( $Purchase ) {
    421421
     422        add_action('shopp_captured_order_event', array($this, 'accounts'));
    422423        add_action('shopp_captured_order_event', array($this, 'notify'));
    423         add_action('shopp_captured_order_event', array($this, 'accounts'));
    424424        add_action('shopp_captured_order_event', array($this, 'success'));
    425425
     
    540540
    541541                add_action( 'shopp_order_event', array($Purchase, 'notifications') );
    542             } elseif ( 'voided' == $Purchase->txnstatus )
    543                 $this->invoice($Purchase); // Re-invoice cancelled orders that are still in-progress @see #1930
     542            } elseif ( 'voided' == $Purchase->txnstatus ) {
     543                $this->invoice($Purchase); // Re-invoice cancelled orders that are still in-progress @see #1930
     544            } elseif ( $Purchase->did('invoiced') ) {
     545                // Reset the order status to invoiced without invoicing it again @see #3301
     546                $Purchase->txnstatus = 'invoiced';
     547                $Purchase->save();
     548            }
    544549
    545550            $this->process($Purchase);
  • shopp/trunk/core/flow/Warehouse.php

    r1122729 r1308754  
    165165                    } break;
    166166            }
    167             wp_cache_delete( 'shopp_product_subcounts' );
     167
     168            // Gracefully invalidate Shopp object caching
     169            Shopp::cache_invalidate();
     170           
    168171            $redirect = add_query_arg( $_GET, $adminurl );
    169172            $redirect = remove_query_arg( array('action','selected','delete_all'), $redirect );
     
    172175
    173176        if ($duplicate) {
     177            // Gracefully invalidate Shopp object caching
     178            Shopp::cache_invalidate();
     179
    174180            $Product = new ShoppProduct($duplicate);
    175181            $Product->duplicate();
     
    189195
    190196        if ($save) {
    191             wp_cache_delete('shopp_product_subcounts');
     197
     198            // Gracefully invalidate Shopp object caching
     199            Shopp::cache_invalidate();
     200
    192201            $this->save($Shopp->Product);
    193202            $this->notice( sprintf(__('%s has been saved.','Shopp'),'<strong>'.stripslashes($Shopp->Product->name).'</strong>') );
     
    421430
    422431        // Get sub-screen counts
    423         $subcounts = wp_cache_get('shopp_product_subcounts','shopp_admin');
     432        $subcounts = Shopp::cache_get('shopp_product_subcounts','shopp_admin');
    424433        if ( $subcounts ) {
    425434            foreach ($subcounts as $name => $total)
     
    446455                $subcounts[ $name ] = $subquery['total'];
    447456            }
    448             wp_cache_set('shopp_product_subcounts', $subcounts, 'shopp_admin');
     457            Shopp::cache_set('shopp_product_subcounts', $subcounts, 'shopp_admin');
    449458        }
    450459
  • shopp/trunk/core/library/Core.php

    r1122729 r1308754  
    23212321
    23222322    }
     2323   
     2324    /**
     2325     * Keyed wrapper for wp_cache_set
     2326     *
     2327     * @author Clifton Griffin
     2328     * @since 1.4
     2329     *
     2330     * @param mixed $key
     2331     * @param mixed $data
     2332     * @param mixed $group (default: null)
     2333     * @param mixed $expire (default: null)
     2334     *
     2335     * @return True
     2336     */
     2337    public static function cache_set ( $key, $data, $group = null, $expire = null ) {
     2338        // Allows us to gracefully expire cache when required
     2339        $ns_key = wp_cache_get( 'shopp_cache_key' );
     2340
     2341        // If cache key doesn't exist, create it
     2342        if ( $ns_key === false ) {
     2343            $ns_key = 1;
     2344            wp_cache_set( 'shopp_cache_key', $ns_key );
     2345        }
     2346           
     2347        return wp_cache_set($key . $ns_key, $data, $group, $expire);
     2348    }
     2349   
     2350    /**
     2351     * Keyed wrapper for wp_cache_get function.
     2352     *
     2353     * @author Clifton Griffin
     2354     * @since 1.4
     2355     *
     2356     * @param mixed $key
     2357     * @param mixed $group (default: null)
     2358     * @param mixed $force (default: null)
     2359     * @param mixed $found (default: null)
     2360     *
     2361     * @return False on failure to retrieve contents or the cache contents on success
     2362     */
     2363    public static function cache_get ( $key, $group = null, $force = null, $found = null ) {
     2364        // Seed request for cache
     2365        $ns_key = wp_cache_get( 'shopp_cache_key' );
     2366       
     2367        return wp_cache_get( $key . $ns_key, $group, $force, $found );
     2368    }
     2369   
     2370    /**
     2371     * Increment the cache key to gracefully invalidate Shopp specific caches
     2372     *
     2373     * @author Clifton Griffin
     2374     * @since 1.4
     2375     *
     2376     * @return void
     2377     */
     2378    public static function cache_invalidate() {
     2379        wp_cache_incr( 'shopp_cache_key' );
     2380       
     2381        do_action('shopp_cache_invalidate');
     2382    }
    23232383
    23242384} // End abstract class ShoppCore
  • shopp/trunk/core/library/DB.php

    r1023860 r1308754  
    11651165
    11661166        // Update record
     1167        unset($data['id']);
    11671168        $dataset = ShoppDatabaseObject::dataset($data);
    11681169        sDB::query("UPDATE $this->_table SET $dataset WHERE $this->_key='$id'");
  • shopp/trunk/core/library/Lookup.php

    r1020997 r1308754  
    256256        $_['QA'] = array('name'=>__('Qatar','Shopp'),'currency'=>array('code'=>'QAR','format'=>'####,## ر.ق'),'units'=>'metric','region'=>4);
    257257        $_['RE'] = array('name'=>__('Réunion','Shopp'),'currency'=>array('code'=>'','format'=>'# ###,## €'),'units'=>'metric','region'=>5);
    258         $_['RO'] = array('name'=>__('Romania','Shopp'),'currency'=>array('code'=>'ROL','format'=>'#.###,## lei'),'units'=>'metric','region'=>3);
     258        $_['RO'] = array('name'=>__('Romania','Shopp'),'currency'=>array('code'=>'RON','format'=>'#.###,## lei'),'units'=>'metric','region'=>3);
    259259        $_['RU'] = array('name'=>__('Russia','Shopp'),'currency'=>array('code'=>'RUB','format'=>'# ###,## руб'),'units'=>'metric','region'=>6);
    260260        $_['RW'] = array('name'=>__('Rwanda','Shopp'),'currency'=>array('code'=>'RWF','format'=>'RF #.###'),'units'=>'metric','region'=>5);
     
    302302        $_['TT'] = array('name'=>__('Trinidad and Tobago','Shopp'),'currency'=>array('code'=>'TTD','format'=>'TT$#,###.##'),'units'=>'metric','region'=>2);
    303303        $_['TN'] = array('name'=>__('Tunisia','Shopp'),'currency'=>array('code'=>'TND','format'=>'####,### د.ت'),'units'=>'metric','region'=>5);
    304         $_['TR'] = array('name'=>__('Turkey','Shopp'),'currency'=>array('code'=>'TRL','format'=>'#.###,## TL'),'units'=>'metric','region'=>6);
     304        $_['TR'] = array('name'=>__('Turkey','Shopp'),'currency'=>array('code'=>'TRY','format'=>'#.###,## TL'),'units'=>'metric','region'=>6);
    305305        $_['TM'] = array('name'=>__('Turkmenistan','Shopp'),'currency'=>array('code'=>'TMT','format'=>'#,###.## m'),'units'=>'metric','region'=>6);
    306306        $_['TC'] = array('name'=>__('Turks and Caicos Islands','Shopp'),'currency'=>array('code'=>'USD','format'=>'$#,###.##'),'units'=>'metric','region'=>1);
     
    309309        $_['UA'] = array('name'=>__('Ukraine','Shopp'),'currency'=>array('code'=>'UAH','format'=>'# ###,## ₴'),'units'=>'metric','region'=>3);
    310310        $_['AE'] = array('name'=>__('United Arab Emirates','Shopp'),'currency'=>array('code'=>'AED','format'=>'Dhs. #,###.##'),'units'=>'metric','region'=>4);
    311         $_['UY'] = array('name'=>__('Uruguay','Shopp'),'currency'=>array('code'=>'UYP','format'=>'$#,###.##'),'units'=>'metric','region'=>2);
     311        $_['UY'] = array('name'=>__('Uruguay','Shopp'),'currency'=>array('code'=>'UYU','format'=>'$#,###.##'),'units'=>'metric','region'=>2);
    312312        $_['UZ'] = array('name'=>__('Uzbekistan','Shopp'),'currency'=>array('code'=>'UZS','format'=>'$#,###.##'),'units'=>'metric','region'=>6);
    313313        $_['VU'] = array('name'=>__('Vanuatu','Shopp'),'currency'=>array('code'=>'VUV','format'=>'$#,###.##'),'units'=>'metric','region'=>7);
    314314        $_['VA'] = array('name'=>__('Vatican City','Shopp'),'currency'=>array('code'=>'EUR','format'=>'€#,###.##'),'units'=>'metric','region'=>3);
    315315        $_['VN'] = array('name'=>__('Vietnam','Shopp'),'currency'=>array('code'=>'VND','format'=>'#.###,## ₫'),'units'=>'metric','region'=>6);
    316         $_['VE'] = array('name'=>__('Venezuela','Shopp'),'currency'=>array('code'=>'VUB','format'=>'Bs. #,###.##'),'units'=>'metric','region'=>2);
     316        $_['VE'] = array('name'=>__('Venezuela','Shopp'),'currency'=>array('code'=>'VEF','format'=>'Bs. #,###.##'),'units'=>'metric','region'=>2);
    317317        $_['WF'] = array('name'=>__('Wallis and Futuna','Shopp'),'currency'=>array('code'=>'XPF','format'=>'#,###.##F'),'units'=>'metric','region'=>7);
    318318        $_['EH'] = array('name'=>__('Western Sahara','Shopp'),'currency'=>array('code'=>'MAD','format'=>'#.###,## درهم'),'units'=>'metric','region'=>5);
  • shopp/trunk/core/library/Session.php

    r1122729 r1308754  
    6060        $this->trim(); // Cleanup stale sessions
    6161
    62         if ( $this->open() ) // Reopen an existing session
    63             add_action('shutdown', array($this, 'save')); // Save on shutdown
    64         else $this->cook(); // Cook a new session cookie
     62        if ( ! $this->open() ) // Reopen an existing session
     63            $this->cook(); // Cook a new session cookie
     64           
     65        add_action('shutdown', array($this, 'save')); // Save on shutdown
    6566
    6667        shopp_debug('Session started ' . str_repeat('-', 64));
  • shopp/trunk/core/library/Version.php

    r1122729 r1308754  
    2222
    2323    /** @type int PATCH The maintenance patch version number */
    24     const PATCH = 9;
     24    const PATCH = 10;
    2525
    2626    /** @type string PRERELEASE The prerelease designation (dev, beta, RC1) */
     
    2828
    2929    /** @type string CODENAME The release project code name */
    30     const CODENAME = 'Cydonia';
     30    const CODENAME = 'Ares';
    3131
    3232    /** @type int DB The database schema version */
  • shopp/trunk/core/model/Collection.php

    r1122729 r1308754  
    198198
    199199            $cachehash = 'collection_alphanav_' . md5($alphaquery);
    200             $cached = wp_cache_get($cachehash, 'shopp_collection');
     200            $cached = Shopp::cache_get($cachehash, 'shopp_collection_alphanav');
    201201            if ($cached) { // Load from object cache,  if available
    202202                $this->alpha = $cached;
     
    205205                $expire = apply_filters('shopp_collection_cache_expire', 43200);
    206206                $alpha = sDB::query($alphaquery, 'array', array($this, 'alphatable'));
    207                 wp_cache_set($cachehash, $alpha, 'shopp_collection_alphanav');
     207
     208                Shopp::cache_set($cachehash, $alpha, 'shopp_collection_alphanav', $expire);
    208209            }
    209210
     
    222223        // Load from cached results if available, or run the query and cache the results
    223224        $cachehash = 'collection_' . md5($query);
    224         $cached = wp_cache_get($cachehash, 'shopp_collection');
     225        $cached = Shopp::cache_get($cachehash, 'shopp_collection');
    225226        if ( $cached ) {
    226227            $this->products = $cached->products;
     
    240241            if ($limited && false === strpos($limit, ',')) $cache->total = $this->total = min($limit, $this->total);
    241242
    242             wp_cache_set($cachehash,$cache,'shopp_collection');
     243            Shopp::cache_set($cachehash,$cache,'shopp_collection', $expire);
    243244        }
    244245        if ( false === $this->products ) $this->products = array();
     
    783784    }
    784785
     786    public function filter( $filter ) {
     787        sanitize_term( $this, $this->taxon, $filter );
     788    }
     789
    785790}
    786791
     
    956961        // Support cache accelleration
    957962        $cachehash = 'collection_facet_' . md5($query);
    958         $cached = wp_cache_get($cachehash, 'shopp_collection_facet');
     963        $cached = Shopp::cache_get($cachehash, 'shopp_collection_facet');
    959964        if ( $cached ) $set = $cached;
    960965        else {
    961966            $set = sDB::query($query, 'array', 'col', 'parent');
    962             wp_cache_set($cachehash, $set, 'shopp_collection_facet');
     967            Shopp::cache_set($cachehash, $set, 'shopp_collection_facet');
    963968        }
    964969
     
    20982103
    20992104        $cachehash = 'alsobought_' . md5($query);
    2100         $cached = wp_cache_get($cachehash, 'shopp_collection_alsobought');
     2105        $cached = Shopp::cache_get($cachehash, 'shopp_collection_alsobought');
    21012106        if ( $cached ) $matches = $cached;
    21022107        else {
    21032108            $matches = sDB::query($query, 'array', 'col', 'p2');
    2104             wp_cache_set($cachehash, $matches, 'shopp_collection_alsobought');
     2109            Shopp::cache_set($cachehash, $matches, 'shopp_collection_alsobought', 14400); //Expires in 4 hours
    21052110        }
    21062111
  • shopp/trunk/core/model/Item.php

    r1122729 r1308754  
    664664     **/
    665665    public function instock ( $qty = false ) {
    666         if ( ! shopp_setting_enabled('inventory') ) return true;
     666        if ( ! shopp_setting_enabled('inventory') || shopp_setting_enabled('backorders') ) return true;
    667667
    668668        if ( ! $this->inventory ) {
  • shopp/trunk/core/model/Product.php

    r1122729 r1308754  
    107107        if ( empty($this->id)) return;
    108108        do_action('save_post', $this->id, get_post($this->id));
     109        if( function_exists('clean_post_cache') )
     110            clean_post_cache($this->id);
    109111    }
    110112
     
    10291031        $id = $this->id;
    10301032        if (empty($id)) return false;
    1031 
     1033       
     1034        if ( false === has_action('shopp_product_delete',array($this,'deletepost')))
     1035            add_action('shopp_product_delete',array($this,'deletepost'));
     1036        do_action_ref_array('shopp_product_delete',array($this));
     1037       
    10321038        // Delete assignment to taxonomies (categories, tags, custom taxonomies)
    10331039        wp_delete_object_term_relationships($id, get_object_taxonomies(ShoppProduct::$posttype));
     
    10691075
    10701076    }
     1077   
     1078    /**
     1079     * Provides compatibility with other plugins that handle custom post types
     1080     *
     1081     * @author Jonathan Davis
     1082     * @since 1.2
     1083     *
     1084     * @return void
     1085     **/
     1086    public function deletepost () {
     1087        if ( empty($this->id)) return;
     1088        do_action('delete_post', $this->id);
     1089        if( function_exists('clean_post_cache') )
     1090            clean_post_cache($this->id);
     1091    }
    10711092
    10721093    /**
     
    10811102        $id = $this->{$this->_key};
    10821103        sDB::query("UPDATE $this->_table SET post_status='trash' WHERE ID='$id'");
     1104        if ( false === has_action('shopp_product_trashed',array($this,'trashpost')))
     1105            add_action('shopp_product_trashed',array($this,'trashpost'));
     1106        do_action_ref_array('shopp_product_trashed',array($this));
     1107    }
     1108   
     1109    /**
     1110     * Provides compatibility with other plugins that handle custom post types
     1111     *
     1112     * @author Jonathan Davis
     1113     * @since 1.2
     1114     *
     1115     * @return void
     1116     **/
     1117    public function trashpost () {
     1118        if ( empty($this->id)) return;
     1119        do_action('wp_trash_post', $this->id);
     1120        if( function_exists('clean_post_cache') )
     1121            clean_post_cache($this->id);
    10831122    }
    10841123
     
    12211260
    12221261        foreach ( $ids as $id ) { // Recount taxonomy counts #2968
    1223             $laststatus = get_post_status($id);
    1224             $Post = new StdClass;
    1225             $Post->ID = $id;
    1226             $Post->post_type = ShoppProduct::$posttype;
    1227             wp_transition_post_status($status, $laststatus, $Post);
     1262            $Post = get_post($id);
     1263            switch ($status) {
     1264                case 'trash':
     1265                    do_action('wp_trash_post', $id);
     1266                    break;
     1267                default:
     1268                    do_action('save_post', $id, $Post);
     1269                    break;
     1270            }
     1271            if( function_exists('clean_post_cache') )
     1272                clean_post_cache($id);
     1273           
     1274            wp_transition_post_status($status, $Product->status, $Post);
    12281275        }
    12291276
  • shopp/trunk/core/model/Purchase.php

    r1122729 r1308754  
    319319        $Purchase = $Event->order();
    320320        if ( ! $Purchase->stocked ) return true; // no inventory in purchase
    321 
     321       
    322322        $prices = array();
    323323        $allocated = array();
     
    374374
    375375        $Event->unstocked($allocated);
     376       
     377        // If out of stock products should be hidden from catalog,
     378        // go ahead and invalidate the cache after unstock
     379        if ( ! Shopp::str_true( shopp_setting('outofstock_catalog') ) )
     380            Shopp::cache_invalidate();
    376381    }
    377382
  • shopp/trunk/core/ui/behaviors/address.js

    r1122729 r1308754  
    5656            $(this).attr('data-last', $(this).val());
    5757        };
    58 
    59     // Handle changes to the firstname and lastname fields
    60     $('#firstname,#lastname').each(keepLastValue).change(function () {
    61         var namefield = $(this); // Reference to the modified field
    62             lastfirstname = $('#firstname').attr('data-last'),
    63             lastlastname = $('#lastname').attr('data-last'),
    64             firstlast = ( ( $('#firstname').val() ).trim() + " " + ( $('#lastname').val() ).trim() ).trim();
    65 
    66             namefield.val( (namefield.val()).trim() );
    67 
    68         // Update the billing name and shipping name
    69         $('#billing-name,#shipping-name').each(function() {
    70             var value = $(this).val();
    71 
    72             if ( value.trim().length == 0 ) {
    73                 // Empty billing or shipping name
    74                 $('#billing-name,#shipping-name').val(firstlast);
    75             } else if ( '' != value && ( $('#firstname').val() == value || $('#lastname').val() == value ) ) {
    76                 // Only one name entered (so far), add the other name
    77                 $(this).val(firstlast);
    78             } else if ( 'firstname' == namefield.attr('id') && value.indexOf(lastlastname) != -1 ) {
    79                 // firstname changed & last lastname matched
    80                 $(this).val( value.replace(lastfirstname, namefield.val()).trim() );
    81             } else if ( 'lastname' == namefield.attr('id') && value.indexOf(lastfirstname) != -1 ) {
    82                 // lastname changed & last firstname matched
    83                 $(this).val( value.replace(lastlastname, namefield.val()).trim() );
    84             }
    85 
    86         });
    87 
    88     }).change(keepLastValue);
     58   
     59    // When first and last name are changed, pre-fill billing name and shipping name if empty
     60    $('#firstname,#lastname').change( function() {
     61        // If other name field is empty, bail
     62        var other_field_id = $(this).attr('id') == 'firstname' ? 'lastname' : 'firstname';
     63        if ( ! $('#' + other_field_id).val().trim() || ! $(this).val().trim() ) return;
     64       
     65        // Otherwise, proceed with setting billing and shipping name
     66        $('#billing-name,#shipping-name').filter(function() {
     67                return ( this.value === '' );
     68        }).val(new String($('#firstname').val()+" "+$('#lastname').val()).trim());
     69    } );
    8970
    9071    // Update state/province
  • shopp/trunk/core/ui/behaviors/address.min.js

    r1122729 r1308754  
    44 * Licensed under the GPLv3 {@see license.txt}
    55 */
    6 (function($){jQuery.fn.upstate=function(){if(typeof regions==="undefined"){return}$(this).change(function(e,init){var $this=$(this),prefix=$this.attr("id").split("-")[0],country=$this.val(),state=$this.parents().find("#"+prefix+"-state"),menu=$this.parents().find("#"+prefix+"-state-menu"),options='<option value=""></option>';if(menu.length==0){return true}if(menu.hasClass("hidden")){menu.removeClass("hidden").hide()}if(regions[country]||(init&&menu.find("option").length>1)){state.setDisabled(true).addClass("_important").hide();if(regions[country]){$.each(regions[country],function(value,label){options+='<option value="'+value+'">'+label+"</option>"});if(!init){menu.empty().append(options).setDisabled(false).show().focus()}if(menu.hasClass("auto-required")){menu.addClass("required")}}else{if(menu.hasClass("auto-required")){menu.removeClass("required")}}menu.setDisabled(false).show();$("label[for="+state.attr("id")+"]").attr("for",menu.attr("id"))}else{menu.empty().setDisabled(true).hide();state.setDisabled(false).show().removeClass("_important");$("label[for="+menu.attr("id")+"]").attr("for",state.attr("id"));if(!init){state.val("").focus()}}}).trigger("change",[true]);return $(this)}})(jQuery);jQuery(document).ready(function($){var sameaddr=$(".sameaddress"),shipFields=$("#shipping-address-fields"),billFields=$("#billing-address-fields"),keepLastValue=function(){$(this).attr("data-last",$(this).val())};$("#firstname,#lastname").each(keepLastValue).change(function(){var namefield=$(this);lastfirstname=$("#firstname").attr("data-last"),lastlastname=$("#lastname").attr("data-last"),firstlast=(($("#firstname").val()).trim()+" "+($("#lastname").val()).trim()).trim();namefield.val((namefield.val()).trim());$("#billing-name,#shipping-name").each(function(){var value=$(this).val();if(value.trim().length==0){$("#billing-name,#shipping-name").val(firstlast)}else{if(""!=value&&($("#firstname").val()==value||$("#lastname").val()==value)){$(this).val(firstlast)}else{if("firstname"==namefield.attr("id")&&value.indexOf(lastlastname)!=-1){$(this).val(value.replace(lastfirstname,namefield.val()).trim())}else{if("lastname"==namefield.attr("id")&&value.indexOf(lastfirstname)!=-1){$(this).val(value.replace(lastlastname,namefield.val()).trim())}}}}})}).change(keepLastValue);$("#billing-country,#shipping-country").upstate();sameaddr.change(function(e,init){var refocus=false,bc=$("#billing-country"),sc=$("#shipping-country"),prime="billing"==sameaddr.val()?shipFields:billFields,alt="shipping"==sameaddr.val()?shipFields:billFields;if(sameaddr.is(":checked")){prime.removeClass("half");alt.hide().find(".required").setDisabled(true)}else{prime.addClass("half");alt.show().find(".disabled:not(._important)").setDisabled(false);if(!init){refocus=true}}if(bc.is(":visible")){bc.trigger("change.localemenu",[init])}if(sc.is(":visible")){sc.trigger("change.localemenu",[init])}if(refocus){alt.find("input:first").focus()}}).trigger("change",[true]).click(function(){$(this).change()})});
     6(function(b){jQuery.fn.upstate=function(){if("undefined"!==typeof regions)return b(this).change(function(g,e){var a=b(this),h=a.attr("id").split("-")[0],d=a.val(),c=a.parents().find("#"+h+"-state"),a=a.parents().find("#"+h+"-state-menu"),f='<option value=""></option>';if(0==a.length)return!0;a.hasClass("hidden")&&a.removeClass("hidden").hide();regions[d]||e&&1<a.find("option").length?(c.setDisabled(!0).addClass("_important").hide(),regions[d]?(b.each(regions[d],function(b,a){f+='<option value="'+
     7b+'">'+a+"</option>"}),e||a.empty().append(f).setDisabled(!1).show().focus(),a.hasClass("auto-required")&&a.addClass("required")):a.hasClass("auto-required")&&a.removeClass("required"),a.setDisabled(!1).show(),b("label[for="+c.attr("id")+"]").attr("for",a.attr("id"))):(a.empty().setDisabled(!0).hide(),c.setDisabled(!1).show().removeClass("_important"),b("label[for="+a.attr("id")+"]").attr("for",c.attr("id")),e||c.val("").focus())}).trigger("change",[!0]),b(this)}})(jQuery);
     8jQuery(document).ready(function(b){var g=b(".sameaddress"),e=b("#shipping-address-fields"),a=b("#billing-address-fields");b("#firstname,#lastname").change(function(){var a="firstname"==b(this).attr("id")?"lastname":"firstname";b("#"+a).val().trim()&&b(this).val().trim()&&b("#billing-name,#shipping-name").filter(function(){return""===this.value}).val((new String(b("#firstname").val()+" "+b("#lastname").val())).trim())});b("#billing-country,#shipping-country").upstate();g.change(function(h,d){var c=
     9!1,f=b("#billing-country"),l=b("#shipping-country"),m="billing"==g.val()?e:a,k="shipping"==g.val()?e:a;g.is(":checked")?(m.removeClass("half"),k.hide().find(".required").setDisabled(!0)):(m.addClass("half"),k.show().find(".disabled:not(._important)").setDisabled(!1),d||(c=!0));f.is(":visible")&&f.trigger("change.localemenu",[d]);l.is(":visible")&&l.trigger("change.localemenu",[d]);c&&k.find("input:first").focus()}).trigger("change",[!0]).click(function(){b(this).change()})});
  • shopp/trunk/core/ui/categories/categories.php

    r831831 r1308754  
    2727        </div>
    2828
    29         <?php $ListTable->pagination( 'top' ); ?>
     29        <?php $ListTable->page_navigation( 'top' ); ?>
    3030    </div>
    3131
     
    135135    </table>
    136136    </form>
    137     <div class="tablenav"><?php $ListTable->pagination( 'bottom' ); ?></div>
     137    <div class="tablenav"><?php $ListTable->page_navigation( 'bottom' ); ?></div>
    138138</div>
    139139
  • shopp/trunk/core/ui/customers/customers.php

    r821385 r1308754  
    3434            </div>
    3535
    36             <?php $ListTable->pagination('top'); ?>
     36            <?php $ListTable->page_navigation('top'); ?>
    3737        <div class="clear"></div>
    3838    </div>
     
    108108        <?php endif; ?>
    109109
    110         <?php $ListTable->pagination('bottom'); ?>
     110        <?php $ListTable->page_navigation('bottom'); ?>
    111111
    112112        <div class="clear"></div>
  • shopp/trunk/core/ui/discounts/discounts.php

    r821385 r1308754  
    3939        </div>
    4040
    41         <?php $ListTable->pagination('top'); ?>
     41        <?php $ListTable->page_navigation('top'); ?>
    4242        <div class="clear"></div>
    4343    </div>
     
    107107    </form>
    108108    <div class="tablenav">
    109         <?php $ListTable->pagination('bottom'); ?>
     109        <?php $ListTable->page_navigation('bottom'); ?>
    110110        <div class="clear"></div>
    111111    </div>
  • shopp/trunk/core/ui/orders/order.php

    r1122729 r1308754  
    188188                                                    $Image = reset($Product->images);
    189189
    190                                                     if ( ! empty($Image) ) { 
     190                                                    if ( ! empty($Image) ) {
    191191                                                        $image_id = apply_filters('shopp_order_item_image_id', $Image->id, $Item, $Product); ?>
    192192                                                        <img src="?siid=<?php echo $image_id ?>&amp;<?php echo $Image->resizing(38, 0, 1) ?>" width="38" height="38" class="alignleft" />
    193193                                                    <?php
    194194                                                    }
    195                                                     echo apply_filters('shopp_purchased_item_name', $itemname); ?>
     195                                                    echo apply_filters('shopp_purchased_item_name', $itemname, $Item); ?>
    196196                                                </a>
    197197                                                <div class="row-actions">
  • shopp/trunk/core/ui/orders/orders.php

    r1122729 r1308754  
    4747        </div>
    4848
    49             <?php $ListTable->pagination('top'); ?>
     49            <?php $ListTable->page_navigation('top'); ?>
    5050
    5151        <div class="clear"></div>
  • shopp/trunk/core/ui/products/inventory.php

    r1020997 r1308754  
    2727        </div>
    2828
    29         <?php $ListTable->pagination('top'); ?>
     29        <?php $ListTable->page_navigation('top'); ?>
    3030
    3131        <br class="clear" />
     
    7474    </form>
    7575    <div class="tablenav">
    76         <?php $ListTable->pagination( 'bottom' ); ?>
     76        <?php $ListTable->page_navigation( 'bottom' ); ?>
    7777        <br class="clear" />
    7878    </div>
  • shopp/trunk/core/ui/products/products.php

    r1023860 r1308754  
    4141        <?php endif; ?>
    4242
    43         <?php $ListTable->pagination('top'); ?>
     43        <?php $ListTable->page_navigation('top'); ?>
    4444
    4545        <br class="clear" />
     
    236236    </form>
    237237    <div class="tablenav bottom">
    238         <?php $ListTable->pagination( 'bottom' ); ?>
     238        <?php $ListTable->page_navigation( 'bottom' ); ?>
    239239        <br class="clear" />
    240240    </div>
  • shopp/trunk/core/ui/settings/images.php

    r970959 r1308754  
    7070        </div>
    7171
    72         <?php $ListTable->pagination('top'); ?>
     72        <?php $ListTable->page_navigation('top'); ?>
    7373
    7474        <br class="clear" />
     
    149149    </form>
    150150    <div class="tablenav bottom">
    151         <?php $ListTable->pagination( 'bottom' ); ?>
     151        <?php $ListTable->page_navigation( 'bottom' ); ?>
    152152        <br class="clear" />
    153153    </div>
  • shopp/trunk/core/ui/styles/admin.css

    r970959 r1308754  
    2727.shopp .inline-fields span { float: left; padding: 0 5px 0 0; display: inline-block; text-align: left; }
    2828
    29 .shopp .checkbox { display: inline-block; position: relative; color: #464646; text-shadow: rgba(255,255,255,1) 0 1px 0; width: 10px; height: 10px; margin-top: 3px; border: 1px solid #a9a9a9;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; background: #fff url(data:image/gif;base64,R0lGODlhBQAGAJEAAPLy8vn5+ezs7AAAACH5BAAAAAAALAAAAAAFAAYAAAIHjA2Zwu3/CgA7) repeat-x scroll left bottom; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=1px, Color='#ececec'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=1px, Color='#ececec')"; -moz-box-shadow: 0 1px 1px #ececec; -webkit-box-shadow: 0 2px 3px #ececec; box-shadow: 0 1px 1px #ececec; overflow: visible; }
     29.shopp .checkbox { display: inline-block; position: relative; color: #464646; text-shadow: rgba(255,255,255,1) 0 1px 0; width: 10px; height: 10px; margin-top: 3px; border: 1px solid #a9a9a9;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; background: #fff url(data:image/gif;base64,R0lGODlhBQAGAJEAAPLy8vn5+ezs7AAAACH5BAAAAAAALAAAAAAFAAYAAAIHjA2Zwu3/CgA7) repeat-x scroll left bottom; -moz-box-shadow: 0 1px 1px #ececec; -webkit-box-shadow: 0 2px 3px #ececec; box-shadow: 0 1px 1px #ececec; overflow: visible; }
    3030.shopp .checkbox.checked:before { font-family:'shopp-icons'; font-size: 13px; content: "\E00B"; line-height: 13px; position: relative; top: -3px; }
    3131
     
    8080h2 a.add-new { font-style: normal; margin: 0px 6px; position: relative; top: -3px; font-family:'Lucida Grande',Verdana,Arial,'Bitstream Vera Sans',sans-serif;text-transform:none;}
    8181.row-actions { visibility:hidden;padding:2px 0 0; }
    82 tr:hover .row-actions,464646
     82tr:hover .row-actions,
    8383div.comment-item:hover .row-actions { visibility:visible; }
    8484
     
    176176#chart .tickLabel { font-size: 1.3em; }
    177177#map { width: 100%; height: 500px; margin: 2em 0; }
    178 .jvectormap-label { position:absolute;display:none;border:1px solid #dfdfdf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;color:white;color:#444;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:3px; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777')"; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777;  }
    179 .jvectormap-zoomin,.jvectormap-zoomout { position:absolute;left:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;padding:3px;color:white;width:10px;height:10px;cursor:pointer;line-height:10px;text-align:center; border:1px solid #dfdfdf;color:#444; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=1px, OffY=2px, Color='#777')"; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; }
     178.jvectormap-label { position:absolute;display:none;border:1px solid #dfdfdf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;color:white;color:#444;font-family:Arial,Helvetica,sans-serif;font-size:1em;padding:3px; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777;  }
     179.jvectormap-zoomin,.jvectormap-zoomout { position:absolute;left:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background:#fff;padding:3px;color:white;width:10px;height:10px;cursor:pointer;line-height:10px;text-align:center; border:1px solid #dfdfdf;color:#444; -moz-box-shadow: 1px 2px 3px #777; -webkit-box-shadow: 1px 2px 3px #777; box-shadow: 1px 2px 3px #777; }
    180180.jvectormap-zoomin { top:10px; }
    181181.jvectormap-zoomout { top:30px; }
     
    216216#membership .subpanel.stage > .label { background: url('../icons/bluebar.png') repeat-x; color: #fff; text-shadow: #2d4a63 0 -1px 0; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; -khtml-border-top-right-radius: 3px; border-top-right-radius: 3px; border: 1px solid #365978; border-bottom: none; }
    217217
    218 #membership .stage { filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=2px, Color='#999'); -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=2px, Color='#999')"; -moz-box-shadow: 0 2px 3px #999; -webkit-box-shadow: 0 2px 3px #999; box-shadow: 0 2px 3px #999; }
     218#membership .stage { -moz-box-shadow: 0 2px 3px #999; -webkit-box-shadow: 0 2px 3px #999; box-shadow: 0 2px 3px #999; }
    219219
    220220.membership.search-select-results { width: 300px; }
     
    315315#shopp-activation-nag .dismiss { color:#ccc; margin-right:8px; }
    316316#shopp-activation-nag .dismiss:hover { color:#aaa; }
    317 #shopp-activation-nag .button { float: left; margin: 8px 20px 0 0; button }
     317#shopp-activation-nag .button { float: left; margin: 8px 20px 0 0; }
    318318#shopp-activation-nag big { display:block; }
    319319
     
    731731.calendar { display:none; }
    732732.calendar-wrap { display:inline;position:relative;overflow:visible; }
    733 .calendar { position:absolute;z-index:10;top:18px;left:0;width:185px;background:white;border:1px solid #dfdfdf;padding:5px;font-size:11px;filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#fff');-ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=0, Color='#fff')";-moz-box-shadow: 0 0 1px #fff;-webkit-box-shadow: 0 0 1px #fff;box-shadow: 0 0 1px #fff;}
     733.calendar { position:absolute;z-index:10;top:18px;left:0;width:185px;background:white;border:1px solid #dfdfdf;padding:5px;font-size:11px;-moz-box-shadow: 0 0 1px #fff;-webkit-box-shadow: 0 0 1px #fff;box-shadow: 0 0 1px #fff;}
    734734.calendar h3 { width:100%;margin:0;text-align:center; }
    735735.calendar span.back { display:block;position:absolute;left:5px;top:5px;padding:0 10px;cursor:pointer; }
  • shopp/trunk/core/ui/widgets/tagcloud.php

    r821385 r1308754  
    4141            ?>
    4242            <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title'); ?></label>
    43             <input type="text" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $options['title']; ?>"></p>
     43                <input type="text" name="<?php echo $this->get_field_name('title'); ?>" id="<?php echo $this->get_field_id('title'); ?>" class="widefat" value="<?php echo $options['title']; ?>">
     44            </p>
     45            <p>
     46                <label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e( 'Exclude' ); ?></label> <input type="text" value="<?php echo $options['exclude']; ?>" name="<?php echo $this->get_field_name('exclude'); ?>" id="<?php echo $this->get_field_id('exclude'); ?>" class="widefat" />
     47                <br />
     48                <small><?php _e( 'Tags, separated by commas.', 'Shopp' ); ?></small>
     49            </p>
    4450            <?php
    4551        }
  • shopp/trunk/gateways/PayPal/PayPalStandard.php

    r1020997 r1308754  
    630630
    631631        status_header( '200' );
    632         die( 'OK' );
     632        exit();
    633633    }
    634634
  • shopp/trunk/readme.md

    r930519 r1308754  
    1 <span class="float-right">
    2 [![build status](http://ci.shopp.net/projects/2/status.png?ref=master)](http://ci.shopp.net/projects/2?ref=master)
    3 </span>
     1[![Build Status](https://api.travis-ci.org/ingenesis/shopp.svg)](https://travis-ci.org/ingenesis/shopp)
    42
    53![Shopp Logo](https://shopplugin.com/logo.png)
  • shopp/trunk/readme.txt

    r1122729 r1308754  
    44Tags: ecommerce, e-commerce, wordpress ecommerce, shopp, shop, shopping, cart, store, storefront, sales, sell, catalog, checkout, accounts, secure, variations, variants, reports, downloads, digital, downloadable, inventory, stock, shipping, taxes, shipped, addons, widgets, shortcodes
    55Requires at least: 3.5
    6 Tested up to: 4.1.1
     6Tested up to: 4.4
    77Stable tag: trunk
    88License: GPLv3 or later
  • shopp/trunk/services/image.php

    r930519 r1308754  
    148148
    149149        $cache = 'image_' . $this->request . ($this->valid ? '_' . $this->valid : '');
    150         $cached = wp_cache_get($cache, 'shopp_image');
     150        $cached = Shopp::cache_get($cache, 'shopp_image');
    151151        if ( $cached ) return ($this->Image = $cached);
    152152
     
    155155        if ( max($this->width, $this->height) > 0 ) $this->loadsized();
    156156
    157         wp_cache_set($cache, $this->Image, 'shopp_image');
     157        Shopp::cache_set($cache, $this->Image, 'shopp_image');
    158158
    159159        do_action('shopp_imageserver_load', $this->Image);
Note: See TracChangeset for help on using the changeset viewer.