Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to readme.txt.

  • Loading branch information...
commit 777ab751c6f5ce3e41c682e7b7aedddd59488fd6 1 parent e5eaad4
@mvied authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 readme.txt
View
10 readme.txt
@@ -59,6 +59,16 @@ Yes! Here is an example of how to use the 'force_ssl' hook to force a page to be
add_filter('force_ssl' , 'custom_force_ssl', 10, 2);`
+You can also use this filter to filter pages based on their URL. Let's say you have an E-commerce site and all of your E-commerce URL's contain 'store'.
+`function store_force_ssl( $force_ssl, $post_id ) {
+ if ( strpos($_SERVER['REQUEST_URI'], 'store') !== false ) {
+ $force_ssl = true;
+ }
+ return $force_ssl;
+}
+
+add_filter('force_ssl', 'store_force_ssl');`
+
== Screenshots ==
1. WordPress HTTPS Settings screen
2. Force SSL checkbox added to add/edit posts screen
Please sign in to comment.
Something went wrong with that request. Please try again.