Make WordPress Core

Ticket #41179: get_the_content_filter.patch

File get_the_content_filter.patch, 1.6 KB (added by Ninos Ego, 7 years ago)
  • src/wp-includes/post-template.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    234234         * Filters the post content.
    235235         *
    236236         * @since 0.71
     237         * @since 4.9 Introduced the `$more_link_text` and `$strip_teaser` parameters.
    237238         *
    238          * @param string $content Content of the current post.
     239         * @param string $content        Content of the current post.
     240         * @param string $more_link_text Content for when there is more text.
     241         * @param bool   $strip_teaser   Strip teaser content before the more text. Default is false.
    239242         */
    240         $content = apply_filters( 'the_content', $content );
     243        $content = apply_filters( 'the_content', $content, $more_link_text, $strip_teaser );
    241244        $content = str_replace( ']]>', ']]&gt;', $content );
    242245        echo $content;
    243246}
     
    327330        if ( $preview ) // Preview fix for JavaScript bug with foreign languages.
    328331                $output =       preg_replace_callback( '/\%u([0-9A-F]{4})/', '_convert_urlencoded_to_entities', $output );
    329332
    330         return $output;
     333        /**
     334         * Filters the retrieved post content.
     335         *
     336         * @since 4.9.0
     337         *
     338         * @param string  $content        The post content.
     339         * @param WP_Post $post           Post object.
     340         * @param string  $more_link_text Content for when there is more text.
     341         * @param bool    $strip_teaser   Strip teaser content before the more text.
     342         */
     343        return apply_filters( 'get_the_content', $output, $post, $more_link_text, $strip_teaser );
    331344}
    332345
    333346/**