functions.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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( 'boot', get_template_directory_uri() . '/css/bootstrap.css');
  17. wp_deregister_script('jquery');
  18. wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.1.min.js', array(), false, true);
  19. wp_enqueue_style( 'style', get_stylesheet_uri() );
  20. wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/navigation.js', 'jquery', '', true );
  21. wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', 'jquery', '', true );
  22. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
  23. wp_enqueue_script( 'comment-reply', '', '', '', true );
  24. }
  25. }
  26. add_action( 'wp_enqueue_scripts', 'dw_scripts' );
  27. function dw_editor() {
  28. //add_editor_style( 'style.css' );
  29. }
  30. add_action( 'init', 'dw_editor' );
  31. ?>