Permalink
Browse files

Move setup_postdata so custom dynamic templates have access to post d…

…ata.
  • Loading branch information...
mgsisk committed Aug 21, 2012
1 parent d3201a8 commit 433f7f2aac5d867ff301b249b4467db6f7624cb9
Showing with 1 addition and 0 deletions.
  1. +1 −0 webcomic.php
View
@@ -710,6 +710,7 @@ public function template_redirect() {
}
if ( isset( $_GET[ 'webcomic_dynamic' ] ) and 'xmlhttprequest' === strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) ) {
+ setup_postdata( $post );
if ( !locate_template( array( "webcomic/dynamic-{$_GET[ 'webcomic_dynamic' ]}-{$collection}.php", "webcomic/dynamic-{$_GET[ 'webcomic_dynamic' ]}.php", "webcomic/dynamic-{$collection}.php", 'webcomic/dynamic.php' ), true, false ) ) {
require self::$dir . '-/php/integrate/dynamic.php';

0 comments on commit 433f7f2

Please sign in to comment.