Created
December 21, 2016 01:34
-
-
Save henryme27/17020933087f432205391eb9d3cd287e to your computer and use it in GitHub Desktop.
How to fix can not select date in Datetimepicker with Plugin Noo Timetable
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 | |
/** | |
* How to fix can not select date in Datetimepicker with Plugin Noo Timetable. | |
* | |
* Place to fix: plugins/noo-timetable/inc/functions/template-func.php | |
* | |
* @see https://cloudup.com/cNEfTzkMUlq | |
* @author Henry Me | |
*/ | |
if( !function_exists('noo_timetable_getJqueryUII18nLocale') ) { | |
function noo_timetable_getJqueryUII18nLocale() { | |
$locale = str_replace( '_', '-', get_locale() ); | |
$locale = substr($locale, 0, strpos($locale, '-')); | |
$allLoc = array( | |
'ar', | |
'id', | |
'bg', | |
'fa', | |
'ru', | |
'uk', | |
'en', | |
'el', | |
'de', | |
'nl', | |
'lt', | |
'tr', | |
'fr', | |
'es', | |
'th', | |
'pl', | |
'pt', | |
'ch', | |
'se', | |
'sv', | |
'kr', | |
'it', | |
'da', | |
'no', | |
'ja', | |
'vi', | |
'sl', | |
'cs', | |
'hu' | |
); | |
if ( ! in_array($locale, $allLoc) ) { | |
$locale = 'en'; | |
} | |
$locale = apply_filters( 'noo_timetable_get_locale', $locale ); | |
if ( $locale == '' ) { | |
$locale = 'en'; | |
} | |
return $locale; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment