Make WordPress Core

Ticket #35308: 35308-protected-excerpt.diff

File 35308-protected-excerpt.diff, 580 bytes (added by Tmeister, 8 years ago)

New filter added to the string.

  • wp-includes/post-template.php

    diff --git wp-includes/post-template.php wp-includes/post-template.php
    index 3164509..e26b6fd 100644
    function get_the_excerpt( $deprecated = '' ) { 
    361361        }
    362362
    363363        if ( post_password_required() ) {
    364                 return __( 'There is no excerpt because this is a protected post.' );
     364                /**
     365                 * Filter the post excerpt when is a protected post.
     366                 *
     367                 * @param string
     368                 */
     369                return apply_filters( 'get_the_protected_excerpt' , __( 'There is no excerpt because this is a protected post.' ) );
    365370        }
    366371
    367372        /**