get_the_content

The timeline below displays how wordpress function get_the_content has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Retrieves the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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 false.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    /*
     * Use the globals if the $post parameter was not specified,
     * but only after they have been set up in setup_postdata().
     */
    if (null === $post && did_action('the_post')) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Post title. */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    // If the requested page doesn't exist.
    if ($elements['page'] > count($elements['pages'])) {
        // Give them the highest numbered page that DOES exist.
        $elements['page'] = count($elements['pages']);
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (str_contains($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || 1 == $elements['page'])) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 6.1

/**
 * Retrieves the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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 false.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    // Use the globals if the $post parameter was not specified,
    // but only after they have been set up in setup_postdata().
    if (null === $post && did_action('the_post')) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Post title. */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    // If the requested page doesn't exist.
    if ($elements['page'] > count($elements['pages'])) {
        // Give them the highest numbered page that DOES exist.
        $elements['page'] = count($elements['pages']);
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || 1 == $elements['page'])) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.5

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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 false.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    // Use the globals if the $post parameter was not specified,
    // but only after they have been set up in setup_postdata().
    if (null === $post && did_action('the_post')) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Post title. */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    // If the requested page doesn't exist.
    if ($elements['page'] > count($elements['pages'])) {
        // Give them the highest numbered page that DOES exist.
        $elements['page'] = count($elements['pages']);
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || 1 == $elements['page'])) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Post title. */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    // If the requested page doesn't exist.
    if ($elements['page'] > count($elements['pages'])) {
        // Give them the highest numbered page that DOES exist.
        $elements['page'] = count($elements['pages']);
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || 1 == $elements['page'])) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Post title. */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    if ($elements['page'] > count($elements['pages'])) {
        // if the requested page doesn't exist
        $elements['page'] = count($elements['pages']);
        // give them the highest numbered page that DOES exist
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || $elements['page'] == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    if ($elements['page'] > count($elements['pages'])) {
        // if the requested page doesn't exist
        $elements['page'] = count($elements['pages']);
        // give them the highest numbered page that DOES exist
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || $elements['page'] == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 2.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    if ($elements['page'] > count($elements['pages'])) {
        // if the requested page doesn't exist
        $elements['page'] = count($elements['pages']);
        // give them the highest numbered page that DOES exist
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || $elements['page'] == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .10

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    if ($elements['page'] > count($elements['pages'])) {
        // if the requested page doesn't exist
        $elements['page'] = count($elements['pages']);
        // give them the highest numbered page that DOES exist
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || $elements['page'] == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 * @since 5.2.0 Added the `$post` parameter.
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @param WP_Post|object|int $post           Optional. WP_Post instance or Post ID/object. Default is null.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false, $post = null)
{
    global $page, $more, $preview, $pages, $multipage;
    $_post = get_post($post);
    if (!$_post instanceof WP_Post) {
        return '';
    }
    if (null === $post) {
        $elements = compact('page', 'more', 'preview', 'pages', 'multipage');
    } else {
        $elements = generate_postdata($_post);
    }
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false, 'post' => $_post))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($_post)) {
        return get_the_password_form($_post);
    }
    if ($elements['page'] > count($elements['pages'])) {
        // if the requested page doesn't exist
        $elements['page'] = count($elements['pages']);
        // give them the highest numbered page that DOES exist
    }
    $page_no = $elements['page'];
    $content = $elements['pages'][$page_no - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        if (has_block('more', $content)) {
            // Remove the core/more block delimiters. They will be left over after $content is split up.
            $content = preg_replace('/<!-- \/?wp:more(.*?) -->/', '', $content);
        }
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($_post->post_content, '<!--noteaser-->') && (!$elements['multipage'] || $elements['page'] == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($elements['more'] && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($elements['more']) {
            $output .= '<span id="more-' . $_post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink($_post) . "#more-{$_post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .10

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
        // give them the highest numbered page that DOES exist
    }
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.1

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains
 *                          part of the content separated by the `<!--nextpage-->` tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
        // give them the highest numbered page that DOES exist
    }
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 0.6

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 0.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 0.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .10

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 9.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 9.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .11

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 8.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .10

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.7

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page      Page number of a single post/page.
 * @global int   $more      Boolean indicator for whether single post/page is being viewed.
 * @global bool  $preview   Whether post/page is in preview mode.
 * @global array $pages     Array of all pages in post/page. Each array element contains part of the content separated by the <!--nextpage--> tag.
 * @global int   $multipage Boolean indicator for whether multiple pages are in play.
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 6.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 6.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .15

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.6

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = sprintf('<span aria-label="%1$s">%2$s</span>', sprintf(
            /* translators: %s: Name of current post */
            __('Continue reading %s'),
            the_title_attribute(array('echo' => false))
        ), __('(more&hellip;)'));
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filters the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 5.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 5.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .18

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.2

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .19

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 3.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 3.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .20

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @global int   $page
 * @global int   $more
 * @global bool  $preview
 * @global array $pages
 * @global int   $multipage
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 2.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 2.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .24

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 1.5

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .40

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 1.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 1.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .27

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 4.1

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @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.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // Preview fix for JavaScript bug with foreign languages.
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 0.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 0.3

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .27

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 3.9

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                /**
                 * Filter the Read More link text.
                 *
                 * @since 2.8.0
                 *
                 * @param string $more_link_element Read More link element.
                 * @param string $more_link_text    Read More text.
                 */
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: 8.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 7.5

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .40

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 7.4

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}

WordPress Version: .30

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    return $output;
}

WordPress Version: 3.7

/**
 * Retrieve the post content.
 *
 * @since 0.71
 *
 * @param string $more_link_text Optional. Content for when there is more text.
 * @param bool $stripteaser Optional. Strip teaser content before the more text. Default is false.
 * @return string
 */
function get_the_content($more_link_text = null, $strip_teaser = false)
{
    global $page, $more, $preview, $pages, $multipage;
    $post = get_post();
    if (null === $more_link_text) {
        $more_link_text = __('(more&hellip;)');
    }
    $output = '';
    $has_teaser = false;
    // If post password required and it doesn't match the cookie.
    if (post_password_required($post)) {
        return get_the_password_form($post);
    }
    if ($page > count($pages)) {
        // if the requested page doesn't exist
        $page = count($pages);
    }
    // give them the highest numbered page that DOES exist
    $content = $pages[$page - 1];
    if (preg_match('/<!--more(.*?)?-->/', $content, $matches)) {
        $content = explode($matches[0], $content, 2);
        if (!empty($matches[1]) && !empty($more_link_text)) {
            $more_link_text = strip_tags(wp_kses_no_null(trim($matches[1])));
        }
        $has_teaser = true;
    } else {
        $content = array($content);
    }
    if (false !== strpos($post->post_content, '<!--noteaser-->') && (!$multipage || $page == 1)) {
        $strip_teaser = true;
    }
    $teaser = $content[0];
    if ($more && $strip_teaser && $has_teaser) {
        $teaser = '';
    }
    $output .= $teaser;
    if (count($content) > 1) {
        if ($more) {
            $output .= '<span id="more-' . $post->ID . '"></span>' . $content[1];
        } else {
            if (!empty($more_link_text)) {
                $output .= apply_filters('the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">{$more_link_text}</a>", $more_link_text);
            }
            $output = force_balance_tags($output);
        }
    }
    if ($preview) {
        // preview fix for javascript bug with foreign languages
        $output = preg_replace_callback('/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output);
    }
    return $output;
}