themes-wordpress/curriculum/functions.php

61 lines
1.1 KiB
PHP
Raw Normal View History

<?php
/**
2023-07-10 15:20:37 +00:00
* Curriculum functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
2023-07-10 15:20:37 +00:00
* @package Curriculum
* @since Curriculum 1.0
*/
2023-07-10 15:20:37 +00:00
if ( ! function_exists( 'curriculum_support' ) ) :
/**
* Sets up theme defaults and registers support for various WordPress features.
*
2023-07-10 15:20:37 +00:00
* @since Curriculum 1.0
*
* @return void
*/
2023-07-10 15:20:37 +00:00
function curriculum_support() {
// Enqueue editor styles.
add_editor_style( 'style.css' );
// Make theme available for translation.
2023-07-10 15:20:37 +00:00
load_theme_textdomain( 'curriculum' );
}
endif;
2023-07-10 15:20:37 +00:00
add_action( 'after_setup_theme', 'curriculum_support' );
2023-07-10 15:20:37 +00:00
if ( ! function_exists( 'curriculum_styles' ) ) :
/**
* Enqueue styles.
*
2023-07-10 15:20:37 +00:00
* @since Curriculum 1.0
*
* @return void
*/
2023-07-10 15:20:37 +00:00
function curriculum_styles() {
// Register theme stylesheet.
wp_register_style(
2023-07-10 15:20:37 +00:00
'curriculum-style',
get_stylesheet_directory_uri() . '/style.css',
array(),
wp_get_theme()->get( 'Version' )
);
// Enqueue theme stylesheet.
2023-07-10 15:20:37 +00:00
wp_enqueue_style( 'curriculum-style' );
}
endif;
2023-07-10 15:20:37 +00:00
add_action( 'wp_enqueue_scripts', 'curriculum_styles' );