From e43a4674a65c6a3956c8e7f10677379ea6aceed8 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sun, 6 Apr 2008 21:29:36 +0000 Subject: [PATCH] Allow TinyMCE to work under SSL. Fixes #6544. Hat tip: blenjee, azaozz. git-svn-id: https://develop.svn.wordpress.org/trunk@7602 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/tinymce/tiny_mce_config.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/js/tinymce/tiny_mce_config.php b/wp-includes/js/tinymce/tiny_mce_config.php index 215fa7e803..ef3c7c480d 100644 --- a/wp-includes/js/tinymce/tiny_mce_config.php +++ b/wp-includes/js/tinymce/tiny_mce_config.php @@ -49,11 +49,11 @@ function putFileContents( $path, $content ) { $https = ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; $baseurl = get_option('siteurl') . '/wp-includes/js/tinymce'; -if ( $https ) str_replace('http://', 'https://', $baseurl); +if ( $https ) $baseurl = str_replace('http://', 'https://', $baseurl); $mce_css = $baseurl . '/wordpress.css'; $mce_css = apply_filters('mce_css', $mce_css); -if ( $https ) str_replace('http://', 'https://', $mce_css); +if ( $https ) $mce_css = str_replace('http://', 'https://', $mce_css); $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1 @@ -104,7 +104,7 @@ if ( ! empty($mce_external_plugins) ) { foreach ( $mce_external_plugins as $name => $url ) { - if ( $https ) str_replace('http://', 'https://', $url); + if ( $https ) $url = str_replace('http://', 'https://', $url); $plugins[] = '-' . $name; @@ -326,4 +326,4 @@ if ( '' != $cacheKey && is_dir($cache_path) && is_readable($cache_path) ) { putFileContents( $cache_file, $content ); } -?> \ No newline at end of file +?>