WordPress.org

Make WordPress Core

Ticket #52072: 52072.patch

File 52072.patch, 2.5 KB (added by manzurahammed, 4 months ago)
  • inc/template-functions.php

     
    127127 * Creates continue reading text
    128128 */
    129129function twenty_twenty_one_continue_reading_text() {
    130         $continue_reading = sprintf(
     130        return sprintf(
    131131                /* translators: %s: Name of current post. */
    132132                esc_html__( 'Continue reading %s', 'twentytwentyone' ),
    133133                the_title( '<span class="screen-reader-text">', '</span>', false )
    134134        );
    135 
    136         return $continue_reading;
    137135}
    138136
    139137/**
     
    200198 */
    201199function twenty_twenty_one_change_calendar_nav_arrows( $calendar_output ) {
    202200        $calendar_output = str_replace( '&laquo; ', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ), $calendar_output );
    203         $calendar_output = str_replace( ' &raquo;', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output );
    204         return $calendar_output;
     201        return str_replace( ' &raquo;', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output );
    205202}
    206203add_filter( 'get_calendar', 'twenty_twenty_one_change_calendar_nav_arrows' );
    207204
     
    394391function twenty_twenty_one_password_form( $post = 0 ) {
    395392        $post   = get_post( $post );
    396393        $label  = 'pwbox-' . ( empty( $post->ID ) ? wp_rand() : $post->ID );
    397         $output = '<p class="post-password-message">' . esc_html__( 'This content is password protected. Please enter a password to view.', 'twentytwentyone' ) . '</p>
     394        return '<p class="post-password-message">' . esc_html__( 'This content is password protected. Please enter a password to view.', 'twentytwentyone' ) . '</p>
    398395        <form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">
    399396        <label class="post-password-form__label" for="' . esc_attr( $label ) . '">' . esc_html_x( 'Password', 'Post password form', 'twentytwentyone' ) . '</label><input class="post-password-form__input" name="post_password" id="' . esc_attr( $label ) . '" type="password" size="20" /><input type="submit" class="post-password-form__submit" name="' . esc_attr_x( 'Submit', 'Post password form', 'twentytwentyone' ) . '" value="' . esc_attr_x( 'Enter', 'Post password form', 'twentytwentyone' ) . '" /></form>
    400397        ';
    401         return $output;
    402398}
    403399add_filter( 'the_password_form', 'twenty_twenty_one_password_form' );
    404400