Title: Different deadline
Last modified: July 13, 2020

---

# Different deadline

 *  Resolved [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/)
 * Hello,
    Is it possible to set a deadline of 15 minutes (after access)? How can
   I do by changing the code? Thank you

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [emanaku](https://wordpress.org/support/users/emanaku/)
 * (@emanaku)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117552)
 * Hi marcorroma,
 * in your functions.php (in your theme) you can add sth like this:
 *     ```
       add_filter( 'tlwp_expiry_options', 'my_tlwp_expiry_option', 10, 1);
   
       function my_tlwp_expiry_option( $options ) {
   
           $options['15_minutes_after_access'] = array(
   
               'label' => __('15 Minutes after Access', 'text-domain'),
           	'group' => 'after_access',
           	'group_name' => __( 'After Access', 'temporary-login-without-password' ),
           	'expiry_label' => __( '15 Minutes after access', 'text-domain' ),
               'timestamp' => MINUTE_IN_SECONDS * 15 ,
               'order' => 1 // dropdown options will be sort with this number
   
           );
       }
       ```
   
 * Just be aware, that the time the user is in the system is only checked, when 
   there is a change of the page/post the user is on.
    If the user is on one page,
   just reading it or watching a video on that page, they can do that for hours,
   because the page does not check the permission for the user “automatically”.
 * Good luck!
    -  This reply was modified 5 years, 10 months ago by [emanaku](https://wordpress.org/support/users/emanaku/).
 *  Thread Starter [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117658)
 * Thanks for the quick reply.
    If I insert that code into the theme functions, 
   I will display the settings of your plugin screenshot: [https://i.ibb.co/wrHHXCX/Schermata-2020-07-13-alle-18-41-22.png](https://i.ibb.co/wrHHXCX/Schermata-2020-07-13-alle-18-41-22.png)
 *  [emanaku](https://wordpress.org/support/users/emanaku/)
 * (@emanaku)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117684)
 * Ok, sorry. I forgot the “return $options” at the end. Here is the correct version:
 *     ```
       add_filter( 'tlwp_expiry_options', 'my_tlwp_expiry_option', 10, 1);
   
       function my_tlwp_expiry_option( $options ) {
   
           $options['15_minutes_after_access'] = array(
   
               'label' => __('15 Minutes after Access', 'text-domain'),
           	'group' => 'after_access',
           	'group_name' => __( 'After Access', 'temporary-login-without-password' ),
           	'expiry_label' => __( '15 Minutes after access', 'text-domain' ),
               'timestamp' => MINUTE_IN_SECONDS * 15 ,
               'order' => 1 // dropdown options will be sort with this number
   
           );
           return $options;
       }
       ```
   
 * Good luck!
 *  Thread Starter [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117741)
 * Thank you! 5 stars!
 *  Thread Starter [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117840)
 * Hi, it seemed to work, in reality it is not set 15 minutes but 24h.
    Why?
 *  [emanaku](https://wordpress.org/support/users/emanaku/)
 * (@emanaku)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117881)
 * How can you see the 24 hours?
 *  Thread Starter [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117904)
 * I have text staying 15 minutes on the page, updating the page and the login was
   still active.
    And also here: [https://i.ibb.co/7t2HNp3/Schermata-2020-07-13-alle-19-37-50.png](https://i.ibb.co/7t2HNp3/Schermata-2020-07-13-alle-19-37-50.png)
 *  [emanaku](https://wordpress.org/support/users/emanaku/)
 * (@emanaku)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117925)
 * (1) make sure you have the line
    `'timestamp' => MINUTE_IN_SECONDS * 15 ;` right
   in your functions.php (2) reload your page with the Temporary Logins (3) make
   a new Temporary Login – choose the 15 minutes after access (4) should work 🙂
   Worked for me in many cases….
 *  Thread Starter [marcorroma](https://wordpress.org/support/users/marcorroma/)
 * (@marcorroma)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13117954)
 * I had made a wrong step.
    It works very well. Thank you!
 *  [Malay Ladu](https://wordpress.org/support/users/malayladu/)
 * (@malayladu)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13119509)
 * [@emanaku](https://wordpress.org/support/users/emanaku/) Appreciate your help
   to [@marcorroma](https://wordpress.org/support/users/marcorroma/)
 * That’s the power of the community where people are helping each other.
    -  This reply was modified 5 years, 10 months ago by [Malay Ladu](https://wordpress.org/support/users/malayladu/).
      Reason: update message

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Different deadline’ is closed to new replies.

 * ![](https://ps.w.org/temporary-login-without-password/assets/icon-256x256.png?
   rev=2966454)
 * [Temporary Login Without Password](https://wordpress.org/plugins/temporary-login-without-password/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/temporary-login-without-password/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/temporary-login-without-password/)
 * [Active Topics](https://wordpress.org/support/plugin/temporary-login-without-password/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/temporary-login-without-password/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/temporary-login-without-password/reviews/)

## Tags

 * [filter](https://wordpress.org/support/topic-tag/filter/)
 * [temporary login](https://wordpress.org/support/topic-tag/temporary-login/)

 * 10 replies
 * 3 participants
 * Last reply from: [Malay Ladu](https://wordpress.org/support/users/malayladu/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/different-deadline/#post-13119509)
 * Status: resolved