Last active
February 28, 2018 15:15
-
-
Save anwas/4709e7dd098cb80888a4a83dd8637b41 to your computer and use it in GitHub Desktop.
[WPML force SSL] #wordpress #wpml #ssl
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
| <?php | |
| /****************/ | |
| /* WPML SUPPORT */ | |
| /****************/ | |
| function force_ssl( $force_ssl, $id = 0 ) { | |
| // A list of posts that should be SSL | |
| $ssl_posts = array(8); | |
| if ( in_array( $id, $ssl_posts ) ) { | |
| $force_ssl = true; | |
| } | |
| return $force_ssl; | |
| } | |
| add_filter( 'force_ssl', 'force_ssl', 1, 3 ); | |
| /********************/ | |
| /* END WPML SUPPORT */ | |
| /********************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment