Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
masnun committed Nov 10, 2011
0 parents commit 8c979fd
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions avro-phonetic.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php

/**
* @package Avro Phonetic WP Plugin
* @version 1
*/
/*
Plugin Name: Avro Phonetic WP Plugin
Plugin URI: http://www.masnun.me/2011/11/11/avro-phonetic-wp-plugin.html
Description: Adds Avro Phonetic to all your text inputs
Author: Masnun
Version: 1
Author URI: http://masnun.com
*/

add_action('admin_head', 'avro_phonetic');
add_action('wp_head', 'avro_phonetic');

function avro_phonetic()
{

?>
<script src="http://code.jquery.com/jquery-1.7.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://raw.github.com/torifat/jsAvroPhonetic/1.0-beta/src/avro-1.0-beta.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
jQuery(function(){
alertOn = false
jQuery('textarea, input[type=text]').avro({'bn':true},
function(isBangla){
if(isBangla) {
if(alertOn) {
alert("Keyboard Switched to Bangla")
} else {
alertOn = true
}
} else {
if(alertOn) {
alert("Keyboard Switched to English")
} else {
alertOn = true
}
}
});
});

</script>


<?

}

0 comments on commit 8c979fd

Please sign in to comment.