/** * Display the post content minus the parsed post format data. * * @since 3.6.0 * * @param string $more_link_text Optional. Content for when there is more text. * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false. */ function the_remaining_content($more_link_text = null, $strip_teaser = false) { $extra = get_the_remaining_content($more_link_text, $strip_teaser); remove_filter('the_content', 'post_formats_compat', 7); $content = apply_filters('the_content', $extra); add_filter('the_content', 'post_formats_compat', 7); echo str_replace(']]>', ']]>', $content); }
/** * Gets content of Post * @param string $more "More" text * @param type $stripTeaser int 0, 1 whether to strip teaser or not * @return HTML content of Post */ public function remainingContent($more = null, $stripTeaser = false) { global $wp_version; if (version_compare($wp_version, "3.6beta", ">=")) { $this->setupData(); $extra = get_the_remaining_content($more, $stripTeaser); remove_filter('the_content', 'post_formats_compat', 7); $content = apply_filters('the_content', $extra); add_filter('the_content', 'post_formats_compat', 7); wp_reset_postdata(); return str_replace(']]>', ']]>', $content); } else { return $this->content($more, $stripTeaser); } }