Index: wp-includes/revision.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/revision.php	(revision 33816)
+++ wp-includes/revision.php	(revision )
@@ -667,3 +667,72 @@
 
 	return true;
 }
+
+/**
+ * Retrieve content from the specified post.
+ *
+ * wp_get_post_content() assumes setup_postdata() has previously been called.
+ * In order to call get_the_content() without side-effects you must first
+ * collect up the values of the global variables assigned in setup_postdata()
+ * and afterwards restore those global variables.
+ *
+ * @since 4.4.0
+ *
+ * @uses save_postdata(), setup_postdata(), restore_postdata(), get_the_content()
+ *
+ * @param object|null|int $post Post data.
+ * @param string $more_link_text Optional. Content for when there is more text.
+ * @param bool $strip_teaser Optional. Teaser content before the more text.
+ * @return string|null The Post's content
+ */
+function wp_get_post_content( $post = null, $more_link_text = null, $strip_teaser = false ) {
+
+	if ( ! is_object( $post = get_post( $post ) ) ) {
+
+		$the_content = null;
+
+	} else {
+
+		$save = wp_save_postdata();
+		setup_postdata( $post );
+		$the_content = get_the_content( $more_link_text, $stripteaser );
+		wp_restore_postdata( $save );
+
+	}
+
+    return $the_content;
+
+}
+
+/**
+ * Retrieve the excerpt from the specified post.
+ *
+ * wp_get_post_excerpt() assumes setup_postdata() has previously been called.
+ * In order to call get_the_excerpt() without side-effects you must first
+ * collect up the values of the global variables assigned in setup_postdata()
+ * and afterwards restore those global variables.
+ *
+ * @since 4.4.0
+ *
+ * @uses save_postdata(), setup_postdata(), restore_postdata(), get_the_excerpt()
+ *
+ * @param object|null|int $post Post data.
+ * @return string|null The Post's excerpt
+ */
+function get_post_excerpt( $post = null ) {
+
+	if ( ! is_object( $post = get_post( $post ) ) ) {
+
+		$the_excerpt = null;
+
+	} else {
+
+		$save = wp_save_postdata();
+		setup_postdata( $post );
+		$the_excerpt = get_the_excerpt();
+		wp_restore_postdata( $save );
+
+	}
+    return $the_excerpt;
+
+}
Index: wp-includes/query.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/query.php	(revision 33816)
+++ wp-includes/query.php	(revision )
@@ -23,7 +23,7 @@
  * @return mixed
  */
 function get_query_var( $var, $default = '' ) {
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->get( $var, $default );
 }
 
@@ -38,7 +38,7 @@
  * @return object
  */
 function get_queried_object() {
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->get_queried_object();
 }
 
@@ -53,7 +53,7 @@
  * @return int
  */
 function get_queried_object_id() {
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->get_queried_object_id();
 }
 
@@ -68,7 +68,7 @@
  * @param mixed  $value
  */
 function set_query_var( $var, $value ) {
-	global $wp_query;
+		global $wp_query;
 	$wp_query->set( $var, $value );
 }
 
