| @@ -17,9 +17,9 @@ | ||
| 17 | 17 | */ |
| 18 | 18 | function wplng_option_page_register() { |
| 19 | 19 | |
| 20 | 20 | // Check if DB size is compatible with wpLingua |
| 21 | - if ( wplng_count_public_content() > 2500 | |
| 21 | + if ( wplng_count_public_content() > 8000 | |
| 22 | 22 | && ! empty( wplng_get_translation_count() ) |
| 23 | 23 | && ! empty( wplng_get_slug_count() ) |
| 24 | 24 | ) { |
| 25 | 25 | wplng_register_part_incompatible_db(); |
| @@ -110,12 +110,17 @@ | ||
| 110 | 110 | endif; |
| 111 | 111 | |
| 112 | 112 | // Display the main option page content |
| 113 | 113 | ?> |
| 114 | - <h1 class="wplng-option-page-title"><span class="dashicons dashicons-translation"></span> <?php esc_html_e( 'wpLingua - Register API key', 'wplingua' ); ?></h1> | |
| 115 | 114 | |
| 116 | 115 | <div class="wrap"> |
| 116 | + | |
| 117 | + <header id="wplng-option-page-header"> | |
| 118 | + <h1 class="wplng-option-page-title"><span class="dashicons dashicons-translation"></span> <?php esc_html_e( 'wpLingua - Register API key', 'wplingua' ); ?></h1> | |
| 119 | + </header> | |
| 120 | + | |
| 117 | 121 | <hr class="wp-header-end"> |
| 122 | + | |
| 118 | 123 | <form method="post" action="options.php"> |
| 119 | 124 | <?php |
| 120 | 125 | // Output settings fields and sections for the plugin |
| 121 | 126 | settings_fields( 'wplng_settings' ); |
| @@ -122,12 +127,9 @@ | ||
| 122 | 127 | do_settings_sections( 'wplng_settings' ); |
| 123 | 128 | ?> |
| 124 | 129 | <table class="form-table wplng-form-table"> |
| 125 | 130 | |
| 126 | - <?php | |
| 127 | - // Display success message if an API key was created and sent via email | |
| 128 | - if ( ! empty( $mail ) ) : | |
| 129 | - ?> | |
| 131 | + <?php if ( ! empty( $mail ) ) : ?> | |
| 130 | 132 | |
| 131 | 133 | <tr> |
| 132 | 134 | <th scope="row"><span class="dashicons dashicons-yes-alt"></span> <?php esc_html_e( 'API key created', 'wplingua' ); ?></th> |
| 133 | 135 | <td id="wplng-register-success-message"> |
| @@ -144,8 +146,33 @@ | ||
| 144 | 146 | |
| 145 | 147 | <p> |
| 146 | 148 | <?php esc_html_e( 'Go to your mailbox and copy the API key sent to you (don\'t forget to check the spam section of your mailbox). Then paste it in the section below, and click "Set API key" to make your website multilingual.', 'wplingua' ); ?> |
| 147 | 149 | </p> |
| 150 | + | |
| 151 | + <?php if ( ! wplng_str_ends_with( $mail, '@gmail.com' ) ) : ?> | |
| 152 | + <hr> | |
| 153 | + <p> | |
| 154 | + <strong><?php esc_html_e( 'Please note:', 'wplingua' ); ?></strong> | |
| 155 | + <?php | |
| 156 | + printf( | |
| 157 | + /* translators: %s: link to request a new API key */ | |
| 158 | + wp_kses( | |
| 159 | + __( 'Some web hosting providers may block or prevent emails from reaching your mailbox. If you don\'t receive the email, please %s using a different email address, such as a Gmail address.', 'wplingua' ), | |
| 160 | + array( | |
| 161 | + 'a' => array( | |
| 162 | + 'href' => array(), | |
| 163 | + 'style' => array(), | |
| 164 | + ), | |
| 165 | + ) | |
| 166 | + ), | |
| 167 | + '<a href="' . esc_url( admin_url( 'admin.php?page=wplingua-settings' ) ) . '" style="text-decoration: underline;">' . | |
| 168 | + esc_html__( 'try requesting a new API key', 'wplingua' ) . | |
| 169 | + '</a>' | |
| 170 | + ); | |
| 171 | + ?> | |
| 172 | + </p> | |
| 173 | + <?php endif; ?> | |
| 174 | + | |
| 148 | 175 | </td> |
| 149 | 176 | </tr> |
| 150 | 177 | |
| 151 | 178 | <tr> |
| @@ -376,8 +403,9 @@ | ||
| 376 | 403 | </div> |
| 377 | 404 | </fieldset> |
| 378 | 405 | |
| 379 | 406 | <div class="wplng-help-box wplng-spacing-top" id="wplng-hb-register-email"> |
| 407 | + <p><?php esc_html_e( 'For better reliability, we recommend using a personal email address such as Gmail, as some hosting providers may filter or block emails sent by external services.', 'wplingua' ); ?></p> | |
| 380 | 408 | <p><?php esc_html_e( 'The email address is detected and pre-filled. This is the administrative email address entered in the Settings ➔ General tab. You can use another email address used to receive your API key.', 'wplingua' ); ?></p> |
| 381 | 409 | </div> |
| 382 | 410 | |
| 383 | 411 | <hr> |
| @@ -439,9 +467,9 @@ | ||
| 439 | 467 | <p> |
| 440 | 468 | <fieldset> |
| 441 | 469 | <input type="checkbox" name="wplng-accept-eula" id="wplng-accept-eula"> |
| 442 | 470 | <label for="wplng-accept-eula"> |
| 443 | - <strong><?php esc_html_e( 'I have read and accept the', 'wplingua' ); ?> <a href="https://wplingua.com/terms/" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'API terms of use', 'wplingua' ); ?></a> </strong> | |
| 471 | + <strong><?php esc_html_e( 'I have read and accept the', 'wplingua' ); ?> <a href="https://wplingua.com/terms/" target="_blank" rel="noopener noreferrer" style="text-decoration: underline;"><?php esc_html_e( 'API terms of use', 'wplingua' ); ?></a> </strong> | |
| 444 | 472 | </label> |
| 445 | 473 | </fieldset> |
| 446 | 474 | </p> |
| 447 | 475 | |