EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor - Version 1.4.1

Version Description

Release Date: 2017-01-06

  • Fixed Google services embeds.
Download this release

Release Info

Developer pressshack
Plugin Icon wp plugin EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

Files changed (5) hide show
  1. EmbedPress/Shortcode.php +31 -11
  2. changelog.txt +5 -0
  3. embedpress.php +1 -1
  4. includes.php +1 -1
  5. readme.txt +6 -1
EmbedPress/Shortcode.php CHANGED
@@ -105,12 +105,30 @@ class Shortcode
105
 
106
  // Identify what service provider the shortcode's link belongs to
107
  $serviceProvider = self::$oEmbedInstance->get_provider($content);
 
 
 
 
 
 
 
 
 
 
108
 
109
- // Gather info about the shortcode's link
110
- $urlData = self::$oEmbedInstance->fetch($serviceProvider, $content, $attributes);
 
 
 
 
 
 
 
111
 
112
  $eventResults = apply_filters('embedpress:onBeforeEmbed', $urlData);
113
  if (empty($eventResults)) {
 
114
  return $subject;
115
  }
116
 
@@ -177,16 +195,18 @@ class Shortcode
177
  }
178
 
179
  if (!$parsedContent) {
180
- // If the embed couldn't be generated, we'll try to use Embera's API
181
- $emberaInstance = new Embera($emberaInstanceSettings);
182
- // Add support to the user's custom service providers
183
- $additionalServiceProviders = Core::getAdditionalServiceProviders();
184
- if (!empty($additionalServiceProviders)) {
185
- foreach ($additionalServiceProviders as $serviceProviderClassName => $serviceProviderUrls) {
186
- self::addServiceProvider($serviceProviderClassName, $serviceProviderUrls, $emberaInstance);
187
- }
 
188
 
189
- unset($serviceProviderUrls, $serviceProviderClassName);
 
190
  }
191
 
192
  // Register the html template
105
 
106
  // Identify what service provider the shortcode's link belongs to
107
  $serviceProvider = self::$oEmbedInstance->get_provider($content);
108
+ // Check if OEmbed was unable to detect the url service provider.
109
+ if (empty($serviceProvider)) {
110
+ // Attempt to do the same using Embera.
111
+ $emberaInstance = new Embera($emberaInstanceSettings);
112
+ // Add support to the user's custom service providers
113
+ $additionalServiceProviders = Core::getAdditionalServiceProviders();
114
+ if (!empty($additionalServiceProviders)) {
115
+ foreach ($additionalServiceProviders as $serviceProviderClassName => $serviceProviderUrls) {
116
+ self::addServiceProvider($serviceProviderClassName, $serviceProviderUrls, $emberaInstance);
117
+ }
118
 
119
+ unset($serviceProviderUrls, $serviceProviderClassName);
120
+ }
121
+
122
+ // Attempt to fetch more info about the url-embed.
123
+ $urlData = $emberaInstance->getUrlInfo($content);
124
+ } else {
125
+ // Attempt to fetch more info about the url-embed.
126
+ $urlData = self::$oEmbedInstance->fetch($serviceProvider, $content, $attributes);
127
+ }
128
 
129
  $eventResults = apply_filters('embedpress:onBeforeEmbed', $urlData);
130
  if (empty($eventResults)) {
131
+ // EmbedPress seems unable to embed the url.
132
  return $subject;
133
  }
134
 
195
  }
196
 
