Google Fonts for WordPress - Version 1.9.4

Version Description

Download this release

Release Info

Developer DannyCooper
Plugin Icon 128x128 Google Fonts for WordPress
Version 1.9.4
Comparing to
See all releases

Code changes from version 1.9.3 to 1.9.4

changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 1.9.3 =
2
 
3
  * Add custom CSS later in wp_head.
1
+ = 1.9.4 =
2
+
3
+ * Improve i18n strings.
4
+
5
  = 1.9.3 =
6
 
7
  * Add custom CSS later in wp_head.
includes/class-ogf-notifications.php CHANGED
@@ -57,7 +57,6 @@ if ( ! class_exists( 'OGF_Notifications' ) ) :
57
  public function __construct( $args ) {
58
  $this->slug = $args['slug'];
59
  $this->name = $args['name'];
60
- $this->type = $args['type'];
61
  $this->date_option = 'ogf_activation_date';
62
  $this->nobug_option = $this->slug . '_no_bug';
63
  if ( isset( $args['time_limit'] ) ) {
@@ -78,27 +77,21 @@ if ( ! class_exists( 'OGF_Notifications' ) ) :
78
  public function seconds_to_words( $seconds ) {
79
  // Get the years.
80
  $years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100;
81
- if ( $years > 1 ) {
82
  /* translators: Number of years */
83
- return sprintf( __( '%s years', 'olympus-google-fonts' ), $years );
84
- } elseif ( $years > 0 ) {
85
- return __( 'a year', 'olympus-google-fonts' );
86
  }
87
  // Get the weeks.
88
  $weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52;
89
- if ( $weeks > 1 ) {
90
  /* translators: Number of weeks */
91
- return sprintf( __( '%s weeks', 'olympus-google-fonts' ), $weeks );
92
- } elseif ( $weeks > 0 ) {
93
- return __( 'a week', 'olympus-google-fonts' );
94
  }
95
  // Get the days.
96
  $days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7;
97
- if ( $days > 1 ) {
98
  /* translators: Number of days */
99
- return sprintf( __( '%s days', 'olympus-google-fonts' ), $days );
100
- } elseif ( $days > 0 ) {
101
- return __( 'a day', 'olympus-google-fonts' );
102
  }
103
  }
104
 
@@ -209,11 +202,7 @@ if ( ! class_exists( 'OGF_Notifications' ) ) :
209
  }
210
  </style>
211
  <?php
212
- if ( $this->type === 'review' ) {
213
- $this->review();
214
- } elseif ( $this->type === 'addon' ) {
215
- $this->addon();
216
- }
217
  }
218
 
219
  /**
@@ -246,37 +235,6 @@ if ( ! class_exists( 'OGF_Notifications' ) ) :
246
  <?php
247
  }
248
 
249
- /**
250
- * Output review content.
251
- */
252
- public function addon() {
253
- if ( is_plugin_active( 'host-google-fonts-locally/host-google-fonts-locally.php' ) ) {
254
- return;
255
- }
256
- $no_bug_url = wp_nonce_url( admin_url( '?' . $this->nobug_option . '=true' ), 'ogf-notification-nounce' );
257
- ?>
258
- <div class="notice updated ogf-notice">
259
- <div class="ogf-notice-inner">
260
- <div class="ogf-notice-icon">
261
- <img src="https://ps.w.org/host-google-fonts-locally/assets/icon-256x256.jpg" alt="<?php echo esc_attr__( 'Host Google Fonts Locally', 'olympus-google-fonts' ); ?>" />
262
- </div>
263
- <div class="ogf-notice-content">
264
- <h3><?php echo esc_html__( 'Speed Up Your Website!', 'olympus-google-fonts' ); ?></h3>
265
- <p>
266
- <?php
267
- _e( 'Our latest <strong>free</strong> addon allows you to host Google Fonts locally.<br>This removes the requests to Google\'s servers and can improve page speed.', 'olympus-google-fonts' );
268
- ?>
269
- </p>
270
- </div>
271
- <div class="ogf-install-now">
272
- <?php printf( '<a href="%1$s" class="button button-primary ogf-install-button" target="_blank">%2$s</a>', esc_url( admin_url( 'plugin-install.php?s=local+google+fonts&tab=search&type=tag' ) ), esc_html__( 'Install Now', 'olympus-google-fonts' ) ); ?>
273
- <a href="<?php echo esc_url( $no_bug_url ); ?>" class="no-thanks"><?php echo esc_html__( 'No thank you.', 'olympus-google-fonts' ); ?></a>
274
- </div>
275
- </div>
276
- </div>
277
- <?php
278
- }
279
-
280
  /**
281
  * Set the plugin to no longer bug users if user asks not to be.
282
  */
