• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / twentysixteen_scripts() – Enqueues scripts and styles.

You appear to be a bot. Output may be restricted

Description

Enqueues scripts and styles.

Usage

twentysixteen_scripts();

Parameters

Returns

void

Source

File name: twentysixteen/functions.php


Lines:

1 to 53 of 53
function twentysixteen_scripts() {
  // Add custom fonts, used in the main stylesheet.
  wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), null );

  // Add Genericons, used in the main stylesheet.
  wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '20201208' );

  // Theme stylesheet.
  wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri(), array(), '20221101' );

  // Theme block stylesheet.
  wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20221004' );

  // Load the Internet Explorer specific stylesheet.
  wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20170530' );
  wp_style_add_data( 'twentysixteen-ie', 'conditional', 'lt IE 10' );

  // Load the Internet Explorer 8 specific stylesheet.
  wp_enqueue_style( 'twentysixteen-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'twentysixteen-style' ), '20170530' );
  wp_style_add_data( 'twentysixteen-ie8', 'conditional', 'lt IE 9' );

  // Load the Internet Explorer 7 specific stylesheet.
  wp_enqueue_style( 'twentysixteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentysixteen-style' ), '20170530' );
  wp_style_add_data( 'twentysixteen-ie7', 'conditional', 'lt IE 8' );

  // Load the html5 shiv.
  wp_enqueue_script( 'twentysixteen-html5', get_template_directory_uri() . '/js/html5.js', array(), '3.7.3' );
  wp_script_add_data( 'twentysixteen-html5', 'conditional', 'lt IE 9' );

  wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20170530', true );

  if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
    wp_enqueue_script( 'comment-reply' );
  }

  if ( is_singular() && wp_attachment_is_image() ) {
    wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20170530' );
  }

  wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20211130', true );

  wp_localize_script(
    'twentysixteen-script',
    'screenReaderText',
    array(
      'expand'   => __( 'expand child menu', 'twentysixteen' ),
      'collapse' => __( 'collapse child menu', 'twentysixteen' ),
    )
  );
}
 

 View on Trac

Published: 25th November 2019 | Last updated: 2nd November 2022

Primary Sidebar

Information

Function name: twentysixteen_scripts
Plugin ref: Twenty Sixteen
Version: 2.8
Sourcefile: functions.php
File ref: functions.php
Deprecated?: No
API Letters: S,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 6.1.1. PHP: 8.0.28
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites