themes-wordpress/hall/functions.php
Jason Crist e961d2a523
Add new theme Hall (#7319)
* Adding new theme Hall from @henriqueiamarino

* Removed 'theme' attribute

* Removed 'ref' attributes from navigation

* Removed unused pattern

* Cleaned up theme.json file (saved via CBT)

* Set version to 1.0.0

* Fixed Header templates to use Site Title instead of Header. Styled Site Title to match Header block that was removed.

* Updates from latest zip

* Update image refs in readme

* Add strict_types

* Patternise 404 and home templates

---------

Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
2024-01-12 21:36:49 +00:00

61 lines
1 KiB
PHP

<?php
/**
* Hall functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Hall
* @since Hall 1.0
*/
declare( strict_types = 1 );
if ( ! function_exists( 'hall_support' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* @since Hall 1.0
*
* @return void
*/
function hall_support() {
// Enqueue editor styles.
add_editor_style( 'style.css' );
// Make theme available for translation.
load_theme_textdomain( 'hall' );
}
endif;
add_action( 'after_setup_theme', 'hall_support' );
if ( ! function_exists( 'hall_styles' ) ) :
/**
* Enqueue styles.
*
* @since Hall 1.0
*
* @return void
*/
function hall_styles() {
// Register theme stylesheet.
wp_register_style(
'hall-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);
// Enqueue theme stylesheet.
wp_enqueue_style( 'hall-style' );
}
endif;
add_action( 'wp_enqueue_scripts', 'hall_styles' );