-
-
Save mrwweb/c9ec4bae48a2ad34c225 to your computer and use it in GitHub Desktop.
This is a draft plugin. Please look in the WordPress repository (eventually) for the real version.
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 | |
/** | |
* Plugin Name: Hawaiian Characters | |
* Description: Adds the correct characters / diacriticals to the WordPress Editor for use in Hawaiian | |
* Plugin URI: | |
* Version: 1.0.0 | |
* Author: Mark Root-Wiley (MRWweb) | |
* Author URI: http://mrwweb.com | |
* Donate Link: | |
* License: GPLv3 | |
* Text Domain: hawaiian-characters | |
* Domain Path: /languages | |
*/ | |
add_filter( 'tiny_mce_before_init', 'hc_tinymce_init' ); | |
function hc_tinymce_init( $settings ) { | |
$new_chars = json_encode( array( | |
array( '0256', 'A - kahako' ), | |
array( '0257', 'a - kahako' ), | |
array( '0274', 'E - kahako' ), | |
array( '0275', 'e - kahako' ), | |
array( '0298', 'I - kahako' ), | |
array( '0299', 'i - kahako' ), | |
array( '0332', 'O - kahako' ), | |
array( '0333', 'o - kahako' ), | |
array( '0362', 'U - kahako' ), | |
array( '0363', 'u - kahako' ), | |
array( '0699', 'okina' ), | |
) ); | |
$settings['charmap_append'] = $new_chars; | |
return $settings; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use the plugin! https://wordpress.org/plugins/hawaiian-characters/