Browse Source

theme check

windhamdavid 10 years ago
parent
commit
88cd438870
3 changed files with 28 additions and 20 deletions
  1. 1 1
      card.php
  2. 14 19
      functions.php
  3. 13 0
      inc/tweaks.php

+ 1 - 1
card.php

@@ -22,7 +22,7 @@
 <script type="text/javascript" src="<?php echo get_template_directory_uri();?>/js/card.js"></script>
 <!--[if lt IE 9]>
 <link rel="stylesheet" type="text/css" media="all" href="<?php echo get_template_directory_uri();?>/css/card-ie.css"/>
-<script src="<?php bloginfo( 'template_directory' ); ?>/js/html5shiv.js" type="text/javascript"></script>
+<script src="<?php echo get_template_directory_uri();?>/js/html5shiv.js" type="text/javascript"></script>
 <![endif]-->
 </head>
 <body>

+ 14 - 19
functions.php

@@ -1,7 +1,5 @@
 <?php
 
-add_filter( 'pre_http_request', '__return_true', 100 ); //REMOVE All REMOTE CAllS
-
 if ( ! function_exists( 'dw_setup' ) ):
 function dw_setup() {
 	require( get_template_directory() . '/inc/template.php' );
@@ -9,14 +7,24 @@ function dw_setup() {
 	require get_template_directory() . '/inc/utils.php';
 }
 endif; 
-add_action( 'after_setup_theme', 'dw_setup' );
 
 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' );
+
+
+
+function dw_editor() {
+    add_editor_style( 'style.css' );
+}
+add_action( 'init', 'dw_editor' );
+
 
 function dw_scripts() {
 	global $post;
@@ -67,26 +75,21 @@ function dw_scripts() {
 	
 	
 	
-	if ( is_page('notebook') || is_archive() || is_search() ) {
-		
+	if ( is_page('notebook') || is_archive() || is_search() ) {	
 		global $wp_rewrite;
-
 		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(
 			'loopType' => 'home',
 			'queriedObject' => $queried_object,
 			'pathInfo' => array(
 				'author_permastruct' => $wp_rewrite->get_author_permastruct(),
-				'host' => preg_replace( '#^http(s)?://#i', '', untrailingslashit( get_option( 'home' ) ) ),
+				'host' => preg_replace( '#^http(s)?://#i', '', untrailingslashit( home_url() ) ),
 				'path' => _s_backbone_get_request_path(),
 				'use_trailing_slashes' => $wp_rewrite->use_trailing_slashes,
 				'parameters' => _s_backbone_get_request_parameters(),
 			),
 		);
-
 		if ( is_category() || is_tag() || is_tax() ) {
 			$local['loopType'] = 'archive';
 			$local['taxonomy'] = get_taxonomy( $queried_object->taxonomy );
@@ -96,21 +99,13 @@ function dw_scripts() {
 		} elseif ( is_author() ) {
 			$local['loopType'] = 'author';
 		}
-		
-		//set the page we're on so that Backbone can load the proper state
 		if ( is_paged() ) {
 			$local['page'] = absint( get_query_var( 'paged' ) ) + 1;
 		}
 
 		wp_localize_script( '_s_backbone-loop', 'settings', $local );
-	}
-	
+	}	
 }
 add_action( 'wp_enqueue_scripts', 'dw_scripts' );
 
-function dw_editor() {
-    //add_editor_style( 'style.css' );
-}
-add_action( 'init', 'dw_editor' );
-
 ?>

+ 13 - 0
inc/tweaks.php

@@ -35,6 +35,19 @@ function dw_hide() {
 add_action( 'admin_head', 'dw_hide' );
 
 
+function dw_fromemail($email) {
+	//$wpfrom = get_option('admin_email');
+    //return $wpfrom;
+	return 'david@davidawindham.com';
+} 
+function dw_fromname($email){
+   	//$wpfrom = get_option('blogname');
+    //return $wpfrom;
+	return 'davidawindham.com';
+}
+add_filter('wp_mail_from', 'dw_fromemail');
+add_filter('wp_mail_from_name', 'dw_fromname');
+
 function dw_oembed_filter($html, $url, $attr, $post_ID) {
     $return = '<div class="video-container">'.$html.'</div>';
 	$return = str_replace('frameborder="0" allowfullscreen', 'style="border:none"', $return);