From a19aa49020e0ccbaf0a4cbe5f4df1c31192a4165 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 22 Mar 2017 08:15:18 -0400 Subject: [PATCH] adding star line url for dev53 via the api plugin options instead of hardcoding the url in the form action --- functions.php | 9 ++++++++- parts/offcanvas-tickets.php | 3 ++- parts/tickets-dropdown.php | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index 641caed..d350b44 100644 --- a/functions.php +++ b/functions.php @@ -197,7 +197,14 @@ function is_post_type($type){ return false; } } - +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'] : ''; echo $startlineUrl; + $starlineUrl = preg_replace("/^http:/i", "https:", $starlineUrl); + + return $starlineUrl; +} add_action('thematic_searchloop', 'mytheme_search_loop'); // End of the Contextual/Highlight Search functions diff --git a/parts/offcanvas-tickets.php b/parts/offcanvas-tickets.php index b83f0e3..1731527 100644 --- a/parts/offcanvas-tickets.php +++ b/parts/offcanvas-tickets.php @@ -1,6 +1,7 @@
Buy Tickets
-
+ + diff --git a/parts/tickets-dropdown.php b/parts/tickets-dropdown.php index 7ee67d9..d8667a1 100644 --- a/parts/tickets-dropdown.php +++ b/parts/tickets-dropdown.php @@ -1,6 +1,6 @@
Buy Tickets
- + -- 2.17.1