Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 29th, 2013  |  syntax: None  |  size: 1.62 KB  |  views: 48  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. /**
  4.  * AIT WordPress Theme
  5.  *
  6.  * Copyright (c) 2012, Affinity Information Technology, s.r.o. (http://ait-themes.com)
  7.  */
  8.  
  9. // if this is "Blog" page get the right template
  10. if($GLOBALS['wp_query']->is_home && $GLOBALS['wp_query']->is_posts_page){
  11.         $template = get_page_template();
  12.         if($template = apply_filters('template_include', $template)){
  13.                 if(substr($template, -8, 8) != 'page.php'){
  14.                         require_once $template;
  15.                         return; // ends executing this script
  16.                 }
  17.         }
  18. }
  19.  
  20. $latteParams['posts'] = WpLatte::createPostEntity($GLOBALS['wp_query']->posts);
  21.  
  22. $latteParams['headerIcon'] = $aitThemeOptions->globals->headerIcon;
  23.  
  24. // no page was selected for "Posts page" from WP Admin in Settings->Reading
  25. $latteParams['isIndexPage'] = true;
  26.  
  27. if(isset($GLOBALS['wp_query']->queried_object)){
  28.  
  29.         $latteParams['post'] = WpLatte::createPostEntity(
  30.                 $GLOBALS['wp_query']->queried_object,
  31.                 array(
  32.                         'meta' => $GLOBALS['pageOptions'],
  33.         ));
  34.  
  35.         $sliderEnable = ($latteParams['post']->options('slider')->overrideGlobal) ? $latteParams['post']->options('slider')->sliderEnable : $aitThemeOptions->globals->sliderEnable;
  36.  
  37.         if (empty($sliderEnable)) {
  38.                 $latteParams['bodyClasses'] .= ' no-slider';
  39.         }
  40.  
  41.         $latteParams['headerIcon'] = ($latteParams['post']->options('header')->overrideGlobal) ? $latteParams['post']->options('header')->headerIcon : $aitThemeOptions->globals->headerIcon;
  42.  
  43.         $latteParams['isIndexPage'] = false;
  44. }
  45.  
  46. if($aitThemeOptions->general->enableCSSFeatures->enable === 'enable') {
  47.         $latteParams['bodyClasses'] .= ' css-features';
  48. }
  49.  
  50. WPLatte::createTemplate(basename(__FILE__, '.php'), $latteParams)->render();
clone this paste RAW Paste Data