| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | Plugin Name:Database for WPforms |
| 4 | 4 | Description: Save and manage WPForms submissions. Never lose important data. Database add-on for WPForms. |
| 5 | 5 | Author: wpdebuglog |
| 6 | 6 | Text Domain: database-for-wpforms |
| 7 | -Version: 1.0.8 | |
| 7 | +Version: 1.1.0 | |
| 8 | 8 | License: GPL v2 or later |
| 9 | 9 | License URI: https://www.gnu.org/licenses/gpl-2.0.html |
| 10 | 10 | */ |
| 11 | 11 | |
| @@ -174,26 +174,38 @@ | ||
| 174 | 174 | $install_date = date_create( $install_date ); |
| 175 | 175 | $date_now = date_create( gmdate('Y-m-d G:i:s') ); |
| 176 | 176 | $date_diff = date_diff( $install_date, $date_now ); |
| 177 | 177 | |
| 178 | - if ( $date_diff->format("%d") < 7 ) { | |
| 178 | + if ( $date_diff->days < 7 ) { | |
| 179 | 179 | |
| 180 | 180 | return false; |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - if ( ! get_option( 'wpformsdb_view_ignore_notice' ) ) { | |
| 183 | + if( empty($_GET['page']) ){ | |
| 184 | + return; | |
| 185 | + } | |
| 184 | 186 | |
| 185 | - echo '<div class="updated"><p>'; | |
| 187 | + if( isset($_GET['page']) && $_GET['page'] !== 'wp-forms-db-list.php' ){ | |
| 188 | + return; | |
| 189 | + } | |
| 186 | 190 | |
| 187 | - printf( | |
| 188 | - /* translators: 1: Settings URL, 2: Repository url */ | |
| 189 | - __( | |
| 190 | - 'Awesome, you\'ve been using <a href="admin.php?page=wp-forms-db-list.php">WPForms DB</a> for more than 1 week. May we ask you to give it a 5-star rating on WordPress? | <a href="%2$s" target="_blank">Ok, you deserved it</a> | <a href="%1$s">I already did</a> | <a href="%1$s">No, not good enough</a>', 'database-for-wpforms' ), | |
| 191 | - '?page=wp-forms-db-list.php&wpformsdb-ignore-notice=0', | |
| 192 | - 'https://wordpress.org/plugins/database-for-wpforms/' | |
| 193 | - ); | |
| 194 | - echo "</p></div>"; | |
| 191 | + if ( 'true' === get_option( 'wpformsdb_view_ignore_notice' ) ) { | |
| 192 | + return; | |
| 195 | 193 | } |
| 194 | + | |
| 195 | + echo '<div class="updated"><p>'; | |
| 196 | + | |
| 197 | + printf( | |
| 198 | + /* translators: 1: Settings URL, 2: Repository url */ | |
| 199 | + __( | |
| 200 | + 'Awesome, you\'ve been using <a href="%s" target="_blank">WPForms DB</a> for more than 1 week. May we ask you to give it a 5-star rating on WordPress? | <a href="%s" target="_blank">Ok, you deserved it</a> | <a href="%s">I already did</a> | <a href="%s">No, not good enough</a>', 'database-for-wpforms' ), | |
| 201 | + 'https://wordpress.org/plugins/database-for-wpforms/', | |
| 202 | + 'https://wordpress.org/support/plugin/database-for-wpforms/reviews/', | |
| 203 | + '?page=wp-forms-db-list.php&wpformsdb-ignore-notice=0', | |
| 204 | + '?page=wp-forms-db-list.php&wpformsdb-ignore-notice=0', | |
| 205 | + ); | |
| 206 | + echo "</p></div>"; | |
| 207 | + | |
| 196 | 208 | } |
| 197 | 209 | |
| 198 | 210 | function wpformsdb_view_ignore_notice() { |
| 199 | 211 | |