Ejemplo n.º 1
0
 function zero_scripts()
 {
     if (!is_admin()) {
         //Call Modernizr
         wp_register_script('modernizr', get_template_directory_uri() . '/js/libs/modernizr.dev.js', array(), null, false);
         wp_enqueue_script('modernizr');
         //Call JQuery
         wp_deregister_script('jquery');
         wp_register_script('jquery', '/wp-includes/js/jquery/jquery.js', '', '', true);
         wp_enqueue_script('jquery');
         if (is_front_page() || is_page_template('new-story-page.php')) {
             wp_register_script('slider_js', get_template_directory_uri() . '/js/libs/slider.min.js', array('jquery'), null, true);
             wp_enqueue_script('slider_js');
         }
         if (is_page(11) || is_child(11)) {
             wp_register_script('gallery_js', get_template_directory_uri() . '/js/libs/gallery.js', array('jquery'), null, true);
             wp_enqueue_script('gallery_js');
         }
         //Call Framework js file
         wp_register_script('main_js', get_template_directory_uri() . '/js/build/concat.js', array('jquery'), '', true);
         wp_enqueue_script('main_js');
     }
     // Setting the site URL as a global variable
     // You can use it to access the template URL in the mainJSfile
     $site_parameters = array('site_url' => get_site_url(), 'theme_directory' => get_template_directory_uri());
     wp_localize_script('main_js', 'SiteParameters', $site_parameters);
 }
Ejemplo n.º 2
0
/**
 * Get site info
 */
