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

Version Description

Release Date: 2017-02-15

  • Added support to embed Giphy URLs;
  • Added support to embed Twitch streams & chat URLs;
  • Fixed odd behavior with non-shortcoded embeddable URLs;
  • Fixed bugs when having multiple editors in a single page;
  • Updated copyright info;
  • Updated Settings page layout;
  • Code enhancements.
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.5.0
Comparing to
See all releases

Code changes from version 1.4.4 to 1.5.0

EmbedPress/AutoLoader.php CHANGED
@@ -8,7 +8,7 @@ namespace EmbedPress;
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.0.0
14
  */
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.0.0
14
  */
EmbedPress/Core.php CHANGED
@@ -13,7 +13,7 @@ use \EmbedPress\Ends\Front\Handler as EndHandlerPublic;
13
  *
14
  * @package EmbedPress
15
  * @author PressShack <help@pressshack.com>
16
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
17
  * @license GPLv2 or later
18
  * @since 1.0.0
19
  */
@@ -132,18 +132,14 @@ class Core
132
 
133
  add_filter('plugin_action_links_embedpress/embedpress.php', array('\EmbedPress\Core', 'handleActionLinks'), 10, 2);
134
 
135
- // Load CSS
136
- wp_register_style( 'embedpress-admin', plugins_url( 'embedpress/assets/css/admin.css' ) );
137
- wp_enqueue_style( 'embedpress-admin' );
138
 
139
  if ($plgSettings->enablePluginInAdmin) {
140
  add_action('init', array('\EmbedPress\Disabler', 'run'), 1);
141
 
142
  $plgHandlerAdminInstance = new EndHandlerAdmin($this->getPluginName(), $this->getPluginVersion());
143
 
144
- $enqueueScriptsHookName = "admin_enqueue_scripts";
145
- $this->loaderInstance->add_action($enqueueScriptsHookName, $plgHandlerAdminInstance, 'enqueueScripts');
146
- $this->loaderInstance->add_action($enqueueScriptsHookName, $plgHandlerAdminInstance, 'enqueueStyles');
147
 
148
  $onAjaxCallbackName = "doShortcodeReceivedViaAjax";
149
  $this->loaderInstance->add_action('wp_ajax_embedpress_do_ajax_request', $plgHandlerAdminInstance, $onAjaxCallbackName);
@@ -151,7 +147,7 @@ class Core
151
 
152
  $this->loaderInstance->add_action('wp_ajax_embedpress_get_embed_url_info', $plgHandlerAdminInstance, "getUrlInfoViaAjax");
153
 
154
- unset($onAjaxCallbackName, $enqueueScriptsHookName, $plgHandlerAdminInstance);
155
  }
