function get_options() { $options = jeo_get_options(); if ($options && isset($options['api'])) { return $options['api']; } }
function vindig_scripts() { wp_register_script('angular', get_stylesheet_directory_uri() . '/static/angular/angular.min.js'); wp_register_script('angular-ui-router', get_stylesheet_directory_uri() . '/static/ui-router/release/angular-ui-router.js', array('angular')); wp_register_script('angular-cookies', get_stylesheet_directory_uri() . '/static/angular-cookies/angular-cookies.min.js', array('angular')); wp_register_script('twttr', 'http://platform.twitter.com/widgets.js'); wp_register_script('angular-socialshare', get_stylesheet_directory_uri() . '/static/angular-socialshare/angular-socialshare.min.js', array('angular', 'twttr')); wp_register_style('angular-socialshare', get_stylesheet_directory_uri() . '/static/angular-socialshare/angular-socialshare.min.css'); wp_register_script('angular-rangeslider', get_stylesheet_directory_uri() . '/static/angular-rangeslider/angular.rangeSlider.js', array('angular')); wp_register_style('angular-rangeslider', get_stylesheet_directory_uri() . '/static/angular-rangeslider/angular.rangeSlider.css'); wp_register_script('angular-fitvids', get_stylesheet_directory_uri() . '/static/angular-fitvids/angular-fitvids.js', array('angular')); wp_register_script('leaflet', get_stylesheet_directory_uri() . '/static/leaflet/dist/leaflet.js'); wp_register_style('leaflet', get_stylesheet_directory_uri() . '/static/leaflet/dist/leaflet.css'); wp_register_script('leaflet.markerclusterer', get_stylesheet_directory_uri() . '/static/leaflet.markerclusterer/dist/leaflet.markercluster.js', array('leaflet')); wp_register_style('leaflet.markerclusterer', get_stylesheet_directory_uri() . '/static/leaflet.markerclusterer/dist/MarkerCluster.Default.css'); wp_register_script('leaflet.fullscreen', get_stylesheet_directory_uri() . '/static/leaflet.fullscreen/Control.FullScreen.js', array('leaflet')); wp_register_style('leaflet.fullscreen', get_stylesheet_directory_uri() . '/static/leaflet.fullscreen/Control.FullScreen.css'); wp_register_script('leaflet.heat', get_stylesheet_directory_uri() . '/js/leaflet-heat.js', array('leaflet')); wp_register_script('mapbox.standalone', get_stylesheet_directory_uri() . '/static/mapbox.js/mapbox.standalone.js'); wp_register_style('mapbox.standalone', get_stylesheet_directory_uri() . '/static/mapbox.js/mapbox.standalone.css'); wp_register_style('normalize', get_stylesheet_directory_uri() . '/static/normalize.css/normalize.css'); wp_register_style('icons', get_stylesheet_directory_uri() . '/css/icons.css'); wp_enqueue_script('app', get_stylesheet_directory_uri() . '/js/app.js', array('jquery', 'underscore', 'angular', 'angular-ui-router', 'angular-cookies', 'angular-socialshare', 'angular-rangeslider', 'angular-fitvids', 'leaflet', 'mapbox.standalone', 'leaflet.fullscreen', 'leaflet.markerclusterer', 'leaflet.heat'), '1.1.4'); wp_enqueue_style('webfonts', 'https://fonts.googleapis.com/css?family=PT+Serif:400,700|Hind+Siliguri:300,400,500,600,700|Megrim:400'); wp_enqueue_style('app', get_stylesheet_directory_uri() . '/css/app.css', array('normalize', 'angular-socialshare', 'angular-rangeslider', 'mapbox.standalone', 'leaflet.fullscreen', 'leaflet.markerclusterer', 'icons'), '1.1.5'); wp_enqueue_style('print', get_stylesheet_directory_uri() . '/css/print.css', array('app'), '1.1', 'print'); $jeo_options = jeo_get_options(); $front_page_map = 0; if ($jeo_options['front_page'] && $jeo_options['front_page']['featured_map']) { $front_page_map = $jeo_options['front_page']['featured_map']; } wp_localize_script('app', 'vindig', array('base' => get_stylesheet_directory_uri(), 'api' => esc_url(get_json_url()), 'featured_map' => $front_page_map)); }
function get_options() { $options = jeo_get_options(); if ($options && isset($options['share-widget'])) { return $options['share-widget']; } }
<?php get_header(); ?> <?php if (is_front_page()) { $options = jeo_get_options(); if (!$options || isset($options['front_page']) && $options['front_page']['front_page_map'] == 'latest') { jeo_featured(); } else { get_template_part('content', 'featured'); } } else { jeo_featured(); } ?> <div class="section-title"> <div class="container"> <div class="twelve columns"> <h2><?php _e('Latest articles', 'jeo'); ?> </H2> </div> </div> </div> <?php get_template_part('loop'); ?>
function get_options() { $this->options = jeo_get_options(); return $this->options; }