86 lines
2.4 KiB
PHP
86 lines
2.4 KiB
PHP
<?php
|
|
/********
|
|
* TODO *
|
|
********/
|
|
|
|
/**
|
|
* noisy functions and definitions
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
|
*
|
|
* @package noisy
|
|
*/
|
|
|
|
if ( ! function_exists( 'noisy_setup' ) ) :
|
|
/**
|
|
* Sets up theme defaults and registers support for various WordPress features.
|
|
*
|
|
* Note that this function is hooked into the after_setup_theme hook, which
|
|
* runs before the init hook. The init hook is too late for some features, such
|
|
* as indicating support for post thumbnails.
|
|
*/
|
|
function noisy_setup() {
|
|
|
|
/*
|
|
* 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',
|
|
) );
|
|
}
|
|
endif;
|
|
add_action( 'after_setup_theme', 'noisy_setup' );
|
|
|
|
/**
|
|
* Set the content width in pixels, based on the theme's design and stylesheet.
|
|
*
|
|
* Priority 0 to make it available to lower priority callbacks.
|
|
*
|
|
* @global int $content_width
|
|
*/
|
|
function noisy_content_width() {
|
|
// This variable is intended to be overruled from themes.
|
|
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
|
|
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
|
|
$GLOBALS['content_width'] = apply_filters( 'noisy_content_width', 800 );
|
|
}
|
|
add_action( 'after_setup_theme', 'noisy_content_width', 0 );
|
|
|
|
|
|
/**
|
|
* Enqueue scripts and styles.
|
|
*/
|
|
function noisy_scripts() {
|
|
wp_enqueue_style( 'noisy-style', get_stylesheet_uri() );
|
|
|
|
// wp_enqueue_script( 'noisy-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
|
|
|
|
// wp_enqueue_script( 'noisy-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
|
|
|
|
// if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
|
// wp_enqueue_script( 'comment-reply' );
|
|
// }
|
|
}
|
|
add_action( 'wp_enqueue_scripts', 'noisy_scripts' );
|
|
|
|
/**
|
|
* Implement the Custom Header feature.
|
|
*/
|
|
// require get_template_directory() . '/inc/custom-header.php';
|
|
|
|
/**
|
|
* Custom template tags for this theme.
|
|
*/
|
|
require get_template_directory() . '/inc/template-tags.php';
|
|
|
|
/**
|
|
* Functions which enhance the theme by hooking into WordPress.
|
|
*/
|
|
// require get_template_directory() . '/inc/template-functions.php';
|
|
|