Skip to content

Instantly share code, notes, and snippets.

View flx9000's full-sized avatar

icantouchthis flx9000

  • inter webz
View GitHub Profile
<!-- Line break in WordPress meta box text area: the PHP way -->
<?php echo nl2br( esc_html( get_post_meta( get_the_ID(), 'my-meta-field', true) ) ); ?>
<?php
/**
* Example filter to add text style to TinyMCE filter with Mark's "MRW TinyMCE Mods" plugin
*
* Adds a "Text Styles" submenu to the "Formats" dropdown
*
* This would go in a functions.php file or mu-plugin so you don't have to modify the original plugin.
*
* $styles array Contains arrays of style_format arguments to define styles.
* Note: Should be an "array of arrays"