functions.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. if ( ! function_exists( 'dw_setup' ) ):
  3. function dw_setup() {
  4. require( get_template_directory() . '/inc/template.php' );
  5. require( get_template_directory() . '/inc/tweaks.php' );
  6. }
  7. endif;
  8. add_action( 'after_setup_theme', 'dw_setup' );
  9. add_theme_support( 'automatic-feed-links' );
  10. add_theme_support( 'menus' );
  11. add_theme_support( 'post-thumbnails' );
  12. set_post_thumbnail_size( 150, 150, true );
  13. add_image_size( 'post-large', 770, 577, true );
  14. function dw_scripts() {
  15. global $post;
  16. wp_enqueue_style( 'style', get_stylesheet_uri() );
  17. //wp_enqueue_style( 'style', get_template_directory_uri() . '/css/style.min.css');
  18. wp_enqueue_style( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
  19. wp_enqueue_style( 'jasny', get_template_directory_uri() . '/css/jasny-bootstrap.css');
  20. wp_deregister_script('jquery');
  21. wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
  22. wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );
  23. wp_enqueue_script( 'init', get_template_directory_uri() . '/js/init.js', 'jquery', '', true );
  24. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
  25. wp_enqueue_script( 'comment-reply', '', '', '', true );
  26. }
  27. }
  28. add_action( 'wp_enqueue_scripts', 'dw_scripts' );
  29. function dw_editor() {
  30. //add_editor_style( 'style.css' );
  31. }
  32. add_action( 'init', 'dw_editor' );
  33. ?>