197
  if (!$parsedContent) {
198
+ if (!isset($emberaInstance)) {
199
+ // If the embed couldn't be generated, we'll try to use Embera's API
200
+ $emberaInstance = new Embera($emberaInstanceSettings);
201
+ // Add support to the user's custom service providers
202
+ $additionalServiceProviders = Core::getAdditionalServiceProviders();
203
+ if (!empty($additionalServiceProviders)) {
204
+ foreach ($additionalServiceProviders as $serviceProviderClassName => $serviceProviderUrls) {
205
+ self::addServiceProvider($serviceProviderClassName, $serviceProviderUrls, $emberaInstance);
206
+ }
207
 
208
+ unset($serviceProviderUrls, $serviceProviderClassName);
209
+ }
210
  }
211
 
212
  // Register the html template
changelog.txt CHANGED
@@ -1,4 +1,9 @@
1
  == Changelog ==
 
 
 
 
 
2
  = 1.4.0 =
3
  Release Date: 2017-01-06
4
 
1
  == Changelog ==
2
+ = 1.4.1 =
3
+ Release Date: 2017-01-06
4
+
5
+ * Fixed Google services embeds.
6
+
7
  = 1.4.0 =
8
  Release Date: 2017-01-06
9
 
embedpress.php CHANGED
@@ -12,7 +12,7 @@
12
  * @embedpress
13
  * Plugin Name: EmbedPress
14
  * Plugin URI: http://pressshack.com/embedpress/
15
- * Version: 1.4.0
16
  * Description: WordPress supports around 35 embed sources, but EmbedPress adds over 40 more, including Facebook, Google Maps, Google Docs, UStream! Just use the URL!
17
  * Author: PressShack
18
  * Author URI: http://pressshack.com
12
  * @embedpress
13
  * Plugin Name: EmbedPress
14
  * Plugin URI: http://pressshack.com/embedpress/
15
+ * Version: 1.4.1
16
  * Description: WordPress supports around 35 embed sources, but EmbedPress adds over 40 more, including Facebook, Google Maps, Google Docs, UStream! Just use the URL!
17
  * Author: PressShack
18
  * Author URI: http://pressshack.com
includes.php CHANGED
@@ -20,7 +20,7 @@ if (!defined('EMBEDPRESS_PLG_NAME')) {
20
  }
21
 
22
  if (!defined('EMBEDPRESS_PLG_VERSION')) {
23
- define('EMBEDPRESS_PLG_VERSION', "1.4.0");
24
  }
25
 
26
  if (!defined('EMBEDPRESS_PATH_BASE')) {
20
  }
21
 
22
  if (!defined('EMBEDPRESS_PLG_VERSION')) {
23
+ define('EMBEDPRESS_PLG_VERSION', "1.4.1");
24
  }
25
 
26
  if (!defined('EMBEDPRESS_PATH_BASE')) {
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: PressShack
3
  Tags: 23hq, amcharts, animoto, bambuser, cacoo, chartblocks, chirbit, circuitlab, cloudup, clyp, collegehumor, coub, crowd ranking, daily mile, dailymotion, devianart, dipity, dotsub, facebook, flickr, funnyordie, gettyimages, github gist, google docs, google drawings, google maps, google sheets, google slides, huffduffer, hulu, imgur, infogram, instagram, issuu, kickstarter, meetup, mixcloud, mobypicture, nfb, photobucket, polldaddy, porfolium, reddit, release wire, reverbnation, roomshare, rutube, sapo videos, scribd, shortnote, shoudio, sketchfab, slideshare, smugmug, soundcloud, speaker deck, spotify, ted, tumblr, twitter, ustream, viddler, videojug, videopress, vimeo, vine, wordpress tv, youtube
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
- Stable tag: 1.4.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -90,6 +90,11 @@ There're two ways to install EmbedPress plugin:
90
  `
91
 
92
  == Changelog ==
 
 
 
 
 
93
  = 1.4.0 =
94
  Release Date: 2017-01-06
95
 
3
  Tags: 23hq, amcharts, animoto, bambuser, cacoo, chartblocks, chirbit, circuitlab, cloudup, clyp, collegehumor, coub, crowd ranking, daily mile, dailymotion, devianart, dipity, dotsub, facebook, flickr, funnyordie, gettyimages, github gist, google docs, google drawings, google maps, google sheets, google slides, huffduffer, hulu, imgur, infogram, instagram, issuu, kickstarter, meetup, mixcloud, mobypicture, nfb, photobucket, polldaddy, porfolium, reddit, release wire, reverbnation, roomshare, rutube, sapo videos, scribd, shortnote, shoudio, sketchfab, slideshare, smugmug, soundcloud, speaker deck, spotify, ted, tumblr, twitter, ustream, viddler, videojug, videopress, vimeo, vine, wordpress tv, youtube
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.4.1
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
90
  `
91
 
92
  == Changelog ==
93
+ = 1.4.1 =
94
+ Release Date: 2017-01-06
95
+
96
+ * Fixed Google services embeds.
97
+
98
  = 1.4.0 =
99
  Release Date: 2017-01-06
100