156
  } else {
157
  add_action('init', array('\EmbedPress\Disabler', 'run'), 1);
13
  *
14
  * @package EmbedPress
15
  * @author PressShack <help@pressshack.com>
16
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
17
  * @license GPLv2 or later
18
  * @since 1.0.0
19
  */
132
 
133
  add_filter('plugin_action_links_embedpress/embedpress.php', array('\EmbedPress\Core', 'handleActionLinks'), 10, 2);
134
 
135
+ add_action('admin_enqueue_scripts', array('\EmbedPress\Ends\Back\Handler', 'enqueueStyles'));
 
 
136
 
137
  if ($plgSettings->enablePluginInAdmin) {
138
  add_action('init', array('\EmbedPress\Disabler', 'run'), 1);
139
 
140
  $plgHandlerAdminInstance = new EndHandlerAdmin($this->getPluginName(), $this->getPluginVersion());
141
 
142
+ $this->loaderInstance->add_action('admin_enqueue_scripts', $plgHandlerAdminInstance, 'enqueueScripts');
 
 
143
 
144
  $onAjaxCallbackName = "doShortcodeReceivedViaAjax";
145
  $this->loaderInstance->add_action('wp_ajax_embedpress_do_ajax_request', $plgHandlerAdminInstance, $onAjaxCallbackName);
147
 
148
  $this->loaderInstance->add_action('wp_ajax_embedpress_get_embed_url_info', $plgHandlerAdminInstance, "getUrlInfoViaAjax");
149
 
150
+ unset($onAjaxCallbackName, $plgHandlerAdminInstance);
151
  }
152
  } else {
153
  add_action('init', array('\EmbedPress\Disabler', 'run'), 1);
EmbedPress/Disabler.php CHANGED
@@ -10,7 +10,7 @@ use \EmbedPress\Shortcode;
10
  *
11
  * @package EmbedPress
12
  * @author PressShack <help@pressshack.com>
13
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
14
  * @license GPLv2 or later
15
  * @since 1.0.0
16
  */
@@ -89,6 +89,9 @@ class Disabler
89
  // Remove {@link WP_Embed::shortcode()} from execution.
90
  remove_shortcode(EMBEDPRESS_SHORTCODE);
91
 
 
 
 
92
  wp_deregister_script('wp-embed');
93
 
94
  add_filter('http_request_host_is_external', array('\EmbedPress\Core', 'allowApiHost'), 10, 3);
10
  *
11
  * @package EmbedPress
12
  * @author PressShack <help@pressshack.com>
13
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
14
  * @license GPLv2 or later
15
  * @since 1.0.0
16
  */
89
  // Remove {@link WP_Embed::shortcode()} from execution.
90
  remove_shortcode(EMBEDPRESS_SHORTCODE);
91
 
92
+ // Attempts to embed all URLs in a post.
93
+ add_filter('the_content', array('\EmbedPress\Ends\Front\Handler', 'autoEmbedUrls'));
94
+
95
  wp_deregister_script('wp-embed');
96
 
97
  add_filter('http_request_host_is_external', array('\EmbedPress\Core', 'allowApiHost'), 10, 3);
EmbedPress/Ends/Back/Handler.php CHANGED
@@ -15,7 +15,7 @@ use \Embera\Embera;
15
  * @package EmbedPress
16
  * @subpackage EmbedPress/Ends/Back
17
  * @author PressShack <help@pressshack.com>
18
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
19
  * @license GPLv2 or later
20
  * @since 1.0.0
21
  */
@@ -63,12 +63,13 @@ class Handler extends EndHandlerAbstract
63
  * Method that register all stylesheets for the admin area.
64
  *
65
  * @since 1.0.0
 
66
  *
67
  * @return void
68
  */
69
- public function enqueueStyles()
70
  {
71
- global $wp_scripts;
72
  }
73
 
74
  /**
15
  * @package EmbedPress
16
  * @subpackage EmbedPress/Ends/Back
17
  * @author PressShack <help@pressshack.com>
18
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
19
  * @license GPLv2 or later
20
  * @since 1.0.0
21
  */
63
  * Method that register all stylesheets for the admin area.
64
  *
65
  * @since 1.0.0
66
+ * @static
67
  *
68
  * @return void
69
  */
70
+ public static function enqueueStyles()
71
  {
72
+ wp_enqueue_style('embedpress-admin', plugins_url('embedpress/assets/css/admin.css'));
73
  }
74
 
75
  /**
EmbedPress/Ends/Back/Settings.php CHANGED
@@ -11,7 +11,7 @@ use \EmbedPress\Core;
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Ends/Back
13
  * @author PressShack <help@pressshack.com>
14
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
@@ -109,7 +109,7 @@ class Settings
109
  */
110
  public static function registerMenuItem()
111
  {
112
- add_object_page('EmbedPress Settings', 'EmbedPress', 'manage_options', 'embedpress', array(self::$namespace, 'renderForm'));
113
  }
114
 
115
  /**
@@ -155,8 +155,14 @@ class Settings
155
  $settingsFieldsIdentifier = !empty($activeTab) ? "embedpress:{$activeTab}" : self::$sectionGroupIdentifier;
156
  $settingsSectionsIdentifier = !empty($activeTab) ? "embedpress:{$activeTab}" : self::$identifier;
157
  ?>
158
- <div>
159
- <h1>EmbedPress</h1>
 
 
 
 
 
 
160
 
161
  <?php settings_errors(); ?>
162
 
@@ -166,12 +172,58 @@ class Settings
166
  <?php do_action('embedpress:settings:render:tab', $activeTab); ?>
167
  </h2>
168
 
169
- <form action="options.php" method="POST">
170
  <?php settings_fields($settingsFieldsIdentifier); ?>
171
  <?php do_settings_sections($settingsSectionsIdentifier); ?>
172
 
173
- <input name="Submit" type="submit" class="button button-primary" value="Save changes" />
174
  </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  </div>
176
  <?php
177
  }
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Ends/Back
13
  * @author PressShack <help@pressshack.com>
14
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
109
  */
110
  public static function registerMenuItem()
111
  {
112
+ add_menu_page('EmbedPress Settings', 'EmbedPress', 'manage_options', 'embedpress', array(self::$namespace, 'renderForm'), null, 64);
113
  }
114
 
115
  /**
155
  $settingsFieldsIdentifier = !empty($activeTab) ? "embedpress:{$activeTab}" : self::$sectionGroupIdentifier;
156
  $settingsSectionsIdentifier = !empty($activeTab) ? "embedpress:{$activeTab}" : self::$identifier;
157
  ?>
158
+ <div id="embedpress-settings-wrapper">
159
+ <header>
160
+ <h1>EmbedPress <small><a href="//wordpress.org/plugins/embedpress/changelog/" target="_blank" rel="noopener noreferrer">v<?php echo EMBEDPRESS_PLG_VERSION; ?></a></small></h1>
161
+
162
+ <a href="//wordpress.org/plugins/embedpress" target="_blank" rel="noopener noreferrer" title="EmbedPress" class="presshack-logo">
163
+ <img width="75" src="//pressshack.com/wp-content/uploads/2016/05/embedpress-150x150.png">
164
+ </a>
165
+ </header>
166
 
167
  <?php settings_errors(); ?>
168
 
172
  <?php do_action('embedpress:settings:render:tab', $activeTab); ?>
173
  </h2>
174
 
175
+ <form action="options.php" method="POST" style="padding-bottom: 20px;">
176
  <?php settings_fields($settingsFieldsIdentifier); ?>
177
  <?php do_settings_sections($settingsSectionsIdentifier); ?>
178
 
179
+ <button type="submit" class="button button-primary">Save changes</button>
180
  </form>
181
+
182
+ <hr>
183
+
184
+ <footer id="embedpress-settings-footer">
185
+ <div>
186
+ <ul>
187
+ <li>
188
+ <a href="//pressshack.com/embedpress" target="_blank" rel="noopener noreferrer" title="About EmbedPress">About</a>
189
+ </li>
190
+ <li>
191
+ <a href="//pressshack.com/embedpress/docs/sources-support" target="_blank" rel="noopener noreferrer" title="List of supported sources by EmbedPress">Supported sources</a>
192
+ </li>
193
+ <li>
194
+ <a href="//pressshack.com/embedpress/docs" target="_blank" rel="noopener noreferrer" title="EmbedPress Documentation">Documentation</a>
195
+ </li>
196
+ <li>
197
+ <a href="//pressshack.com/embedpress/youtube" target="_blank" rel="noopener noreferrer" title="EmbedPress Add-Ons">Add-Ons</a>
198
+ </li>
199
+ <li>
200
+ <a href="//pressshack.com/contact" target="_blank" rel="noopener noreferrer" title="Contact the PressShack team">Contact</a>
201
+ </li>
202
+ </ul>
203
+ <ul>
204
+ <li>
205
+ <a href="//twitter.com/pressshack" target="_blank" rel="noopener noreferrer">
206
+ <span class="dashicons dashicons-twitter"></span>
207
+ </a>
208
+ </li>
209
+ <li>
210
+ <a href="//www.facebook.com/pressshack" target="_blank" rel="noopener noreferrer">
211
+ <span class="dashicons dashicons-facebook"></span>
212
+ </a>
213
+ </li>
214
+ </ul>
215
+ </div>
216
+ <div>
217
+ <p>
218
+ <small>Copyright &copy; 2017 Open Source Training LLC</small>
219
+ </p>
220
+ <p style="text-align: right; margin-top: 0;">
221
+ <a href="//pressshack.com" target="_blank" rel="noopener noreferrer">
222
+ <img width="100" src="//pressshack.com/wp-content/uploads/2016/11/logo-450.png" style="margin-top: 10px;">
223
+ </a>
224
+ </p>
225
+ </div>
226
+ </footer>
227
  </div>
228
  <?php
229
  }
EmbedPress/Ends/Front/Handler.php CHANGED
@@ -2,6 +2,7 @@
2
  namespace EmbedPress\Ends\Front;
3
 
4
  use \EmbedPress\Ends\Handler as EndHandlerAbstract;
 
5
 
6
  (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed.");
7
 
@@ -12,31 +13,66 @@ use \EmbedPress\Ends\Handler as EndHandlerAbstract;
12
  * @package EmbedPress
13
  * @subpackage EmbedPress/Ends/Front
14
  * @author PressShack <help@pressshack.com>
15
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
16
  * @license GPLv2 or later
17
  * @since 1.0.0
18
  */
19
  class Handler extends EndHandlerAbstract
20
  {
21
  /**
22
- * Method that register all scripts for the admin area.
23
  *
24
  * @since 1.0.0
 
25
  *
26
  * @return void
27
  */
28
- public function enqueueScripts()
29
- {}
 
 
30
 
31
  /**
32
- * Method that register all stylesheets for the public area.
33
  *
34
- * @since 1.0.0
 
35
  *
36
- * @return void
 
 
37
  */
38
- public function enqueueStyles()
39
  {
40
- wp_enqueue_style(EMBEDPRESS_PLG_NAME, EMBEDPRESS_URL_ASSETS .'css/embedpress.css');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  }
42
  }
2
  namespace EmbedPress\Ends\Front;
3
 
4
  use \EmbedPress\Ends\Handler as EndHandlerAbstract;
5
+ use \EmbedPress\Shortcode;
6
 
7
  (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed.");
8
 
13
  * @package EmbedPress
14
  * @subpackage EmbedPress/Ends/Front
15
  * @author PressShack <help@pressshack.com>
16
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
17
  * @license GPLv2 or later
18
  * @since 1.0.0
19
  */
20
  class Handler extends EndHandlerAbstract
21
  {
22
  /**
23
+ * Method that register all stylesheets for the public area.
24
  *
25
  * @since 1.0.0
26
+ * @static
27
  *
28
  * @return void
29
  */
30
+ public static function enqueueStyles()
31
+ {
32
+ wp_enqueue_style(EMBEDPRESS_PLG_NAME, EMBEDPRESS_URL_ASSETS .'css/embedpress.css');
33
+ }
34
 
35
  /**
36
+ * Passes any unlinked URLs to EmbedPress\Shortcode::do_shortcode() for potential embedding.
37
  *
38
+ * @since 1.5.0
39
+ * @static
40
  *
41
+ * @param string $content The content to be searched.
42
+ *
43
+ * @return string The potentially modified content.
44
  */
45
+ public static function autoEmbedUrls($content)
46
  {
47
+ // Replace line breaks from all HTML elements with placeholders.
48
+ $content = wp_replace_in_html_tags($content, array("\n" => '<!-- embedpress-line-break -->'));
49
+
50
+ if (preg_match('#(^|\s|>)https?://#i', $content)) {
51
+ $callbackFingerprint = array('\EmbedPress\Ends\Front\Handler', 'autoEmbedUrlsCallback');
52
+
53
+ // Find URLs on their own line.
54
+ $content = preg_replace_callback('|^(\s*)(https?://[^\s<>"]+)(\s*)$|im', $callbackFingerprint, $content);
55
+ // Find URLs in their own paragraph.
56
+ $content = preg_replace_callback('|(<p(?: [^>]*)?>\s*)(https?://[^\s<>"]+)(\s*<\/p>)|i', $callbackFingerprint, $content);
57
+ }
58
+
59
+ // Put the line breaks back.
60
+ return str_replace('<!-- embedpress-line-break -->', "\n", $content);
61
+ }
62
+
63
+ /**
64
+ * Callback function for \EmbedPress\Ends\Front\Handler::autoEmbedUrls().
65
+ *
66
+ * @since 1.5.0
67
+ * @static
68
+ *
69
+ * @param array $match A regex match array.
70
+ *
71
+ * @return string The embed HTML on success, otherwise the original URL.
72
+ */
73
+ public static function autoEmbedUrlsCallback($match) {
74
+ $return = Shortcode::do_shortcode(array(), $match[2]);
75
+
76
+ return $match[1] . $return . $match[3];
77
  }
78
  }
EmbedPress/Ends/Handler.php CHANGED
@@ -9,7 +9,7 @@ namespace EmbedPress\Ends;
9
  * @package EmbedPress
10
  * @subpackage EmbedPress/Ends
11
  * @author PressShack <help@pressshack.com>
12
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
13
  * @license GPLv2 or later
14
  * @since 1.0.0
15
  */
@@ -54,19 +54,20 @@ abstract class Handler
54
  * Method that register all scripts for the admin area.
55
  *
56
  * @since 1.0.0
57
- * @abstract
58
  *
59
  * @return void
60
  */
61
- abstract public function enqueueScripts();
 
62
 
63
  /**
64
  * Method that register all stylesheets for the admin area.
65
  *
66
  * @since 1.0.0
67
- * @abstract
68
  *
69
  * @return void
70
  */
71
- abstract public function enqueueStyles();
 
72
  }
9
  * @package EmbedPress
10
  * @subpackage EmbedPress/Ends
11
  * @author PressShack <help@pressshack.com>
12
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
13
  * @license GPLv2 or later
14
  * @since 1.0.0
15
  */
54
  * Method that register all scripts for the admin area.
55
  *
56
  * @since 1.0.0
 
57
  *
58
  * @return void
59
  */
60
+ public function enqueueScripts()
61
+ {}
62
 
63
  /**
64
  * Method that register all stylesheets for the admin area.
65
  *
66
  * @since 1.0.0
67
+ * @static
68
  *
69
  * @return void
70
  */
71
+ public static function enqueueStyles()
72
+ {}
73
  }
EmbedPress/Loader.php CHANGED
@@ -8,7 +8,7 @@ namespace EmbedPress;
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.0.0
14
  */
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.0.0
14
  */
EmbedPress/Plugins/Html/Field.php CHANGED
@@ -8,7 +8,7 @@ namespace EmbedPress\Plugins\Html;
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.4.0
14
  */
