You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.4 KiB
46 lines
1.4 KiB
2 years ago
|
<?php
|
||
|
if ( ! function_exists( 'biztime_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 post thumbnails.
|
||
|
*/
|
||
|
|
||
|
function biztime_setup() {
|
||
|
|
||
|
/**
|
||
|
* Add support for custom navigation menu.
|
||
|
*/
|
||
|
register_nav_menus( array(
|
||
|
'primary' => __( 'Primary Menu', 'biztime' ),
|
||
|
) );
|
||
|
|
||
|
/**
|
||
|
* Enqueue styles and scripts.
|
||
|
*/
|
||
|
add_action( 'wp_enqueue_scripts', 'biztime_enqueue_styles' );
|
||
|
wp_enqueue_script( 'biztime-script', get_template_directory_uri() . '/js/theme.js', array('jquery'), '1.0.0', true );
|
||
|
|
||
|
/**
|
||
|
* Add favicon.
|
||
|
*/
|
||
|
add_action( 'wp_head', 'biztime_favicon' );
|
||
|
}
|
||
|
endif; // biztime_setup
|
||
|
add_action( 'after_setup_theme', 'biztime_setup' );
|
||
|
|
||
|
function biztime_favicon() {
|
||
|
echo '<link rel="shortcut icon" type="image/x-icon" href="' . get_template_directory_uri() . '/favicon.ico" />' . "\n";
|
||
|
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">';
|
||
|
echo '<link rel="preload" as="image" href="' . get_template_directory_uri() . '/images/illustration-devices.svg" />' . "\n";
|
||
|
}
|
||
|
|
||
|
function biztime_enqueue_styles() {
|
||
|
if ( ! is_admin() ) {
|
||
|
wp_enqueue_style( 'biztime-style', get_stylesheet_uri() );
|
||
|
}
|
||
|
}
|