123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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' );
- require( get_template_directory() . '/inc/tweaks.php' );
- 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' );
- set_post_thumbnail_size( 150, 150, true );
- add_image_size( 'post-large', 770, 577, true );
- function dw_scripts() {
- global $post;
- wp_enqueue_style( 'style', get_stylesheet_uri() );
- //wp_enqueue_style( 'style-o-min', get_template_directory_uri() . '/css/style-o.min.css');
- //wp_enqueue_style( 'style-o', get_template_directory_uri() . '/css/style-o.css');
- //wp_enqueue_style( 'style-o', get_template_directory_uri() . '/css/style-o.min.css');
- wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
- wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
- wp_enqueue_style( 'font', get_template_directory_uri() . '/css/font-awesome.css');
- wp_enqueue_style( 'cal', get_template_directory_uri() . '/css/fullcalendar.css');
- wp_enqueue_style( 'ani', get_template_directory_uri() . '/css/animate.css');
-
- wp_deregister_script('jquery');
- wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
- if ( is_front_page() || is_home() ) {
- //wp_enqueue_style( 'style-min', get_template_directory_uri() . '/css/style.min.css');
- wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
- wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
- wp_enqueue_style( 'font', get_template_directory_uri() . '/css/font-awesome.css');
- wp_enqueue_style( 'cal', get_template_directory_uri() . '/css/fullcalendar.css');
- wp_enqueue_style( 'ani', get_template_directory_uri() . '/css/animate.css');
-
- wp_enqueue_script( 'modern', get_template_directory_uri() . '/js/modernizr.js', 'jquery', '', true );
- wp_enqueue_script( 'boostrap', get_template_directory_uri() . '/js/bootstrap.min.js', 'jquery', '', true );
- wp_enqueue_script( 'offcanvas', get_template_directory_uri() . '/js/jasny-bootstrap.js', 'jquery', '', true );
- wp_enqueue_script( 'time', get_template_directory_uri() . '/js/moment.min.js', 'jquery', '', true );
- wp_enqueue_script( 'cal', get_template_directory_uri() . '/js/fullcalendar.min.js', 'jquery', '', true );
- wp_enqueue_script( 'valid', get_template_directory_uri() . '/js/validate.min.js', 'jquery', '', true );
- wp_enqueue_script( 'smooth', get_template_directory_uri() . '/js/smooth.js', 'jquery', '', true );
- wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/scripts.js', 'jquery', '', true );
- //wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );
- //wp_enqueue_script( 'scriptmin', get_template_directory_uri() . '/js/script.min.js', 'jquery', '', true );
- wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.js', 'jquery', '', true );
- //wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.min.js', 'jquery', '', true );
- }
- 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 );
- }
- if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
- wp_enqueue_script( 'comment-reply' );
- }
-
-
-
- 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' ) ) ),
- '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 );
- } elseif ( is_search() ) {
- $local['loopType'] = 'search';
- $local['searchQuery'] = get_search_query();
- } 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' );
- ?>
|