8
  *
9
  * @package EmbedPress
10
  * @author PressShack <help@pressshack.com>
11
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
12
  * @license GPLv2 or later
13
  * @since 1.4.0
14
  */
EmbedPress/Plugins/Html/index.html CHANGED
File without changes
EmbedPress/Plugins/Plugin.php CHANGED
@@ -10,7 +10,7 @@ use \EmbedPress\Updater;
10
  *
11
  * @package EmbedPress
12
  * @author PressShack <help@pressshack.com>
13
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
14
  * @license GPLv2 or later
15
  * @since 1.4.0
16
  * @abstract
10
  *
11
  * @package EmbedPress
12
  * @author PressShack <help@pressshack.com>
13
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
14
  * @license GPLv2 or later
15
  * @since 1.4.0
16
  * @abstract
EmbedPress/Plugins/index.html CHANGED
File without changes
EmbedPress/Providers/Giphy.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace EmbedPress\Providers;
3
+
4
+ use \Embera\Adapters\Service as EmberaService;
5
+
6
+ (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed.");
7
+
8
+ /**
9
+ * Entity responsible to support Giphy embeds.
10
+ *
11
+ * @package EmbedPress
12
+ * @subpackage EmbedPress/Providers
13
+ * @author PressShack <help@pressshack.com>
14
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
15
+ * @license GPLv2 or later
16
+ * @since 1.5.0
17
+ */
18
+ class Giphy extends EmberaService
19
+ {
20
+ /**
21
+ * The regex which identifies Giphy URLs.
22
+ *
23
+ * @since 1.5.0
24
+ * @access private
25
+ *
26
+ * @var string
27
+ */
28
+ private $urlRegexPattern = '~http[s]?:\/\/(?:www\.)?giphy\.com\/gifs\/([a-zA-Z0-9\-]+)|i.giphy\.com\/([a-zA-Z0-9\-]+)(\.gif)~';
29
+
30
+ /**
31
+ * Method that verifies if the embed URL belongs to Giphy.
32
+ *
33
+ * @since 1.5.0
34
+ *
35
+ * @return boolean
36
+ */
37
+ public function validateUrl()
38
+ {
39
+ return preg_match($this->urlRegexPattern, $this->url);
40
+ }
41
+
42
+ /**
43
+ * This method fakes an Oembed response.
44
+ *
45
+ * @since 1.5.0
46
+ *
47
+ * @return array
48
+ */
49
+ public function fakeResponse()
50
+ {
51
+ $url = $this->getUrl();
52
+
53
+ if (preg_match($this->urlRegexPattern, $url, $matches)) {
54
+ $gifId = count($matches) > 3 && strtolower($matches[3]) === ".gif" ? $matches[2] : $matches[1];
55
+
56
+ $html = ''.
57
+ '<a href="https://giphy.com/gifs/'. $gifId .'">'.
58
+ '<img src="https://media.giphy.com/media/'. $gifId .'/giphy.gif" alt="" width="{width}" height="{height}">'.
59
+ '</a>';
60
+
61
+ $response = array(
62
+ 'type' => 'image',
63
+ 'provider_name' => 'Giphy',
64
+ 'provider_url' => 'https://giphy.com',
65
+ 'url' => $url,
66
+ 'html' => $html
67
+ );
68
+ } else {
69
+ $response = array();
70
+ }
71
+
72
+ return $response;
73
+ }
74
+ }
EmbedPress/Providers/GoogleDocs.php CHANGED
@@ -11,7 +11,7 @@ use \Embera\Adapters\Service as EmberaService;
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Providers
13
  * @author PressShack <help@pressshack.com>
14
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Providers
13
  * @author PressShack <help@pressshack.com>
14
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
EmbedPress/Providers/GoogleMaps.php CHANGED
@@ -11,7 +11,7 @@ use \Embera\Adapters\Service as EmberaService;
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Providers
13
  * @author PressShack <help@pressshack.com>
14
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
11
  * @package EmbedPress
12
  * @subpackage EmbedPress/Providers
13
  * @author PressShack <help@pressshack.com>
14
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
15
  * @license GPLv2 or later
16
  * @since 1.0.0
17
  */
EmbedPress/Providers/Twitch.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace EmbedPress\Providers;
3
+
4
+ use \Embera\Adapters\Service as EmberaService;
5
+
6
+ (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed.");
7
+
8
+ /**
9
+ * Entity responsible to support Twitch embeds.
10
+ *
11
+ * @package EmbedPress
12
+ * @subpackage EmbedPress/Providers
13
+ * @author PressShack <help@pressshack.com>
14
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
15
+ * @license GPLv2 or later
16
+ * @since 1.5.0
17
+ */
18
+ class Twitch extends EmberaService
19
+ {
20
+ /**
21
+ * The regex which identifies Twitch URLs.
22
+ *
23
+ * @since 1.5.0
24
+ * @access private
25
+ *
26
+ * @var string
27
+ */
28
+ private $urlRegexPattern = '~http[s]?:\/\/(?:www\.)twitch\.tv\/([a-zA-Z\-\_]+)\/?(chat\/?$)?~';
29
+
30
+ /**
31
+ * Method that verifies if the embed URL belongs to Twitch.
32
+ *
33
+ * @since 1.5.0
34
+ *
35
+ * @return boolean
36
+ */
37
+ public function validateUrl()
38
+ {
39
+ return preg_match($this->urlRegexPattern, $this->url);
40
+ }
41
+
42
+ /**
43
+ * This method fakes an Oembed response.
44
+ *
45
+ * @since 1.5.0
46
+ *
47
+ * @return array
48
+ */
49
+ public function fakeResponse()
50
+ {
51
+ $url = $this->getUrl();
52
+
53
+ if (preg_match("{$this->urlRegexPattern}i", $url, $matches)) {
54
+ $channelName = $matches[1];
55
+ $renderChatInsteadOfStream = (count($matches) > 2 && strtolower($matches[2]) === "chat");
56
+
57
+ $html = '<iframe src="https://www.twitch.tv/'. $channelName .'/'. ($renderChatInsteadOfStream ? 'chat' : 'embed' ) .'" height="{height}" width="{width}" scrolling="no" frameborder="0" title="" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
58
+
59
+ $response = array(
60
+ 'type' => ($renderChatInsteadOfStream ? 'rich' : 'video'),
61
+ 'provider_name' => 'Twitch',
62
+ 'provider_url' => 'https://www.twitch.tv',
63
+ 'url' => $url,
64
+ 'html' => $html
65
+ );
66
+ } else {
67
+ $response = array();
68
+ }
69
+
70
+ return $response;
71
+ }
72
+ }
EmbedPress/Providers/index.html CHANGED
File without changes
EmbedPress/Shortcode.php CHANGED
@@ -12,7 +12,7 @@ use \Embera\Formatter;
12
  *
13
  * @package EmbedPress
14
  * @author PressShack <help@pressshack.com>
15
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
16
  * @license GPLv2 or later
17
  * @since 1.0.0
18
  */
@@ -180,7 +180,7 @@ class Shortcode
180
 
181
  // Facebook is a special case. WordPress will try to embed them using OEmbed, but they always end up embedding the profile page, regardless
182
  // if the url was pointing to a photo, a post, etc. So, since Embera can embed only facebook-media/posts, we'll use it only for that.
183
- if (in_array($urlData->provider_name, array('Facebook'))) {
184
  // Check if this is a Facebook profile url.
185
  if (preg_match('/facebook\.com\/(?:[^\/]+?)\/?$/', $content, $match)) {
186
  // Try to embed the url using WP's OSEmbed.
@@ -228,20 +228,22 @@ class Shortcode
228
  $parsedContent = preg_replace('/((?:ose-)?\{provider_alias\})/i', "ose-". strtolower($urlData->provider_name), $parsedContent);
229
  }
230
 
231
- // NFB seems to always return their embed code with all HTML entities into their applicable characters string.
232
- if (strtoupper($urlData->provider_name) === "NATIONAL FILM BOARD OF CANADA") {
233
- $parsedContent = html_entity_decode($parsedContent);
234
- } else if (strtoupper($urlData->provider_name) === "FACEBOOK") {
235
- $plgSettings = Core::getSettings();
236
-
237
- // Check if the user wants to force a certain language into Facebook embeds.
238
- $locale = isset($plgSettings->fbLanguage) && !empty($plgSettings->fbLanguage) ? $plgSettings->fbLanguage : false;
239
- if (!!$locale) {
240
- // Replace the automatically detected language by Facebook's API with the language chosen by the user.
241
- $parsedContent = preg_replace('/\/[a-z]{2}\_[a-z]{2}\/sdk\.js/i', "/{$locale}/sdk.js", $parsedContent);
242
- }
 
243
 
244
- unset($locale, $plgSettings);
 
245
  }
246
 
247
  unset($embedTemplate, $serviceProvider);
12
  *
13
  * @package EmbedPress
14
  * @author PressShack <help@pressshack.com>
15
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
16
  * @license GPLv2 or later
17
  * @since 1.0.0
18
  */
180
 
181
  // Facebook is a special case. WordPress will try to embed them using OEmbed, but they always end up embedding the profile page, regardless
182
  // if the url was pointing to a photo, a post, etc. So, since Embera can embed only facebook-media/posts, we'll use it only for that.
183
+ if (isset($urlData->provider_name) && in_array($urlData->provider_name, array('Facebook'))) {
184
  // Check if this is a Facebook profile url.
185
  if (preg_match('/facebook\.com\/(?:[^\/]+?)\/?$/', $content, $match)) {
186
  // Try to embed the url using WP's OSEmbed.
228
  $parsedContent = preg_replace('/((?:ose-)?\{provider_alias\})/i', "ose-". strtolower($urlData->provider_name), $parsedContent);
229
  }
230
 
231
+ if (isset($urlData->provider_name)) {
232
+ // NFB seems to always return their embed code with all HTML entities into their applicable characters string.
233
+ if (strtoupper($urlData->provider_name) === "NATIONAL FILM BOARD OF CANADA") {
234
+ $parsedContent = html_entity_decode($parsedContent);
235
+ } else if (strtoupper($urlData->provider_name) === "FACEBOOK") {
236
+ $plgSettings = Core::getSettings();
237
+
238
+ // Check if the user wants to force a certain language into Facebook embeds.
239
+ $locale = isset($plgSettings->fbLanguage) && !empty($plgSettings->fbLanguage) ? $plgSettings->fbLanguage : false;
240
+ if (!!$locale) {
241
+ // Replace the automatically detected language by Facebook's API with the language chosen by the user.
242
+ $parsedContent = preg_replace('/\/[a-z]{2}\_[a-z]{2}\/sdk\.js/i', "/{$locale}/sdk.js", $parsedContent);
243
+ }
244
 
245
+ unset($locale, $plgSettings);
246
+ }
247
  }
248
 
249
  unset($embedTemplate, $serviceProvider);
EmbedPress/Updater.php CHANGED
File without changes
assets/css/admin.css CHANGED
@@ -1,11 +1,18 @@
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.3.1
7
  */
8
 
 
 
 
 
 
 
 
9
  #toplevel_page_embedpress .dashicons-admin-generic::before,
10
  #toplevel_page_embedpress .current .dashicons-admin-generic::before {
11
  background-image: url(../images/menu-icon.png);
@@ -28,14 +35,15 @@
28
  background-position: 0 -60px;
29
  }
30
 
31
- /* Custom classes */
32
-
 
33
  .ep-label-danger {
34
- color: #d54e21;
35
  }
36
 
37
  .ep-label-success {
38
- color: #5ca410;
39
  }
40
 
41
  .ep-small-link {
@@ -45,4 +53,181 @@
45
 
46
  .ep-small-spacing {
47
  margin-left: 5px;
48
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.3.1
7
  */
8
 
9
+ /**
10
+ * WordPress's admin sidebar.
11
+ */
12
+ #toplevel_page_embedpress > a.current {
13
+ background-color: #655997 !important;
14
+ }
15
+
16
  #toplevel_page_embedpress .dashicons-admin-generic::before,
17
  #toplevel_page_embedpress .current .dashicons-admin-generic::before {
18
  background-image: url(../images/menu-icon.png);
35
  background-position: 0 -60px;
36
  }
37
 
38
+ /**
39
+ * Helper classes.
40
+ */
41
  .ep-label-danger {
42
+ color: #D54E21;
43
  }
44
 
45
  .ep-label-success {
46
+ color: #5CA410;
47
  }
48
 
49
  .ep-small-link {
53
 
54
  .ep-small-spacing {
55
  margin-left: 5px;
56
+ }
57
+
58
+ /**
59
+ * EmbedPress Settings Wrapper.
60
+ */
61
+ #embedpress-settings-wrapper #setting-error-settings_updated {
62
+ margin-top: 42px;
63
+ }
64
+
65
+ #embedpress-settings-wrapper .nav-tab-wrapper .nav-tab:not(.nav-tab-active):hover {
66
+ color: #555;
67
+ }
68
+
69
+ #embedpress-settings-wrapper .nav-tab-wrapper .nav-tab-active {
70
+ border-top: 2px solid #655997;
71
+ color: #655997;
72
+ }
73
+
74
+ #embedpress-settings-wrapper > header {
75
+ display: -webkit-box;
76
+ display: -moz-box;
77
+ display: -ms-flexbox;
78
+ display: -webkit-flex;
79
+ display: flex;
80
+ flex-direction: row;
81
+ justify-content: space-between;
82
+ }
83
+
84
+ #embedpress-settings-wrapper > header h1 small {
85
+ font-size: .5em;
86
+ margin-left: 15px;
87
+ }
88
+
89
+ #embedpress-settings-wrapper > header h1 small a {
90
+ color: #777;
91
+ text-decoration: none;
92
+ }
93
+
94
+ #embedpress-settings-wrapper > header > a {
95
+ margin-right: 16px;
96
+ margin-top: 10px;
97
+ max-height: 30px;
98
+ }
99
+
100
+ #embedpress-settings-wrapper > header > a img {
101
+ padding-top: 5px;
102
+ }
103
+
104
+ #embedpress-settings-wrapper a {
105
+ color: #777;
106
+ }
107
+
108
+ #embedpress-settings-wrapper a:link,
109
+ #embedpress-settings-wrapper a:visited,
110
+ #embedpress-settings-wrapper a:active,
111
+ #embedpress-settings-wrapper a:hover {
112
+ text-decoration: none;
113
+ }
114
+
115
+ #embedpress-settings-wrapper > header a img,
116
+ #embedpress-settings-wrapper a,
117
+ #embedpress-settings-wrapper button,
118
+ #embedpress-settings-wrapper button::before {
119
+ -webkit-transition: all 200ms ease-in-out;
120
+ -moz-transition: all 200ms ease-in-out;
121
+ -o-transition: all 200ms ease-in-out;
122
+ transition: all 200ms ease-in-out;
123
+ }
124
+
125
+ #embedpress-settings-wrapper a:hover {
126
+ color: #9D94C9;
127
+ }
128
+
129
+ #embedpress-settings-wrapper a:hover img {
130
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)";
131
+ filter: alpha(opacity=75);
132
+ -moz-opacity: .75;
133
+ -khtml-opacity: .75;
134
+ opacity: .75;
135
+ }
136
+
137
+ #embedpress-settings-wrapper input:not([type="checkbox"]):not([type="radio"]) {
138
+ -webkit-border-radius: 4px;
139
+ -moz-border-radius: 4px;
140
+ border-radius: 4px;
141
+ padding: 4.5px 10px;
142
+ }
143
+
144
+ #embedpress-settings-wrapper input:focus,
145
+ #embedpress-settings-wrapper select:focus,
146
+ #embedpress-settings-wrapper textarea:focus,
147
+ #embedpress-settings-wrapper button:not(.notice-dismiss):not([type="submit"]):active,
148
+ #embedpress-settings-wrapper button:not(.notice-dismiss):not([type="submit"]):focus,
149
+ #embedpress-settings-wrapper a:active,
150
+ #embedpress-settings-wrapper a:focus {
151
+ -webkit-box-shadow: 0 0 2px rgba(101, 89, 151, .8);
152
+ -moz-box-shadow: 0 0 2px rgba(101, 89, 151, .8);
153
+ box-shadow: 0 0 2px rgba(101, 89, 151, .8);
154
+ }
155
+
156
+ #embedpress-settings-wrapper input:focus,
157
+ #embedpress-settings-wrapper select:focus,
158
+ #embedpress-settings-wrapper textarea:focus,
159
+ #embedpress-settings-wrapper button:not(.notice-dismiss):not([type="submit"]):active,
160
+ #embedpress-settings-wrapper button:not(.notice-dismiss):not([type="submit"]):focus {
161
+ border-color: #9D94C9;
162
+ }
163
+
164
+ #embedpress-settings-wrapper input[type="radio"]::before {
165
+ background-color: #9D94C9;
166
+ }
167
+
168
+ #embedpress-settings-wrapper button:not(.notice-dismiss) {
169
+ -webkit-border-radius: 5px;
170
+ -moz-border-radius: 5px;
171
+ border-radius: 5px;
172
+ text-shadow: initial;
173
+ -webkit-box-shadow: initial;
174
+ -moz-box-shadow: initial;
175
+ box-shadow: initial;
176
+ vertical-align: middle;
177
+ line-height: 0;
178
+ min-height: 28px;
179
+ text-decoration: none;
180
+ padding: 15px 10px;
181
+ border-width: 2px;
182
+ border-style: solid;
183
+ }
184
+
185
+ #embedpress-settings-wrapper button:not(.notice-dismiss):hover,
186
+ #embedpress-settings-wrapper button:not(.notice-dismiss):active,
187
+ #embedpress-settings-wrapper button:not(.notice-dismiss):focus {
188
+ outline: none;
189
+ -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
190
+ -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
191
+ box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
192
+ }
193
+
194
+ #embedpress-settings-wrapper .button-primary {
195
+ background-color: #FFB300;
196
+ border-color: #C58C07;
197
+ color: #754D26;
198
+ }
199
+
200
+ #embedpress-settings-wrapper .button-primary:hover,
201
+ #embedpress-settings-wrapper .button-primary:active,
202
+ #embedpress-settings-wrapper .button-primary:focus {
203
+ background-color: #F3AC04;
204
+ color: #333;
205
+ }
206
+
207
+ #embedpress-settings-wrapper button:not(.notice-dismiss).button-secondary {
208
+ background-color: #655997;
209
+ border-color: #363050;
210
+ color: #FFF;
211
+ }
212
+
213
+ #embedpress-settings-wrapper button:not(.notice-dismiss).button-secondary:hover {
214
+ background-color: #5A4F87;
215
+ }
216
+
217
+ #embedpress-settings-footer > div {
218
+ display: -webkit-box;
219
+ display: -moz-box;
220
+ display: -ms-flexbox;
221
+ display: -webkit-flex;
222
+ display: flex;
223
+ justify-content: space-between;
224
+ padding-right: 16px;
225
+ }
226
+
227
+ #embedpress-settings-footer > div ul li {
228
+ display: inline;
229
+ }
230
+
231
+ #embedpress-settings-footer > div ul li:not(:first-child) {
232
+ margin-left: 15px;
233
+ }
assets/css/embedpress.css CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
assets/css/font.css CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
assets/css/preview.css CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
assets/css/vendor/bootstrap/bootstrap.css.map CHANGED
File without changes
assets/images/menu-icon.png CHANGED
File without changes
assets/js/preview.js CHANGED
@@ -1,7 +1,7 @@
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
@@ -302,11 +302,15 @@
302
  * @return Object The editor
