amitabhaghosh197
10/31/2014 - 11:58 AM

custom post in wordpress all for speechcare

custom post in wordpress all for speechcare

<?php

define('CD_THEME_FILES' , get_template_directory_uri() . '/layouts/front/', true);
define('CD_IMGS' , get_bloginfo('template_url') . '/layouts/front/images/', true);


function cutedoctor_css_set()
{
	
	wp_enqueue_style('bootstrap_css', CD_THEME_FILES . 'css/bootstrap/bootstrap.css', false );
	
	// For 'Facebook titled' Page fb-apps.css else main.css
	if(is_page_template( 'facebook.php' )) {
		
		wp_enqueue_style('facebook_css', CD_THEME_FILES . 'css/fb-apps.css', false );
		
		} else{
			
			wp_enqueue_style('main_css', CD_THEME_FILES . 'css/main.css', false );
			
			}
	
	
	wp_enqueue_style('bootstrap_responsive_css', CD_THEME_FILES . 'css/bootstrap/bootstrap-responsive.css', false );
	wp_enqueue_style('theme_responsive_css', CD_THEME_FILES . 'css/responsive.css', false );
	wp_enqueue_style('theme_other_font_css', CD_THEME_FILES . 'fonts/webfonts/webfont-styles.css', false );
	wp_enqueue_style('magnific_pop_css', CD_THEME_FILES . 'vendors/magnific-popup/magnific-popup.css', false );
	
	
	}
	
	add_action('wp_enqueue_scripts', 'cutedoctor_css_set');
	

/****************	
// CDN CSS URLS

****************/

$cdn_css_url = wp_remote_fopen('http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css', 'r');

if($cdn_css_url !== false) {
	
	
	 function cutedoctor_cdn_css()
	 {
		
		wp_enqueue_style('font_awesome', 'http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css', false); 
		 
		 
		 }
	add_action('wp_enqueue_scripts', 'cutedoctor_cdn_css');
	
	} else
	{
		
		function cutedoctor_local_css_set()
		
		{
			wp_enqueue_style('font_awesome', CD_THEME_FILES . 'fonts/font-awesome-3.2/css/font-awesome.min.css', false );
			
			
			
			}
			add_action ('wp_enqueue_scripts', 'cutedoctor_local_css_set');
		
		}
		

 /*******************
   //jQuery Library
 *************/

		if (!is_admin()) add_action("wp_enqueue_scripts", "jquery_library", 11);
		function jquery_library() {
		   wp_deregister_script('jquery');
		   wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js", false, null);
		   wp_enqueue_script('jquery');
		}
		
/******************

 // jQuery UI
 
*******************/

     function jQuery_ui_root(){
			  
			  if(!is_admin()){
				  
			wp_register_script('jquery_ui', "http://code.jquery.com/ui/1.10.4/jquery-ui.js", false, null);
		    wp_enqueue_script('jquery_ui');
				  
			      }
			  
			  }
			add_action('wp_enqueue_scripts', 'jQuery_ui_root', 15); 
		