@@ -299,6 +257,5 @@ new OGF_Notifications(
299
  'slug' => 'ogf',
300
  'name' => __( 'Google Fonts for WordPress', 'olympus-google-fonts' ),
301
  'time_limit' => WEEK_IN_SECONDS,
302
- 'type' => 'review',
303
  )
304
  );
57
  public function __construct( $args ) {
58
  $this->slug = $args['slug'];
59
  $this->name = $args['name'];
 
60
  $this->date_option = 'ogf_activation_date';
61
  $this->nobug_option = $this->slug . '_no_bug';
62
  if ( isset( $args['time_limit'] ) ) {
77
  public function seconds_to_words( $seconds ) {
78
  // Get the years.
79
  $years = ( intval( $seconds ) / YEAR_IN_SECONDS ) % 100;
80
+ if ( $years > 0 ) {
81
  /* translators: Number of years */
82
+ return sprintf( _n( 'a year', '%d years', $years, 'olympus-google-fonts' ), $years );
 
 
83
  }
84
  // Get the weeks.
85
  $weeks = ( intval( $seconds ) / WEEK_IN_SECONDS ) % 52;
86
+ if ( $weeks > 0 ) {
87
  /* translators: Number of weeks */
88
+ return sprintf( _n( 'a week', '%d weeks', $weeks, 'olympus-google-fonts' ), $weeks );
 
 
89
  }
90
  // Get the days.
91
  $days = ( intval( $seconds ) / DAY_IN_SECONDS ) % 7;
92
+ if ( $days > 0 ) {
93
  /* translators: Number of days */
94
+ return sprintf( _n( 'a day', '%d days', $days, 'olympus-google-fonts' ), $days );
 
 
95
  }
96
  }
97
 
202
  }
203
  </style>
204
  <?php
205
+ $this->review();
 
 
 
 
206
  }
207
 
208
  /**
235
  <?php
236
  }
237
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  /**
239
  * Set the plugin to no longer bug users if user asks not to be.
240
  */
257
  'slug' => 'ogf',
258
  'name' => __( 'Google Fonts for WordPress', 'olympus-google-fonts' ),
259
  'time_limit' => WEEK_IN_SECONDS,
 
260
  )
261
  );
languages/olympus-google-fonts.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the same license as the Google Fonts Typography plugin.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Google Fonts Typography 1.9.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/olympus-google-fonts\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2019-07-23T19:35:15+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: olympus-google-fonts\n"
@@ -288,73 +288,44 @@ msgstr ""
288
 
289
  #. translators: Number of years
290
  #: includes/class-ogf-notifications.php:83
291
- msgid "%s years"
292
- msgstr ""
293
-
294
- #: includes/class-ogf-notifications.php:85
295
  msgid "a year"
296
- msgstr ""
 
297
 
298
  #. translators: Number of weeks
299
- #: includes/class-ogf-notifications.php:91
300
- msgid "%s weeks"
301
- msgstr ""
302
-
303
- #: includes/class-ogf-notifications.php:93
304
  msgid "a week"
305
- msgstr ""
 
306
 
307
  #. translators: Number of days
308
- #: includes/class-ogf-notifications.php:99
309
- msgid "%s days"
310
- msgstr ""
311
-
312
- #: includes/class-ogf-notifications.php:101
313
  msgid "a day"
314
- msgstr ""
 
315
 
316
- #: includes/class-ogf-notifications.php:229
317
  msgid "Google Fonts WordPress Plugin"
318
  msgstr ""
319
 
320
- #: includes/class-ogf-notifications.php:232
321
  msgid "Are you enjoying using Google Fonts?"
322
  msgstr ""
323
 
324
  #. translators: 1. Name, 2. Time
325
- #: includes/class-ogf-notifications.php:236
326
  msgid "You have been using <strong>%1$s</strong> for %2$s now! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?"
327
  msgstr ""
328
 
329
- #: includes/class-ogf-notifications.php:241
330
  msgid "Leave a Review"
331
  msgstr ""
332
 
333
- #: includes/class-ogf-notifications.php:242
334
  msgid "No thanks / I already have"
335
  msgstr ""
336
 
337
- #: includes/class-ogf-notifications.php:261
338
- msgid "Host Google Fonts Locally"
339
- msgstr ""
340
-
341
- #: includes/class-ogf-notifications.php:264
342
- msgid "Speed Up Your Website!"
343
- msgstr ""
344
-
345
- #: includes/class-ogf-notifications.php:267
346
- msgid "Our latest <strong>free</strong> addon allows you to host Google Fonts locally.<br>This removes the requests to Google's servers and can improve page speed."
347
- msgstr ""
348
-
349
- #: includes/class-ogf-notifications.php:272
350
- msgid "Install Now"
351
- msgstr ""
352
-
353
- #: includes/class-ogf-notifications.php:273
354
- msgid "No thank you."
355
- msgstr ""
356
-
357
- #: includes/class-ogf-notifications.php:300
358
  msgid "Google Fonts for WordPress"
