Last active
March 13, 2017 22:58
-
-
Save cliffordp/bf4c9e0595489cd0fcf8b748309f552f to your computer and use it in GitHub Desktop.
Renders all shortcodes for the BNFW plugin's email message, such as using with https://theeventscalendar.com/extensions/formatted-event-date-shortcode/
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 | |
// NO LONGER NEEDED as of BNFW version 1.6.3 from March 13, 2017 | |
/** | |
* Renders all shortcodes for the BNFW plugin's email message, such as using with https://theeventscalendar.com/extensions/formatted-event-date-shortcode/ | |
* Note that BNFW version 1.6.2 does not run do_shortcode() at all so this adds such functionality. Also, its own shortcodes aren't *real* WordPress shortcodes; they're just str_replace's. | |
* from https://gist.github.com/cliffordp/bf4c9e0595489cd0fcf8b748309f552f | |
* | |
* @link https://theeventscalendar.com/support/forums/topic/display-event-start-and-end-dates-in-an-email-using-the-bnfw/#post-1243308 | |
* @link https://wordpress.org/plugins/bnfw/ | |
* @link https://wordpress.org/support/topic/run-do_shortcode-before-bnfw_shortcodes_post/ | |
* | |
* @return string | |
*/ | |
function cliff_bnfw_actually_render_shortcodes( $message, $post_id ) { | |
$message = do_shortcode( $message ); | |
return $message; | |
} | |
add_filter( 'bnfw_shortcodes_post', 'cliff_bnfw_actually_render_shortcodes', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Submitted pull request at jackmcconnell/bnfw#1