303
  */
304
  self.getEditor = function() {
305
- if (window.tinymce.editors.length === 0) {
306
  return null;
307
  }
308
 
309
- return window.tinymce.activeEditor;
 
 
 
 
310
  };
311
 
312
  /**
@@ -601,7 +605,17 @@
601
  'docs.google.com/document/*',
602
  'docs.google.com/spreadsheets/*',
603
  'docs.google.com/forms/*',
604
- 'docs.google.com/drawings/*'
 
 
 
 
 
 
 
 
 
 
605
  ],
606
  patterns = [];
607
 
@@ -824,7 +838,7 @@
824
  iframe.allowTransparency = 'true';
825
  iframe.scrolling = 'no';
826
  iframe.class = "wpview-sandbox";
827
- iframe.style.width = (customAttributes.width ? customAttributes.width +'px' : '100%');
828
 
829
  dom.add(contentWrapper, iframe);
830
  var iframeWindow = iframe.contentWindow;
@@ -836,19 +850,19 @@
836
  var iframeDoc = iframeWindow.document;
837
 
838
  $(iframe).load(function() {
839
- var maximumChecksAllowed = 100;
840
  var checkIndex = 0;
841
  var checkerInterval = setInterval(function() {
842
  if (checkIndex === maximumChecksAllowed) {
843
  clearInterval(checkerInterval);
844
 
845
  setTimeout(function() {
846
- iframe.height = $(iframeDoc.body).height();
847
- iframe.width = $(iframeDoc.body).width();
848
 
849
  $wrapper.attr('width', iframe.width);
850
  $wrapper.css('width', iframe.width + 'px');
851
- }, 250);
852
  } else {
853
  if (customAttributes.height) {
854
  iframe.height = customAttributes.height;
@@ -861,12 +875,12 @@
861
  iframe.width = customAttributes.width;
862
  iframe.style.width = customAttributes.width +'px';
863
  } else {
864
- iframe.width = $(iframeDoc.body).width();
865
  }
866
 
867
  checkIndex++;
868
  }
869
- }, 100);
870
  });
871
 
872
  iframeDoc.open();
@@ -893,7 +907,7 @@
893
  '}'+
894
  '</style>'+
895
  '</head>'+
896
- '<body id="wpview-iframe-sandbox" class="'+ self.editor.getBody().className +'" style="width: 100%; display: inline-block;">'+
897
  $content.html() +
898
  '</body>'+
899
  '</html>'
@@ -1125,6 +1139,12 @@
1125
  var previewWrapperOlderSibling = previewWrapper.prev();
1126
  if (previewWrapperOlderSibling && previewWrapperOlderSibling.prop('tagName') && previewWrapperOlderSibling.prop('tagName').toUpperCase() === "P" && !previewWrapperOlderSibling.html().replace(/\&nbsp\;/i, '').length) {
1127
  previewWrapperOlderSibling.remove();
 
 
 
 
 
 
1128
  }
1129
 
1130
  var previewWrapperYoungerSibling = previewWrapper.next();
@@ -1132,8 +1152,6 @@
1132
  if (!previewWrapperYoungerSibling.next().length && !previewWrapperYoungerSibling.html().replace(/\&nbsp\;/i, '').length) {
1133
  previewWrapperYoungerSibling.remove();
1134
  $('<p>&nbsp;</p>').insertAfter(previewWrapper);
1135
- } else {
1136
- previewWrapperYoungerSibling.remove();
1137
  }
1138
  } else {
1139
  $('<p>&nbsp;</p>').insertAfter(previewWrapper);
@@ -1313,6 +1331,7 @@
1313
  *
1314
  * @return void
1315
  */
 
