Developers’ Guide

Glypheer Developers’ Guide

This is the developers’ guide the Egyptological Hieroglyph plugin for WordPress, including notes for its use on other PHP platforms. TheĀ  Glypheer User Guide explains the options available for writers.

Additional Output Options

As well as the ouput=”” options described in the user guide, some additional options are available (case insensitive):

Output = Purpose
help Displays the user guide so that the user guide can be incorporated into your own site.
hiero Specifies the default set of glyph images
HTML Displays the HTML that would normally be used to display the glyphs using the default image set. This is intended for debugging purposes.
raw The input is parsed into an approximate layout but no glyphs are transformed into image
version Displays the installed version of the plugin. (This is also called from the user guide.)

Public Function Reference


The easiest option is to call the mdc_glyphs_do_shortcode() function equivalent to [?hieroglyphs] shortcode which is coded within mdc-glyphs2.php. You should make sure this file has been included. The function takes a number of arguments as follows. For details of possible values please refer to the user guide for the equivalents in the shortcode.

Argument Required? Default Purpose
$content Yes N/A The content to the parsed
$output Optional hiero The output option
$scale Optional 100 The scale factor
$slashes Optional false If true, {backslash} is converted to a backslash character &92; before parsing. This format is more reliable when calling from code.
$max_iterations Optional 999 The maximum number of characters in the input tape which will be parsed.

The only other exposed function within mdc-stateful.php is mdc_glyphs_shortcode which establishes the shortcode. There should be no need to use call this function directly.

Other Exposed Functions

Most of the other useful exposed functions are within mdc-stateful.php which defines the main parsing class and output. These functions should only be required if you are seeking to extend the parsing engine or output options. Refer to the code for arguments.

Method Returns Purpose
MdC_Stateful() An instance of the class Class constructor
parse() The output (excluding the >span< wrapper added within mdc_glyphs_do_shortcode() ). Parses the input. Call after creating a new object.
get_output() The same output as parse() If the output is required again, use this method – parse() must have been called first as this method doesn’t parse the input.

There are five exposed functions within mdc-glyphs-help.php which are used to build the User Guide.

Method Returns Purpose
mdc_glyph_help() User Guide Returns the User Guide or, optionally, a particular section of the User Guide so that a site-specific guide can be built which re-uses sections of the default User Guide.
mdc_glyphs_shortcode_text() Any shortcode text As shortcodes are hard to escape, this function is a helper to do display shortcode text which is not to be converted
mdc_glyph_help_version() Help version Outputs the version of the help file.
mdc_glyphs_title_maker() Title maker Ensures titles in the User Guide have a consistent format – use if adding a new section so that it get’s added to the Table of Contents.
mdc_glyphs_toc_maker() Builds the Table of Contents Used to build the Table of Contents.

If you add a new section to the User Guide use mdc_glyphs_title_maker() to give it the correct format for the title. Build an arrayof section IDs (see the code for details) and call the mdc_glyph_help($id) to build the User Guide in the order you want including any new section. Concatenate the results into a string and pass that to mdc_glyphs_toc_maker() which will add a Table of Contents at the start of it.


Versioning output is accessed from code by calling mdc_glyphs_do_shortcode(”,’version’). You can also directly access mdc_glyph_help_version(), mdc_glyphs_phonemes_version(), mdc_glyphs_stateful_version() and mdc_glyphs_rotor_version() but you must ensure that the relevant file has been included. There is no version method within mdc-glyphs2.php.

Latest Version

[hieroglyphs output=”version”]

Leave a Comment

If you wish to leave a new comment please use the message box below; if you are responding to an earlier comment then please click on the Reply To button for that comment.