function get_development_data()
{
    $current_theme = '';
    $parent_theme = '';
    $wp_data = '';
    $plugin_location = WP_PLUGIN_DIR . '/converter-modules/modules-init.php';
    //Get Plugin Directory
    $theme = wp_get_theme();
    $is_child = is_child($theme);
    $short_data = '<h3>Overview</h3>';
    // Site Data.
    $short_data .= '<strong>Site Title</strong>: ' . get_bloginfo('name') . '<br/>';
    $short_data .= '<strong>Tagline</strong>: ' . get_bloginfo('description') . '<br/>';
    $short_data .= '<strong>SiteUrl</strong>: ' . get_bloginfo('wpurl') . '<br/>';
    $short_data .= '<strong>Stylesheet Directory</strong>: ' . get_stylesheet_directory_uri() . '<br/>';
    $short_data .= '<strong>Template directory</strong>: ' . get_template_directory_uri() . '<br/>';
    $short_data .= '<hr/>';
    $short_data .= '<strong>WordPress</strong>: ' . get_bloginfo('version') . '<br/>';
    // Current theme data.
    //Overview Part.
    $short_data .= '<strong>Active theme</strong>: ' . $theme->get('Name') . ' v.<strong>' . $theme->get('Version') . '</strong><br/>';
    $current_theme .= '<h3>Current Theme Data</h3>';
    $current_theme .= '<ul>';
    $current_theme .= '<li><strong>Theme name:</strong> ' . $theme->get('Name') . '</li>';
    $current_theme .= '<li><strong>Theme URI:</strong> ' . $theme->get('ThemeURI') . '</li>';
    $current_theme .= '<li><strong>Text Domain:</strong> ' . $theme->get('TextDomain') . '</li>';
    $current_theme .= '<li><strong>Description:</strong> ' . $theme->get('Description') . '</li>';
    $current_theme .= '<li><strong>Author:</strong> ' . $theme->get('Author') . '</li>';
    $current_theme .= '<li><strong>AuthorURI:</strong> ' . $theme->get('AuthorURI') . '</li>';
    $current_theme .= '<li><strong>Theme Version:</strong> ' . $theme->get('Version') . '</li>';
    $current_theme .= '</ul>';
    // Parent theme Data.
    if ($is_child) {
        $parent_t = $theme->parent();
        //Overview Part.
        $short_data .= '<strong>Parent Theme</strong>: ' . $parent_t->get('Name') . ' v.<strong>' . $parent_t->get('Version') . '</strong><br/>';
        $parent_theme .= '<h3>Parent Theme Data</h3>';
        $parent_theme .= '<ul>';
        $parent_theme .= '<li><strong>Theme name:</strong> ' . $parent_t->get('Name') . '</li>';
        $parent_theme .= '<li><strong>Theme URI:</strong> ' . $parent_t->get('ThemeURI') . '</li>';
        $parent_theme .= '<li><strong>Text Domain:</strong> ' . $parent_t->get('TextDomain') . '</li>';
        $parent_theme .= '<li><strong>Description:</strong> ' . $parent_t->get('Description') . '</li>';
        $parent_theme .= '<li><strong>Author:</strong> ' . $parent_t->get('Author') . '</li>';
        $parent_theme .= '<li><strong>AuthorURI:</strong> ' . $parent_t->get('AuthorURI') . '</li>';
        $parent_theme .= '<li><strong>Theme Version:</strong> ' . $parent_t->get('Version') . '</li>';
        $parent_theme .= '</ul>';
    }
    // Get wordpress data.
    $wp_data .= '<h3>Wordpress Data</h3>';
    $wp_data .= '<ul>';
    $wp_data .= '<li><strong>Site Title</strong>' . get_bloginfo('name') . '</li>';
    $wp_data .= '</ul>';
    return $short_data . '<br/><hr/>' . $current_theme . $parent_theme;
}
Ejemplo n.º 3
0
 function deleteImage($imageName, $lang = 'english')
 {
     $this->_lang_set($lang);
     if ($this->config->item('list_images', 'uploader_settings')) {
         $this->load->helper('file');
         $imageDir = $this->config->item('upload_path', 'uploader_settings');
         $imageUrl = $this->config->item('img_path', 'uploader_settings');
         // Make sure image exists in upload path
         $imagePath = $imageDir . '/' . basename(urldecode($imageName));
         if (is_file($imagePath) && file_exists($imagePath) && is_child($imageDir, dirname($imagePath))) {
             unlink($imagePath);
         } else {
             show_error('File does not exist');
         }
         $this->listImages();
     } else {
         $this->load->view('no_file_list');
     }
 }
        <?php 
                    }
                    ?>
          </div>
          <?php 
                }
            }
            ?>
          <?php 
        }
    }
    ?>
        </div>
      </div>
   <?php 
} elseif (is_page('about') || is_child('about')) {
    $post_slug = 'organizers';
    $args = array('name' => $post_slug, 'post_type' => 'yellows', 'numberposts' => 1);
    $single_post = query_posts($args);
    ?>
     <div class="header">
       <h2><?php 
    echo $single_post[0]->post_title;
    ?>
</h2>
     </div>
     <div class="body">
       <div class="org-items">
         <div class="controls">
             <i id="next" class="fa fa-angle-right"></i>
             <i id="prev" class="fa fa-angle-left"></i>
Ejemplo n.º 5
0
/**
 * Attach a loop to the `genesis_loop` output hook so we can get some front-end output.
 *
 * @since 1.1.0
 *
 * @uses genesis_get_option()       Get theme setting value.
 * @uses genesis_get_custom_field() Get custom field value.
 * @uses genesis_custom_loop()      Do custom loop.
 * @uses genesis_standard_loop()    Do standard loop.
 */
function und_do_loop()
{
    if (current_user_can('editor') || current_user_can('administrator')) {
        kernredaktion_widget();
    }
    if (is_page_template('page_login.php')) {
        if (is_user_logged_in()) {
            print '<a href="https://webmail.cyon.ch/"><div class="cell cell-intern" style="background: #3EA4D7;"><svg class="icon icon-email" viewBox="0 0 48 32"><use xlink:href="#icon-email"></use></svg></div></a>
                   <a href="http://www.generationentandem.ch/interner-bereich/"><div class="cell cell-intern" style="background:' . get_theme_mod('theme_color') . ';"><svg class="icon icon-internerbereich" viewBox="0 0 48 32"><use xlink:href="#icon-internerbereich"></use></svg></div></a>';
            genesis_standard_loop();
        } else {
            print "<article class='entry page'><h1>Login</h1>";
            wp_login_form();
            print "</article>";
        }
    } else {
        if (is_page_template('page_intern.php')) {
            if (is_user_logged_in()) {
                $content_width = 1000;
                intern_widget();
                genesis_standard_loop();
            } else {
                print "<article class='entry page'><h1>Login</h1>";
                wp_login_form();
                print "</article>";
            }
        } else {
            if (is_category(1413)) {
                //ontour_widget();
                ontour_map();
                $include = 1413;
                $exclude = genesis_get_option('blog_cat_exclude') ? explode(',', str_replace(' ', '', genesis_get_option('blog_cat_exclude'))) : '';
                $paged = get_query_var('paged') ? get_query_var('paged') : 1;
                //* Easter Egg
                $query_args = wp_parse_args(genesis_get_custom_field('query_args'), array('cat' => $include, 'category__not_in' => $exclude, 'showposts' => genesis_get_option('blog_cat_num'), 'paged' => $paged));
                genesis_custom_loop($query_args);
            } else {
                if (in_category(1413) && is_single() || is_child(4976) && is_page()) {
                    //ontour_widget();
                    genesis_standard_loop();
                } else {
                    //ontour_widget();
                    genesis_standard_loop();
                }
            }
        }
    }
}
Ejemplo n.º 6
0
 ?>
     <?php 
 if (is_page() && !is_page('inicio')) {
     ?>
         <script>
             $(document).ready(function() {
                 $(".top .title h2").lettering('words');
                 $(".block h3 a").lettering('words');
                 $(".cont-select p").lettering('words');
             });
         </script>
     <?php 
 }
 ?>
     <?php 
 if (is_page('servicios-spa') || is_singular('tours') || is_page('tours-y-actividades-nocturnos') || is_child(13)) {
     ?>
         <script>
             $(document).ready(function(){
                 $('.price-description').hide();
                 $('.description').each(function() {
                     var $dropdown = $(this);
                     $('.look-price', $dropdown).click(function(e) {
                         e.preventDefault();
                         $price = $('.price-description', $dropdown);
                         $price.slideToggle('fast', function() {
                             $('.look-price', $dropdown).toggleClass('current-open', $(this).is(':visible'));
                         });
                         $('.price-description').not($price).hide();
                         $('.price-description').not($price).parent().find('.look-price').text('» Ver Precio');
                         $(this).text('« Cerrar'); //texto activo
Ejemplo n.º 7
0
/**
 * Adds a Featured Widget on top of the Page
 */
function ontour_widget()
{
    if (is_category(1413) or in_category(1413) or is_child(4976) && is_page()) {
        genesis_widget_area('ontour', array('before' => '<div class="special-widget-area ontour-widget-area widget-area">', 'after' => '</div>'));
    }
}
Ejemplo n.º 8
0
        the_permalink();
        ?>
">
			        	<div class="post-link__key">
			        		<div class="thumb-overlay"></div>
							<?php 
        the_post_thumbnail('thumbnail');
        ?>
							<span class="chapter-name">
								<?php 
        print_page_parents($reverse = true);
        ?>
							</span>
							<h2>
								<?php 
        if (is_child()) {
            $num = get_post_field('menu_order', $post->ID);
            if (count(get_post_ancestors($post->ID)) >= 2) {
                echo romanNumerals($num);
                echo ". ";
            } else {
                echo $num;
                echo ". ";
            }
        }
        ?>
								<?php 
        the_title();
        ?>
							</h2>
			            </div>
Ejemplo n.º 9
0
<?php

$pageID = 10;
if (is_page($pageID) || is_child($pageID)) {
    require_once TEMPLATEPATH . "/geoip.inc";
    $gi = geoip_open(TEMPLATEPATH . "/GeoIP.dat", GEOIP_STANDARD);
    $country_code = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
    geoip_close($gi);
    $block_countries = array('US');
    if (in_array($country_code, $block_countries)) {
        ?>
	
			<?php 
        //if($country_code=='AU') {
        //	$message =  __('We´re sorry. The content on this page cannot be viewed within your country due to legal restrictions, unless you are a registered doctor.', 'scibase');
        //  $heading = __('Confirm to proceed.', 'scibase');
        //	$label_deny = __('Continue as a private person', 'scibase');
        //}
        if ($country_code == 'US') {
            $message = '';
            $heading = __('Note: Nevisense is not yet approved for commercial distribution in the US.', 'scibase');
            $label_deny = '';
        }
        ?>
			
			<link rel="stylesheet" type="text/css" href="<?php 
        bloginfo('template_url');
        ?>
/ui/css/geocheck.css">
			<script type="text/javascript">
			// Texts for the restriction modal
Ejemplo n.º 10
0
		<main id="main" class="site-main" role="main">

			<?php 
while (have_posts()) {
    the_post();
    ?>

				<?php 
    if (is_parent() && !is_child()) {
        get_template_part('content', 'chapter');
    } else {
        if (is_parent() && is_child()) {
            get_template_part('content', 'subchapter');
        } else {
            if (!is_parent() && is_child()) {
                get_template_part('content', 'article');
            } else {
                if (is_front_page()) {
                    get_template_part('content', 'home');
                } else {
                    get_template_part('content', 'page');
                }
            }
        }
    }
    ?>

				<?php 
    // If comments are open or we have at least one comment, load up the comment template
    if (comments_open() || get_comments_number()) {