1316
  self.onPaste = function(e, b) {
1317
  var urlPatternRegex = new RegExp(/(https?):\/\/([w]{3}\.)?.+?(?:\s|$)/i);
1318
 
@@ -1325,6 +1344,8 @@
1325
 
1326
  event.preventDefault();
1327
 
 
 
1328
  // Check for clipboard data in various places for cross-browser compatibility an get its data as text.
1329
  var rawContent = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
1330
 
@@ -1339,20 +1360,27 @@
1339
  // Check if the term into the current line is a url.
1340
  var match = term.match(urlPatternRegex);
1341
  if (match) {
1342
- // Isolates that url from the rest of the content.
1343
- return `</p><p>${match[0]}</p><p>`;
 
 
 
 
 
1344
  }
1345
 
1346
  return term;
1347
  });
1348
 
 
 
1349
  line = termsList.join(' ');
1350
  }
1351
 
1352
- return `${line}<br>`;
1353
  });
1354
 
1355
- var content = `<p>${contentLines.join('')}</p>`;
1356
 
1357
  // Insert the new content into the editor.
1358
  self.editor.execCommand('mceInsertContent', false, content);
1
  /**
2
  * @package EmbedPress
3
  * @author PressShack <help@pressshack.com>
4
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
5
  * @license GPLv2 or later
6
  * @since 1.0
7
  */
302
  * @return Object The editor
303
  */
304
  self.getEditor = function() {
305
+ if (!window.tinymce || !window.tinymce.editors || window.tinymce.editors.length === 0) {
306
  return null;
307
  }
308
 
309
+ if (!window.tinymce.editors.content) {
310
+ return null;
311
+ }
312
+
313
+ return window.tinymce.editors.content;
314
  };
315
 
316
  /**
605
  'docs.google.com/document/*',
606
  'docs.google.com/spreadsheets/*',
607
  'docs.google.com/forms/*',
608
+ 'docs.google.com/drawings/*',
609
+
610
+ // Twitch.tv
611
+ '*.twitch.tv/*',
612
+ 'twitch.tv/*',
613
+
614
+ // Giphy
615
+ '*.giphy.com/gifs/*',
616
+ 'giphy.com/gifs/*',
617
+ 'i.giphy.com/*',
618
+ 'gph.is/*'
619
  ],
620
  patterns = [];
621
 
838
  iframe.allowTransparency = 'true';
839
  iframe.scrolling = 'no';
840
  iframe.class = "wpview-sandbox";
841
+ iframe.style.width = (customAttributes.width ? customAttributes.width +'px' : '');
842
 
843
  dom.add(contentWrapper, iframe);
844
  var iframeWindow = iframe.contentWindow;
850
  var iframeDoc = iframeWindow.document;
851
 
852
  $(iframe).load(function() {
853
+ var maximumChecksAllowed = 8;
854
  var checkIndex = 0;
855
  var checkerInterval = setInterval(function() {
856
  if (checkIndex === maximumChecksAllowed) {
857
  clearInterval(checkerInterval);
858
 
859
  setTimeout(function() {
860
+ iframe.height = $(iframeWindow).height();
861
+ iframe.width = $(iframeWindow).width();
862
 
863
  $wrapper.attr('width', iframe.width);
864
  $wrapper.css('width', iframe.width + 'px');
865
+ }, 100);
866
  } else {
867
  if (customAttributes.height) {
868
  iframe.height = customAttributes.height;
875
  iframe.width = customAttributes.width;
876
  iframe.style.width = customAttributes.width +'px';
877
  } else {
878
+ iframe.width = $(iframeDoc).width();
879
  }
880
 
881
  checkIndex++;
882
  }
883
+ }, 250);
884
  });
885
 
886
  iframeDoc.open();
907
  '}'+
908
  '</style>'+
909
  '</head>'+
910
+ '<body id="wpview-iframe-sandbox" class="'+ self.editor.getBody().className +'" style="display: inline-block;">'+
911
  $content.html() +
912
  '</body>'+
913
  '</html>'
1139
  var previewWrapperOlderSibling = previewWrapper.prev();
1140
  if (previewWrapperOlderSibling && previewWrapperOlderSibling.prop('tagName') && previewWrapperOlderSibling.prop('tagName').toUpperCase() === "P" && !previewWrapperOlderSibling.html().replace(/\&nbsp\;/i, '').length) {
1141
  previewWrapperOlderSibling.remove();
1142
+ } else {
1143
+ if (previewWrapperOlderSibling.html().match(/<[\/]?br>/)) {
1144
+ if (!previewWrapperOlderSibling.prev().length) {
1145
+ previewWrapperOlderSibling.remove();
1146
+ }
1147
+ }
1148
  }
1149
 
1150
  var previewWrapperYoungerSibling = previewWrapper.next();
1152
  if (!previewWrapperYoungerSibling.next().length && !previewWrapperYoungerSibling.html().replace(/\&nbsp\;/i, '').length) {
1153
  previewWrapperYoungerSibling.remove();
1154
  $('<p>&nbsp;</p>').insertAfter(previewWrapper);
 
 
1155
  }
1156
  } else {
1157
  $('<p>&nbsp;</p>').insertAfter(previewWrapper);
1331
  *
1332
  * @return void
1333
  */
