Ticket #29727: 29727.diff
File 29727.diff, 1.4 KB (added by , 9 years ago) |
---|
-
wp-includes/default-filters.php
151 151 add_filter( 'comment_text', 'convert_smilies', 20 ); 152 152 add_filter( 'comment_text', 'wpautop', 30 ); 153 153 154 if ( is_ssl() ) { 155 add_filter( 'the_content', 'wp_post_content_ssl_urls' ); 156 add_filter( 'the_excerpt', 'wp_post_content_ssl_urls' ); 157 add_filter( 'comment_text', 'wp_post_content_ssl_urls' ); 158 } 159 160 154 161 add_filter( 'comment_excerpt', 'convert_chars' ); 155 162 156 163 add_filter( 'list_cats', 'wptexturize' ); -
wp-includes/functions.php
3942 3942 } 3943 3943 3944 3944 /** 3945 * Rewrites local HTTP URLs in post content to HTTPS URLs 3946 * 3947 * @since 4.5.0 3948 * 3949 * @param string $content Post content. 3950 * @return string Post content with rewritten URLs 3951 */ 3952 function wp_post_content_ssl_urls( $content ) { 3953 $search = array( 3954 home_url( '', 'http' ), 3955 site_url( '', 'http' ) 3956 ); 3957 $replace = array( 3958 home_url( '', 'https' ), 3959 site_url( '', 'https' ) 3960 ); 3961 return str_replace( $search, $replace, $content ); 3962 } 3963 3964 /** 3945 3965 * Guess the URL for the site. 3946 3966 * 3947 3967 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin