Created
July 5, 2011 05:39
-
-
Save fbzhong/1064299 to your computer and use it in GitHub Desktop.
HTTPS fix for wordpress language zh_CN.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zh_cn_language_pack_backend_style_modify() { | |
$styleUrl = WP_CONTENT_URL . '/' . ZH_CN_PACK_LANGUAGE_DIR_TO_CONTENT . 'zh_CN-dashboard.css'; | |
$styleFile = WP_CONTENT_DIR . '/' . ZH_CN_PACK_LANGUAGE_DIR_TO_CONTENT . 'zh_CN-dashboard.css'; | |
if ( file_exists( $styleFile ) ) { | |
+ if ( 0 === strpos($styleUrl, 'http') && is_ssl() ) | |
+ $styleUrl = str_replace( 'http://', 'https://', $styleUrl ); | |
wp_register_style( 'zh-cn-pack-style-dashboard', $styleUrl, array(), '1.0'); | |
wp_enqueue_style( 'zh-cn-pack-style-dashboard' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment