Skip to content

Instantly share code, notes, and snippets.

@mrwweb
Created February 19, 2016 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrwweb/c9ec4bae48a2ad34c225 to your computer and use it in GitHub Desktop.
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.
<?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;
}
@mrwweb
Copy link
Author

mrwweb commented Oct 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment