Reference for language code : Language Code
<?php
$currLang = get_bloginfo('language');
if($currLang == "id-ID"){ // Replace condition with your language code.
echo 'Bahasa Indonesia';
} else {
echo 'up to you'
}
?>
<?php | |
// Flush rewrite rules after switch theme | |
function my_rewrite_flush() { | |
flush_rewrite_rules(); | |
} | |
add_action( 'after_switch_theme', 'my_rewrite_flush' ); | |
// A little help so we can get the stylesheet from parent theme | |
// Remove line 10-19 if this is not a child theme | |
function my_enqueue_styles() { |
/* | |
Title: Oxygen Code Editor Theme | |
Type: CSS > Compile SCSS Code | |
Location: Custom Hooks | |
Hook name: oxygen_enqueue_ui_scripts | |
Priority: 10 | |
*/ | |
#oxygen-ui { | |
.cm-s-default { |
/** | |
* Image preloader | |
* | |
* @link http://engineeredweb.com/blog/09/12/preloading-images-jquery-and-javascript | |
*/ | |
var cache = []; | |
// Arguments are image paths relative to the current page. | |
function pilau_preload_images() { | |
var args_len, i, cache_image; | |
args_len = arguments.length; |
<?php | |
/** | |
* Inspired by https://raw.githubusercontent.com/zendframework/zend-http/master/src/PhpEnvironment/RemoteAddress.php | |
*/ | |
//PHP 5.6 | |
function get_ip( $trusted_proxies = [] ) { | |
if ( ! empty( $trusted_proxies ) && isset( $_SERVER['REMOTE_ADDR'] ) && ! in_array( $_SERVER['REMOTE_ADDR'], $trusted_proxies ) ) { | |
if ( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ) { | |
$ip = $_SERVER['HTTP_CF_CONNECTING_IP']; | |
} elseif ( isset( $_SERVER['HTTP_CLIENT_IP'] ) ) { |
<?php | |
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
/* Remove all JSON output by Yoast SEO | |
* Credit: Yoast development team | |
* Documentation: https://developer.yoast.com/schema-documentation/api/ | |
* Last Tested: Apr 16 2019 using Yoast SEO 11.0 on WordPress 5.1.1 | |
*/ | |
add_filter( 'wpseo_json_ld_output', '__return_false' ); |
<?php
$currLang = get_bloginfo('language');
if($currLang == "id-ID"){ // Replace condition with your language code.
echo 'Bahasa Indonesia';
} else {
echo 'up to you'
}
?>
/* Allows focus on sub menu items by tabbing menu | |
------------------------------------------------ */ | |
.oxy-nav-menu:not(.oxy-nav-menu-open) .menu-item .sub-menu { | |
right: 5000px; | |
visibility: visible; | |
} | |
.oxy-nav-menu:not(.oxy-nav-menu-open).menu-item .sub-menu .sub-menu { | |
right: auto; |
add_action( 'wp_enqueue_scripts', 'lit_remove_global_inline_styles' ); | |
function lit_remove_global_inline_styles() { | |
wp_dequeue_style('global-styles'); | |
}; |