Permalink
Browse files

Add entries after the shortcodes had been run

The shortcodes in the liveblog entries already had their shortcodes
processed and if we left any (for example in the original content) we would prefer
that they are left verbatim.
  • Loading branch information...
1 parent e6bace0 commit 167d167395f410317f9e934f4c3e7c00a569f4bf @nb nb committed Jan 25, 2013
Showing with 7 additions and 3 deletions.
  1. +7 −3 liveblog.php
View
@@ -196,10 +196,14 @@ public static function handle_request() {
self::$post_id = get_the_ID();
self::$entry_query = new WPCOM_Liveblog_Entry_Query( self::$post_id, self::key );
- if ( self::is_initial_page_request() )
- add_filter( 'the_content', array( __CLASS__, 'add_liveblog_to_content' ) );
- else
+ if ( self::is_initial_page_request() ) {
+ // we need to add the liveblog after the shortcodes are run, because we already
+ // process shortcodes in the comment contents and if we left any (like in the original content)
+ // we wouldn't like them to be processed
+ add_filter( 'the_content', array( __CLASS__, 'add_liveblog_to_content' ), 20 );
+ } else {
self::handle_ajax_request();
+ }
}
private static function handle_ajax_request() {

0 comments on commit 167d167

Please sign in to comment.