windhamdavid 10 years ago
parent
commit
8d5cfc1358
4 changed files with 44 additions and 29 deletions
  1. 1 1
      css/card.css
  2. 31 17
      functions.php
  3. 2 3
      inc/smtp.php
  4. 10 8
      page-desk.php

+ 1 - 1
css/card.css

@@ -55,7 +55,7 @@ a img {
 
 
 body {
-		background: rgba(160,160,160,0.73) url(img/3.png);
+		background: rgba(160,160,160,0.73) url(../img/3.png);
 }
 body,
 input,

+ 31 - 17
functions.php

@@ -2,23 +2,32 @@
 
 if ( ! function_exists( 'dw_setup' ) ):
 function dw_setup() {
+	require( get_template_directory() . '/inc/utils.php' );
 	require( get_template_directory() . '/inc/template.php' );
 	require( get_template_directory() . '/inc/tweaks.php' );
-	require( get_template_directory() . '/inc/smtp.php' );
-	require get_template_directory() . '/inc/utils.php';
+	if ( ! isset( $content_width ) ) $content_width = 1310;
+	add_theme_support( 'automatic-feed-links' );
+	add_theme_support( 'menus' );
+	add_theme_support( 'post-thumbnails' );
+	add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) );
+	add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
+	set_post_thumbnail_size( 150, 150, true );
+	add_image_size( 'post-large', 770, 577, true );
 }
 endif; 
-
-add_theme_support( 'automatic-feed-links' );
-add_theme_support( 'menus' );
-add_theme_support( 'post-thumbnails' );
-add_theme_support( 'html5', array( 'comment-list', 'comment-form', 'search-form', 'gallery', 'caption' ) );
-set_post_thumbnail_size( 150, 150, true );
-add_image_size( 'post-large', 770, 577, true );
-
-if ( ! isset( $content_width ) ) $content_width = 1310;
 add_action( 'after_setup_theme', 'dw_setup' );
 
+if ( ! function_exists( 'dw_plugs' ) ):
+function dw_plugs() {
+	if (!class_exists('dw_smtp')) {
+		include_once(TEMPLATEPATH.'/inc/smtp.php');
+	}
+	if (!class_exists('dw_crumbs')) {
+		//include_once(TEMPLATEPATH.'/inc/crumbs.php');
+	}
+}
+endif; 
+
 function dw_editor() {
     add_editor_style( 'style.css' );
 }
@@ -37,9 +46,12 @@ function dw_scripts() {
 	//wp_enqueue_style( 'ani', get_template_directory_uri() . '/css/animate.css');
 	
 	wp_deregister_script('jquery');
+	
+	
 	if ( is_front_page() || is_home() ) {
 		
 	}
+	
 	if ( is_page('home') ) {	
 		wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
 		wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
@@ -77,13 +89,10 @@ function dw_scripts() {
 		wp_enqueue_style( 'jplayercss', get_template_directory_uri() . '/css/card.css');
 		wp_enqueue_script( 'scripts-o', get_template_directory_uri() . '/js/card.js', 'jquery', '', true );
 	}
-
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
-		wp_enqueue_script( 'comment-reply' );
-	}
 	
-	if ( is_page('desk') || is_archive() ) {	
+	if ( is_page('desk') || is_archive() || is_search() ) {	
 		global $wp_rewrite;
+		wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
 		wp_enqueue_script( '_s_backbone-loop', get_template_directory_uri() . '/js/loop.js', array( 'jquery', 'backbone', 'underscore', 'wp-api'  ), '1.0', true );
 		$queried_object = get_queried_object();
 		$local = array(
@@ -112,12 +121,17 @@ function dw_scripts() {
 		wp_localize_script( '_s_backbone-loop', 'settings', $local );
 	}
 	
+	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
+		wp_enqueue_script( 'comment-reply' );
+	}
+	
 	else {
 		wp_enqueue_script( 'scripts-o', get_template_directory_uri() . '/js/script-o.js', 'jquery', '', true );
 		//wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/script-o.min.js', 'jquery', '', true );
 		wp_enqueue_script( 'init-o', get_template_directory_uri() . '/js/init-o.js', 'jquery', '', true );
 		//wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init-o.min.js', 'jquery', '', true );
-	}	
+	}
+	
 }
 add_action( 'wp_enqueue_scripts', 'dw_scripts' );
 

+ 2 - 3
inc/smtp.php

@@ -1,7 +1,6 @@
 <?php
-/*Thanks https://github.com/rohmann/wp-multisite-smtp */
 
-class DW_SMTP {
+class dw_smtp {
 
     protected static $instance;
     protected $validations;
@@ -106,4 +105,4 @@ class DW_SMTP {
     }
 }
 
-DW_SMTP::launch();
+dw_smtp::launch();

+ 10 - 8
page-desk.php

@@ -10,16 +10,18 @@ get_header(); ?>
 			<main id="main" class="site-main" role="main">
 			<?php query_posts('showposts=10'); ?>
 			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
-			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
-				<div class="entry-content">
-					<div class="date">
-						<time datetime="<?php the_time('c');?>" itemprop="datePublished"><?php the_date('n/j/Y'); ?></time>		
+			<article id="content" class="single" role="main">
+				<div itemscope="" itemtype="http://schema.org/BlogPosting" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+					<div class="entry-content">
+						<div class="date">
+							<time datetime="<?php the_time('c');?>" itemprop="datePublished"><?php the_date('n/j/Y'); ?></time>		
+						</div>
+						<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
+						<?php the_content(); ?>
+						<div class="clear">&nbsp;</div>
 					</div>
-					<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
-					<?php the_content(); ?>
-					<div class="clear">&nbsp;</div>
 				</div>
-			</div>
+			</article>
 			<?php endwhile; ?>
 			</main>
 		</div>