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
This commit is contained in:
Matt Mullenweg 2008-04-06 21:29:36 +00:00
parent e1ae860b7d
commit e43a4674a6
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 );
}
?>
?>