Beispiel #1
0
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        $title = isset($instance['title']) ? strip_tags($instance['title']) : false;
        $before = isset($instance['before']) ? wp_kses_post($instance['before']) : false;
        $after = isset($instance['after']) ? wp_kses_post($instance['after']) : false;
        $converter = new wpSight_Currency();
        $notitle = empty($title) ? ' no-title' : '';
        ?>
        
		<div id="<?php 
        echo wpcasa_dashes($widget_id);
        ?>
-wrap" class="widget-wrap widget-currency-converter-wrap<?php 
        echo $notitle;
        ?>
">
		
		    <div id="<?php 
        echo wpcasa_dashes($widget_id);
        ?>
" class="widget widget-currency-converter clearfix">
		    
		    	<div class="widget-inner"><?php 
        if (!empty($title)) {
            echo '<h3 class="title">' . $title . '</h3>';
        }
        $currency_select = '';
        if (!empty($before)) {
            $currency_select .= '<span class="select-currency-before">' . $before . '</span>';
        }
        $currency_select .= $converter->wpsight_currency_selector('widget');
        if (!empty($after)) {
            $currency_select .= '<span class="select-currency-after">' . $after . '</span>';
        }
        echo $currency_select;
        ?>
		
		    	</div><!-- .widget-inner -->
		    	
		    </div><!-- .widget -->
		    
		</div><!-- .widget-wrap --><?php 
    }
Beispiel #2
0
    function widget($args, $instance)
    {
        if (is_single() && get_post_type() == 'property') {
            extract($args, EXTR_SKIP);
            $title = isset($instance['title']) ? strip_tags($instance['title']) : false;
            $exclude_featured = isset($instance['exclude_featured']) ? $instance['exclude_featured'] : false;
            $effect = isset($instance['effect']) ? $instance['effect'] : 'horizontal';
            $pause = isset($instance['pause']) ? (int) $instance['pause'] : 5000;
            $controls = isset($instance['controls']) ? $instance['controls'] : true;
            $controls_auto = isset($instance['controls_auto']) ? $instance['controls_auto'] : true;
            $auto_start = isset($instance['auto_start']) ? $instance['auto_start'] : false;
            $wpsight_gallery = new wpSight_Gallery();
            $wpsight_gallery_view = $wpsight_gallery->wpsight_gallery_public_view($id, $exclude_featured, $this->id);
            $notitle = empty($title) ? ' no-title' : '';
            $controls = $controls != 0 ? 'true' : 'false';
            $controls_auto = $controls_auto != 0 ? 'true' : 'false';
            $auto_start = $auto_start != 0 ? 'true' : 'false';
            $sidebar = function_exists('wpsight_get_sidebar') ? wpsight_get_sidebar('sidebar-listing') : 'sidebar-property';
            ?>
			
        	<script type="text/javascript">
			
        	jQuery(document).ready(function() {
			
	    	    var effect	         = "<?php 
            echo $effect;
            ?>
";
	    	    var pause	         = <?php 
            echo $pause;
            ?>
;
	    	    var controls         = <?php 
            echo $controls;
            ?>
;
	    	    var auto_start       = <?php 
            echo $auto_start;
            ?>
;
	    	    var auto_controls    = <?php 
            echo $controls_auto;
            ?>
;
	    	    var auto_hover       = true;
			
	    	    <?php 
            if ($id == $sidebar) {
                ?>
				
	    	    jQuery('#<?php 
                echo $this->id;
                ?>
_sidebar_listing_gallery').bxSlider({
					pagerCustom: '#<?php 
                echo $this->id;
                ?>
_bx-pager-sidebar',
					mode: effect,
					pause: pause,
					controls: controls,
					autoControls: auto_controls,
					autoStart: auto_start,
					auto: true,
					autoHover: true
			    });
			
			    <?php 
            } else {
                ?>
			    jQuery('#<?php 
                echo $this->id;
                ?>
_content_listing_gallery').bxSlider({
					pagerCustom: '#<?php 
                echo $this->id;
                ?>
_bx-pager-content',
					mode: effect,
					pause: pause,
					controls: controls,
					autoControls: auto_controls,
					autoStart: auto_start,
					auto: true,
					autoHover: true
			    });
			
			    <?php 
            }
            ?>
 	            
			});
			</script>
        	
			<div id="<?php 
            echo wpcasa_dashes($widget_id);
            ?>
-wrap" class="widget-wrap section widget-gallery-wrap<?php 
            echo $notitle;
            ?>
">
			
			    <div id="<?php 
            echo wpcasa_dashes($widget_id);
            ?>
" class="widget widget-gallery clearfix">
			    
			    	<div class="widget-inner">
			    		
			    		<?php 
            if (!empty($title)) {
                echo '<h3 class="title">' . $title . '</h3>';
            }
            echo $wpsight_gallery_view;
            ?>
			
			    	</div><!-- .widget-inner -->
			    	
			    </div><!-- .widget -->
			    
			</div><!-- .widget-wrap -->

			<?php 
        }
    }