Google Fonts for WordPress - Version 3.0.6

Version Description

Download this release

Release Info

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

Code changes from version 3.0.5 to 3.0.6

changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 3.0.5 =
2
 
3
  * Update and compress fonts list.
1
+ = 3.0.6 =
2
+
3
+ * Remove dependency on fontsplugin.com to show news
4
+
5
  = 3.0.5 =
6
 
7
  * Update and compress fonts list.
class-olympus-google-fonts.php CHANGED
@@ -39,7 +39,7 @@ class Olympus_Google_Fonts {
39
  */
40
  public function constants() {
41
  if ( ! defined( 'OGF_VERSION' ) ) {
42
- define( 'OGF_VERSION', '3.0.5' );
43
  }
44
 
45
  if ( ! defined( 'OGF_DIR_PATH' ) ) {
39
  */
40
  public function constants() {
41
  if ( ! defined( 'OGF_VERSION' ) ) {
42
+ define( 'OGF_VERSION', '3.0.6' );
43
  }
44
 
45
  if ( ! defined( 'OGF_DIR_PATH' ) ) {
includes/class-ogf-dashboard-widget.php CHANGED
@@ -27,7 +27,7 @@ class OGF_Dashboard_Widget {
27
  public function add_dashboard_widget() {
28
  wp_add_dashboard_widget(
29
  'ogf-rss-feed',
30
- esc_html__( 'Typography News', 'olympus-google-fonts' ),
31
  array(
32
  $this,
33
  'display_rss_dashboard_widget',
@@ -60,44 +60,33 @@ class OGF_Dashboard_Widget {
60
  return;
61
  }
62
 
63
- include_once ABSPATH . WPINC . '/feed.php';
64
-
65
- $rss_items = get_transient( 'ogf_feed' );
66
- if ( false === $rss_items ) {
67
-
68
- $rss = fetch_feed( 'https://fontsplugin.com/feed/' );
69
- if ( is_wp_error( $rss ) ) {
70
- echo esc_html__( 'Temporarily unable to load feed.', 'olympus-google-fonts' );
71
-
72
- return;
73
- }
74
- $rss_items = $rss->get_items( 0, 4 ); // Show four items.
75
-
76
- $cached = array();
77
- foreach ( $rss_items as $item ) {
78
- $cached[] = array(
79
- 'url' => $item->get_permalink(),
80
- 'title' => $item->get_title(),
81
- 'date' => $item->get_date( 'M jS Y' ),
82
- 'content' => substr( wp_strip_all_tags( $item->get_content() ), 0, 128 ) . '...',
83
- );
84
- }
85
- $rss_items = $cached;
86
-
87
- set_transient( 'ogf_feed', $cached, WEEK_IN_SECONDS );
88
-
89
- }
90
-
91
  ?>
92
-
93
  <ul>
94
  <?php
95
- if ( false === $rss_items ) {
96
- echo esc_html__( 'Temporarily unable to load feed.', 'olympus-google-fonts' );
97
-
98
- return;
99
- }
100
-
101
  foreach ( $rss_items as $item ) {
102
  ?>
103
  <li>
@@ -110,10 +99,8 @@ class OGF_Dashboard_Widget {
110
  </li>
111
  <?php
112
  }
113
-
114
  ?>
115
  </ul>
116
-
117
  <?php
118
  }
119
  }
27
  public function add_dashboard_widget() {
28
  wp_add_dashboard_widget(
29
  'ogf-rss-feed',
30
+ esc_html__( 'Typography News from Fonts Plugin', 'olympus-google-fonts' ),
31
  array(
32
  $this,
33
  'display_rss_dashboard_widget',
60
  return;
61
  }
62
 
63
+ $rss_items = array(
64
+ 'first' => array(
65
+ 'url' => 'https://fontsplugin.com/speed-up-wordpress/',
66
+ 'title' => 'How To Speed Up WordPress (A Non-Technical Guide)',
67
+ 'date' => 'Nov 16th 2020',
68
+ 'content' => 'You hate slow websites, your visitors do too. Studies have shown that 47% of users expect pages to load in two seconds or less. ...',
69
+ ),
70
+ 'second' => array(
71
+ 'url' => 'https://fontsplugin.com/disable-google-fonts/',
72
+ 'title' => 'How to Disable Google Fonts in WordPress',
73
+ 'date' => 'Aug 10th 2019',
74
+ 'content' => 'Google Fonts can be a great addition to your website that considerably improves your typography. However, they do add an externa...', ),
75
+ 'third' => array(
76
+ 'url' => 'https://fontsplugin.com/how-to-download-google-fonts/', 'title' => 'How To Download Google Fonts',
77
+ 'date' => 'May 29th 2019',
78
+ 'content' => 'Google Fonts are free for both personal and commercial use. That means you can download and use them in your projects without ha...',
79
+ ),
80
+ 'fourth' => array(
81
+ 'url' => 'https://fontsplugin.com/google-fonts-univers/',
82
+ 'title' => 'Google Fonts Similar to Univers',
83
+ 'date' => 'May 29th 2019',
84
+ 'content' => 'Released in 1957, Univers is a sans-serif font designed by Adrian Frutiger and released by his employer Deberny & Peignot. ...',
85
+ ),
86
+ );
 
 
 
 
87
  ?>
 
88
  <ul>
89
  <?php
 
 
 
 
 
 
90
  foreach ( $rss_items as $item ) {
91
  ?>
92
  <li>
99
  </li>
100
  <?php
101
  }
 
102
  ?>
103
  </ul>
 
104
  <?php
105
  }
106
  }
olympus-google-fonts.php CHANGED
@@ -4,8 +4,8 @@
4
  *
5
  * Plugin Name: Fonts Plugin | 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. 1000+ font choices.
8
- * Version: 3.0.5
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
11
  * Text Domain: olympus-google-fonts
4
  *
5
  * Plugin Name: Fonts Plugin | Google Fonts Typography
6
  * Plugin URI: https://wordpress.org/plugins/olympus-google-fonts/
7
+ * Description: The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
8
+ * Version: 3.0.6
9
  * Author: Fonts Plugin
10
  * Author URI: https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=description
11
  * Text Domain: olympus-google-fonts
readme.txt CHANGED
@@ -5,9 +5,9 @@ Donate link: https://fontsplugin.com/#pricing
5
  Requires at least: 4.0
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
- Stable tag: 3.0.5
9
 
10
- The easiest to use Google Fonts Typography Plugin. No coding required. 1000+ font choices.
11
 
12
  == Description ==
13
  The [Google Fonts](https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=intro) library currently contains 998 unique fonts. This plugin allows you to easily use any of them on your WordPress website.
5
  Requires at least: 4.0
6
  Tested up to: 5.8
7
  License: GPLv2 or later
8
+ Stable tag: 3.0.6
9
 
10
+ The easiest to use Google Fonts Plugin. No coding required. Optimized for Speed. 1000+ font choices.
11
 
12
  == Description ==
13
  The [Google Fonts](https://fontsplugin.com/?utm_source=wporg&utm_medium=readme&utm_campaign=intro) library currently contains 998 unique fonts. This plugin allows you to easily use any of them on your WordPress website.