2021-04-04 15:47:52 +03:00

30 lines
2.1 KiB
PHP

<?php
add_action('wp_enqueue_scripts', 'armanty_get_styles');
function armanty_get_styles(){
$libs = $GLOBALS['paths']['libs'];;
$css = $GLOBALS['paths']['css'];;
$pagesStyle = $css . '/pages';
$styleVersion = $GLOBALS['version'];
wp_enqueue_style('styles', get_stylesheet_uri());
// Common styles
wp_enqueue_style('armanty_style', $css . '/style.css', array(), $styleVersion);
// Pages styles
if (is_page_template('templates/about.php')) wp_enqueue_style('armanty_about', $pagesStyle . '/about.css', array(), $styleVersion);
if (is_page_template('templates/certificates.php')) wp_enqueue_style('armanty_certificates', $pagesStyle . '/certificates.css', array(), $styleVersion);
if (is_page_template('templates/contacts.php')) wp_enqueue_style('armanty_contacts', $pagesStyle . '/contacts.css', array(), $styleVersion);
if (is_page_template('templates/form.php')) wp_enqueue_style('armanty_form', $pagesStyle . '/form.css', array(), $styleVersion);
if (is_page_template('templates/gallery.php')) wp_enqueue_style('armanty_gallery', $pagesStyle . '/gallery.css', array(), $styleVersion);
if (is_page_template('templates/graduation.php')) wp_enqueue_style('armanty_graduation', $pagesStyle . '/graduation.css', array(), $styleVersion);
if (is_page_template('templates/holiday.php')) wp_enqueue_style('armanty_holiday', $pagesStyle . '/holiday.css', array(), $styleVersion);
if (is_page_template('templates/home.php')) wp_enqueue_style('armanty_home', $pagesStyle . '/home.css', array(), $styleVersion);
if (is_page_template('templates/price.php')) wp_enqueue_style('armanty_price', $pagesStyle . '/price.css', array(), $styleVersion);
if (is_page_template('templates/quests.php')) wp_enqueue_style('armanty_quests', $pagesStyle . '/quests.css', array(), $styleVersion);
if (is_page_template('templates/sales.php')) wp_enqueue_style('armanty_sales', $pagesStyle . '/sales.css', array(), $styleVersion);
if (is_page_template('templates/single-quest.php')) wp_enqueue_style('armanty_single-quest', $pagesStyle . '/single-quest.css', array(), $styleVersion);
}
?>