{"id":8163327,"date":"2016-09-09T10:29:20","date_gmt":"2016-09-09T10:29:20","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/whitelist-for-dummies\/"},"modified":"2016-09-09T10:29:20","modified_gmt":"2016-09-09T10:29:20","slug":"whitelist-for-dummies","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/whitelist-for-dummies\/","title":{"rendered":"Whitelist for dummies"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Thanks for creating this plugin. I really love it. <\/p>\n<p>The only thing that I can&#8217;t figure out is the whitelist option. I have a WordPress multisite. I&#8217;m trying to white list http:\/\/shop.easyorange.nl\/dealers and entered the following to my functions.php.<\/p>\n<p>Caution: I am an absolute noob when i comes to code&#8230;<\/p>\n<p>\/**<br \/>\n * Filter Force Login to allow exceptions for specific URLs.<br \/>\n *<br \/>\n * @return array An array of URLs. Must be absolute.<br \/>\n **\/<br \/>\nfunction my_forcelogin_whitelist( $whitelist ) {<br \/>\n  $whitelist[] = (&#8216;https:\/\/shop.easyorange.nl\/dealers&#8217;);<br \/>\n  $whitelist[] = (&#8216;www.drinkflesgroothandel.nl\/easyorangeshop\/dealers&#8217;);<br \/>\n  return $whitelist;<br \/>\n}<br \/>\nadd_filter(&#8216;v_forcelogin_whitelist&#8217;, &#8216;my_forcelogin_whitelist&#8217;, 10, 1);<\/p>\n<p>I also tried:<br \/>\n$whitelist[] = site_url( &#8216;\/dealers\/&#8217; );<\/p>\n<p>Both with no effect. I keep getting the login screen.<\/p>\n<p>Thank you in advance for your help!<\/p>\n","protected":false},"template":"","class_list":["post-8163327","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8163327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/8163327\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=8163327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}