Skip to content

Commit

Permalink
Support for filtering the language used with jQuery Validate.
Browse files Browse the repository at this point in the history
WordPress.com does something different than a constant
  • Loading branch information
danielbachhuber committed Feb 22, 2013
1 parent 4ab1281 commit 2caad24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend-uploader.php
Expand Up @@ -731,8 +731,9 @@ function enqueue_scripts() {
wp_enqueue_script( 'frontend-uploader-js', UGC_URL . 'lib/js/frontend-uploader.js', array( 'jquery', 'jquery-validate' ) );

// Include localization strings for default messages of validation plugin
if ( '' != WPLANG ) {
$lang = explode( '_', WPLANG );
$wplang = apply_filters( 'fu_wplang', WPLANG );
if ( $wplang ) {
$lang = explode( '_', $wplang );
$url = "//ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_{$lang[0]}.js";
wp_enqueue_script( 'jquery-validate-messages', $url, array( 'jquery' ) );
}
Expand Down

0 comments on commit 2caad24

Please sign in to comment.