359
  msgstr ""
360
 
@@ -365,6 +336,7 @@ msgid "Custom Elements"
365
  msgstr ""
366
 
367
  #: includes/customizer/settings.php:56
 
368
  msgid "Load Fonts Only"
369
  msgstr ""
370
 
@@ -439,10 +411,6 @@ msgstr ""
439
  msgid "Footer"
440
  msgstr ""
441
 
442
- #: includes/customizer/panels.php:159
443
- msgid "Load Fonts for CSS"
444
- msgstr ""
445
-
446
  #: includes/customizer/controls/class-ogf-customize-repeater-control.php:83
447
  msgid "Add New"
448
  msgstr ""
2
  # This file is distributed under the same license as the Google Fonts Typography plugin.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Google Fonts Typography 1.9.3\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/olympus-google-fonts\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2019-07-29T13:00:38+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.1.0\n"
15
  "X-Domain: olympus-google-fonts\n"
288
 
289
  #. translators: Number of years
290
  #: includes/class-ogf-notifications.php:83
 
 
 
 
291
  msgid "a year"
292
+ msgid_plural "%d years"
293
+ msgstr[0] ""
294
 
295
  #. translators: Number of weeks
296
+ #: includes/class-ogf-notifications.php:89
 
 
 
 
297
  msgid "a week"
298
+ msgid_plural "%d weeks"
299
+ msgstr[0] ""
300
 
301
  #. translators: Number of days
302
+ #: includes/class-ogf-notifications.php:95
 
 
 
 
303
  msgid "a day"
304
+ msgid_plural "%d days"
305
+ msgstr[0] ""
306
 
307
+ #: includes/class-ogf-notifications.php:219
308
  msgid "Google Fonts WordPress Plugin"
309
  msgstr ""
310
 
311
+ #: includes/class-ogf-notifications.php:222
312
  msgid "Are you enjoying using Google Fonts?"
313
  msgstr ""
314
 
315
  #. translators: 1. Name, 2. Time
316
+ #: includes/class-ogf-notifications.php:226
317
  msgid "You have been using <strong>%1$s</strong> for %2$s now! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?"
318
  msgstr ""
319
 
320
+ #: includes/class-ogf-notifications.php:231
321
  msgid "Leave a Review"
322
  msgstr ""
323
 
324
+ #: includes/class-ogf-notifications.php:232
325
  msgid "No thanks / I already have"
326
  msgstr ""
327
 
328
+ #: includes/class-ogf-notifications.php:259
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
329
  msgid "Google Fonts for WordPress"
330
  msgstr ""
331
 
336
  msgstr ""
337
 
338
  #: includes/customizer/settings.php:56
339
+ #: includes/customizer/panels.php:159
340
  msgid "Load Fonts Only"
341
  msgstr ""
342
 
411
  msgid "Footer"
412
  msgstr ""
413
 
 
 
 
 
414
  #: includes/customizer/controls/class-ogf-customize-repeater-control.php:83
415
  msgid "Add New"
416
  msgstr ""
olympus-google-fonts.php CHANGED
@@ -5,7 +5,7 @@
5
  * Plugin Name: Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts typography plugin. No coding required. 870+ font choices.
8
- * Version: 1.9.3
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
11
  * Text Domain: olympus-google-fonts
@@ -18,7 +18,7 @@
18
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
  */
20
 
21
- define( 'OGF_VERSION', '1.9.3' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
5
  * Plugin Name: Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
  * Description: The easiest to use Google Fonts typography plugin. No coding required. 870+ font choices.
8
+ * Version: 1.9.4
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_campaign=heading
11
  * Text Domain: olympus-google-fonts
18
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
19
  */
20
 
21
+ define( 'OGF_VERSION', '1.9.4' );
22
  define( 'OGF_DIR_PATH', plugin_dir_path( __FILE__ ) );
23
  define( 'OGF_DIR_URL', plugin_dir_url( __FILE__ ) );
24
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://fontsplugin.com/#pricing
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
  License: GPLv2 or later
8
- Stable tag: 1.9.3
9
 
10
  The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
11
 
5
  Requires at least: 4.0
6
  Tested up to: 5.2
7
  License: GPLv2 or later
8
+ Stable tag: 1.9.4
9
 
10
  The easiest to use Google Fonts Typography Plugin. No coding required. 900+ font choices.
11