Skip to content

Instantly share code, notes, and snippets.

@PaulHughes01
Created August 11, 2012 18:13
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 PaulHughes01/3326097 to your computer and use it in GitHub Desktop.
Save PaulHughes01/3326097 to your computer and use it in GitHub Desktop.
TinyMCE for TribeEventsBeforeHTML/After
<?php
// Add the following to your functions.php file.
function tribe_filter_before_html_field( $field ) {
echo '<fieldset id="tribe-field-tribeEventsBeforeHTML" class="tribe-field tribe-field-textarea tribe-size-large">';
echo '<legend class="tribe-field-label">Add HTML before calendar</legend><div class="tribe-field-wrap">';
wp_editor( tribe_get_option('tribeEventsBeforeHTML', ''), 'tribeEventsBeforeHTML', array( 'teeny' => true ) );
echo '</fieldset>';
}
function tribe_filter_after_html_field( $field ) {
echo '<fieldset id="tribe-field-tribeEventsAfterHTML" class="tribe-field tribe-field-textarea tribe-size-large">';
echo '<legend class="tribe-field-label">Add HTML after calendar</legend><div class="tribe-field-wrap">';
wp_editor( tribe_get_option('tribeEventsAfterHTML', ''), 'tribeEventsAfterHTML', array( 'teeny' => true ) );
echo '</fieldset>';
}
add_filter( 'tribe_field_output_textarea_tribeEventsBeforeHTML', 'tribe_filter_before_html_field' );
add_filter( 'tribe_field_output_textarea_tribeEventsAfterHTML', 'tribe_filter_after_html_field' );
@AngieB
Copy link

AngieB commented Apr 4, 2013

Also trying to solve this short code issue. Any guesses?

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