Plugin Directory

Changeset 2998087


Ignore:
Timestamp:
11/18/2023 12:14:29 PM (2 years ago)
Author:
speedify
Message:

Releasing version 3.6.8

Location:
auto-install-free-ssl
Files:
278 added
5 edited

Legend:

Unmodified
Added
Removed
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/Factory.php

    r2989232 r2998087  
    14181418   
    14191419    }
     1420   
     1421    /**
     1422     * Get discount offer details
     1423     * @param bool $comparison_table
     1424     *
     1425     * @return array
     1426     * @since 3.6.8
     1427     */
     1428    public function get_offer_details( $comparison_table = false )
     1429    {
     1430       
     1431        if ( time() > strtotime( "November 23, 2023" ) && time() < strtotime( "November 29, 2023" ) ) {
     1432            $offer_name = "<strong>Black Friday + Cyber Monday Sale</strong><br /><br />";
     1433            $offer_end_time = strtotime( "November 29, 2023" );
     1434            $coupon_code = "BFCM";
     1435            $discount_percentage = __( "30%", 'auto-install-free-ssl' );
     1436        } else {
     1437            $offer_name = "";
     1438            $offer_end_time = get_option( 'aifs_comparison_table_promo_start_time' ) + AIFS_COUNTDOWN_DURATION;
     1439           
     1440            if ( $comparison_table ) {
     1441                $coupon_code = "20AutoInstall";
     1442            } else {
     1443                $coupon_code = "AutoInstall20";
     1444            }
     1445           
     1446            $discount_percentage = __( "20%", 'auto-install-free-ssl' );
     1447        }
     1448       
     1449        return array(
     1450            'offer_name'          => $offer_name,
     1451            'offer_end_time'      => $offer_end_time,
     1452            'coupon_code'         => $coupon_code,
     1453            'discount_percentage' => $discount_percentage,
     1454        );
     1455    }
    14201456
    14211457}
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/GenerateSSLmanually.php

    r2989232 r2998087  
    365365
    366366        //if($text){
     367        $offer_details = $this->factory->get_offer_details();
     368
    367369            if($this->factory->is_cpanel()){
    368                 if(time() > strtotime("August 19, 2023") && time() < strtotime("September 22, 2023")){
    369                     $coupon_code = "SUMMER_40";
    370                 }
    371                 else{
    372                     $coupon_code = "AutoInstall20";
    373                 }
    374 
     370                $coupon_code = $offer_details['coupon_code'];
    375371                $query_string = "hide_coupon=true&checkout=true";
    376372                $set_up = __( "We'll do the one-time setup for you if you can't do this (worth $49 per website).", 'auto-install-free-ssl' );
     
    382378            }
    383379
    384             $countDownDate = get_option('aifs_comparison_table_promo_start_time') + AIFS_COUNTDOWN_DURATION;
    385 
    386             if($coupon_code && time() < $countDownDate) {
    387                 $now = new DateTime();
    388                 $expiry = new DateTime('@'.$countDownDate);
    389                 $interval = (int) $now->diff($expiry)->format('%R%a');
    390 
    391                 if(time() > strtotime("August 19, 2023") && time() < strtotime("September 22, 2023")){
    392                     $discount_percentage = __("40%", 'auto-install-free-ssl' );
     380            if($coupon_code && time() < $offer_details['offer_end_time']) {
     381                /* translators: %1$s: Discount percentage (includes % sign), %2$s: Coupon code for the discount */
     382                $discount_info = sprintf(__( '%1$s discount code: %2$s', 'auto-install-free-ssl' ), $offer_details['discount_percentage'], ('<span style="font-weight: bold; text-transform: uppercase;">' . $coupon_code . '</span>'));
     383
     384                $difference = $offer_details['offer_end_time'] - time();
     385                // Calculate days, hours, minutes, and seconds
     386                $days = floor($difference / (24 * 3600));
     387                $difference %= (24 * 3600);
     388                $hours = floor($difference / 3600);
     389                $difference %= 3600;
     390                $minutes = floor($difference / 60);
     391                $seconds = $difference % 60;
     392
     393                // Format the countdown string
     394                if($days > 0){
     395                    $countdown = sprintf("%02d:%02d:%02d:%02d", $days, $hours, $minutes, $seconds);
    393396                }
    394                 else{
    395                     $discount_percentage = __("20%", 'auto-install-free-ssl' );
     397                else {
     398                    $countdown = sprintf( "%02d:%02d:%02d", $hours, $minutes, $seconds );
    396399                }
    397400
    398                 /* translators: %1$s: Discount percentage (includes % sign), %2$s: Coupon code for the discount */
    399                 $discount_info = sprintf(__( '%1$s discount code: %2$s', 'auto-install-free-ssl' ), $discount_percentage, ('<span style="font-weight: bold; text-transform: uppercase;">' . $coupon_code . '</span>'));
    400 
    401                 if ( $interval > 1 ) {
    402                     /* translators: %d: A plural number, e.g., 4 */
    403                     $discount_info .= " <u>" . sprintf(__( 'expiring in %d days', 'auto-install-free-ssl' ), $interval) . "</u>";
    404                 }
    405                 elseif ( $interval > 0 ){
    406                     /* translators: %d: A singular number, i.e., 1 */
    407                     $discount_info .= " <u>" . sprintf(__( 'expiring in %d day', 'auto-install-free-ssl' ), $interval) . "</u>";
    408                 }
    409                 else{
    410                     $discount_info .= " <u>" . __( 'expiring soon', 'auto-install-free-ssl' ) . "</u>";
    411                 }
     401                $discount_info .= " (" . __("expires in", 'auto-install-free-ssl') . " " . $countdown . ")";
     402
    412403            }
    413404            else{
     405                $coupon_code = false;
     406                $query_string = false;
    414407                $discount_info = "";
    415408            }
     
    598591        );
    599592
    600         if(get_option('aifs_is_admin_email_invalid')){
    601             add_settings_field(
    602                 'admin_email',
    603                 /* translators: %s: HTML code to create a superscript with the text '(required)' */
    604                 sprintf(__("Admin email %s(required)%s", 'auto-install-free-ssl'), '<sup>', '</sup>'),
    605                 array( $this, 'admin_email_callback' ),
    606                 'aifs_generate_ssl_manually_admin',
    607                 'aifs_generate_ssl_section_id'
    608             );
    609         }
     593        add_settings_field(
     594            'admin_email',
     595            /* translators: %s: HTML code to create a superscript with the text '(required)' */
     596            sprintf(__("Admin email %s(required)%s", 'auto-install-free-ssl'), '<sup>', '</sup>'),
     597            array( $this, 'admin_email_callback' ),
     598            'aifs_generate_ssl_manually_admin',
     599            'aifs_generate_ssl_section_id'
     600        );
    610601
    611602        add_settings_field(
     
    648639        }
    649640
    650         if(get_option('aifs_is_admin_email_invalid') && isset($input['admin_email'])){
     641        if(isset($input['admin_email'])){
    651642            $basic_settings = get_option('basic_settings_auto_install_free_ssl');
    652643            $basic_settings['admin_email'][0] = sanitize_email($input['admin_email']);
    653644            update_option('basic_settings_auto_install_free_ssl', $basic_settings);
    654645
    655             update_option('admin_email', sanitize_email($input['admin_email']));
     646            if(get_option('aifs_is_admin_email_invalid')) {
     647                update_option( 'admin_email', sanitize_email( $input['admin_email'] ) );
     648            }
     649            //refresh this variable, as admin_email has been updated
     650            $this->appConfig = aifs_get_app_settings();
    656651        }
    657652
     
    680675        /* translators: %s: Name of a button, e.g., Next Step */
    681676        echo "<p>" . sprintf(__( "Please click the '%s' button to proceed.", 'auto-install-free-ssl' ), $this->save_button_text) . "</p>";
     677
     678        echo "<p>" . __( "The SSL certificate authority Let's Encrypt™ needs a valid email ID to register your account. We'll send SSL renewal reminders to this email ID.", 'auto-install-free-ssl' ) . "</p>";
    682679
    683680            //echo "<br />"; $this->save_button_text
     
    723720    /**
    724721     * admin_email
    725      * Improved since 3.6.6
     722     * Improved since 3.6.8
    726723     */
    727724    public function admin_email_callback()
    728725    {
    729         //Get current user details
    730         /*global $current_user;
    731         get_currentuserinfo();*/
    732         $current_user = wp_get_current_user();
     726        if(isset($this->appConfig['admin_email'][0]) && strpos($this->appConfig['admin_email'][0], "secureserver.net") === false){
     727            $admin_email = $this->appConfig['admin_email'][0];
     728        }
     729        else if(strpos(get_option('admin_email'), "secureserver.net") === false){
     730            $admin_email = get_option('admin_email');
     731        }
     732        else{
     733            $admin_email = "";
     734        }
    733735
    734736        printf(
    735             '<input type="email" id="admin_email" name="aifs_generate_ssl_manually[admin_email]" required="required" value="%s" />',
    736              $current_user->user_email
     737            '<input type="email" id="admin_email" name="aifs_generate_ssl_manually[admin_email]" required="required" value="%s" style="width: 300px;" />',
     738            $admin_email
    737739        );
    738740    }
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/HomeOptions.php

    r2989232 r2998087  
    177177            <p><?php
    178178            /* translators: %s: Name of this plugin, i.e., 'Auto-Install Free SSL' */
    179             echo  sprintf( __( 'Thank you for choosing \'%s\' - the most powerful plugin to generate Free SSL Certificates in your WordPress dashboard.', 'auto-install-free-ssl' ), AIFS_NAME ) ;
     179            //echo sprintf(__( 'Thank you for choosing \'%s\' - the most powerful plugin to generate Free SSL Certificates in your WordPress dashboard.', 'auto-install-free-ssl'), AIFS_NAME)
    180180            ?></p>
    181181
    182182            <p><?php
    183183            /* translators: %1$s: Name of this plugin, i.e., 'Auto-Install Free SSL'; %2$s: Name of the SSL certificate authority, e.g., Let's Encrypt */
    184             echo  sprintf( __( '\'%1$s\' makes creating Free SSL Certificates easy using the %2$s API. Please get started by creating an SSL Certificate or reading our documentation.', 'auto-install-free-ssl' ), AIFS_NAME, $ca ) ;
     184            //echo sprintf(__( '\'%1$s\' makes creating Free SSL Certificates easy using the %2$s API. Please get started by creating an SSL Certificate or reading our documentation.', 'auto-install-free-ssl'), AIFS_NAME, $ca)
    185185            ?></p>
    186186            <p style="margin-top: 2%;"><a href="<?php
    187187            echo  $free ;
    188188            ?>" class="button button-primary"><?php
    189             echo  __( "Generate Your First SSL Certificate", 'auto-install-free-ssl' ) ;
     189            //echo __( "Generate Your First SSL Certificate", 'auto-install-free-ssl')
    190190            ?></a> <a href="https://freessl.tech/wordpress-letsencrypt-free-ssl-certificate-documentation/?utm_source=users_website&utm_medium=dashboard&utm_campaign=aifs_free&utm_content=welcome_section" target="_blank" class="button" style="margin-left: 5%;"><?php
    191             echo  __( "Read the Documentation", 'auto-install-free-ssl' ) ;
     191            //echo __( "Read the Documentation", 'auto-install-free-ssl')
    192192            ?></a></p>
    193193          </div>
     
    206206
    207207        <?php
    208         /*if($this->factory->is_cpanel() && ((get_option('aifs_premium_plan_selected') >= 1 && time() < strtotime("January 1, 2024")) || (time() > strtotime("November 1, 2022") && time() < strtotime("January 1, 2024")))){
    209               $coupon_code = "20AutoInstall";
    210               echo '<div style="background: white; color: black; margin: 2% 0; padding: 1% 1.5%; border-style: solid; border-width: 1px; border-color: green;"><p style="font-size: medium; margin: 0;">';
    211               echo '<span class="dashicons dashicons-megaphone" style="font-size: xx-large; color: #5F97FB;"></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' . sprintf(__('Could a coupon help? Use the %1$s discount%2$s code %3$s during checkout. The coupon is expiring soon!', 'auto-install-free-ssl'), "<span style='color: red;'>20%", "</span>", "<strong>'$coupon_code'</strong>");
    212               echo '</p></div>';
    213           }*/
    214         /*if(!get_option('aifs_default_page_first_access_time')){
    215                         add_option('aifs_default_page_first_access_time', time());
    216                     }
    217        
    218                     $first_access_time = get_option('aifs_default_page_first_access_time');*/
    219208        //if(($first_access_time && (time() > $first_access_time + 5 * 60)) || (isset($_GET['comparison']) && $_GET['comparison'] == "yes")){
    220209        if ( !get_option( 'aifs_comparison_table_promo_start_time' ) ) {
    221210            add_option( 'aifs_comparison_table_promo_start_time', time() );
    222211        }
    223         $start_time = get_option( 'aifs_comparison_table_promo_start_time' );
    224        
    225         if ( $this->factory->is_cpanel() && time() < $start_time + AIFS_COUNTDOWN_DURATION && (get_option( 'aifs_premium_plan_selected' ) >= 1 && time() < strtotime( "January 1, 2024" ) || time() > strtotime( "November 1, 2022" ) && time() < strtotime( "January 1, 2024" )) ) {
     212        $offer_details = $this->factory->get_offer_details( true );
     213       
     214        if ( $this->factory->is_cpanel() && time() < $offer_details['offer_end_time'] && (get_option( 'aifs_premium_plan_selected' ) >= 1 && time() < strtotime( "January 1, 2025" ) || time() > strtotime( "November 1, 2022" ) && time() < strtotime( "January 1, 2025" )) ) {
    226215            echo  '<div id="aifs-promo" class="aifs-promo"><p style="font-size: medium; margin: 0;">' ;
    227216            echo  '<span class="dashicons dashicons-arrow-down-alt" style="font-size: xx-large; color: #5F97FB;"></span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' ;
    228            
    229             if ( time() > strtotime( "August 19, 2023" ) && time() < strtotime( "September 22, 2023" ) ) {
    230                 $coupon_code = "SUMMER_40";
    231                 $percentage = __( "40%", 'auto-install-free-ssl' );
    232                 echo  "<strong>End-of-Summer Sale:</strong> " ;
    233             } else {
    234                 $coupon_code = "20AutoInstall";
    235                 $percentage = __( "20%", 'auto-install-free-ssl' );
    236             }
    237            
     217            $coupon_code = $offer_details['coupon_code'];
    238218            /* translators: %1$s: HTML code to make the color red of the text '%2$s discount!'. Please keep its order the same.    %2$s: Discount percentage (includes % sign) */
    239             echo  sprintf( __( 'Select any Pro plan asap to grab a %1$s %2$s discount!', 'auto-install-free-ssl' ), "<span style='color: red;'>", $percentage ) . "</span>" ;
     219            echo  $offer_details['offer_name'] . " " . sprintf( __( 'Select any Pro plan asap to grab a %1$s %2$s discount!', 'auto-install-free-ssl' ), "<span style='color: red;'>", $offer_details['discount_percentage'] ) . "</span>" ;
    240220            echo  '<img src="' . AIFS_URL . 'assets/img/fire.webp" style="margin-left: 2%; width 20px; height: 20px;"><span class="expires-in">' . __( "expires in", 'auto-install-free-ssl' ) . ' <span id="countdown" style=""></span></span>' ;
    241221            echo  '</p></div>' ;
     
    867847        //wp_register_script('aifs_countdown', '');
    868848        //wp_enqueue_script('aifs_countdown', false, [], false, true);
     849        $offer_details = $this->factory->get_offer_details( true );
    869850        return '// Set the date to countdown to (in this example, it is 1 hour from now)
    870 var countDownDate = ' . (get_option( 'aifs_comparison_table_promo_start_time' ) + AIFS_COUNTDOWN_DURATION) . ' * 1000;
     851var countDownDate = ' . $offer_details['offer_end_time'] . ' * 1000;
    871852
    872853// Update the countdown every second
  • auto-install-free-ssl/trunk/auto-install-free-ssl.php

    r2989232 r2998087  
    77 * Plugin URI:  https://freessl.tech
    88 * Description: Generate & install Free SSL Certificates, activate force HTTPS redirect with one click to fix insecure links & mixed content warnings, and get automatic Renewal Reminders.
    9  * Version:     3.6.7
     9 * Version:     3.6.8
    1010 * Requires at least: 4.1
    1111 * Requires PHP:      5.6
  • auto-install-free-ssl/trunk/readme.txt

    r2989232 r2998087  
    1 === Free SSL Certificate Plugin, HTTPS Redirect, Renewal Reminder – Auto-Install Free SSL ===
     1=== WordPress Free SSL Certificate Plugin, HTTPS Redirect, Renewal Reminder – Auto-Install Free SSL ===
    22Contributors: speedify, freessl, freemius
    33Donate link: https://www.paypal.me/site4author
    44License: GPLv3
    55License URI: http://www.gnu.org/licenses/gpl-3.0.html
    6 Tags: free ssl,free ssl certificate,ssl certificate,https,force ssl
     6Tags: free ssl,free ssl certificate,ssl certificate,https redirect, ssl
    77Requires at least: 4.1
    88Tested up to: 6.4
    9 Stable tag: 3.6.7
     9Stable tag: 3.6.8
    1010Requires PHP: 5.6
    1111Development location: https://freessl.tech
     
    2727
    2828
    29 `    378,000+ DOWNLOADS!!`
     29`    383,000+ DOWNLOADS!!`
    3030
    3131
Note: See TracChangeset for help on using the changeset viewer.