Advertisement
verygoodplugins

Untitled

Apr 10th, 2023
796
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. function verify_wpf_auto_login( $end, $contact_data ) {
  2.  
  3.     if ( isset( $_GET['cid'] ) ) {
  4.  
  5.         // If there's no &d= parameter in the URL, or the date doesn't match today's date
  6.         // end the auto login session
  7.  
  8.         if ( ! isset( $_GET['d'] ) ) {
  9.             return true;
  10.         }
  11.  
  12.         if ( urldecode( $_GET['d'] ) != date('Ymd') ) {
  13.             return true;
  14.         }
  15.     }
  16.  
  17.     return $end;
  18.  
  19. }
  20.  
  21. add_filter( 'wpf_end_auto_login', 'verify_wpf_auto_login', 10, 2 );
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement