Ticket #40245: 40245_update.2.diff
File 40245_update.2.diff, 3.1 KB (added by , 6 years ago) |
---|
-
wp-includes/default-filters.php
554 554 add_filter( 'the_excerpt_embed', 'shortcode_unautop' ); 555 555 add_filter( 'the_excerpt_embed', 'wp_embed_excerpt_attachment' ); 556 556 557 add_filter( 'oembed_dataparse', 'wp_filter_oembed_title', 9, 3 ); 557 558 add_filter( 'oembed_dataparse', 'wp_filter_oembed_result', 10, 3 ); 558 559 add_filter( 'oembed_response_data', 'get_oembed_response_data_rich', 10, 4 ); 559 560 add_filter( 'pre_oembed_result', 'wp_filter_pre_oembed_result', 10, 3 ); -
wp-includes/embed.php
709 709 } 710 710 711 711 /** 712 * Filters the given oEmbed HTML to make sure it has a title. 713 * 714 * @since x.x.x 715 * 716 * @param string $result The oEmbed HTML result. 717 * @param object $data A data object result from an oEmbed provider. 718 * @param string $url The URL of the content to be embedded. 719 * @return string The filtered oEmbed result. 720 */ 721 function wp_filter_oembed_title( $result, $data, $url ) { 722 723 // Get title from oEmbed data to start. 724 $title = ! empty( $data->title ) ? $data->title : ''; 725 726 // If no oEmbed title, search the return markup for a title attribute. 727 $preg_match = '/title\=[\"|\\\']{1}([^\"\\\']*)[\"|\\\']{1}/i'; 728 $has_title_attr = preg_match( $preg_match, $result, $matches ); 729 if ( $has_title_attr && ! empty( $matches[1] ) ) { 730 $title = $matches[1]; 731 } 732 733 $title = apply_filters( 'oembed_title', $title, $result, $data, $url ); 734 735 /* 736 * If the title attribute already 737 * exists, replace with new value. 738 * 739 * Otherwise, add the title attribute. 740 */ 741 if ( $has_title_attr ) { 742 $result = preg_replace( $preg_match, 'title="' . esc_attr( $title ) . '"', $result ); 743 } else { 744 $result = preg_replace( '/^\<iframe/i', '<iframe title="' . esc_attr( $title ) . '"', $result ); 745 } 746 747 return $result; 748 } 749 750 /** 712 751 * Filters the given oEmbed HTML. 713 752 * 714 753 * If the `$url` isn't on the trusted providers list, -
wp-login.php
334 334 } elseif ( strpos( $_POST['user_login'], '@' ) ) { 335 335 $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) ); 336 336 if ( empty( $user_data ) ) { 337 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There is no user registered with thatemail address.' ) );337 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: There are no user accounts using that username or email address.' ) ); 338 338 } 339 339 } else { 340 340 $login = trim( $_POST['user_login'] ); … … 357 357 } 358 358 359 359 if ( ! $user_data ) { 360 $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: Invalid username or email.' ) );360 $errors->add( 'invalidcombo', __( '<strong>ERROR</strong>: There are no user accounts using that username or email address.' ) ); 361 361 return $errors; 362 362 } 363 363