Allow TinyMCE to work under SSL. Fixes #6544. Hat tip: blenjee, azaozz.

git-svn-id: http://svn.automattic.com/wordpress/trunk@7602 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2008-04-06 21:29:36 +00:00
parent ad1c6ea083
commit 6099258ff9
1 changed files with 4 additions and 4 deletions

View File

@ -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 );
}
?>
?>