Bypass all relative path
-
Hello,
I am using the following code to control the bypass for pages/** * Bypass Force Login to allow for exceptions. * * @param bool $bypass Whether to disable Force Login. Default false. * @param string $visited_url The visited URL. * @return bool */ function my_forcelogin_bypass( $bypass, $visited_url ) { // Allow all single posts if ( is_single() ) { $bypass = true; } // Allow these absolute URLs $allowed = array( 'https://my.site.com/gps/', ); if ( ! $bypass ) { $bypass = in_array( $visited_url, $allowed ); } return $bypass; } add_filter( 'v_forcelogin_bypass', 'my_forcelogin_bypass', 10, 2 );
`
Everything working fine but now I am adding one new feature which will generate dynamic URLs with a different token each time. All URL will be through the same path https://my.site.com/gps/ but after “gps/” the token will be added.
Is there a way to do that?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Bypass all relative path’ is closed to new replies.