Created
November 2, 2020 19:57
-
-
Save trueqap/3a2e8476322c78fdfa5d16b3e41d4b62 to your computer and use it in GitHub Desktop.
Nyelv + CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$current_lang = apply_filters('wpml_current_language', NULL); | |
function lang_en() { | |
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/en.css' ); | |
} | |
function lang_it() { | |
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/it.css' ); | |
} | |
function lang_hu() { | |
wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/hu.css' ); | |
} | |
if ('en' == $current_lang) { | |
add_action( 'wp_enqueue_scripts', 'lang_en' ); | |
} | |
if ('it' == $current_lang) { | |
add_action( 'wp_enqueue_scripts', 'lang_it' ); | |
} | |
if ('hu' == $current_lang) { | |
add_action( 'wp_enqueue_scripts', 'lang_hu' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment