Plugin Directory

Changeset 2892748


Ignore:
Timestamp:
04/03/2023 01:05:33 PM (3 years ago)
Author:
speedify
Message:

Releasing version 3.4.1

Location:
auto-install-free-ssl
Files:
276 added
6 edited

Legend:

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

    r2886132 r2892748  
    6161            if ( aifs_is_existing_user() && time() < strtotime( "January 1, 2023" ) ) {
    6262                //Display free Premium License request button
    63                 $this->request_free_premium_license();
     63                //$this->request_free_premium_license(); // removed the method since 3.4.1
    6464            } else {
    6565                //if(!get_option('aifs_free_plan_selected') || (isset($_GET['comparison']) && $_GET['comparison'] == "yes")){   //changed from version 3.4.0
     
    133133       
    134134        return $text_display;
    135     }
    136    
    137     /**
    138      * Handles free Premium License request
    139      *
    140      */
    141     private function request_free_premium_license()
    142     {
    143         if ( !aifs_is_existing_user() ) {
    144             return;
    145         }
    146         $response = [];
    147         $options = ( get_option( 'aifs_request_free_premium_license' ) ? get_option( 'aifs_request_free_premium_license' ) : add_option( 'aifs_request_free_premium_license' ) );
    148         //if (isset($_GET['settings-updated']) && $_GET['settings-updated'] === 'true') {
    149        
    150         if ( 'POST' === $_SERVER['REQUEST_METHOD'] && isset( $_POST['agree_to_freessl_tech_tos_pp'] ) ) {
    151             //request license
    152             //Send domain, admin name and email to FreeSSL.tech server
    153             $admin_email = get_option( 'admin_email' );
    154             $admin = get_user_by( 'email', $admin_email );
    155             //$admin->first_name;
    156             global  $wp_version ;
    157             $data = array(
    158                 'body' => array(
    159                 'domain'               => aifs_get_domain( true ),
    160                 'admin_email'          => $admin_email,
    161                 'key'                  => "xX4x0;58CVl3[0~+f[*pH8c*Vg_7ioiKR-69zu~F8itU2(md@8eT5[7J22R7*5&(",
    162                 'admin_first_name'     => $admin->first_name,
    163                 'admin_last_name'      => $admin->last_name,
    164                 'aifs_version'         => AIFS_VERSION,
    165                 'wordpress_version'    => $wp_version,
    166                 'is_free_version'      => aifs_is_free_version(),
    167                 'is_premium'           => aifssl_fs()->is_premium(),
    168                 'can_use_premium_code' => aifssl_fs()->can_use_premium_code(),
    169                 'ip_server'            => $_SERVER['SERVER_ADDR'],
    170                 'ip_user'              => $_SERVER['REMOTE_ADDR'],
    171             ),
    172             );
    173             //Send the request to freessl.tech
    174             $response = wp_remote_post( "https://pro.freessl.tech/aifs_request_free.php", $data );
    175            
    176             if ( $response['response']['code'] === 200 ) {
    177                 $class = "notice-success";
    178                 $font_size = 8;
    179                 $color = "green";
    180             } else {
    181                 $class = "notice-error";
    182                 $color = "red";
    183                 $font_size = 8;
    184             }
    185            
    186             //if($response['response']['code'] === 200) {
    187             //echo "<pre>";
    188             echo  "<br /><br />" ;
    189             echo  '<div class="notice ' . $class . ' is-dismissible">' ;
    190             echo  '<span class="dashicons dashicons-info-outline" style="font-size: ' . $font_size . 'em; color: ' . $color . '; float: right; margin-top: 1%; margin-right: 10%;"></span>' ;
    191             echo  $response['body'] ;
    192             echo  '</div>' ;
    193             //echo "</pre>";
    194             //}
    195             $options[] = array(
    196                 'agree_to_freessl_tech_tos_pp' => true,
    197                 'sent'                         => $data,
    198                 'received'                     => $response['body'],
    199             );
    200             update_option( 'aifs_request_free_premium_license', $options );
    201         }
    202        
    203         ?>
    204         <div class="wrap">
    205 
    206         <?php
    207         echo  aifs_header() ;
    208         ?>
    209 
    210         <table style="width: 100%; margin-bottom: 2%;">
    211             <tr>
    212                 <td class="card block-body" style="width: 55%; padding-top: 1%; padding-left: 2%;">
    213 
    214                     <?php
    215         $heading = __( "Claim Premium License for FREE", 'auto-install-free-ssl' );
    216         echo  '<h1 style="color: #076507; text-align: center;">' . $heading . '</h1>' ;
    217         echo  '<br /><h3 style="color: #076507; text-align: center; margin-top: -0.1%;">' . __( "Exclusive offer for the Existing users", 'auto-install-free-ssl' ) . '</h3>' ;
    218         echo  '<p style="color: #000000; text-align: center; margin-top: -0.1%;">' . __( "The FREE license is valid until December 31, 2022", 'auto-install-free-ssl' ) . '</p>' ;
    219         echo  '<p style="color: #000000; text-align: center;">' . __( "Unlimited Sites license", 'auto-install-free-ssl' ) . '</p>' ;
    220         $save_button_text = __( "Request Premium License for Free", 'auto-install-free-ssl' );
    221        
    222         if ( !isset( $response['response']['code'] ) || $response['response']['code'] != 200 ) {
    223             $tos_text = __( "By clicking the '%s' button, you acknowledge that you agree with FreeSSL.tech %s & %s.", 'auto-install-free-ssl' );
    224             $fs_tos = '<a href="https://freessl.tech/terms-of-service" target="_blank">' . __( "Terms of Service", 'auto-install-free-ssl' ) . '</a>';
    225             $fs_pp = '<a href="https://freessl.tech/privacy-policy" target="_blank">' . __( "Privacy Policy", 'auto-install-free-ssl' ) . '</a>';
    226             echo  "<p><br />" . sprintf(
    227                 $tos_text,
    228                 $save_button_text,
    229                 $fs_pp,
    230                 $fs_tos
    231             ) . "<br /><br /></p>" ;
    232             echo  '<form method="post" action="">' ;
    233             /*settings_fields( 'aifs_generate_ssl_manually_group' );
    234               do_settings_sections( 'aifs_generate_ssl_manually_admin' );*/
    235             $confirmation_text = __( "Are you sure to request FREE Premium License?", 'auto-install-free-ssl' );
    236             submit_button(
    237                 $save_button_text,
    238                 'button-primary button-hero',
    239                 'agree_to_freessl_tech_tos_pp',
    240                 false,
    241                 'onclick="return aifs_confirm(\'' . $confirmation_text . '\')"'
    242             );
    243             //echo '<a href="' . menu_page_url( 'auto_install_free_ssl', false ) . '" id="aifs-cancel" class="page-title-action button">' . __( "Cancel", 'auto-install-free-ssl' ) . '</a>';
    244             echo  '</form>' ;
    245         }
    246        
    247         ?>
    248 
    249 
    250                 </td>
    251 
    252                 <td style="width: 2%;"></td>
    253 
    254                 <td class="card block-body" style="width: 43%; padding-top: 1%; padding-left: 2%;">
    255                     <h3 class="block-title"><?php
    256         echo  __( "How to Claim & Activate the Premium Version", 'auto-install-free-ssl' ) ;
    257         ?></h3>
    258                     <p style="color: green;"><?php
    259         echo  __( "Video tutorial. Time required: 1 minute.", 'auto-install-free-ssl' ) ;
    260         ?></p>
    261 
    262                     <iframe width="100%" height="281" src="https://www.youtube.com/embed/wLG8fT3AFqE?start=46" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
    263                 </td>
    264 
    265                 <?php
    266         /*$forcehttps = new ForceSSL();
    267           echo $forcehttps->force_ssl_ui();*/
    268         ?>
    269             </tr>
    270 
    271         </table>
    272 
    273         <div class="overlay"></div>
    274         <div class="spanner">
    275             <div class="loader"></div>
    276             <p class="loader_text"><?php
    277         echo  __( "Processing, please wait ...", 'auto-install-free-ssl' ) ;
    278         ?></p>
    279         </div>
    280 
    281         <?php
    282         $manually = new GenerateSSLmanually();
    283         $manually->pro_version_promotion();
    284         ?>
    285         <?php
    286         echo  aifs_powered_by() ;
    287         ?>
    288         </div>
    289     <?php
    290135    }
    291136   
     
    633478        echo  __( "No", 'auto-install-free-ssl' ) ;
    634479        ?> <!-- <a title="<?php
    635         echo  __( "Because the renewal is automated", 'auto-install-free-ssl' ) ;
     480        //echo __( "Because the renewal is automated", 'auto-install-free-ssl' )
    636481        ?>">[?]</a> -->
    637482                  </td>
     
    640485        echo  __( "No", 'auto-install-free-ssl' ) ;
    641486        ?> <!-- <a title="<?php
    642         echo  __( "Because the renewal is automated", 'auto-install-free-ssl' ) ;
     487        //echo __( "Because the renewal is automated", 'auto-install-free-ssl' )
    643488        ?>">[?]</a> -->
    644489                  </td>
     
    759604          <div class="card block-body" style="width: 100%; padding-left: 1.5%;">
    760605             <p><?php
    761         echo  sprintf( __( "%s discount code for you: %s", 'auto-install-free-ssl' ), "25%", "<strong>AUTOMATION</strong>" ) ;
     606        //echo sprintf(__( "%s discount code for you: %s", 'auto-install-free-ssl' ), "25%", "<strong>AUTOMATION</strong>")
    762607        ?></p>
    763608             <p><?php
    764         echo  __( "Facing difficulties? Our Premium Version automatically generates free SSL certificates and installs & renews them.", 'auto-install-free-ssl' ) ;
     609        //echo __( "Facing difficulties? Our Premium Version automatically generates free SSL certificates and installs & renews them.", 'auto-install-free-ssl' )
    765610        ?></p>
    766611             <p><i><?php
    767         echo  __( "BONUS: we'll do the one-time setup for you.", 'auto-install-free-ssl' ) ;
     612        //echo __( "BONUS: we'll do the one-time setup for you.", 'auto-install-free-ssl' )
    768613        ?></i> <a class="aifs-review-now aifs-review-button" style="margin-left: 5%;" href="<?php
    769         echo  $this->factory->upgrade_url() . '&coupon=AUTOMATION' ;
     614        //echo $this->factory->upgrade_url() . '&coupon=AUTOMATION'
    770615        ?>"><?php
    771         echo  __( "Grab the deal now!", 'auto-install-free-ssl' ) ;
     616        //echo __( "Grab the deal now!", 'auto-install-free-ssl' )
    772617        ?></a></p>
    773618          </div> -->
     
    872717    {
    873718        //wp_register_script('aifs_countdown', '');
    874         //wp_enqueue_script('aifs_countdown', false);
     719        //wp_enqueue_script('aifs_countdown', false, [], false, true);
    875720        return '// Set the date to countdown to (in this example, it is 1 hour from now)
    876721var countDownDate = (' . get_option( 'aifs_comparison_table_promo_start_time' ) . ' + 1 * 60 * 60) * 1000;
  • auto-install-free-ssl/trunk/auto-install-free-ssl.php

    r2886132 r2892748  
    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.4.0
     9 * Version:     3.4.1
    1010 * Requires at least: 4.1
    1111 * Requires PHP:      5.6
  • auto-install-free-ssl/trunk/freemius/includes/class-fs-api.php

    r2886132 r2892748  
    372372         * @param array  $remote_args
    373373         *
    374          * @return mixed
     374         * @return array|WP_Error The response array or a WP_Error on failure.
    375375         */
    376376        static function remote_request( $url, $remote_args ) {
     
    387387
    388388            if (
    389                 empty( $response['headers'] ) ||
    390                 empty( $response['headers']['x-api-server'] )
     389                is_array( $response ) &&
     390                (
     391                    empty( $response['headers'] ) ||
     392                    empty( $response['headers']['x-api-server'] )
     393                )
    391394            ) {
    392395                // API is considered blocked if the response doesn't include the `x-api-server` header. When there's no error but this header doesn't exist, the response is usually not in the expected form (e.g., cannot be JSON-decoded).
  • auto-install-free-ssl/trunk/freemius/includes/sdk/FreemiusWordPress.php

    r2886132 r2892748  
    349349         * @param array  $pWPRemoteArgs
    350350         *
    351          * @return mixed
     351         * @return array|WP_Error The response array or a WP_Error on failure.
    352352         */
    353353        static function RemoteRequest( $pUrl, $pWPRemoteArgs ) {
     
    355355
    356356            if (
    357                 empty( $response['headers'] ) ||
    358                 empty( $response['headers']['x-api-server'] )
     357                is_array( $response ) &&
     358                (
     359                    empty( $response['headers'] ) ||
     360                    empty( $response['headers']['x-api-server'] )
     361                )
    359362            ) {
    360363                // API is considered blocked if the response doesn't include the `x-api-server` header. When there's no error but this header doesn't exist, the response is usually not in the expected form (e.g., cannot be JSON-decoded).
  • auto-install-free-ssl/trunk/freemius/start.php

    r2886132 r2892748  
    1616     * @var string
    1717     */
    18     $this_sdk_version = '2.5.5';
     18    $this_sdk_version = '2.5.6';
    1919
    2020    #region SDK Selection Logic --------------------------------------------------------------------
  • auto-install-free-ssl/trunk/readme.txt

    r2886132 r2892748  
    77Requires at least: 4.1
    88Tested up to: 6.2
    9 Stable tag: 3.4.0
     9Stable tag: 3.4.1
    1010Requires PHP: 5.6
    1111Development location: https://freessl.tech
     
    2727
    2828
    29 `    300,500+ DOWNLOADS!!`
     29`    305,500+ DOWNLOADS!!`
    3030
    3131
     
    340340== Changelog ==
    341341
     342= 3.4.1 =
     343* Updated the Freemius WordPress SDK to version 2.5.6.
     344* Removed the function request_free_premium_license(), unused since January 1, 2023.
     345
    342346= 3.4.0 =
    343347* Improved the layout of all the steps to generate free SSL certificate and the free vs. premium comparison page.
Note: See TracChangeset for help on using the changeset viewer.