functions.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. if ( ! isset( $content_width ) )
  3. $content_width = 640; /* pixels */
  4. if ( ! function_exists( 'bml_setup' ) ) :
  5. function bml_setup() {
  6. require( get_template_directory() . '/inc/tweaks.php' );
  7. load_theme_textdomain( 'bml', get_template_directory() . '/languages' );
  8. add_theme_support( 'automatic-feed-links' );
  9. register_nav_menus( array( 'primary' => __( 'Primary Menu', 'bml' ), ) );
  10. add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
  11. add_theme_support( 'custom-background', apply_filters( 'bml_custom_background_args', array(
  12. 'default-color' => 'ffffff',
  13. 'default-image' => '',
  14. ) ) );
  15. }
  16. endif;
  17. add_action( 'after_setup_theme', 'bml_setup' );
  18. add_filter('show_admin_bar', '__return_false');
  19. function bml_widgets_init() {
  20. register_sidebar( array(
  21. 'name' => __( 'Sidebar', 'bml' ),
  22. 'id' => 'sidebar-1',
  23. 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
  24. 'after_widget' => '</aside>',
  25. 'before_title' => '<h1 class="widget-title">',
  26. 'after_title' => '</h1>',
  27. ) );
  28. }
  29. add_action( 'widgets_init', 'bml_widgets_init' );
  30. add_action( 'wp_enqueue_scripts', 'bml_scripts' );
  31. function bml_scripts() {
  32. wp_enqueue_script('jquery');
  33. wp_enqueue_style( 'bml', get_template_directory_uri() . '/style.css');
  34. wp_enqueue_style( 'bml2', get_template_directory_uri() . '/css/stripe.css');
  35. wp_enqueue_script( 'bmlcountdown', get_template_directory_uri() . '/js/jquery.countdown.min.js', array(), '1.0.0', true);
  36. //wp_enqueue_script( 'bmlscript', get_template_directory_uri() . '/js/script.js', array(), '1.0.0', true );
  37. wp_enqueue_script( 'bmlinit', get_template_directory_uri() . '/js/init.js', array(), '1.0.0', true );
  38. wp_enqueue_script( 'bmlskroll', get_template_directory_uri() . '/js/skrollr.min.js', array(), '1.0.0', true );
  39. wp_enqueue_script( 'bmlskrollmenu', get_template_directory_uri() . '/js/skrollr.menu.min.js', array(), '1.0.0', true );
  40. if( is_page('wish') )
  41. {
  42. }
  43. if( is_front_page() )
  44. {
  45. }
  46. }