Ticket #52072: 52072.patch
File 52072.patch, 2.5 KB (added by , 4 months ago) |
---|
-
inc/template-functions.php
127 127 * Creates continue reading text 128 128 */ 129 129 function twenty_twenty_one_continue_reading_text() { 130 $continue_reading =sprintf(130 return sprintf( 131 131 /* translators: %s: Name of current post. */ 132 132 esc_html__( 'Continue reading %s', 'twentytwentyone' ), 133 133 the_title( '<span class="screen-reader-text">', '</span>', false ) 134 134 ); 135 136 return $continue_reading;137 135 } 138 136 139 137 /** … … 200 198 */ 201 199 function twenty_twenty_one_change_calendar_nav_arrows( $calendar_output ) { 202 200 $calendar_output = str_replace( '« ', 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( ' »', 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( ' »', is_rtl() ? twenty_twenty_one_get_icon_svg( 'ui', 'arrow_left' ) : twenty_twenty_one_get_icon_svg( 'ui', 'arrow_right' ), $calendar_output ); 205 202 } 206 203 add_filter( 'get_calendar', 'twenty_twenty_one_change_calendar_nav_arrows' ); 207 204 … … 394 391 function twenty_twenty_one_password_form( $post = 0 ) { 395 392 $post = get_post( $post ); 396 393 $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> 398 395 <form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post"> 399 396 <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> 400 397 '; 401 return $output;402 398 } 403 399 add_filter( 'the_password_form', 'twenty_twenty_one_password_form' ); 404 400