function foundation_theme_support() { // Add language support load_theme_textdomain('foundation', get_template_directory() . '/languages'); // Add menu support add_theme_support('menus'); // Let WordPress manage the document title add_theme_support('title-tag'); // Add post thumbnail support: http://codex.wordpress.org/Post_Thumbnails add_theme_support('post-thumbnails'); // RSS thingy add_theme_support('automatic-feed-links'); // Add post formarts support: http://codex.wordpress.org/Post_Formats add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat')); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support('html5', array('search-form', 'comment-form', 'comment-list', 'gallery', 'caption')); // Setup the WordPress core custom background feature. add_theme_support('custom-background', apply_filters('foundation_custom_background_args', array('default-color' => 'ffffff', 'default-attachment' => 'fixed'))); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, icons, and column width. */ add_editor_style(array('stylesheets/editor-style.css', 'genericons/genericons.css', foundation_fonts_url())); }
function foundation_scripts() { // Deregister the jquery version bundled with WordPress. wp_deregister_script('jquery'); // Add custom fonts, used in the main stylesheet. wp_enqueue_style('foundation-fonts', foundation_fonts_url(), array(), null); // Enqueue the main Stylesheet. wp_enqueue_style('main-stylesheet', get_template_directory_uri() . '/stylesheets/app.css'); // Load our main stylesheet. wp_enqueue_style('foundation-style', get_stylesheet_uri()); // Modernizr is used for polyfills and feature detection. Must be placed in header. (Not required). wp_register_script('modernizr', get_template_directory_uri() . '/bower_components/foundation/js/vendor/modernizr.js', array(), '2.8.3', false); // Fastclick removes the 300ms delay on click events in mobile environments. Must be placed in header. (Not required). wp_register_script('fastclick', get_template_directory_uri() . '/bower_components/foundation/js/vendor/fastclick.js', array(), '1.0.0', false); // jQuery wp_register_script('jquery', get_template_directory_uri() . '/bower_components/jquery/dist/jquery.min.js', array(), '2.1.4', false); // foundation framework main js wp_register_script('foundation', get_template_directory_uri() . '/bower_components/foundation/js/foundation.min.js', array('jquery'), '5.5.2', true); if (is_singular() && comments_open() && get_option('thread_comments')) { wp_enqueue_script('comment-reply'); } // Main js wp_register_script('foundation-app', get_template_directory_uri() . '/js/app.min.js', array('jquery'), '5.5.2', true); // Enqueue all registered scripts. wp_enqueue_script('modernizr'); wp_enqueue_script('fastclick'); wp_enqueue_script('jquery'); wp_enqueue_script('foundation'); wp_enqueue_script('foundation-app'); }