<!-- ERROR HEADER : begin --> <div class="error-header"> <h1 class="m-secondary-font"><?php echo lsvr_get_field('page404_title', __('<span>404</span> Sorry, page not found.', 'beautyspot')); ?> </h1> <p><?php echo lsvr_get_field('page404_subtitle', __('The page you are looking for is no longer available or has been moved.', 'beautyspot')); ?> </p> </div> <!-- ERROR HEADER : end --> <?php if (lsvr_get_field('page404_enable_search', true, true)) { ?> <div class="various-content"> <!-- SEARCH SECTION : begin --> <section> <h2><?php _e('Search the site', 'beautyspot'); ?> </h2> <?php get_search_form(); ?> </section> <!-- SEARCH SECTION : end -->
<?php /* ----------------------------------------------------------------------------- Load Storm Twitter class https://github.com/stormuk/storm-twitter ----------------------------------------------------------------------------- */ include 'storm-twitter.class.php'; /* ----------------------------------------------------------------------------- Initialize the Twitter app ----------------------------------------------------------------------------- */ $config = array('directory' => '', 'key' => esc_attr(lsvr_get_field('twitter_consumer_key')), 'secret' => esc_attr(lsvr_get_field('twitter_consumer_secret')), 'token' => esc_attr(lsvr_get_field('twitter_access_token')), 'token_secret' => esc_attr(lsvr_get_field('twitter_access_token_secret')), 'cache_expire' => 3600); global $lsvr_twitter_app; $lsvr_twitter_app = new StormTwitter($config); /* ----------------------------------------------------------------------------- RESPONSE ----------------------------------------------------------------------------- */ $username = esc_attr(lsvr_get_field('twitter_feed_username', '')); $limit = (int) esc_attr(lsvr_get_field('twitter_feed_count')); if ($username !== '' && $limit > 0) { global $lsvr_twitter_app; $tweets = $lsvr_twitter_app->getTweets($limit, $username); echo json_encode($tweets); }
function lsvr_sidebar_settings_meta_content($post) { $lsvr_sidebar_settings_meta = get_post_meta($post->ID, '_lsvr_sidebar_settings_meta', true); echo '<p>' . __('You can assign a sidebar to this page (it will be displayed only if the selected template supports sidebars). Custom sidebars can be managed under <strong>"Theme Options / Sidebars"</strong>.', 'beautyspot') . '</p>'; /* ------------------------------------------------------------------------- SIDEBAR NAME ------------------------------------------------------------------------- */ $active_id = is_array($lsvr_sidebar_settings_meta) && array_key_exists('id', $lsvr_sidebar_settings_meta) ? $lsvr_sidebar_settings_meta['id'] : ''; echo '<p><label for="lsvr_sidebar_settings_meta_id"><strong>' . __('Select Sidebar', 'beautyspot') . '</strong></label></p>'; echo '<select id="lsvr_sidebar_settings_meta_id" name="lsvr_sidebar_settings_meta_id">'; // add primary if (is_active_sidebar('primary-sidebar')) { echo '<option value="primary-sidebar">' . __('Default Sidebar', 'beautyspot') . '</option>'; } // add custom for ($i = 1; $i <= 10; $i++) { if (is_active_sidebar('custom-sidebar-' . $i)) { if ($active_id === 'custom-sidebar-' . $i) { echo '<option value="custom-sidebar-' . $i . '" selected="selected">'; } else { echo '<option value="custom-sidebar-' . $i . '">'; } echo lsvr_get_field('sidebar_' . $i . '_name', 'Custom Sidebar ' . $i) . '</option>'; } } echo '</select>'; /* ------------------------------------------------------------------------- SIDEBAR POSITION ------------------------------------------------------------------------- */ $active_pos = is_array($lsvr_sidebar_settings_meta) && array_key_exists('pos', $lsvr_sidebar_settings_meta) ? $lsvr_sidebar_settings_meta['pos'] : ''; echo '<p><label for="lsvr_sidebar_settings_meta_pos"><strong>' . __('Sidebar Position', 'beautyspot') . '</strong></label></p>'; echo '<select id="lsvr_sidebar_settings_meta_pos" name="lsvr_sidebar_settings_meta_pos">'; if ($active_pos === 'right') { echo '<option value="right" selected="selected">'; } else { echo '<option value="right">'; } _e('Right', 'beautyspot') . '</option>'; if ($active_pos === 'left') { echo '<option value="left" selected="selected">'; } else { echo '<option value="left">'; } _e('Left', 'beautyspot') . '</option>'; echo '</select>'; /* ------------------------------------------------------------------------- SIDEBAR MOBILE POSITION ------------------------------------------------------------------------- */ $active_mobilepos = is_array($lsvr_sidebar_settings_meta) && array_key_exists('mobilepos', $lsvr_sidebar_settings_meta) ? $lsvr_sidebar_settings_meta['mobilepos'] : ''; echo '<p><label for="lsvr_sidebar_settings_meta_mobilepos"><strong>' . __('Sidebar Position on Mobile Devices', 'beautyspot') . '</strong></label></p>'; echo '<select id="lsvr_sidebar_settings_meta_mobilepos" name="lsvr_sidebar_settings_meta_mobilepos">'; if ($active_mobilepos === 'bottom') { echo '<option value="bottom" selected="selected">'; } else { echo '<option value="bottom">'; } _e('Bottom', 'beautyspot') . '</option>'; if ($active_mobilepos === 'top') { echo '<option value="top" selected="selected">'; } else { echo '<option value="top">'; } _e('Top', 'beautyspot') . '</option>'; echo '</select>'; }
<?php } ?> </ul> </div> <!-- HEADER CONTACT : end --> <?php } ?> <?php $social_links = lsvr_get_social_links(); ?> <?php $social_links_target = lsvr_get_field('social_links_target', false, true); ?> <?php if ($social_links) { ?> <!-- HEADER SOCIAL : begin --> <div class="header-social"> <ul> <?php foreach ($social_links as $key => $val) { ?> <?php if (strpos($val, 'http://') === 0 || strpos($val, 'https://') === 0) { ?> <li><a href="<?php echo $val;
} ?> </div> <!-- WRAPPER : end --> <?php if (lsvr_get_field('resform_shortcode') !== '') { ?> <!-- RESERVATION FORM : begin --> <div id="reservation-form" class="c-modal" style="display: none;"> <div class="modal-loading"><span class="c-loading-anim"><span></span></span></div> <div class="modal-box" style="display: none;"> <button class="modal-close" type="button"><i class="fa fa-times"></i></button> <div class="modal-box-inner various-content"><?php echo do_shortcode(lsvr_get_field('resform_shortcode')); ?> </div> </div> </div> <!-- RESERVATION FORM : end --> <?php } ?> <?php wp_footer(); ?> </body> </html>
?> <?php } ?> </div> <!-- ARTICLE CONTENT : end --> <?php } ?> <!-- ARTICLE FOOTER : begin --> <footer class="article-footer"> <ul class="article-info"> <?php if (lsvr_get_field('blog_list_enable_author', false, true)) { ?> <!-- AUTHOR : begin --> <li class="author"><a href="<?php echo esc_url(get_author_posts_url(get_the_author_meta('ID'))); ?> "><?php echo get_the_author(); ?> </a></li> <!-- AUTHOR : end --> <?php } ?> <?php
function lsvr_woo_set_number_of_products() { $products_per_page = lsvr_get_field('woo_index_products_per_page', 9); add_filter('loop_shop_per_page', create_function('$cols', 'return ' . $products_per_page . ';'), 20); }