1334
+
1335
  self.onPaste = function(e, b) {
1336
  var urlPatternRegex = new RegExp(/(https?):\/\/([w]{3}\.)?.+?(?:\s|$)/i);
1337
 
1344
 
1345
  event.preventDefault();
1346
 
1347
+ var urlPatternsList = self.getProvidersURLPatterns();
1348
+
1349
  // Check for clipboard data in various places for cross-browser compatibility an get its data as text.
1350
  var rawContent = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
1351
 
1360
  // Check if the term into the current line is a url.
1361
  var match = term.match(urlPatternRegex);
1362
  if (match) {
1363
+ for (var urlPatternIndex = 0; urlPatternIndex < urlPatternsList.length; urlPatternIndex++) {
1364
+ // Isolates that url from the rest of the content if the service is supported.
1365
+ var urlPattern = new RegExp(urlPatternsList[urlPatternIndex]);
1366
+ if (urlPattern.test(term)) {
1367
+ return '</p><p>'+ match[0] +'</p><p>';
1368
+ }
1369
+ }
1370
  }
1371
 
1372
  return term;
1373
  });
1374
 
1375
+ termsList[termsList.length - 1] = termsList[termsList.length - 1] + '<br>';
1376
+
1377
  line = termsList.join(' ');
1378
  }
1379
 
1380
+ return line;
1381
  });
1382
 
1383
+ var content = '<p>'+ contentLines.join('') +'</p>';
1384
 
1385
  // Insert the new content into the editor.
1386
  self.editor.execCommand('mceInsertContent', false, content);
assets/js/vendor/bootbox.min.js CHANGED
File without changes
autoloader.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * @package EmbedPress
4
  * @author PressShack <help@pressshack.com>
5
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
6
  * @license GPLv2 or later
7
  * @since 1.0.0
8
  */
2
  /**
3
  * @package EmbedPress
4
  * @author PressShack <help@pressshack.com>
5
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
6
  * @license GPLv2 or later
7
  * @since 1.0.0
8
  */
changelog.txt CHANGED
@@ -1,4 +1,15 @@
1
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
2
  = 1.4.4 =
3
  Release Date: 2017-01-24
4
 
1
  == Changelog ==
2
+ = 1.5.0 =
3
+ Release Date: 2017-02-15
4
+
5
+ * Added support to embed Giphy URLs;
6
+ * Added support to embed Twitch streams & chat URLs;
7
+ * Fixed odd behavior with non-shortcoded embeddable URLs;
8
+ * Fixed bugs when having multiple editors in a single page;
9
+ * Updated copyright info;
10
+ * Updated Settings page layout;
11
+ * Code enhancements.
12
+
13
  = 1.4.4 =
14
  Release Date: 2017-01-24
15
 
embedpress.php CHANGED
@@ -2,17 +2,17 @@
2
  /**
3
  * EmbedPress plugin bootstrap file.
4
  *
5
- * @link http://pressshack.com/embedpress/
6
  * @package EmbedPress
7
  * @author PressShack <help@pressshack.com>
8
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
9
  * @license GPLv2 or later
10
  * @since 1.0.0
11
  *
12
  * @embedpress
13
  * Plugin Name: EmbedPress
14
- * Plugin URI: http://pressshack.com/embedpress/
15
- * Version: 1.4.4
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
2
  /**
3
  * EmbedPress plugin bootstrap file.
4
  *
5
+ * @link https://pressshack.com/embedpress/
6
  * @package EmbedPress
7
  * @author PressShack <help@pressshack.com>
8
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
9
  * @license GPLv2 or later
10
  * @since 1.0.0
11
  *
12
  * @embedpress
13
  * Plugin Name: EmbedPress
14
+ * Plugin URI: https://pressshack.com/embedpress/
15
+ * Version: 1.5.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
includes.php CHANGED
@@ -6,7 +6,7 @@ defined('ABSPATH') or die("No direct script access allowed.");
6
  *
7
  * @package EmbedPress
8
  * @author PressShack <help@pressshack.com>
9
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
10
  * @license GPLv2 or later
11
  * @since 1.0.0
12
  */
@@ -20,7 +20,7 @@ if (!defined('EMBEDPRESS_PLG_NAME')) {
20
  }
21
 
22
  if (!defined('EMBEDPRESS_PLG_VERSION')) {
23
- define('EMBEDPRESS_PLG_VERSION', "1.4.4");
24
  }
25
 
26
  if (!defined('EMBEDPRESS_PATH_BASE')) {
6
  *
7
  * @package EmbedPress
8
  * @author PressShack <help@pressshack.com>
9
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
10
  * @license GPLv2 or later
11
  * @since 1.0.0
12
  */
20
  }
21
 
22
  if (!defined('EMBEDPRESS_PLG_VERSION')) {
23
+ define('EMBEDPRESS_PLG_VERSION', "1.5.0");
24
  }
25
 
