Skip to content

Commit

Permalink
Added Reset Postdata Hook
Browse files Browse the repository at this point in the history
* https://wordpress.tv/2017/08/11/amanda-giles-level-up-taking-your-wordpress-code-up-a-notch/ mentions needing to reset postdata. Unsure if this is necessary the way we use WP_Query, but better to be safe than sorry
  • Loading branch information
Lewiscowles1986 committed Aug 13, 2017
1 parent c3e90eb commit c1a97f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://www.codesign2.co.uk
Description: Bring your content authoring and tooling into the 21st century with this tool.
Author: CODESIGN2
Version: 2.6.2
Version: 2.6.4
Author URI: http://www.codesign2.co.uk/
License: AGPL
*/
Expand Down Expand Up @@ -103,6 +103,7 @@ public function render_sc( $atts, $content='', $tag=self::POST_TYPE ) {
}
}
wp_reset_query();
wp_reset_postdata();
return $out;
}

Expand Down

0 comments on commit c1a97f5

Please sign in to comment.