Plugin Directory

Changeset 596023


Ignore:
Timestamp:
09/07/2012 04:46:42 PM (14 years ago)
Author:
misterbisson
Message:

resolves a bug where the template name wasn't being added to the list of class names when the loop was fetched from cache

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bcms/trunk/components/postloops.php

    r593252 r596023  
    374374    function __construct( $args = '' )
    375375    {
     376
    376377        // get settings
    377378        $defaults = array(
     
    426427            // initialize scrollable
    427428            $('<?php echo $this->settings->parent_selector; ?>').scrollable({ circular: true }).navigator().autoscroll(<?php echo json_encode( $this->settings->autoscroll ); ?>)
     429
     430            //show the .items divs now that the scrollable is initialized
     431            $('<?php echo $this->settings->child_selector; ?>').width( $(window).width() ).show();
    428432        });
    429433    })(jQuery);
     
    432436    }
    433437}
    434 
    435438
    436439
     
    758761            // get the templates, thumbnail size, and other stuff
    759762            $this->post_templates = (array) $postloops->get_templates('post');
     763            $cached->template = $this->post_templates[ $instance['template'] ];
    760764
    761765            $postloops->current_postloop = &$instance;
     
    835839            // figure out what classes to put on the widget
    836840            $extra_classes = array();
    837             $extra_classes[] = str_replace( '9spot', 'nines' , sanitize_title_with_dashes( $this->post_templates[ $instance['template'] ]['name'] ));
     841            $extra_classes[] = str_replace( '9spot', 'nines' , sanitize_title_with_dashes( $cached->template['name'] ));
    838842            $extra_classes[] = 'widget-post_loop-'. sanitize_title_with_dashes( $instance['title'] );
    839843            $extra_classes = array_merge( $extra_classes , (array) $instance['extra_classes'] );
     
    849853
    850854            if( isset( $cachekey ))
    851                 wp_cache_set( $cachekey , (object) array( 'html' => $cached->html , 'instance' => $instance , 'time' => time() ) , 'bcmspostloop' , $this->ttl );
     855                wp_cache_set( $cachekey , (object) array( 'html' => $cached->html , 'template' => $cached->template , 'instance' => $instance , 'time' => time() ) , 'bcmspostloop' , $this->ttl );
    852856        }
    853857
Note: See TracChangeset for help on using the changeset viewer.