26
  if (!defined('EMBEDPRESS_PATH_BASE')) {
providers.php CHANGED
@@ -9,12 +9,14 @@
9
  *
10
  * @package EmbedPress
11
  * @author PressShack <help@pressshack.com>
12
- * @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved.
13
  * @license GPLv2 or later
14
  * @since 1.0.0
15
  */
16
 
17
  $additionalServiceProviders = array(
18
  'GoogleMaps' => array("google.com", "google.com.*", "maps.google.com", "goo.gl"),
19
- 'GoogleDocs' => array("docs.google.com")
 
 
20
  );
9
  *
10
  * @package EmbedPress
11
  * @author PressShack <help@pressshack.com>
12
+ * @copyright Copyright (C) 2017 Open Source Training, LLC. All rights reserved.
13
  * @license GPLv2 or later
14
  * @since 1.0.0
15
  */
16
 
17
  $additionalServiceProviders = array(
18
  'GoogleMaps' => array("google.com", "google.com.*", "maps.google.com", "goo.gl"),
19
+ 'GoogleDocs' => array("docs.google.com"),
20
+ 'Twitch' => array("twitch.tv"),
21
+ 'Giphy' => array("giphy.com", "i.giphy.com")
22
  );
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === EmbedPress ===
2
  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.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -16,72 +16,74 @@ We’re starting with Facebook, Google, UStream and more. All you need is the UR
16
 
17
  In addition to the default WordPress sources, EmbedPress supports these providers:
18
 
19
- - [23hq](http://pressshack.com/embedpress/docs/embed-23hq-photos-wordpress/) <em>(Images)</em>
20
- - [AmCharts](http://pressshack.com/embedpress/docs/embed-amcharts-wordpress/) <em>(Charts)</em>
21
- - [Animoto](http://pressshack.com/embedpress/docs/embed-animoto-videos-wordpress/) <em>(Videos)</em>
22
- - [Bambuser](http://pressshack.com/embedpress/docs/embed-bambuser-videos-wordpress/) <em>(Videos)</em>
23
- - [Cacoo](http://pressshack.com/embedpress/docs/embed-cacoo-charts-wordpress/) <em>(Charts)</em>
24
- - [ChartBlocks](http://pressshack.com/embedpress/docs/embed-chartblocks-charts-wordpress/) <em>(Charts)</em>
25
- - [Chirbit](http://pressshack.com/embedpress/docs/embed-chirbit-audio-wordpress/) <em>(Audio)</em>
26
- - [Clyp](http://pressshack.com/embedpress/docs/embed-clypit-audio-wordpress/) <em>(Audio)</em>
27
- - [CircuitLab](http://pressshack.com/embedpress/docs/embed-circuitlab-circuit-wordpress/) <em>(Charts)</em>
28
- - [Cloudup](http://pressshack.com/embedpress/docs/embed-cloudup-videos-images-or-audios-wordpress/) <em>(Videos, Galleries, Images)</em>
29
- - [College Humor](http://pressshack.com/embedpress/docs/embed-collegehumor-videos-wordpress/) <em>(Videos)</em>
30
- - [Coub](http://pressshack.com/embedpress/docs/embed-coub-videos-iwordpress/) <em>(Videos)</em>
31
- - [Crowd Raniking](http://pressshack.com/embedpress/docs/embed-crowdranking-polls-wordpress/) <em>(Videos)</em>
32
- - [Daily Mile](http://pressshack.com/embedpress/docs/embed-dailymile-activity-wordpress/) <em>(Activity)</em>
33
- - [Daily Motion](http://pressshack.com/embedpress/docs/embed-dailymotion-videos-wordpress/) <em>(Videos)</em>
34
- - [Deviantart](http://pressshack.com/embedpress/docs/embed-deviantart-image-wordpress/) <em>(Images)</em>
35
- - [Dotsub](http://pressshack.com/embedpress/docs/embed-dotsub-videos-wordpress/) <em>(Videos)</em>
36
- - [Facebook](http://pressshack.com/embedpress/docs/embed-facebook-posts-wordpress/) <em>(Posts)</em>
37
- - [Flickr](http://pressshack.com/embedpress/docs/embed-flickr-image-wordpress/) <em>(Images)</em>
38
- - [Funny or Die](http://pressshack.com/embedpress/docs/embed-funnyordie-videos-wordpress/) <em>(Videos)</em>
39
- - [GettyImages](http://pressshack.com/embedpress/docs/embed-getty-images-wordpress/) <em>(Images)</em>
40
- - [Github Gist](http://pressshack.com/embedpress/docs/embed-github-gist-snippets-wordpress/) <em>(Code)</em>
41
- - [Google Docs](http://pressshack.com/embedpress/docs/google-docs-embed-wordpress/) <em>(Documents)</em>
42
- - [Google Maps](http://pressshack.com/embedpress/docs/google-maps-embed-wordpress/) <em>(Maps)</em>
43
- - [Google Drawings](http://pressshack.com/embedpress/docs/google-drawings-embed-wordpress/) <em>(Drawings)</em>
44
- - [Google Sheets](http://pressshack.com/embedpress/docs/embed-google-sheets-wordpress/) <em>(Spreadsheets)</em>
45
- - [Google Slides](http://pressshack.com/embedpress/docs/embed-google-slides-wordpress/) <em>(Presentations)</em>
46
- - [HuffDuffer](http://pressshack.com/embedpress/docs/embed-huffduffer-audios-wordpress/) <em>(Audio)</em>
47
- - [Hulu](http://pressshack.com/embedpress/docs/embed-hulu-videos-wordpress/) <em>(Videos)</em>
48
- - [Imgur](http://pressshack.com/embedpress/docs/embed-imgur-images-wordpress/) <em>(Videos)</em>
49
- - [Infogram](http://pressshack.com/embedpress/docs/embed-infogram-charts-wordpress/) <em>(Charts)</em>
50
- - [Instagram](http://pressshack.com/embedpress/docs/embed-instagram-wordpress/) <em>(Images)</em>
51
- - [Issuu](http://pressshack.com/embedpress/docs/embed-issuu-documents-wordpress/) <em>(Documents)</em>
52
- - [Kickstarter](http://pressshack.com/embedpress/docs/embed-kickstarter-videos-wordpress/) <em>(Videos)</em>
53
- - [Meetup](http://pressshack.com/embedpress/docs/embed-meetup-groups-events-wordpress/) <em>(Groups, Events)</em>
54
- - [Mixcloud](http://pressshack.com/embedpress/docs/embed-mixcloud-audio-wordpress/) <em>(Audio)</em>
55
- - [MobyPicture](http://pressshack.com/embedpress/docs/embed-mobypicture-photos-wordpress/) <em>(Image)</em>
56
- - [NFB](http://pressshack.com/embedpress/docs/embed-nfb-videos-wordpress/) <em>(Videos)</em>
57
- - [PhotoBucket](http://pressshack.com/embedpress/docs/embed-photobucket-images-wordpress/) <em>(Images)</em>
58
- - [PollDaddy](http://pressshack.com/embedpress/docs/polldaddy-embed-wordpress/) <em>(Polls, Surveys, Quizzes)</em>
59
- - [Porfolium](http://pressshack.com/embedpress/docs/embed-portfolium-projects-wordpress/) <em>(Projects)</em>
60
- - [Reddit](http://pressshack.com/embedpress/docs/embed-reddit-post-wordpress/) <em>(Posts, Comments)</em>
61
- - [ReleaseWire](http://pressshack.com/embedpress/docs/embed-releasewire-press-releases-wordpress/) <em>(Press releases)</em>
62
- - [ReverbNation](http://pressshack.com/embedpress/docs/embed-reverbnation-audio-wordpress/) <em>(Audio)</em>
63
- - [RoomShare](http://pressshack.com/embedpress/docs/embed-roomshare-listings-wordpress/) <em>(Listings in Japanese)</em>
64
- - [RuTube](http://pressshack.com/embedpress/docs/embed-rutube-videos-wordpress/) (Videos in Russian)</em>
65
- - [Sapo Videos](http://pressshack.com/embedpress/docs/embed-sapo-videos-wordpress/) <em>(Videos in Spanish)</em>
66
- - [Scribd](http://pressshack.com/embedpress/docs/embed-scribd-document-wordpress/) <em>(Documents)</em>
67
- - [Shoudio](http://pressshack.com/embedpress/docs/embed-shoudio-audios-wordpress/) <em>(Audio)</em>
68
- - [ShortNote](http://pressshack.com/embedpress/docs/embed-shortnote-notes-wordpress/) <em>(Notes in Japanese)</em>
69
- - [Sketchfab](http://pressshack.com/embedpress/docs/embed-sketchfab-drawings-wordpress/) <em>(Drawings)</em>
70
- - [SlideShare](http://pressshack.com/embedpress/docs/embed-slideshare-presentations-wordpress/) <em>(Presentations)</em>
71
- - [SmugMug](http://pressshack.com/embedpress/docs/embed-smugmug-images-wordpress/) <em>(Images)</em>
72
- - [SoundCloud](http://pressshack.com/embedpress/docs/embed-soundcloud-audio-wordpress/) <em>(Audio)</em>
73
- - [SpeakerDeck](http://pressshack.com/embedpress/docs/embed-speakerdeck-presentations-wordpress/) <em>(Presentations)</em>
74
- - [Spotify](http://pressshack.com/embedpress/docs/embed-spotify-audios-wordpress/) <em>(Audio)</em>
75
- - [TED](http://pressshack.com/embedpress/docs/embed-ted-videos-wordpress/) <em>(Videos)</em>
76
- - [Twitter](http://pressshack.com/embedpress/docs/embed-twitter-tweets-collections-moments-wordpress/) <em>(Tweets, Collections, Moments)</em>
77
- - [Ustream](http://pressshack.com/embedpress/docs/embed-ustream-videos-wordpress/) <em>(Videos)</em>
78
- - [Viddler](http://pressshack.com/embedpress/docs/embed-viddler-videos-wordpress/) <em>(Videos)</em>
79
- - [VideoJug](http://pressshack.com/embedpress/docs/embed-videojug-videos-wordpress/) <em>(Videos)</em>
80
- - [VideoPress](http://pressshack.com/embedpress/docs/embed-videopress-videos-wordpress/) <em>(Videos)</em>
81
- - [Vimeo](http://pressshack.com/embedpress/docs/embed-vimeo-video-wordpress/) <em>(Videos)</em>
82
- - [Vine](http://pressshack.com/embedpress/docs/embed-vine-videos-wordpress/) <em>(Videos)</em>
83
- - [WordPress.tv](http://pressshack.com/embedpress/docs/embed-wordpress-tv-videos-wordpress/) <em>(Videos)</em>
84
- - [YouTube](http://pressshack.com/embedpress/docs/youtube-wordpress/) <em>(Videos)</em>
 
 
85
 
86
  == Installation ==
87
  There're two ways to install EmbedPress plugin:
@@ -119,6 +121,17 @@ There're two ways to install EmbedPress plugin:
119
  `
120
 
121
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
122
  = 1.4.4 =
123
  Release Date: 2017-01-24
124
 
1
  === EmbedPress ===
2
  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, giphy, 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, twitch tv
4
  Requires at least: 4.0
5
  Tested up to: 4.7
6
+ Stable tag: 1.5.0
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
16
 
17
  In addition to the default WordPress sources, EmbedPress supports these providers:
18
 
19
+ - [23hq](https://pressshack.com/embedpress/docs/embed-23hq-photos-wordpress/) <em>(Images)</em>
20
+ - [AmCharts](https://pressshack.com/embedpress/docs/embed-amcharts-wordpress/) <em>(Charts)</em>
21
+ - [Animoto](https://pressshack.com/embedpress/docs/embed-animoto-videos-wordpress/) <em>(Videos)</em>
22
+ - [Bambuser](https://pressshack.com/embedpress/docs/embed-bambuser-videos-wordpress/) <em>(Videos)</em>
23
+ - [Cacoo](https://pressshack.com/embedpress/docs/embed-cacoo-charts-wordpress/) <em>(Charts)</em>
24
+ - [ChartBlocks](https://pressshack.com/embedpress/docs/embed-chartblocks-charts-wordpress/) <em>(Charts)</em>
25
+ - [Chirbit](https://pressshack.com/embedpress/docs/embed-chirbit-audio-wordpress/) <em>(Audio)</em>
26
+ - [Clyp](https://pressshack.com/embedpress/docs/embed-clypit-audio-wordpress/) <em>(Audio)</em>
27
+ - [CircuitLab](https://pressshack.com/embedpress/docs/embed-circuitlab-circuit-wordpress/) <em>(Charts)</em>
28
+ - [Cloudup](https://pressshack.com/embedpress/docs/embed-cloudup-videos-images-or-audios-wordpress/) <em>(Videos, Galleries, Images)</em>
29
+ - [College Humor](https://pressshack.com/embedpress/docs/embed-collegehumor-videos-wordpress/) <em>(Videos)</em>
30
+ - [Coub](https://pressshack.com/embedpress/docs/embed-coub-videos-iwordpress/) <em>(Videos)</em>
31
+ - [Crowd Raniking](https://pressshack.com/embedpress/docs/embed-crowdranking-polls-wordpress/) <em>(Videos)</em>
32
+ - [Daily Mile](https://pressshack.com/embedpress/docs/embed-dailymile-activity-wordpress/) <em>(Activity)</em>
33
+ - [Daily Motion](https://pressshack.com/embedpress/docs/embed-dailymotion-videos-wordpress/) <em>(Videos)</em>
34
+ - [Deviantart](https://pressshack.com/embedpress/docs/embed-deviantart-image-wordpress/) <em>(Images)</em>
35
+ - [Dotsub](https://pressshack.com/embedpress/docs/embed-dotsub-videos-wordpress/) <em>(Videos)</em>
36
+ - [Facebook](https://pressshack.com/embedpress/docs/embed-facebook-posts-wordpress/) <em>(Posts)</em>
37
+ - [Flickr](https://pressshack.com/embedpress/docs/embed-flickr-image-wordpress/) <em>(Images)</em>
38
+ - [Funny or Die](https://pressshack.com/embedpress/docs/embed-funnyordie-videos-wordpress/) <em>(Videos)</em>
39
+ - [GettyImages](https://pressshack.com/embedpress/docs/embed-getty-images-wordpress/) <em>(Images)</em>
40
+ - [Giphy](https://pressshack.com/embedpress/docs/embed-giphy-gifs-wordpress/) <em>(Gifs)</em>
41
+ - [Github Gist](https://pressshack.com/embedpress/docs/embed-github-gist-snippets-wordpress/) <em>(Code)</em>
42
+ - [Google Docs](https://pressshack.com/embedpress/docs/google-docs-embed-wordpress/) <em>(Documents)</em>
43
+ - [Google Maps](https://pressshack.com/embedpress/docs/google-maps-embed-wordpress/) <em>(Maps)</em>
44
+ - [Google Drawings](https://pressshack.com/embedpress/docs/google-drawings-embed-wordpress/) <em>(Drawings)</em>
45
+ - [Google Sheets](https://pressshack.com/embedpress/docs/embed-google-sheets-wordpress/) <em>(Spreadsheets)</em>
46
+ - [Google Slides](https://pressshack.com/embedpress/docs/embed-google-slides-wordpress/) <em>(Presentations)</em>
47
+ - [HuffDuffer](https://pressshack.com/embedpress/docs/embed-huffduffer-audios-wordpress/) <em>(Audio)</em>
48
+ - [Hulu](https://pressshack.com/embedpress/docs/embed-hulu-videos-wordpress/) <em>(Videos)</em>
49
+ - [Imgur](https://pressshack.com/embedpress/docs/embed-imgur-images-wordpress/) <em>(Videos)</em>
50
+ - [Infogram](https://pressshack.com/embedpress/docs/embed-infogram-charts-wordpress/) <em>(Charts)</em>
51
+ - [Instagram](https://pressshack.com/embedpress/docs/embed-instagram-wordpress/) <em>(Images)</em>
52
+ - [Issuu](https://pressshack.com/embedpress/docs/embed-issuu-documents-wordpress/) <em>(Documents)</em>
53
+ - [Kickstarter](https://pressshack.com/embedpress/docs/embed-kickstarter-videos-wordpress/) <em>(Videos)</em>
54
+ - [Meetup](https://pressshack.com/embedpress/docs/embed-meetup-groups-events-wordpress/) <em>(Groups, Events)</em>
55
+ - [Mixcloud](https://pressshack.com/embedpress/docs/embed-mixcloud-audio-wordpress/) <em>(Audio)</em>
56
+ - [MobyPicture](https://pressshack.com/embedpress/docs/embed-mobypicture-photos-wordpress/) <em>(Image)</em>
57
+ - [NFB](https://pressshack.com/embedpress/docs/embed-nfb-videos-wordpress/) <em>(Videos)</em>
58
+ - [PhotoBucket](https://pressshack.com/embedpress/docs/embed-photobucket-images-wordpress/) <em>(Images)</em>
59
+ - [PollDaddy](https://pressshack.com/embedpress/docs/polldaddy-embed-wordpress/) <em>(Polls, Surveys, Quizzes)</em>
60
+ - [Porfolium](https://pressshack.com/embedpress/docs/embed-portfolium-projects-wordpress/) <em>(Projects)</em>
61
+ - [Reddit](https://pressshack.com/embedpress/docs/embed-reddit-post-wordpress/) <em>(Posts, Comments)</em>
62
+ - [ReleaseWire](https://pressshack.com/embedpress/docs/embed-releasewire-press-releases-wordpress/) <em>(Press releases)</em>
63
+ - [ReverbNation](https://pressshack.com/embedpress/docs/embed-reverbnation-audio-wordpress/) <em>(Audio)</em>
64
+ - [RoomShare](https://pressshack.com/embedpress/docs/embed-roomshare-listings-wordpress/) <em>(Listings in Japanese)</em>
65
+ - [RuTube](https://pressshack.com/embedpress/docs/embed-rutube-videos-wordpress/) (Videos in Russian)</em>
66
+ - [Sapo Videos](https://pressshack.com/embedpress/docs/embed-sapo-videos-wordpress/) <em>(Videos in Spanish)</em>
67
+ - [Scribd](https://pressshack.com/embedpress/docs/embed-scribd-document-wordpress/) <em>(Documents)</em>
68
+ - [Shoudio](https://pressshack.com/embedpress/docs/embed-shoudio-audios-wordpress/) <em>(Audio)</em>
69
+ - [ShortNote](https://pressshack.com/embedpress/docs/embed-shortnote-notes-wordpress/) <em>(Notes in Japanese)</em>
70
+ - [Sketchfab](https://pressshack.com/embedpress/docs/embed-sketchfab-drawings-wordpress/) <em>(Drawings)</em>
71
+ - [SlideShare](https://pressshack.com/embedpress/docs/embed-slideshare-presentations-wordpress/) <em>(Presentations)</em>
72
+ - [SmugMug](https://pressshack.com/embedpress/docs/embed-smugmug-images-wordpress/) <em>(Images)</em>
73
+ - [SoundCloud](https://pressshack.com/embedpress/docs/embed-soundcloud-audio-wordpress/) <em>(Audio)</em>
74
+ - [SpeakerDeck](https://pressshack.com/embedpress/docs/embed-speakerdeck-presentations-wordpress/) <em>(Presentations)</em>
75
+ - [Spotify](https://pressshack.com/embedpress/docs/embed-spotify-audios-wordpress/) <em>(Audio)</em>
76
+ - [TED](https://pressshack.com/embedpress/docs/embed-ted-videos-wordpress/) <em>(Videos)</em>
77
+ - [Twitch](https://pressshack.com/embedpress/docs/embed-twitch-streams-chat/) <em>(Videos, Chat)</em>
78
+ - [Twitter](https://pressshack.com/embedpress/docs/embed-twitter-tweets-collections-moments-wordpress/) <em>(Tweets, Collections, Moments)</em>
79
+ - [Ustream](https://pressshack.com/embedpress/docs/embed-ustream-videos-wordpress/) <em>(Videos)</em>
80
+ - [Viddler](https://pressshack.com/embedpress/docs/embed-viddler-videos-wordpress/) <em>(Videos)</em>
81
+ - [VideoJug](https://pressshack.com/embedpress/docs/embed-videojug-videos-wordpress/) <em>(Videos)</em>
82
+ - [VideoPress](https://pressshack.com/embedpress/docs/embed-videopress-videos-wordpress/) <em>(Videos)</em>
83
+ - [Vimeo](https://pressshack.com/embedpress/docs/embed-vimeo-video-wordpress/) <em>(Videos)</em>
84
+ - [Vine](https://pressshack.com/embedpress/docs/embed-vine-videos-wordpress/) <em>(Videos)</em>
85
+ - [WordPress.tv](https://pressshack.com/embedpress/docs/embed-wordpress-tv-videos-wordpress/) <em>(Videos)</em>
86
+ - [YouTube](https://pressshack.com/embedpress/docs/youtube-wordpress/) <em>(Videos)</em>
87
 
88
  == Installation ==
89
  There're two ways to install EmbedPress plugin:
121
  `
122
 
123
  == Changelog ==
124
+ = 1.5.0 =
125
+ Release Date: 2017-02-15
126
+
127
+ * Added support to embed Giphy URLs;
128
+ * Added support to embed Twitch streams & chat URLs;
129
+ * Fixed odd behavior with non-shortcoded embeddable URLs;
130
+ * Fixed bugs when having multiple editors in a single page;
131
+ * Updated copyright info;
132
+ * Updated Settings page layout;
133
+ * Code enhancements.
134
+
135
  = 1.4.4 =
136
  Release Date: 2017-01-24
137