Created
August 11, 2012 18:13
-
-
Save PaulHughes01/3326097 to your computer and use it in GitHub Desktop.
TinyMCE for TribeEventsBeforeHTML/After
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 | |
// 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' ); |
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
it dosnt support the short code:) any ideas to solve that