X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9441756a895fb4fdc4bcf20e0d228cef622663ca..febc815b2c9d85be5717da9e8d164bd2daa97e31:/wp-content/themes/twentysixteen/functions.php diff --git a/wp-content/themes/twentysixteen/functions.php b/wp-content/themes/twentysixteen/functions.php index f22d1bd1..3626af96 100644 --- a/wp-content/themes/twentysixteen/functions.php +++ b/wp-content/themes/twentysixteen/functions.php @@ -47,11 +47,11 @@ if ( ! function_exists( 'twentysixteen_setup' ) ) : function twentysixteen_setup() { /* * Make theme available for translation. - * Translations can be filed in the /languages/ directory. + * Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen * If you're building a theme based on Twenty Sixteen, use a find and replace * to change 'twentysixteen' to the name of your theme in all the template files */ - load_theme_textdomain( 'twentysixteen', get_template_directory() . '/languages' ); + load_theme_textdomain( 'twentysixteen' ); // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); @@ -64,6 +64,17 @@ function twentysixteen_setup() { */ add_theme_support( 'title-tag' ); + /* + * Enable support for custom logo. + * + * @since Twenty Sixteen 1.2 + */ + add_theme_support( 'custom-logo', array( + 'height' => 240, + 'width' => 240, + 'flex-height' => true, + ) ); + /* * Enable support for Post Thumbnails on posts and pages. * @@ -112,6 +123,9 @@ function twentysixteen_setup() { * specifically font, colors, icons, and column width. */ add_editor_style( array( 'css/editor-style.css', twentysixteen_fonts_url() ) ); + + // Indicate widget sidebars can use selective refresh in the Customizer. + add_theme_support( 'customize-selective-refresh-widgets' ); } endif; // twentysixteen_setup add_action( 'after_setup_theme', 'twentysixteen_setup' ); @@ -239,32 +253,32 @@ function twentysixteen_scripts() { wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() ); // Load the Internet Explorer specific stylesheet. - wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20150930' ); + wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160816' ); 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' ), '20151230' ); + wp_enqueue_style( 'twentysixteen-ie8', get_template_directory_uri() . '/css/ie8.css', array( 'twentysixteen-style' ), '20160816' ); 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' ), '20150930' ); + wp_enqueue_style( 'twentysixteen-ie7', get_template_directory_uri() . '/css/ie7.css', array( 'twentysixteen-style' ), '20160816' ); 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(), '20151112', true ); + wp_enqueue_script( 'twentysixteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20160816', 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' ), '20151104' ); + wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' ); } - wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20151204', true ); + wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true ); wp_localize_script( 'twentysixteen-script', 'screenReaderText', array( 'expand' => __( 'expand child menu', 'twentysixteen' ),