<?php endif;?>
</div>
</div>
- </div>
+ </div>
<!--
<div class="small-12 medium-6 large-4 columns small-text-center medium-text-left">
<?php //get_sidebar(); ?>
<div class="row">
<div class="buy-tickets small-12 medium-6 text-center columns">
<a href="<?php echo get_permalink(40)?>"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/buy-tickets-graphics.png"></a>
- <a href="https://dev53.gaslightmedia.com/www.mackinacferry.com/order-tickets-online-6/"><h5>Buy Ferry <br>Tickets</h5></a>
+ <a href="<?php echo ticket_url_base();?>order-tickets-online-6/"><h5>Buy Ferry <br>Tickets</h5></a>
</div>
<div class="get-schedule small-12 medium-6 text-center columns">
<a href="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/schedules/2016-1_Winter_Schedule.pdf" target="_blank"><img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/schedules-covers.png"></a>
'id' => 'slideshow',
'description' => __('Meta Slider/Slideshow Area')
));
-
+
}
}
function shareThis(){
- echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';
+ echo '<span class="st_sharethis" st_title="'. get_the_title().'" st_url="'. get_the_permalink() .'"></span>';
}
add_action( 'woocommerce_single_product_summary', 'shareThis', 20);
function glm_get_header() {
global $post;
$post_id = $post->ID;
-
- if( is_page() ) {
+
+ if( is_page() ) {
$parents = get_post_ancestors( $post_id );
$post_id = ($parents) ? $parents[count($parents)-1]: $post->ID;
if ( is_post_type('page') ) {
$image_data = wp_get_attachment_image_src(get_post_thumbnail_id($post_id), "full");
echo ' style="background-image: url('.$image_data[0].');padding:0;padding-bottom:16%;background-position:center bottom;background-size: cover;background-repeat:no-repeat;max-height: 250px; "';
-
- } else if ( !is_post_type('page') ){
+
+ } else if ( !is_post_type('page') ){
echo ' class="no-featured"';
} else {
echo ' style="background-image: url('.get_template_directory_uri().'/assets/Ticket-Featured.png);padding:0;padding-bottom:16%;background-position:center bottom;background-size:cover;background-repeat:no-repeat;max-height: 250px; "';
}
function starlineUrl(){
// get the url from the api plugin serialized options and replace the http protocol with https using regex
- $starlineOptions = unserialize( get_option( GLM_MEMBERS_APIS_STARLINE_OPTION_NAME ) );
- $starlineUrl = ( isset( $starlineOptions['ticketUrl'] ) ) ? $starlineOptions['ticketUrl'] : '';
- $starlineUrl = preg_replace("/^http:/i", "https:", $starlineUrl);
-
+ $starlineOptions = unserialize( get_option( GLM_MEMBERS_APIS_STARLINE_OPTION_NAME ) );
+ $starlineUrl = ( isset( $starlineOptions['ticketUrl'] ) ) ? $starlineOptions['ticketUrl'] : '';
+ $starlineUrl = preg_replace("/^http:/i", "https:", $starlineUrl);
+
return $starlineUrl;
}
add_action('thematic_searchloop', 'mytheme_search_loop');
return false;
}
}
-?>
+
+if (!function_exists('ticket_url_base')) {
+ function ticket_url_base()
+ {
+ // get the option for the ticket url from the api plugin
+ // if not found then return false.
+ if ( defined('GLM_MEMBERS_APIS_STARLINE_OPTION_NAME') ) {
+ $starlineOptions = unserialize( get_option( GLM_MEMBERS_APIS_STARLINE_OPTION_NAME ) );
+ $starlineUrl = ( isset( $starlineOptions['ticketUrl'] ) ) ? $starlineOptions['ticketUrl'] : '';
+ return $startlineUrl;
+ } else {
+ return false;
+ }
+ }
+}
<a class="left-off-canvas-toggle menu-icon" href="#"><span>Menu</span></a>
</section>
<section class="center-small">
- <a class="right-off-canvas-toggle" href="#"><span>Buy Tickets</span></a>
+ <a class="right-off-canvas-toggle" href="#"><span>Buy Tickets</span></a>
</section>
<section class="right-small">
-
+
<div class="header-cart-container">
- <a href="https://dev53.gaslightmedia.com/www.mackinacferry.com/order-tickets-online-6/?x=1&Action=Shop_cart">
+ <a href="<?php echo ticket_url_base();?>order-tickets-online-6/?x=1&Action=Shop_cart">
<span>Cart</span>
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/assets/cart-icon-white.png">
</a>