@@ -116,7 +116,7 @@
  * @global WP_Query $wp_query
  */
 function wp_reset_postdata() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( isset( $wp_query ) ) {
 		$wp_query->reset_postdata();
@@ -139,7 +139,7 @@
  * @return bool
  */
 function is_archive() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -160,7 +160,7 @@
  * @return bool
  */
 function is_post_type_archive( $post_types = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -181,7 +181,7 @@
  * @return bool
  */
 function is_attachment( $attachment = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -205,7 +205,7 @@
  * @return bool
  */
 function is_author( $author = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -229,7 +229,7 @@
  * @return bool
  */
 function is_category( $category = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -253,7 +253,7 @@
  * @return bool
  */
 function is_tag( $tag = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -282,7 +282,7 @@
  * @return bool
  */
 function is_tax( $taxonomy = '', $term = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -302,7 +302,7 @@
  * @return bool
  */
 function is_comments_popup() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -322,7 +322,7 @@
  * @return bool
  */
 function is_date() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -342,7 +342,7 @@
  * @return bool
  */
 function is_day() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -363,7 +363,7 @@
  * @return bool
  */
 function is_feed( $feeds = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -383,7 +383,7 @@
  * @return bool
  */
 function is_comment_feed() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -412,7 +412,7 @@
  * @return bool True, if front of site.
  */
 function is_front_page() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -441,7 +441,7 @@
  * @return bool True if blog view homepage.
  */
 function is_home() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -461,7 +461,7 @@
  * @return bool
  */
 function is_month() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -488,7 +488,7 @@
  * @return bool
  */
 function is_page( $page = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -508,7 +508,7 @@
  * @return bool
  */
 function is_paged() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -528,7 +528,7 @@
  * @return bool
  */
 function is_preview() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -548,7 +548,7 @@
  * @return bool
  */
 function is_robots() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -568,7 +568,7 @@
  * @return bool
  */
 function is_search() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -597,7 +597,7 @@
  * @return bool
  */
 function is_single( $post = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -624,7 +624,7 @@
  * @return bool
  */
 function is_singular( $post_types = '' ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -644,7 +644,7 @@
  * @return bool
  */
 function is_time() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -664,7 +664,7 @@
  * @return bool
  */
 function is_trackback() {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! isset( $wp_query ) ) {
 		_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
@@ -730,7 +730,7 @@
 		_doing_it_wrong( __FUNCTION__, $message, '3.7' );
 	}
 
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->is_main_query();
 }
 
@@ -748,7 +748,7 @@
  * @return bool
  */
 function have_posts() {
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->have_posts();
 }
 
@@ -762,7 +762,7 @@
  * @return bool True if caller is within loop, false if loop hasn't started or ended.
  */
 function in_the_loop() {
-	global $wp_query;
+		global $wp_query;
 	return $wp_query->in_the_loop;
 }
 
@@ -774,7 +774,7 @@
  * @global WP_Query $wp_query
  */
 function rewind_posts() {
-	global $wp_query;
+		global $wp_query;
 	$wp_query->rewind_posts();
 }
 
@@ -786,7 +786,7 @@
  * @global WP_Query $wp_query
  */
 function the_post() {
-	global $wp_query;
+		global $wp_query;
 	$wp_query->the_post();
 }
 
@@ -4704,7 +4704,7 @@
  * @global wpdb     $wpdb     WordPress database abstraction object.
  */
 function wp_old_slug_redirect() {
-	global $wp_query;
+		global $wp_query;
 	if ( is_404() && '' != $wp_query->query_vars['name'] ) :
 		global $wpdb;
 
@@ -4763,7 +4763,7 @@
  * @return bool True when finished.
  */
 function setup_postdata( $post ) {
-	global $wp_query;
+		global $wp_query;
 
 	if ( ! empty( $wp_query ) && $wp_query instanceof WP_Query ) {
 		return $wp_query->setup_postdata( $post );
@@ -4771,3 +4771,34 @@
 
 	return false;
 }
+
+/**
+ * Save global post data into an array for later restore.
+ *
+ * @since 4.4.0
+ *
+ * @return array Values of selected global variables to be restored by restore_postdata().
+ */
+function wp_save_postdata() {
+
+    global $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages;
+
+    $postdata = array( $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages );
+
+    return $postdata;
+}
+
+/**
+ * Save global post data into an array for later restore.
+ *
+ * @since 4.4.0
+ *
+ * @param array Values of selected global variables collected by save_postdata().
+ */
+function wp_restore_postdata( $postdata ) {
+
+    global $id, $day, $more, $post, $page, $pages, $numpages, $multipage, $authordata, $currentmonth;
+
+    list( $id, $authordata, $day, $currentmonth, $page, $pages, $multipage, $more, $numpages ) = $postdata;
+
+}
