|
@@ -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' );
|
|
|
|