Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** * Fix Header/Footer Template Not Support for WPML */ if ( class_exists( 'SitePress' ) && ! function_exists( 'jkit_wpml_custom_template_conditions' ) ) { /** * Custom Condition for Jeg Elementor Kit Header/Footer Template * * @param bool $flag The Conditions. * @param int $post_id The Post ID. * @param int $header_id The Template ID. * @param array $conditions The Condition args. */ function jkit_wpml_custom_template_conditions( $flag, $post_id, $header_id, $conditions ) { /** * Get The Current Language by `wpml_current_language` hook filters */ $current_lang = apply_filters( 'wpml_current_language', null ); /** * List Template ID for each Languages * * Wrap by array, if have multivalue (many template), write like this: * * array( 4407, 4408 ); // array( id1, id2, id3 ); */ $indonesia_template_ids = array( 4407 ); /** Indonesia Template IDs */ $english_template_id = array( 4405 ); /** English Template IDs */ /** * Check if Template ID in Language Templates */ if ( in_array( $header_id, $indonesia_template_ids ) ) { /** * Check if current language is Indonesia (id) */ if ( $current_lang === 'id' ) { $flag = $flag && true; } else { $flag = $flag && false; } } /** * Check if Template ID in Language Templates */ if ( in_array( $header_id, $english_template_id ) ) { /** * Check if current language is English (en) */ if ( $current_lang === 'en' ) { $flag = $flag && true; } else { $flag = $flag && false; } } return $flag; } add_filter( 'jkit_check_template_conditions', 'jkit_wpml_custom_template_conditions', 10, 4 ); }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)