• Resolved Lioneur

    (@iadminwp)


    Hi

    I added “two months” option. I just want to know is this the only place in the code to add the settings?

    public static function get_expiry_duration($key = '') {
    
            $expiry_duration = array(
                '3_days' => array(
                    'value' => DAY_IN_SECONDS * 3,
                    'label' => __('Three Days', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                'day' => array(
                    'value' => DAY_IN_SECONDS,
                    'label' => __('One Day', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                '3_hours' => array(
                    'value' => HOUR_IN_SECONDS * 3,
                    'label' => __('Three Hours', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                'hour' => array(
                    'value' => HOUR_IN_SECONDS,
                    'label' => __('One Hour', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                'week' => array(
                    'value' => WEEK_IN_SECONDS,
                    'label' => __('One Week', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                'month' => array(
                    'value' => DAY_IN_SECONDS * 30,
                    'label' => __('One Month', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),
                '2_month' => array(
                    'value' => DAY_IN_SECONDS * 60,
                    'label' => __('Two Months', Wp_Temporary_Login_Without_Password_i18n::$text_domain)
                ),            
            );
    
            if (empty($key)) {
                return $expiry_duration;
            } elseif (isset($expiry_duration[$key])) {
                return $expiry_duration[$key];
            } else {
                return;
            }
        }
    

    Thank you for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello iAdminWP,

    Yes, this is the only code which require to create Temporary Login with 2 months of expiry.

    It’s completely fine to use ‘2_month’ (singular) as a key but it would be great if you can make it ‘2_months’ (plural).

    Hope that helps.

    @iadminwp,

    Just want to update you that we have recently released a new version (1.4.1) of Temporary Login Without Password plugin. In that we have added “Custom Date” option to set the expiry option.

    Now, you can set any expiry date.

    Hope that helps.

    If you like this plugin, please consider to give us 5 star rating here.

    Thanks!
    :Malay

    • This reply was modified 7 years, 9 months ago by Malay Ladu.

    @iadminwp,

    Just want to update you that we have recently released a new version (1.4.1) of Temporary Login Without Password plugin. In that we have added “Custom Date” option to set the expiry option.

    Now, you can set any expiry date.

    Hope that helps.

    If you like this plugin, please consider to give us 5 star rating here.

    Thanks!
    :Malay

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Two Months option’ is closed to new replies.