/***************************

// HELPER JS SCRIPTS

***************************/	
		
		function js_helpers() {
			
			if(is_page_template( 'facebook.php' )): wp_enqueue_script('facebook_custom_js', CD_THEME_FILES. 'js/fb-apps.jquery.js', array(), '', true ); else : wp_enqueue_script('theme_js', CD_THEME_FILES. 'js/main.js', array(), '', true ); endif;
			if(is_page_template( 'facebook.php' )) : wp_enqueue_script('flexslider_js', CD_THEME_FILES. 'js/jquery.flexslider-min.js', array(), '', true ); endif;
			
			wp_enqueue_script('bootstrap_js', CD_THEME_FILES. 'js/bootstrap/bootstrap.min.js', array('jquery'), '2.3.2', true );
			wp_enqueue_script('bootstrap_collapse_js', CD_THEME_FILES. 'js/bootstrap/bootstrap-collapse.js', array('jquery'), '2.3.2', true );
			wp_enqueue_script('mordenizr_respond_js', CD_THEME_FILES. 'js/modernizr-2.6.2-respond-1.1.0.min.js', array('jquery'), '', true );
			wp_enqueue_script('fitvids_js', CD_THEME_FILES. 'js/jquery.fitvids.js', array('jquery'), '', true );
			wp_enqueue_script('thumbnail_scroller_js', CD_THEME_FILES. 'vendors/jquery.thumbnailScroller.js', array('jquery'), '', true );
			wp_enqueue_script('scroll_to_top_js', CD_THEME_FILES. 'vendors/jquery.scrollUp.min.js', array('jquery'), '', true );
			wp_enqueue_script('magnific_pop_up_js', CD_THEME_FILES. 'vendors/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), '', true );
			
			
			}
		add_action('wp_enqueue_scripts', 'js_helpers');
		
		
  /***************
  
  // IE init
  
  *****************/
		
		
		function cutedoctor_ie_set()
		{ 
		
		$script_ie = CD_THEME_FILES . 'js/ie-oldiejs.js';
			$ie_font_awesome_files = CD_THEME_FILES . 'fonts/font-awesome-3.2/css/font-awesome-ie7.css';
			$ie_oldie_files = CD_THEME_FILES . 'css/ie-oldie.css';
			
			echo '<!--[if lt IE 9]>' ;
    echo '<link href="'.$ie_font_awesome_files.'" rel="stylesheet" type="text/css">';
	 echo '<link href="'.$ie_oldie_files.'" rel="stylesheet" type="text/css">';
	echo '<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>';
	echo '<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>';
    echo '<script src="'.$script_ie.'"></script>' ;
	echo '<![endif]-->';
			
			}	
			
			add_action('wp_head', 'cutedoctor_ie_set', 20);
			
/******************

// GOOGLE FONT

********************/


	
	function cutedoctor_google_fonts()
	
	{
		if(!is_admin())
		wp_deregister_style('open-sans');
		wp_register_style('cute-doctor-open-sans' , 'http://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic', false);
		wp_enqueue_style('cute-doctor-open-sans');
		
		
		}
	add_action('wp_enqueue_scripts', 'cutedoctor_google_fonts', 5);
	
	
//EXCERPT CLASS
	
	
		class Excerpt {
	 
	// Default length (by WordPress)
	public static $length = 55;
	 
	// So you can call: my_excerpt('short');
	public static $types = array(
	'short' => 25,
	'regular' => 55,
	'long' => 100
	);
	 
	/**
	* Sets the length for the excerpt,
	* then it adds the WP filter
	* And automatically calls the_excerpt();
	*
	* @param string $new_length
	* @return void
	* @author Baylor Rae'
	*/
	public static function length($new_length = 55) {
	Excerpt::$length = $new_length;
	 
	add_filter('excerpt_length', 'Excerpt::new_length', 999);
	 
	Excerpt::output();
	}
	 
	// Tells WP the new length
	public static function new_length() {
	if( isset(Excerpt::$types[Excerpt::$length]) )
	return Excerpt::$types[Excerpt::$length];
	else
	return Excerpt::$length;
	}
	 
	// Echoes out the excerpt
	public static function output() {
	the_excerpt();
	}
	 
	}
	 
	// An alias to the class
	function custom_excerpt($length = 55) {
	Excerpt::length($length);
	}
	
	
/*********************

* @ Redux Framework

*************/





if ( !class_exists( 'ReduxFramework' ) && file_exists( CD_THEME_OPTIONS . 'ReduxCore/framework.php' ) ) {
    require_once( CD_THEME_OPTIONS . 'ReduxCore/framework.php' );
}


if ( !isset( $redux_demo ) && file_exists(CD_THEME_OPTIONS . 'options/config.php' ) ) {
    require_once( CD_THEME_OPTIONS . 'options/config.php');
}



/******************

* @ Damiracle echo

************************/

if(!function_exists('damiracle_echo')){
	
	function damiracle_echo(){
		
		$dami_web = 'http://damiracle.com';
		
		echo '<a href="'. $dami_web .'">Da Miracle</a>';
		
		
		}
	
	
	}
	
	// Breadcrumb

function the_breadcrumb() {
    global $post;
    echo '<ul id="breadcrumbs">';
    if (!is_home()) {
        echo '<li><a href="';
        echo get_option('home');
        echo '">';
        echo 'Home';
        echo '</a></li><li class="separator"> / </li>';
        if (is_category() || is_single()) {
            echo '<li>';
            the_category(' </li><li class="separator"> / </li><li> ');
            if (is_single()) {
                echo '</li><li class="separator"> / </li><li>';
                the_title();
                echo '</li>';
            }
        } elseif (is_page()) {
            if($post->post_parent){
                $anc = get_post_ancestors( $post->ID );
                $title = get_the_title();
                foreach ( $anc as $ancestor ) {
                    $output = '<li><a href="'.get_permalink($ancestor).'" title="'.get_the_title($ancestor).'">'.get_the_title($ancestor).'</a></li> <li class="separator">/</li>';
                }
                echo $output;
                echo '<span title="'.$title.'"> '.$title.'</span>';
            } else {
                echo '<li> '.get_the_title().'</li>';
            }
        }
    }
    elseif (is_tag()) {single_tag_title();}
    elseif (is_day()) {echo"<li>Archive for "; the_time('F jS, Y'); echo'</li>';}
    elseif (is_month()) {echo"<li>Archive for "; the_time('F, Y'); echo'</li>';}
    elseif (is_year()) {echo"<li>Archive for "; the_time('Y'); echo'</li>';}
    elseif (is_author()) {echo"<li>Author Archive"; echo'</li>';}
    elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {echo "<li>Blog Archives"; echo'</li>';}
    elseif (is_search()) {echo"<li>Search Results"; echo'</li>';}
    echo '</ul>';
}

/***

*@function for page, posts & other banners

***/

function cutedoctor_if_is_page_or_post_other(){
	
	if (is_page()){
		
		  get_template_part('layouts/templates/header', 'pagebanner');
		
		
		
		
		} elseif(is_404()){
			
			get_template_part('layouts/templates/header', 'fourzerofour');
			
			
			}
		elseif(is_single()){
			
			get_template_part('layouts/templates/header', 'singlebanner');
			
			
			
			} elseif(is_category() || is_archive() || is_year() || is_month() ||  is_day()){
				
				
				get_template_part('layouts/templates/header', 'otherbanner');
				
				}
	
	}

add_action('init', 'cutedoctor_if_is_page_or_post_other', 10);


/***

@function for social

***/

if(!function_exists('cutedoctor_social_links')){
	
	function cutedoctor_social_links(){?>
		
		<?php $options = get_option('redux_demo'); 
		
		$face_book = $options['opt-facebook-text'] ; 
		$twitter = $options['opt-twitter-text'] ;
		$google = $options['opt-google-text'] ;
		$rss = $options['opt-rss-text'] ;
		$linked_in = $options['opt-linkedin-text'] ;
		?>
		
		<ul class="">
		 <li><a href="<?php echo $face_book ?>"><i class="icon-facebook"></i> </a></li>
         <li><a href="<?php echo $twitter ?>"><i class="icon-twitter"></i> </a></li>
         <li><a href="<?php echo $google ?>"><i class="icon-google-plus"></i> </a></li>
         <li><a href="<?php echo $rss ?>"><i class="icon-rss"></i> </a></li>
         <li><a href="<?php echo $linked_in ?>"><i class="icon-linkedin"></i> </a></li>
         
		
		</ul>
		
		<?php }
	
	
	 add_action('init', 'cutedoctor_social_links', 0);
	
	}
	
	

			//ADD CUSTOM CSS IN REDUX FRAMEWORK
			
			add_action('wp_head' , 'display_custom_css');

			function display_custom_css()
			{?>
				
				  <style>
				  <?php $options = get_option('redux_demo');  ?>
				  
				   <?php echo $options['opt-ace-editor-css']; ?>
				  
				  </style>
				  
				  
				  
				  
				<?php }
<?php
add_action('init', 'slider_register');

function slider_register() 
{
	$labels = array(
		'name' => _x('Facebook SlideShow', 'post type general name'),
		'singular_name' => _x('facebook slider', 'post type singular name'),
		'add_new' => _x('Add New', 'facebook slider'),
		'add_new_item' => __('Add New facebook slider'),
		'edit_item' => __('Edit facebook slider'),
		'new_item' => __('New facebook slider'),
		'view_item' => __('View facebook slider'),
		'search_items' => __('Search facebook slider'),
		'not_found' =>  __('No facebook slider found'),
		'not_found_in_trash' => __('No facebook slider found in Trash'), 
		'parent_item_colon' => ''
	);
	
	$args = array(
		'labels' => $labels,
		'public' => true,
		'supports' => array('title','thumbnail','excerpt','editor')
	);
	
	
	register_post_type( 'slider' , $args );
	
	
	register_taxonomy("slider-cat", 
		array("slider"), 
		array(	
			"hierarchical" => true, 
			"label" => "Categories", 
			"singular_label" => "Categories", 
			"rewrite" => array( 'slug' => 'slider_ct' ),
			"query_var" => true
	));  
}
//tags
add_action( 'init', 'create_tag_taxonomies_slider', 0 );
function create_tag_taxonomies_slider() 
{
  // Add new taxonomy, NOT hierarchical (like tags)
  $labels = array(
    'name' => _x( 'Tags', 'taxonomy general name' ),
    'singular_name' => _x( 'Tag', 'taxonomy singular name' ),
    'search_items' =>  __( 'Search Tags' ),
    'popular_items' => __( 'Popular Tags' ),
    'all_items' => __( 'All Tags' ),
    'parent_item' => null,
    'parent_item_colon' => null,
    'edit_item' => __( 'Edit Tag' ), 
    'update_item' => __( 'Update Tag' ),
    'add_new_item' => __( 'Add New Tag' ),
    'new_item_name' => __( 'New Tag Name' ),
    'separate_items_with_commas' => __( 'Separate tags with commas' ),
    'add_or_remove_items' => __( 'Add or remove tags' ),
    'choose_from_most_used' => __( 'Choose from the most used tags' ),
    'menu_name' => __( 'Tags' ),
  ); 

  register_taxonomy('tag','slider',array(
    'hierarchical' => false,
    'labels' => $labels,
    'show_ui' => true,
    'update_count_callback' => '_update_post_term_count',
    'query_var' => true,
    'rewrite' => array( 'slug' => 'tag' ),
  ));
}

add_action('wp_print_scripts', 'my_script_images');
function my_script_images() {
    if(is_admin()){
		wp_deregister_script('autosave');
        wp_enqueue_script('custom_admin_script', get_bloginfo('template_url').'/js/admin.js', array('jquery'));
		wp_enqueue_style('property-style', get_bloginfo('template_url').'/css/admin-property-style.css');
    }   
}



?>
<?php


add_action('init', 'register_lenswork');

function register_lenswork() 
{
	$labels = array(
		'name' => _x('Lenswork', 'post type general name'),
		'singular_name' => _x('lenswork', 'post type singular name'),
		'add_new' => _x('Add Lensworks', 'dignitaries'),
		'add_new_item' => __('Add New Lenswork'),
		'edit_item' => __('Edit Lenswork'),
		'new_item' => __('New Lenswork'),
		'view_item' => __('View Lenswork'),
		'search_items' => __('Search Lenswork'),
		'not_found' =>  __('No Lensworks found'),
		'not_found_in_trash' => __('No Lensworks found in Trash'), 
		'parent_item_colon' => ''
	);
	
	$args = array(
		'labels' => $labels,
		'public' => true,
		'supports' => array('title','thumbnail', 'editor','excerpt'),
		'menu_position'=> 25,
		'menu_icon' => CD_IMGS.('cd.png'),
		'has_archive'   => true
	);
	
	
	register_post_type( 'lensworks' , $args );
	
	
	register_taxonomy("lensworks-cat", 
		array("lensworks"), 
		array(	
			"hierarchical" => true, 
			"label" => "Lenswork Category", 
			"singular_label" => "Categories", 
			"rewrite" => array( 'slug' => 'lensworks_cp' ),
			"query_var" => true
	));  
}

//tags
add_action( 'init', 'create_tag_taxonomies_lensworks', 0 );
function create_tag_taxonomies_lensworks() 
{
  // Add new taxonomy, NOT hierarchical (like tags)
  $labels = array(
    'name' => _x( 'Tags', 'taxonomy general name' ),
    'singular_name' => _x( 'Tag', 'taxonomy singular name' ),
    'search_items' =>  __( 'Search Tags' ),
    'popular_items' => __( 'Popular Tags' ),
    'all_items' => __( 'All Tags' ),
    'parent_item' => null,
    'parent_item_colon' => null,
    'edit_item' => __( 'Edit Tag' ), 
    'update_item' => __( 'Update Tag' ),
    'add_new_item' => __( 'Add New Tag' ),
    'new_item_name' => __( 'New Tag Name' ),
    'separate_items_with_commas' => __( 'Separate tags with commas' ),
    'add_or_remove_items' => __( 'Add or remove tags' ),
    'choose_from_most_used' => __( 'Choose from the most used tags' ),
    'menu_name' => __( 'Tags' ),
  ); 

  register_taxonomy('tag_lensworks','lensworks',array(
    'hierarchical' => true,
    'labels' => $labels,
    'show_ui' => true,
    'update_count_callback' => '_update_post_term_count',
    'query_var' => true,
    'rewrite' => array( 'slug' => 'tag_lensworks' ),
  ));
}


<?php


define('CD_CORE' , get_template_directory(). '/core/');
define('CD_FUNCTIONS_DIR', CD_CORE . 'functions/' );
define ('CD_CUSTOM_POST_DIR', CD_CORE . 'custom-posts/');
define('CD_LIBRARY' , CD_CORE . 'lib/' );
define('CD_THEME_OPTIONS' , CD_CORE . 'theme-options/' );

/****REQUIRES***************/

function cutedoctor_requires(){
require_once(CD_FUNCTIONS_DIR . 'theme-functions.php');
require_once(CD_FUNCTIONS_DIR . 'wp_bootstrap_navwalker.php');
require_once(CD_FUNCTIONS_DIR . 'dynamic-classes.php');
require_once(CD_CUSTOM_POST_DIR. 'cp-inc.php');
require_once(CD_LIBRARY. 'meta-boxes/meta.php');
require_once(CD_LIBRARY. 'sidebar/sidebar_generator.php');
require_once(CD_LIBRARY. 'widgets/recent-posts-widgets.php');
require_once(get_template_directory(). '/layouts/front/js/map-js.php');
}
add_action('init', 'cutedoctor_requires', 0);

// Hide admin-bar from frontend when logged in
add_action('admin_bar_init', 'my_admin_bar');

if(!function_exists('my_admin_bar')){
function my_admin_bar()
{
	remove_action('wp_head', '_admin_bar_bump_cb');
	add_action ('wp_head', '_admin_bar_new');
	remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
	
	
	}

function _admin_bar_new(){ ?>
	
   <style type="text/css">
   html { margin-top: 0px !important; }
	* html body { margin-top: 0px !important; }
	@media screen and ( max-width: 782px ) {
		html { margin-top: 0px !important; }
		* html body { margin-top: 0px !important; }
	}
   
   
   </style>
	
	<?php
	}

}



function ag_remove_cmb_metaboxes(){
	
    global $post;
    $id = $post->ID;
	
	if ( ! empty( $post ) ) : 
if( $id == 21){?>
	<script type="text/javascript">
    jQuery(document).ready(function($){
    jQuery('#test_metabox_img') .hide();
    });
    </script>
<?php }

endif;
	
}
add_action( 'admin_head', 'ag_remove_cmb_metaboxes' );

<?php
/**
 * The header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content">
 *
 * @package cutedoctor
 */
?><!DOCTYPE html>
 <!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
    <!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
    <!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
    <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

  
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>


<?php $options = get_option('redux_demo'); ?>

		<?php 
        /*******
        
        * For Facebook App Page
        
        
        ******/
        
         ?>
<?php if(is_page_template( 'facebook.php' )) : ?>
  
  <div class="container bg-wrapper">
   <div class="row-fluid">
    <div class="header-wrapper">
  <div class="span12 header-slider" >
  
    <div class="flexslider">
          <ul class="slides">
			<?php 
				$cat = get_query_var('slider-cat');
			
				$args = array(	
					'post_type'=> 'slider',
					'posts_per_page' => -1,
					'order'    => 'DESC'
					
				); 
				
				$the_query = new WP_Query( $args );
				if($the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
						<li>
							<img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>"  alt="image01" data-description="" />
							 <div class="captions">
								<?php the_content();?>
								
							</div>
						</li>
					<?php endwhile; ?>
				<?php endif; ?>
          </ul>
        </div>
  
  </div><!-----/span12 header-slider------------------>
  
  </div> <!----/header-wrapper------------------->
  </div><!------/row-fluid------------------->
  </div> <!-----/container-------->
  <!----------End of Facebook Page Header------------------------->
  
  <?php else : ?>
  
  <?php 
        /*******
        
        * For All Others
        
        
        ******/
        
         ?>
         
 <header class="header">
      <div class="header-social-fixed-widgets"> <?php cutedoctor_social_links();  ?></div>
      <div class="header-top">
      
        <div class="container" >
        
           <div class="row-fluid">
           
                <div class="span12">
                  <div class="search-box offset8 hidden-phone">
               <?php get_template_part('layouts/templates/searchform', 'header'); ?>
                  
                  </div>  <!--------/search-box hidden-phone--------------------->
                  
                  
                   <div class="search-box hidden-desktop hidden-tablet">
                   
                  <?php get_template_part('layouts/templates/searchform', 'header'); ?>
                  
                  </div> <!------/search-box hidden-desktop hidden-tablet------------------------->
                
                
                </div><!------/span12------------------------>
           </div><!---------/row-fluid----------------->
        
        </div><!-----/container----------------->
      
      </div><!------/header-top----------->
 
            <!---------------Header Bottom-------------------->
               <div class="header-bottom">
                  <div class="container">
                     <div class="row-fluid">
                     
                       <div class="header-bottom-wrapper">
                       
                       <!---------Left Wrapper----------------------->
                           <div class="span3">
                             <div class="left-wrapper">
                             
                               <div class="logo-box">
                               <?php $logo_image = $options['opt-logo-media']['url']; ?>
                               
                               <?php  if($logo_image) { ?>
                               <a href="<?php echo esc_url( home_url());  ?>">
                                <img title="<?php echo bloginfo('name'); ?>" src="<?php echo esc_url($logo_image);?>" alt="<?php echo bloginfo('name'); ?>"></a>
                               
                               <?php } else {?>
                               
                               <h1><a href="<?php echo esc_url( home_url());  ?>"><?php bloginfo('name');  ?></a>/h1>
                               
                               <?php } ?>
                               </div><!----/logo-box----------->
                             
                                    <div class="info-box">
                                    
                                       <p><i class="icon-envelope"></i> <span><?php echo $options['opt-info-text'];   ?></span></p>
                                        <p><i class="icon-phone"></i> <span><?php echo $options['opt-info-telno'] ;  ?></span></p>
                                    </div><!-----/info-box------------------->
                             </div><!-----/left-wrapper--------->
                           </div><!----/span3--------->
                           
                           <!-----------Right Wrapper---------------------------------->
                           
                               <div class="span9">
                                <div class="right-wrapper">
                                   <div class="welcome-text">
                                     <p><span><?php echo $options['opt-dr-name']  ?></span><?php echo $options['opt-dr-deg']; ?></p>
                                     <p><?php echo $options['opt-dr-designation']   ?></p>
                                   
                                   </div><!-------/welcome-text---------------------->
                                   
                                   
                                   <!--------Navigations----------------------->
                                   
                             <div class="navbar">
                                   <a class=" btn-navbar"  data-toggle="collapse" data-target= "#mm01">
                                                            <span class="icon-align-justify"></span>
                                                            
                                                       </a>
                                                       
                                                       <div id="mm01" class="nav-collapse collapse" >
                                                       
                                                                  
                                                                   <?php 
																  if(has_nav_menu('primary')){

																wp_nav_menu( array(
																	
																	'theme_location'  => 'primary',
																	'menu'       => '',

																	'depth'      => 2,

																	'container'  => '',

																	'container_class' => '', //This is the class of div inside which the ul lies

																	'menu_class' => 'main-menu pull-right',   // This is the class defined for the ul

																	'fallback_cb' => 'wp_page_menu',

																	//Process nav menu using our custom nav walker

																	'walker' => new wp_bootstrap_navwalker()

																	)

																);
																  }

																 ?>
                                                         
                                                         </div> <!-----/nav-collapse---------------> 
                              
                             
                             </div><!---------/nav-wrapper---------------------->
                               
                               </div> <!------/right-wrapper----------------->
                               </div><!--------/span9--------------->
                       
                       
                       </div><!---------/header-bottom-wrapper-------------------->
                     
                     </div><!-------/row-fluid-------------->
                  
                  </div><!------/container------------------>
               </div><!--------/header-bottom---------------------->
 
 </header><!------/header------------------------->
 
 
             <!--------------------BANNER-------------------------->
              
              <section>
              <?php  
			  /**
			  
			  * @ Banner Template includes
			  
			  
			  **/
			  
			   ?>
              <?php 
			 
			  if (is_front_page()  ) {?>
              <?php get_template_part('layouts/templates/header', 'banner');   ?>
              
                <?php } elseif(is_home()) { ?>
                
                <?php get_template_part('layouts/templates/header', 'banner');   ?>
                
                <?php } elseif(is_page(90)) {?>
                
                  <?php get_template_part('layouts/templates/header', 'contacthead');   ?>
                
                <?php } ?>
                
                </section> <!---------/END OF BANNER------------------------------>
                
                
                <!--------CONTENT STARTS-------------------------->
                
                <section class="content-wrapper">
                 
                   <div class="container">
                   
                    <div class="row-fluid">
                    
                    <?php endif;  ?>
<?php
/**
 * The template used for displaying page content in page-home.php
 *
 * @package cutedoctor
 */
?>
<?php $options = get_option('redux_demo'); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

        <div class="facebook-page-content-wrapper bg-wrapper clearfix">
        
          <div class="span6">
           <ul class="facebook-post-wrapper">
            <?php $the_query = new WP_Query( 'showposts= 4' ); ?>

            <?php 
			
			while ($the_query -> have_posts()) : $the_query -> the_post();
			 ?>
             <li>
              <h1 class="stylish-h1"><span><?php the_title();  ?></span></h1>
               <div class="post-content">
              <p class="img"> <?php if ( has_post_thumbnail() ) { 	the_post_thumbnail('facebook_pg'); } ?>
              </p> <!-----/img---------->
              
              <p class="text"><?php echo substr(strip_tags($post->post_content), 0, 155);?>
                
                <span class="post-content-bottom">
                <span class="con-left" >
                  
                 <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?>
                  </span>
                <span class="con-right">
                  <a  href="<?php the_permalink(); ?>">More &nbsp;<i class="icon-caret-right"></i></a>
                </span>
                </span>
                </p> <!----/text------------>
                
                   <ul class="post-sharing">
                     <li><a href=""><i class="icon-facebook-sign"></i></a></li>
                     <li><a href=""><i class="icon-twitter-sign"></i></a></li>
                     <li><a href=""><i class="icon-envelope"></i></a></li>
                     <li><?php comments_popup_link('0', '1 comment', '% comments', 'comments-style'); ?><i class="icon-comments-alt"></i></li>
                   </ul>
               </div><!---/post-content------------->
               
             
             </li> <!--------End of Posts------------------->
           <?php endwhile;?>
           
           </ul>
          </div><!----/span6-------------->
          
            <!----------End of Posts------------------------->
            
           <div class="span6 ">
          <div class="right-container-wrapper">
                  <div  class="facebook-about-doctor" margin-bot="ninety-two">
                  <h1 class="stylish-h1"><span> ABOUT <span class="about-text-before"><?php  echo $options['opt-dr-name']; ?> </span></span></h1>
                     <div class="span12">
                    <div class="span6 facebook-about-doctor-img-wrapper">
                    
                    <img src="<?php echo $options['opt-about-us-media']['url']; ?>" >
                    </div> <!-----/span6-------------->
                    
                            <div class="span6 facebook-about-doctor-content" >
                            <p>
                            <?php  echo substr ( strip_tags( $options['opt-dr-txt-editor'] ),0, 155 ); ?>
                            </p>
                             <p class="pull-right">
                  <a  href="<?php  echo $options['opt-what-makes-tab']; ?>">More &nbsp;<i class="icon-caret-right"></i></a>
                </p>
                            </div> <!------/span6 facebook-about-doctor-content----------------------->
                    </div>
                  </div> <!----/facebook-about-doctor--------------------->
                 
                  <!-------End of About Doctor---------------------->
                   <div class="clearfix"></div>
                   
                  <div class="my-researches" margin-bot="sixty-five">
                   <h1 class="stylish-h1"><span> My Reserach Interests</span></h1>
                  
                   <ul>
                      <?php
											   $args_sem = array(
											   
											   'post_type' => 'researches',
											   'order'     => 'DESC'
											   
											   );
				  
				  							$query_sem = new WP_Query($args_sem);
				  
				  					if($query_sem -> have_posts()) : while($query_sem -> have_posts()) : $query_sem -> the_post();
				  					?>
                              <li><p><a href="<?php echo the_permalink(); ?>"><?php the_excerpt(); ?></a></p></li>
                                      
                                   <?php endwhile; ?>
                                   <?php endif; ?>
                                   <?php wp_reset_postdata(); ?>
                   
                   
                   </ul>
                  
                  <p class="pull-right">
                  <a  href="<?php  echo $options['opt-facebook-info-text']; ?>">More &nbsp;<i class="icon-caret-right"></i></a>
                </p>
                  </div> <!-------/my-researches-------------------------->
                  
                  <!---------End of Researches-------------------->
                   <div class="clearfix"></div>
                   
                   <div class="lens-work" margin-bot="ninety-two">
                   <h1 class="stylish-h1"><span> Lens Work</span></h1> 
                    <div id="flexslider" class="carousel">
                    
                     <ul class="slides">
                                       <?php
											   $args_car = array(
											   
											   'post_type' => 'lensworks',
											   'order'     => 'DESC',
											   'post_per_page' => -1
											   );
				  
				  							$query_car = new WP_Query($args_car);
				  
				  					if($query_car -> have_posts()) : while($query_car -> have_posts()) : $query_car -> the_post();
				  					?>
                                     <?php $small_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'facebook_car'); ?>
                                  <li><img src="<?php echo $small_image_url[0] ?>"  alt="<?php the_title(); ?>" /></li>
                      
                                  <?php endwhile; ?>
                                   <?php endif; ?>
                                   <?php wp_reset_postdata(); ?>

                     </ul>
                    </div><!---/flexslider------------>
                   
                   </div><!------/lens-work------------------------->
                   
                   <!-------END OF LENS WORK------------------------------->
                   <div class="clearfix"></div>
                   
                    <div class="facebook-logos-wrapper" >
                      
                        <ul>
                         <li><img src="<?php echo $options['opt-facebook-logo1-media']['url']; ?>" ></li>
                         <li><img src="<?php echo $options['opt-facebook-logo2-media']['url']; ?>" ></li>
                        </ul>
                        <div class="pull-right">
                        <?php $logo_image = $options['opt-logo-media']['url']; ?>
                               
                               <?php  if($logo_image) { ?>
                               <a href="<?php echo esc_url( home_url());  ?>">
                                <img title="<?php echo bloginfo('name'); ?>" src="<?php echo esc_url($logo_image);?>" alt="<?php echo bloginfo('name'); ?>"></a>
                               
                               <?php } else {?>
                               
                               <h1><a href="<?php echo esc_url( home_url());  ?>"><?php bloginfo('name');  ?></a>/h1>
                               
                               <?php } ?>
                        
                        
                        </div>
                    </div> <!--------/facebook-logos-wrapper-------------------->
                    <!------------End of Logos------------------------------->
           </div> <!-------/right-container-wrapper----------------------->
          </div><!----/span6-------------->
             
        </div><!-----/facebook-page-content-wrapper bg-wrapper----------------------->
     
   
	
</article><!-- #post-## -->
<?php
/**
 * Dynamic Classes
 *
 * @package ThematicCoreLibrary
 * @subpackage DynamicClasses
 */
 

if ( function_exists( 'childtheme_override_body_class' ) )  {
	/**
	 * @ignore
	 */
	 function thematic_body_class() {
		childtheme_override_body_class();
	}
} else {
	/**
	 * Generates semantic classes for BODY element
	 *
	 * @param array $c body classes
	 */
	function thematic_body_class( $c ) {
		global $wp_query, $current_user, $blog_id, $post, $taxonomy;
	
		if ( apply_filters('thematic_show_bc_wordpress', TRUE ) ) {
	        // It's surely a WordPress blog, right?
	        $c[] = 'wordpress';
	    }
	    
	    if ( apply_filters( 'thematic_show_bc_blogid', TRUE) ) {
	    	// Applies the blog id to BODY element .. blog-id1 for WordPress < 3.0
	    	$c[] = 'blogid-' . $blog_id;
	    }
	
		if ( apply_filters( 'thematic_show_bc_datetime', TRUE) ) {
	        // Applies the time- and date-based classes (below) to BODY element
	        thematic_date_classes( time(), $c );
	    }
	
	    if ( apply_filters( 'thematic_show_bc_contenttype', TRUE ) ) {
	        // Generic semantic classes for what type of content is displayed
	        is_front_page()  ? $c[] = 'home'       : null; // For the front page, if set
	        is_home()        ? $c[] = 'blog'       : null; // For the blog posts page, if set
	        is_archive()     ? $c[] = 'archive'    : null;
	        is_date()        ? $c[] = 'date'       : null;
	        is_search()      ? $c[] = 'search'     : null;
	        is_paged()       ? $c[] = 'paged'      : null;
	        is_attachment()  ? $c[] = 'attachment' : null;
	        is_404()         ? $c[] = 'four04'     : null; // CSS does not allow a digit as first character
	    }
	
	    if ( apply_filters( 'thematic_show_bc_singular', TRUE) ) {
	        // Special classes for BODY element when a singular post
	        if ( is_singular() ) {
	            $c[] = 'singular';
	        } else {
	            $c[] = 'not-singular';
	        }
	    }
	if ( is_single() && apply_filters( 'thematic_show_bc_singlepost', TRUE ) ) {
			$postID = $wp_query->post->ID;
			the_post();
	
	        // Adds post slug class, prefixed by 'slug-'
	        $c[] = 'slug-' . $wp_query->post->post_name;
	
			// Adds 'single' class and class with the post ID
			$c[] = 'single';
			$c[] = 'postid-' . $postID;
	
			// Adds classes for the month, day, and hour when the post was published
			if ( isset( $wp_query->post->post_date ) )
				thematic_date_classes( mysql2date( 'U', $wp_query->post->post_date ), $c, 's-' );
	
		// Special classes for BODY element when a single post
		
			// Adds category classes for each category on single posts
			if ( $cats = get_the_category() )
				foreach ( $cats as $cat )
					$c[] = 's-category-' . $cat->slug;

			// Adds tag classes for each tag on single posts
			if ( $tags = get_the_tags() )
				foreach ( $tags as $tag )
					$c[] = 's-tag-' . $tag->slug;

			// Adds taxonomy classes for each term on single posts
			$single_post_type = get_post_type_object( get_post_type( $post->ID ) );
			
			// Check for post types without taxonomy inclusion
			if ( isset( $single_post_type->taxonomy ) ) {
			    if ( $tax = get_the_terms( $post->ID, get_post_taxonomies() ) ) {
			    	foreach ( $tax as $term )   { 
			    		// Remove tags and categories from results
			    		if  ( $term->taxonomy != 'post_tag' )	{
			    			if  ( $term->taxonomy != 'category' )   { 
			    				$c[] = 's-tax-' . $term->taxonomy;
			    				$c[] = 's-' . $term->taxonomy . '-' . $term->slug;
			    			}
			    		}
			    	}
			    }
			}
			
			// Adds MIME-specific classes for attachments
			if ( is_attachment() ) {
				$mime_type = get_post_mime_type();
				$mime_prefix = array( 'application/', 'image/', 'text/', 'audio/', 'video/', 'music/' );
					$c[] = 'attachmentid-' . $postID . ' attachment-' . str_replace( $mime_prefix, "", "$mime_type" );
			}
	
			// Adds author class for the post author
			$c[] = 's-author-' . sanitize_title_with_dashes( strtolower( get_the_author_meta( 'user_nicename', $post->post_author ) ) );
			rewind_posts();
			
			// For posts with excerpts
			if ( has_excerpt() )
				$c[] = 's-has-excerpt';
				
			// For posts with comments open or closed
			if ( comments_open() ) {
				$c[] = 's-comments-open';		
			} else {
				$c[] = 's-comments-closed';
			}
		
			// For posts with pings open or closed
			if ( pings_open() ) {
				$c[] = 's-pings-open';
			} else {
				$c[] = 's-pings-closed';
			}
		
			// For password-protected posts
			if ( $post->post_password )
				$c[] = 's-protected';
		
			// For sticky posts
			if ( is_sticky() )
			   $c[] = 's-sticky';		
			
		}
	
		// Author name classes for BODY on author archives
		elseif ( is_author() && apply_filters( 'thematic_show_bc_authorarchives', TRUE ) ) {
			$author = $wp_query->get_queried_object();
			$c[] = 'author';
			$c[] = 'author-' . $author->user_nicename;
		}
	
		// Category name classes for BODY on category archvies
		elseif ( is_category() && apply_filters( 'thematic_show_bc_categoryarchives', TRUE ) ) {
			$cat = $wp_query->get_queried_object();
			$c[] = 'category';
			$c[] = 'category-' . $cat->slug;
		}
	
		// Tag name classes for BODY on tag archives
		elseif ( is_tag() && apply_filters('thematic_show_bc_tagarchives', TRUE ) ) {
			$tags = $wp_query->get_queried_object();
			$c[] = 'tag';
			$c[] = 'tag-' . $tags->slug;
		}
		
		// Taxonomy name classes for BODY on tag archives
		
		elseif ( is_tax() && apply_filters( 'thematic_show_bc_taxonomyarchives', TRUE) ) {
			$c[] = 'taxonomy';
			$c[] = 'tax-' . $taxonomy;
			$c[] = $taxonomy . '-' . strtolower(thematic_get_term_name());
		}
	
		// Page author for BODY on 'pages'
		elseif ( is_page() && apply_filters( 'thematic_show_bc_pages', TRUE ) ) {
			$pageID = $wp_query->post->ID;
			$page_children = wp_list_pages( "child_of=$pageID&echo=0" );
			the_post();
	
	        // Adds post slug class, prefixed by 'slug-'
	        $c[] = 'slug-' . $wp_query->post->post_name;
	
			$c[] = 'page';
			$c[] = 'pageid-' . $pageID;
			
			$c[] = 'page-author-' . sanitize_title_with_dashes( strtolower( get_the_author_meta( 'user_nicename', $post->post_author) ) );
			
			// Checks to see if the page has children and/or is a child page; props to Adam
			if ( $page_children )
				$c[] = 'page-parent';
			if ( $wp_query->post->post_parent )
				$c[] = 'page-child parent-pageid-' . $wp_query->post->post_parent;
				
			// For pages with excerpts
			if ( has_excerpt() )
				$c[] = 'page-has-excerpt';
				
			// For pages with comments open or closed
			if ( comments_open() ) {
				$c[] = 'page-comments-open';		
			} else {
				$c[] = 'page-comments-closed';
			}
		
			// For pages with pings open or closed
			if ( pings_open() ) {
				$c[] = 'page-pings-open';
			} else {
				$c[] = 'page-pings-closed';
			}
		
			// For password-protected pages
			if ( $post->post_password )
				$c[] = 'page-protected';			
				
			// Checks to see if the page is using a template	
			if ( is_page_template() & !is_page_template('default') )
				$c[] = 'page-template page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
			rewind_posts();
		}
	
		// Search classes for results or no results
		elseif ( is_search() && apply_filters( 'thematic_show_bc_search', TRUE ) ) {
			the_post();
			if ( $wp_query->found_posts > 0 ) {
				$c[] = 'search-results';
			} else {
				$c[] = 'search-no-results';
			}
			rewind_posts();
		}
	
		if ( apply_filters( 'thematic_show_bc_loggedin', TRUE ) ) {
	        // For when a visitor is logged in while browsing
	        if ( $current_user->ID )
	            $c[] = 'loggedin';
	    }
	
	 // Paged classes; for page x > 1 classes of index and all post types etc.
		if ( isset( $post ) && apply_filters( 'thematic_show_bc_pagex', TRUE ) ) {
			if ( ( ( ( $page = $wp_query->get( 'paged' ) ) || ( $page = $wp_query->get('page') ) ) && $page > 1 ) ) {
				// Thanks to Prentiss Riddle, twitter.com/pzriddle, for the security fix below. 
				$page = intval( $page ); // Ensures that an integer (not some dangerous script) is passed for the variable
 					$c[] = 'paged-' . $page;
 				if ( thematic_is_custom_post_type() ) {
 							$c[] = str_replace( '_','-',$post->post_type ) . '-paged-' . $page;
 					} elseif ( is_single() && $post->post_type=="post"  ) {
				        $c[] = 'single-paged-' . $page;
					} elseif ( is_page() ) {
				        $c[] = 'page-paged-' . $page;
					} elseif ( is_category() ) {
				        $c[] = 'category-paged-' . $page;
					} elseif ( is_tag() ) {
				        $c[] = 'tag-paged-' . $page;
					} elseif ( is_tax() ) {
				        $c[] = 'taxonomy-paged-' . $page;
					} elseif ( is_date() ) {
				        $c[] = 'date-paged-' . $page;
					} elseif ( is_author() ) {
				        $c[] = 'author-paged-' . $page;
					} elseif ( is_search() ) {
				        $c[] = 'search-paged-' . $page;
 				} 
 			// Paged classes; for page x = 1	For all post types
 			} elseif ( preg_match( '/<!--nextpage(.*?)-->/', $post->post_content ) )  { 
 				if ( thematic_is_custom_post_type() ) {
				    	$c[] = str_replace( '_','-',$post->post_type ) . '-paged-1';
 				    } elseif (is_page()) {
				    	$c[] = 'page-paged-1';
 				    } elseif (is_single())  {
				    	$c[] = 'single-paged-1';
				}
  			}
  		}

		// And tada!
		return array_unique(apply_filters( 'thematic_body_class', $c )); // Available filter: thematic_body_class
	}
}

/**
 * Add thematic body classes if child theme activates it
 */
function thematic_activate_body_classes() {
	if ( current_theme_supports ( 'thematic_legacy_body_class' ) ) {
		add_filter( 'body_class', 'thematic_body_class', 20 );
	}
	
	// Add browser CSS class to the end (queuing through priority) of the body classes 
	if ( apply_filters( 'thematic_show_bc_browser', TRUE ) ) {
		add_filter( 'body_class', 'thematic_browser_class_names', 30 ); 
	}
}
add_action( 'init', 'thematic_activate_body_classes' );



/**
 * thematic_browser_class_names function.
 */
function thematic_browser_class_names($classes) {
	// add 'class-name' to the $classes array
	// $classes[] = 'class-name';
	$browser = $_SERVER[ 'HTTP_USER_AGENT' ];
		
	// Mac, PC ...or Linux
	if ( preg_match( "/Mac/", $browser ) ){
		$classes[] = 'mac';
			
	} elseif ( preg_match( "/Windows/", $browser ) ){
		$classes[] = 'windows';
			
	} elseif ( preg_match( "/Linux/", $browser ) ) {
		$classes[] = 'linux';
	
	} else {
		$classes[] = 'unknown-os';
	}
		
	// Checks browsers in this order: Chrome, Safari, Opera, MSIE, FF
	if ( preg_match( "/Chrome/", $browser ) ) {
		$classes[] = 'chrome';
		
		if ( ( current_theme_supports( 'minorbrowserversion_all' )) || ( current_theme_supports( 'minorbrowserversion_ch' ) ) ) {
			preg_match( "/Chrome\/(\d+.\d+)/si", $browser, $matches );
			$ch_version = 'ch' . str_replace( '.', '-', $matches[1] );
		} else {
			preg_match( "/Chrome\/(\d+)/si", $browser, $matches );
			$ch_version = 'ch' . $matches[1];
		}      
		$classes[] = $ch_version;
	
	} elseif ( preg_match( "/Safari/", $browser ) ) {
		$classes[] = 'safari';
				
		if ( ( current_theme_supports( 'minorbrowserversion_all' )) || ( current_theme_supports( 'minorbrowserversion_sf' ) ) ) {
			preg_match( "/Version\/(\d+.\d+)/si", $browser, $matches );
			$sf_version = 'sf' . str_replace( '.', '-', $matches[1] );
		} else {
			preg_match( "/Version\/(\d+)/si", $browser, $matches );
			$sf_version = 'sf' . $matches[1];
			
		}     
		$classes[] = $sf_version;
				
	} elseif ( preg_match( "/Opera/", $browser ) ) {
		$classes[] = 'opera';
				
		if ( ( current_theme_supports( 'minorbrowserversion_all' ) ) || ( current_theme_supports( 'minorbrowserversion_op' ) ) ) {
			preg_match( "/Version\/(\d+.\d+)/si", $browser, $matches );
			$op_version = 'op' . str_replace( '.', '-', $matches[1] );      
		} else {
			preg_match( "/Version\/(\d+)/si", $browser, $matches );
			$op_version = 'op' . $matches[1];      			
		}
		$classes[] = $op_version;
				
	} elseif ( preg_match( "/MSIE/", $browser ) ) {
		$classes[] = 'msie';
		
		if ( ( current_theme_supports( 'minorbrowserversion_all' )) || ( current_theme_supports( 'minorbrowserversion_ie' ) ) ) {
			preg_match( "/MSIE (\d+.\d+)/si", $browser, $matches );
			$ie_version = 'ie' . str_replace( '.', '-', $matches[1] );
		} else {
			preg_match( "/MSIE (\d+)/si", $browser, $matches );
			$ie_version = 'ie' . $matches[1];
			
		}
		$classes[] = $ie_version;
				
	} elseif ( preg_match( "/Firefox/", $browser ) && preg_match( "/Gecko/", $browser ) ) {
			$classes[] = 'firefox';
				
			if ( ( current_theme_supports( 'minorbrowserversion_all' ) ) || ( current_theme_supports( 'minorbrowserversion_ff' ) ) ) {
				preg_match( "/Firefox\/(\d+.\d+)/si", $browser, $matches );
				$ff_version = 'ff' . str_replace( '.', '-', $matches[1] );
			} else {
				preg_match( "/Firefox\/(\d+)/si", $browser, $matches );
				$ff_version = 'ff' . $matches[1];
			}      
			$classes[] = $ff_version;
				
	} else {
		$classes[] = 'unknown-browser';
	}
	// return the $classes array
	return $classes;
}


if (function_exists('childtheme_override_post_class'))  {
	/**
	 * @ignore
	 */
	 function thematic_post_class() {
		childtheme_override_post_class();
	}
} else {
	/**
	 * Generates semantic classes for each post DIV element
	 */
	function thematic_post_class( $c ) {

		global $post, $thematic_post_alt, $thematic_content_length, $taxonomy;
	
		// hentry for hAtom compliace, gets 'alt' for every other post DIV, describes the post type and p[n]
		$c[] = 'hentry';
		$c[] = "p$thematic_post_alt";
		$c[] =  str_replace( '_', '-', $post->post_type );
		$c[] =  $post->post_status ;
	
		// Author for the post queried
		$c[] = 'author-' . sanitize_title_with_dashes( strtolower( get_the_author_meta( 'user_login' ) ) );
	
		// Category for the post queried
		foreach ( ( array ) get_the_category() as $cat )
			$c[] = 'category-' . $cat->slug;
		
		// Tags for the post queried; if not tagged, use .untagged
		if ( get_the_tags() == null ) {
			$c[] = 'untagged';
		} else {
			foreach ( ( array ) get_the_tags() as $tag )
				$c[] = 'tag-' . $tag->slug;
		}
		
		if (function_exists('get_post_type_object')) {
			// Taxonomies and terms for the post queried
			$single_post_type = get_post_type_object( get_post_type( $post->ID ) );
			// Check for post types without taxonomy inclusion
			if ( isset($single_post_type->taxonomy) ) {
				foreach ( ( array ) get_the_terms( $post->ID, get_post_taxonomies() )  as $term  )   {
					// Remove tags and categories from results
					if  ( $term->taxonomy != 'category' )	{
						if  ( $term->taxonomy != 'post_tag' )   { 
							$c[] = 'p-tax-' . $term->taxonomy;
							$c[] = 'p-' . $term->taxonomy . '-' . $term->slug;
						}
					}
				}
			}
		}

		$thematic_excerpt_more = preg_match( '/<!--more(.*?)-->/', $post->post_content );

		// For posts displayed as excerpts
		if ( $thematic_content_length == 'excerpt' || ( !is_single() && $thematic_excerpt_more ) ) {
			$c[] = 'is-excerpt';
			if ( has_excerpt() ) {
				// For wp-admin Write Page generated excerpts
				$c[] = 'custom-excerpt';
			} elseif ( $thematic_excerpt_more ) {
				// For  more tag
				$c[] = 'moretag-excerpt';
			} else {
				// For auto generated excerpts
				$c[] = 'auto-excerpt';
			}
		// For posts displayed as full content
		} elseif (  $thematic_content_length == 'full'  )  {
				$c[] = 'is-full';
		}

						
		// For posts with comments open or closed
		if ( comments_open() ) {
			$c[] = 'comments-open';		
		} else {
			$c[] = 'comments-closed';
		}
	
		// For posts with pings open or closed
		if (pings_open()) {
			$c[] = 'pings-open';
		} else {
			$c[] = 'pings-closed';
		}
	
		// For password-protected posts
		if ( $post->post_password )
			$c[] = 'protected';
	
		// For sticky posts
		if (is_sticky())
		   $c[] = 'sticky';
	
		// Applies the time- and date-based classes (below) to post DIV
		thematic_date_classes( mysql2date( 'U', $post->post_date ), $c );
	
		// If it's the other to the every, then add 'alt' class
		if ( ++$thematic_post_alt % 2 )
			$c[] = 'alt';
	
	    // Adds post slug class, prefixed by 'slug-'
	    $c[] = 'slug-' . $post->post_name; 
	
		// And tada!
		return array_unique(apply_filters( 'thematic_post_class', $c )); // Available filter: thematic_post_class
	}
}

/**
 * Add thematic post classes if child theme activates it
 */
function thematic_activate_post_classes() {
	if ( current_theme_supports ( 'thematic_legacy_post_class' ) ) {
		add_filter( 'post_class', 'thematic_post_class', 20 );
	}
}
add_action( 'init', 'thematic_activate_post_classes' );

/**
 * Define the num val for 'alt' classes (in post DIV and comment LI)
 * 
 * @var int  (default value: 1)
 */
$thematic_post_alt = 1;



/** 
 * Adds classes to commment li's using the WordPress comment_class filter
 *
 * @since 1.0
 */
function thematic_add_comment_class($classes) {
    global $comment, $post;

    // Add time and date based classes
    thematic_date_classes( mysql2date( 'U', $comment->comment_date ), $classes, 'thm-c-' );

    // Do not duplicate values
    return array_unique( $classes );
}

add_filter( 'comment_class', 'thematic_add_comment_class', 20 );



if ( function_exists( 'childtheme_override_date_classes' ) )  {
	/**
	 * @ignore
	 */
	function thematic_date_classes() {
		childtheme_override_date_classes();
	}
} else {
	/**
	 * Generates time and date based classes relative to GMT (UTC)
	 */
	function thematic_date_classes( $t, &$c, $p = '' ) {
		$t = $t + ( get_option('gmt_offset') * 3600 );
		$c[] = $p . 'y' . gmdate( 'Y', $t ); // Year
		$c[] = $p . 'm' . gmdate( 'm', $t ); // Month
		$c[] = $p . 'd' . gmdate( 'd', $t ); // Day
		$c[] = $p . 'h' . gmdate( 'H', $t ); // Hour
	}
}

// Remember: Thematic, like The Sandbox, is for play.

?>