twentythirteen_scripts_styles

Enqueue scripts and styles for the front end.

Description

twentythirteen_scripts_styles(); 

Usage

  1. if ( !function_exists( 'twentythirteen_scripts_styles' ) ) { 
  2. require_once '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentythirteen_scripts_styles(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/functions.php  
  1. function twentythirteen_scripts_styles() { 
  2. /** 
  3. * Adds JavaScript to pages with the comment form to support 
  4. * sites with threaded comments (when in use). 
  5. */ 
  6. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) 
  7. wp_enqueue_script( 'comment-reply' ); 
  8.  
  9. // Adds Masonry to handle vertical alignment of footer widgets. 
  10. if ( is_active_sidebar( 'sidebar-1' ) ) 
  11. wp_enqueue_script( 'jquery-masonry' ); 
  12.  
  13. // Loads JavaScript file with functionality specific to Twenty Thirteen. 
  14. wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160717', true ); 
  15.  
  16. // Add Source Sans Pro and Bitter fonts, used in the main stylesheet. 
  17. wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null ); 
  18.  
  19. // Add Genericons font, used in the main stylesheet. 
  20. wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' ); 
  21.  
  22. // Loads our main stylesheet. 
  23. wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' ); 
  24.  
  25. // Loads the Internet Explorer specific stylesheet. 
  26. wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' ); 
  27. wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' );