2023-03-20 14:01:58 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2023-03-22 15:40:20 +00:00
|
|
|
* CTLG functions and definitions
|
2023-03-20 14:01:58 +00:00
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/theme-functions/
|
|
|
|
*
|
2023-03-22 15:40:20 +00:00
|
|
|
* @package CTLG
|
|
|
|
* @since CTLG 1.0
|
2023-03-20 14:01:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2023-03-22 15:40:20 +00:00
|
|
|
if ( ! function_exists( 'ctlg_support' ) ) :
|
2023-03-20 14:01:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets up theme defaults and registers support for various WordPress features.
|
|
|
|
*
|
2023-03-22 15:40:20 +00:00
|
|
|
* @since CTLG 1.0
|
2023-03-20 14:01:58 +00:00
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-03-22 15:40:20 +00:00
|
|
|
function ctlg_support() {
|
2023-03-20 14:01:58 +00:00
|
|
|
|
|
|
|
// Enqueue editor styles.
|
|
|
|
add_editor_style( 'style.css' );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
2023-03-22 15:40:20 +00:00
|
|
|
add_action( 'after_setup_theme', 'ctlg_support' );
|
2023-03-20 14:01:58 +00:00
|
|
|
|
2023-03-22 15:40:20 +00:00
|
|
|
if ( ! function_exists( 'ctlg_styles' ) ) :
|
2023-03-20 14:01:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enqueue styles.
|
|
|
|
*
|
2023-03-22 15:40:20 +00:00
|
|
|
* @since CTLG 1.0
|
2023-03-20 14:01:58 +00:00
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2023-03-22 15:40:20 +00:00
|
|
|
function ctlg_styles() {
|
2023-03-20 14:01:58 +00:00
|
|
|
|
|
|
|
// Register theme stylesheet.
|
|
|
|
wp_register_style(
|
2023-03-22 15:40:20 +00:00
|
|
|
'ctlg-style',
|
2023-03-20 14:01:58 +00:00
|
|
|
get_stylesheet_directory_uri() . '/style.css',
|
|
|
|
array(),
|
|
|
|
wp_get_theme()->get( 'Version' )
|
|
|
|
);
|
|
|
|
|
|
|
|
// Enqueue theme stylesheet.
|
2023-03-22 15:40:20 +00:00
|
|
|
wp_enqueue_style( 'ctlg-style' );
|
2023-03-20 14:01:58 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
endif;
|
|
|
|
|
2023-03-22 15:40:20 +00:00
|
|
|
add_action( 'wp_enqueue_scripts', 'ctlg_styles' );
|