diff --git wp-admin/includes/class-wp-comments-list-table.php wp-admin/includes/class-wp-comments-list-table.php
index bb5a95e..391e9f5 100644
|
|
|
class WP_Comments_List_Table extends WP_List_Table { |
| 447 | 447 | $author_url = get_comment_author_url(); |
| 448 | 448 | if ( 'http://' == $author_url ) |
| 449 | 449 | $author_url = ''; |
| 450 | | $author_url_display = preg_replace( '|http://(www\.)?|i', '', $author_url ); |
| | 450 | $author_url_display = preg_replace( '|^http://(www\.)?|i', '', $author_url ); |
| 451 | 451 | if ( strlen( $author_url_display ) > 50 ) |
| 452 | 452 | $author_url_display = substr( $author_url_display, 0, 49 ) . '...'; |
| 453 | 453 | |
diff --git wp-admin/network.php wp-admin/network.php
index 2931cbb..7396769 100644
|
|
|
function network_domain_check() { |
| 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( 'siteurl' ) ); |
| | 54 | $domain = preg_replace( '|^https?://([^/]+)|', '$1', get_option( 'siteurl' ) ); |
| 55 | 55 | if( false !== strpos( $domain, '/' ) || 'localhost' == $domain || preg_match( '|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|', $domain ) ) |
| 56 | 56 | return false; |
| 57 | 57 | |
| … |
… |
function allow_subdirectory_install() { |
| 86 | 86 | function get_clean_basedomain() { |
| 87 | 87 | if ( $existing_domain = network_domain_check() ) |
| 88 | 88 | return $existing_domain; |
| 89 | | $domain = preg_replace( '|https?://|', '', get_option( 'siteurl' ) ); |
| | 89 | $domain = preg_replace( '|^https?://|', '', get_option( 'siteurl' ) ); |
| 90 | 90 | if ( $slash = strpos( $domain, '/' ) ) |
| 91 | 91 | $domain = substr( $domain, 0, $slash ); |
| 92 | 92 | return $domain; |
diff --git wp-includes/class-wp-xmlrpc-server.php wp-includes/class-wp-xmlrpc-server.php
index 14b8334..08a7236 100644
|
|
|
class wp_xmlrpc_server extends IXR_Server { |
| 3407 | 3407 | |
| 3408 | 3408 | /* warning: here we make the assumption that the blog's URL is on the same server */ |
| 3409 | 3409 | $filename = get_option('home') . '/'; |
| 3410 | | $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); |
| | 3410 | $filename = preg_replace('#^https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); |
| 3411 | 3411 | |
| 3412 | 3412 | $f = fopen($filename, 'r'); |
| 3413 | 3413 | $content = fread($f, filesize($filename)); |
| … |
… |
class wp_xmlrpc_server extends IXR_Server { |
| 3447 | 3447 | |
| 3448 | 3448 | /* warning: here we make the assumption that the blog's URL is on the same server */ |
| 3449 | 3449 | $filename = get_option('home') . '/'; |
| 3450 | | $filename = preg_replace('#https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); |
| | 3450 | $filename = preg_replace('#^https?://.+?/#', $_SERVER['DOCUMENT_ROOT'].'/', $filename); |
| 3451 | 3451 | |
| 3452 | 3452 | if ($f = fopen($filename, 'w+')) { |
| 3453 | 3453 | fwrite($f, $content); |
diff --git wp-includes/default-constants.php wp-includes/default-constants.php
index 4e5daab..9602f7d 100644
|
|
|
function wp_cookie_constants( ) { |
| 192 | 192 | * @since 1.2.0 |
| 193 | 193 | */ |
| 194 | 194 | if ( !defined('COOKIEPATH') ) |
| 195 | | define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) ); |
| | 195 | define('COOKIEPATH', preg_replace('|^https?://[^/]+|i', '', get_option('home') . '/' ) ); |
| 196 | 196 | |
| 197 | 197 | /** |
| 198 | 198 | * @since 1.5.0 |
| 199 | 199 | */ |
| 200 | 200 | if ( !defined('SITECOOKIEPATH') ) |
| 201 | | define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); |
| | 201 | define('SITECOOKIEPATH', preg_replace('|^https?://[^/]+|i', '', get_option('siteurl') . '/' ) ); |
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | 204 | * @since 2.6.0 |
| … |
… |
function wp_cookie_constants( ) { |
| 210 | 210 | * @since 2.6.0 |
| 211 | 211 | */ |
| 212 | 212 | if ( !defined('PLUGINS_COOKIE_PATH') ) |
| 213 | | define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) ); |
| | 213 | define( 'PLUGINS_COOKIE_PATH', preg_replace('|^https?://[^/]+|i', '', WP_PLUGIN_URL) ); |
| 214 | 214 | |
| 215 | 215 | /** |
| 216 | 216 | * @since 2.0.0 |
diff --git wp-includes/formatting.php wp-includes/formatting.php
index fcf519c..984b384 100644
|
|
|
function like_escape($text) { |
| 2704 | 2704 | * @return string Absolute path. |
| 2705 | 2705 | */ |
| 2706 | 2706 | function wp_make_link_relative( $link ) { |
| 2707 | | return preg_replace( '|https?://[^/]+(/.*)|i', '$1', $link ); |
| | 2707 | return preg_replace( '|^https?://[^/]+(/.*)|i', '$1', $link ); |
| 2708 | 2708 | } |
| 2709 | 2709 | |
| 2710 | 2710 | /** |