Ticket #22330: 22330.2.diff
File 22330.2.diff, 3.1 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/class-wp-comments-list-table.php
497 497 $author_url = get_comment_author_url(); 498 498 if ( 'http://' == $author_url ) 499 499 $author_url = ''; 500 $author_url_display = preg_replace( '| http://(www\.)?|i', '', $author_url );500 $author_url_display = preg_replace( '|^http://(www\.)?|i', '', $author_url ); 501 501 if ( strlen( $author_url_display ) > 50 ) 502 502 $author_url_display = substr( $author_url_display, 0, 49 ) . '…'; 503 503 -
wp-admin/network.php
51 51 * @return bool Whether subdomain install is allowed 52 52 */ 53 53 function allow_subdomain_install() { 54 $domain = preg_replace( '| https?://([^/]+)|', '$1', get_option( 'home' ) );54 $domain = preg_replace( '|^https?://([^/]+)|', '$1', get_option( 'home' ) ); 55 55 if( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) ) 56 56 return false; 57 57 … … 93 93 function get_clean_basedomain() { 94 94 if ( $existing_domain = network_domain_check() ) 95 95 return $existing_domain; 96 $domain = preg_replace( '| https?://|', '', get_option( 'siteurl' ) );96 $domain = preg_replace( '|^https?://|', '', get_option( 'siteurl' ) ); 97 97 if ( $slash = strpos( $domain, '/' ) ) 98 98 $domain = substr( $domain, 0, $slash ); 99 99 return $domain; -
wp-includes/default-constants.php
211 211 * @since 1.2.0 212 212 */ 213 213 if ( !defined('COOKIEPATH') ) 214 define('COOKIEPATH', preg_replace('| https?://[^/]+|i', '', get_option('home') . '/' ) );214 define('COOKIEPATH', preg_replace('|^https?://[^/]+|i', '', get_option('home') . '/' ) ); 215 215 216 216 /** 217 217 * @since 1.5.0 218 218 */ 219 219 if ( !defined('SITECOOKIEPATH') ) 220 define('SITECOOKIEPATH', preg_replace('| https?://[^/]+|i', '', get_option('siteurl') . '/' ) );220 define('SITECOOKIEPATH', preg_replace('|^https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); 221 221 222 222 /** 223 223 * @since 2.6.0 … … 229 229 * @since 2.6.0 230 230 */ 231 231 if ( !defined('PLUGINS_COOKIE_PATH') ) 232 define( 'PLUGINS_COOKIE_PATH', preg_replace('| https?://[^/]+|i', '', WP_PLUGIN_URL));232 define( 'PLUGINS_COOKIE_PATH', preg_replace('|^https?://[^/]+|i', '', WP_PLUGIN_URL) ); 233 233 234 234 /** 235 235 * @since 2.0.0 -
wp-includes/formatting.php
3089 3089 * @return string Absolute path. 3090 3090 */ 3091 3091 function wp_make_link_relative( $link ) { 3092 return preg_replace( '| https?://[^/]+(/.*)|i', '$1', $link );3092 return preg_replace( '|^https?://[^/]+(/.*)|i', '$1', $link ); 3093 3093 } 3094 3094 3095 3095 /**