Version Description
Release Date: 2016-11-04
- Enhanced Crowd Ranking url detection;
- Ability to force a different language into Facebook embeds via settings page;
- Minor CSS fixes and enhancements;
- Fixed stylesheet conflicting with some other plugins;
- Fixed a lot of bugs with Facebook urls;
- Fixed bug where the embed controllers were not appearing to some serivce providers;
- Fixed a lot of bugs with GettyImage urls;
- Fixed a lot of bugs with Github Gist urls;
- Fixed a lot of bugs with VideoJug urls;
- Fixed a lot of bugs with NFB urls;
- Fixed bug where the editor was treating non-embeddable urls as normal embeds;
- Fixed bug where nbsp; were added before and after the embed every time the user switch from Visual to Text mode;
- Dropped support to Edocr due to embed inconsistency;
- Dropped support to Aol On Videos.
Download this release
Release Info
Developer | pressshack |
Plugin | EmbedPress – Embed Google Docs, YouTube, Maps, Vimeo, Wistia Videos & Upload PDF, PPT in Gutenberg & Elementor |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.0 to 1.3.0
- EmbedPress/AutoLoader.php +0 -0
- EmbedPress/Disabler.php +0 -0
- EmbedPress/Ends/Back/Handler.php +0 -3
- EmbedPress/Ends/Back/Settings.php +190 -1
- EmbedPress/Ends/Front/Handler.php +0 -0
- EmbedPress/Ends/Handler.php +0 -0
- EmbedPress/Loader.php +0 -0
- EmbedPress/Plugin.php +0 -0
- EmbedPress/Providers/GoogleDocs.php +0 -0
- EmbedPress/Providers/GoogleMaps.php +0 -0
- EmbedPress/Providers/index.html +0 -0
- EmbedPress/Shortcode.php +32 -2
- PROVIDERS.md +0 -2
- assets/css/embedpress.css +1 -1
- assets/css/font.css +0 -0
- assets/css/preview.css +1 -0
- assets/css/vendor/bootstrap/bootstrap.css.map +0 -0
- assets/js/preview.js +98 -49
- assets/js/vendor/bootbox.min.js +0 -0
- autoloader.php +0 -0
- changelog.txt +18 -0
- embedpress.php +1 -1
- includes.php +1 -1
- library/ostraining/embera/Lib/Embera/Providers/GithubGist.php +4 -4
- providers.php +0 -0
- readme.txt +20 -4
EmbedPress/AutoLoader.php
CHANGED
File without changes
|
EmbedPress/Disabler.php
CHANGED
File without changes
|
EmbedPress/Ends/Back/Handler.php
CHANGED
@@ -57,9 +57,6 @@ class Handler extends EndHandlerAbstract
|
|
57 |
public function enqueueStyles()
|
58 |
{
|
59 |
global $wp_scripts;
|
60 |
-
|
61 |
-
wp_enqueue_style('bootbox-bootstrap', EMBEDPRESS_URL_ASSETS .'css/vendor/bootstrap/bootstrap.min.css');
|
62 |
-
wp_enqueue_style($this->pluginName, EMBEDPRESS_URL_ASSETS .'css/preview.css');
|
63 |
}
|
64 |
|
65 |
/**
|
57 |
public function enqueueStyles()
|
58 |
{
|
59 |
global $wp_scripts;
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
/**
|
EmbedPress/Ends/Back/Settings.php
CHANGED
@@ -78,6 +78,10 @@ class Settings
|
|
78 |
'displayPreviewBox' => array(
|
79 |
'label' => "Display Preview Box inside editor",
|
80 |
'section' => "admin"
|
|
|
|
|
|
|
|
|
81 |
)
|
82 |
);
|
83 |
|
@@ -160,7 +164,8 @@ class Settings
|
|
160 |
{
|
161 |
$data = array(
|
162 |
'displayPreviewBox' => (bool)$freshData['displayPreviewBox'],
|
163 |
-
'enablePluginInAdmin' => (bool)$freshData['enablePluginInAdmin']
|
|
|
164 |
);
|
165 |
|
166 |
return $data;
|
@@ -222,4 +227,188 @@ class Settings
|
|
222 |
echo " ";
|
223 |
echo '<label><input type="radio" id="'. $fieldName .'_1" name="'. self::$sectionGroupIdentifier .'['. $fieldName .']" value="1" '. ($options[$fieldName] ? "checked" : "") .' /> Yes</label>';
|
224 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
78 |
'displayPreviewBox' => array(
|
79 |
'label' => "Display Preview Box inside editor",
|
80 |
'section' => "admin"
|
81 |
+
),
|
82 |
+
'forceFacebookLanguage' => array(
|
83 |
+
'label' => "Display Facebook embeds in a different language",
|
84 |
+
'section' => "admin"
|
85 |
)
|
86 |
);
|
87 |
|
164 |
{
|
165 |
$data = array(
|
166 |
'displayPreviewBox' => (bool)$freshData['displayPreviewBox'],
|
167 |
+
'enablePluginInAdmin' => (bool)$freshData['enablePluginInAdmin'],
|
168 |
+
'fbLanguage' => $freshData['fbLanguage']
|
169 |
);
|
170 |
|
171 |
return $data;
|
227 |
echo " ";
|
228 |
echo '<label><input type="radio" id="'. $fieldName .'_1" name="'. self::$sectionGroupIdentifier .'['. $fieldName .']" value="1" '. ($options[$fieldName] ? "checked" : "") .' /> Yes</label>';
|
229 |
}
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Method that renders the forceFacebookLanguage input.
|
233 |
+
*
|
234 |
+
* @since 1.3.0
|
235 |
+
* @static
|
236 |
+
*/
|
237 |
+
public static function renderField_forceFacebookLanguage()
|
238 |
+
{
|
239 |
+
$fieldName = "fbLanguage";
|
240 |
+
|
241 |
+
$options = get_option(self::$sectionGroupIdentifier);
|
242 |
+
|
243 |
+
$options[$fieldName] = !isset($options[$fieldName]) ? "" : $options[$fieldName];
|
244 |
+
|
245 |
+
$facebookLocales = self::getFacebookAvailableLocales();
|
246 |
+
|
247 |
+
echo '<select name="'. self::$sectionGroupIdentifier .'['. $fieldName .']">';
|
248 |
+
echo '<option value="0">Automatic (by Facebook)</option>';
|
249 |
+
echo '<optgroup label="Available">';
|
250 |
+
foreach ($facebookLocales as $locale => $localeName) {
|
251 |
+
echo '<option value="'. $locale .'"'. ($options[$fieldName] === $locale ? ' selected' : '') .'>'. $localeName .'</option>';
|
252 |
+
}
|
253 |
+
echo '</optgroup>';
|
254 |
+
echo '</select>';
|
255 |
+
}
|
256 |
+
|
257 |
+
/**
|
258 |
+
* Returns a list of locales that can be used on Facebook embeds.
|
259 |
+
*
|
260 |
+
* @since 1.3.0
|
261 |
+
* @static
|
262 |
+
*
|
263 |
+
* @return array
|
264 |
+
*/
|
265 |
+
public static function getFacebookAvailableLocales()
|
266 |
+
{
|
267 |
+
$locales = array(
|
268 |
+
'af_ZA' => "Afrikaans",
|
269 |
+
'ak_GH' => "Akan",
|
270 |
+
'am_ET' => "Amharic",
|
271 |
+
'ar_AR' => "Arabic",
|
272 |
+
'as_IN' => "Assamese",
|
273 |
+
'ay_BO' => "Aymara",
|
274 |
+
'az_AZ' => "Azerbaijani",
|
275 |
+
'be_BY' => "Belarusian",
|
276 |
+
'bg_BG' => "Bulgarian",
|
277 |
+
'bn_IN' => "Bengali",
|
278 |
+
'br_FR' => "Breton",
|
279 |
+
'bs_BA' => "Bosnian",
|
280 |
+
'ca_ES' => "Catalan",
|
281 |
+
'cb_IQ' => "Sorani Kurdish",
|
282 |
+
'ck_US' => "Cherokee",
|
283 |
+
'co_FR' => "Corsican",
|
284 |
+
'cs_CZ' => "Czech",
|
285 |
+
'cx_PH' => "Cebuano",
|
286 |
+
'cy_GB' => "Welsh",
|
287 |
+
'da_DK' => "Danish",
|
288 |
+
'de_DE' => "German",
|
289 |
+
'el_GR' => "Greek",
|
290 |
+
'en_GB' => "English (UK)",
|
291 |
+
'en_IN' => "English (India)",
|
292 |
+
'en_PI' => "English (Pirate)",
|
293 |
+
'en_UD' => "English (Upside Down)",
|
294 |
+
'en_US' => "English (US)",
|
295 |
+
'eo_EO' => "Esperanto",
|
296 |
+
'es_CL' => "Spanish (Chile)",
|
297 |
+
'es_CO' => "Spanish (Colombia)",
|
298 |
+
'es_ES' => "Spanish (Spain)",
|
299 |
+
'es_LA' => "Spanish",
|
300 |
+
'es_MX' => "Spanish (Mexico)",
|
301 |
+
'es_VE' => "Spanish (Venezuela)",
|
302 |
+
'et_EE' => "Estonian",
|
303 |
+
'eu_ES' => "Basque",
|
304 |
+
'fa_IR' => "Persian",
|
305 |
+
'fb_LT' => "Leet Speak",
|
306 |
+
'ff_NG' => "Fulah",
|
307 |
+
'fi_FI' => "Finnish",
|
308 |
+
'fo_FO' => "Faroese",
|
309 |
+
'fr_CA' => "French (Canada)",
|
310 |
+
'fr_FR' => "French (France)",
|
311 |
+
'fy_NL' => "Frisian",
|
312 |
+
'ga_IE' => "Irish",
|
313 |
+
'gl_ES' => "Galician",
|
314 |
+
'gn_PY' => "Guarani",
|
315 |
+
'gu_IN' => "Gujarati",
|
316 |
+
'gx_GR' => "Classical Greek",
|
317 |
+
'ha_NG' => "Hausa",
|
318 |
+
'he_IL' => "Hebrew",
|
319 |
+
'hi_IN' => "Hindi",
|
320 |
+
'hr_HR' => "Croatian",
|
321 |
+
'ht_HT' => "Haitian Creole",
|
322 |
+
'hu_HU' => "Hungarian",
|
323 |
+
'hy_AM' => "Armenian",
|
324 |
+
'id_ID' => "Indonesian",
|
325 |
+
'ig_NG' => "Igbo",
|
326 |
+
'is_IS' => "Icelandic",
|
327 |
+
'it_IT' => "Italian",
|
328 |
+
'ja_JP' => "Japanese",
|
329 |
+
'ja_KS' => "Japanese (Kansai)",
|
330 |
+
'jv_ID' => "Javanese",
|
331 |
+
'ka_GE' => "Georgian",
|
332 |
+
'kk_KZ' => "Kazakh",
|
333 |
+
'km_KH' => "Khmer",
|
334 |
+
'kn_IN' => "Kannada",
|
335 |
+
'ko_KR' => "Korean",
|
336 |
+
'ku_TR' => "Kurdish (Kurmanji)",
|
337 |
+
'ky_KG' => "Kyrgyz",
|
338 |
+
'la_VA' => "Latin",
|
339 |
+
'lg_UG' => "Ganda",
|
340 |
+
'li_NL' => "Limburgish",
|
341 |
+
'ln_CD' => "Lingala",
|
342 |
+
'lo_LA' => "Lao",
|
343 |
+
'lt_LT' => "Lithuanian",
|
344 |
+
'lv_LV' => "Latvian",
|
345 |
+
'mg_MG' => "Malagasy",
|
346 |
+
'mi_NZ' => "Māori",
|
347 |
+
'mk_MK' => "Macedonian",
|
348 |
+
'ml_IN' => "Malayalam",
|
349 |
+
'mn_MN' => "Mongolian",
|
350 |
+
'mr_IN' => "Marathi",
|
351 |
+
'ms_MY' => "Malay",
|
352 |
+
'mt_MT' => "Maltese",
|
353 |
+
'my_MM' => "Burmese",
|
354 |
+
'nb_NO' => "Norwegian (bokmal)",
|
355 |
+
'nd_ZW' => "Ndebele",
|
356 |
+
'ne_NP' => "Nepali",
|
357 |
+
'nl_BE' => "Dutch (België)",
|
358 |
+
'nl_NL' => "Dutch",
|
359 |
+
'nn_NO' => "Norwegian (nynorsk)",
|
360 |
+
'ny_MW' => "Chewa",
|
361 |
+
'or_IN' => "Oriya",
|
362 |
+
'pa_IN' => "Punjabi",
|
363 |
+
'pl_PL' => "Polish",
|
364 |
+
'ps_AF' => "Pashto",
|
365 |
+
'pt_BR' => "Portuguese (Brazil)",
|
366 |
+
'pt_PT' => "Portuguese (Portugal)",
|
367 |
+
'qc_GT' => "Quiché",
|
368 |
+
'qu_PE' => "Quechua",
|
369 |
+
'rm_CH' => "Romansh",
|
370 |
+
'ro_RO' => "Romanian",
|
371 |
+
'ru_RU' => "Russian",
|
372 |
+
'rw_RW' => "Kinyarwanda",
|
373 |
+
'sa_IN' => "Sanskrit",
|
374 |
+
'sc_IT' => "Sardinian",
|
375 |
+
'se_NO' => "Northern Sámi",
|
376 |
+
'si_LK' => "Sinhala",
|
377 |
+
'sk_SK' => "Slovak",
|
378 |
+
'sl_SI' => "Slovenian",
|
379 |
+
'sn_ZW' => "Shona",
|
380 |
+
'so_SO' => "Somali",
|
381 |
+
'sq_AL' => "Albanian",
|
382 |
+
'sr_RS' => "Serbian",
|
383 |
+
'sv_SE' => "Swedish",
|
384 |
+
'sw_KE' => "Swahili",
|
385 |
+
'sy_SY' => "Syriac",
|
386 |
+
'sz_PL' => "Silesian",
|
387 |
+
'ta_IN' => "Tamil",
|
388 |
+
'te_IN' => "Telugu",
|
389 |
+
'tg_TJ' => "Tajik",
|
390 |
+
'th_TH' => "Thai",
|
391 |
+
'tk_TM' => "Turkmen",
|
392 |
+
'tl_PH' => "Filipino",
|
393 |
+
'tl_ST' => "Klingon",
|
394 |
+
'tr_TR' => "Turkish",
|
395 |
+
'tt_RU' => "Tatar",
|
396 |
+
'tz_MA' => "Tamazight",
|
397 |
+
'uk_UA' => "Ukrainian",
|
398 |
+
'ur_PK' => "Urdu",
|
399 |
+
'uz_UZ' => "Uzbek",
|
400 |
+
'vi_VN' => "Vietnamese",
|
401 |
+
'wo_SN' => "Wolof",
|
402 |
+
'xh_ZA' => "Xhosa",
|
403 |
+
'yi_DE' => "Yiddish",
|
404 |
+
'yo_NG' => "Yoruba",
|
405 |
+
'zh_CN' => "Simplified Chinese (China)",
|
406 |
+
'zh_HK' => "Traditional Chinese (Hong Kong)",
|
407 |
+
'zh_TW' => "Traditional Chinese (Taiwan)",
|
408 |
+
'zu_ZA' => "Zulu",
|
409 |
+
'zz_TR' => "Zazaki"
|
410 |
+
);
|
411 |
+
|
412 |
+
return $locales;
|
413 |
+
}
|
414 |
}
|
EmbedPress/Ends/Front/Handler.php
CHANGED
File without changes
|
EmbedPress/Ends/Handler.php
CHANGED
File without changes
|
EmbedPress/Loader.php
CHANGED
File without changes
|
EmbedPress/Plugin.php
CHANGED
File without changes
|
EmbedPress/Providers/GoogleDocs.php
CHANGED
File without changes
|
EmbedPress/Providers/GoogleMaps.php
CHANGED
File without changes
|
EmbedPress/Providers/index.html
CHANGED
File without changes
|
EmbedPress/Shortcode.php
CHANGED
@@ -155,8 +155,22 @@ class Shortcode
|
|
155 |
unset($service, $supportedServicesHeadersPatterns, $headers, $matches);
|
156 |
}
|
157 |
|
158 |
-
//
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
if (!$parsedContent) {
|
161 |
// If the embed couldn't be generated, we'll try to use Embera's API
|
162 |
$emberaInstance = new Embera($emberaInstanceSettings);
|
@@ -189,6 +203,22 @@ class Shortcode
|
|
189 |
$parsedContent = preg_replace('/((?:ose-)?\{provider_alias\})/i', "ose-". strtolower($urlData->provider_name), $parsedContent);
|
190 |
}
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
unset($embedTemplate, $urlData, $serviceProvider);
|
193 |
|
194 |
// This assure that the iframe has the same dimensions the user wants to
|
155 |
unset($service, $supportedServicesHeadersPatterns, $headers, $matches);
|
156 |
}
|
157 |
|
158 |
+
// Facebook is a special case. WordPress will try to embed them using OEmbed, but they always end up embedding the profile page, regardless
|
159 |
+
// 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.
|
160 |
+
if (in_array($urlData->provider_name, array('Facebook'))) {
|
161 |
+
// Check if this is a Facebook profile url.
|
162 |
+
if (preg_match('/facebook\.com\/(?:[^\/]+?)\/?$/', $content, $match)) {
|
163 |
+
// Try to embed the url using WP's OSEmbed.
|
164 |
+
$parsedContent = self::$oEmbedInstance->get_html($content, $attributes);
|
165 |
+
} else {
|
166 |
+
// Try to embed the url using EmbedPress' Embera.
|
167 |
+
$parsedContent = false;
|
168 |
+
}
|
169 |
+
} else {
|
170 |
+
// Try to embed the url using WP's OSEmbed.
|
171 |
+
$parsedContent = self::$oEmbedInstance->get_html($content, $attributes);
|
172 |
+
}
|
173 |
+
|
174 |
if (!$parsedContent) {
|
175 |
// If the embed couldn't be generated, we'll try to use Embera's API
|
176 |
$emberaInstance = new Embera($emberaInstanceSettings);
|
203 |
$parsedContent = preg_replace('/((?:ose-)?\{provider_alias\})/i', "ose-". strtolower($urlData->provider_name), $parsedContent);
|
204 |
}
|
205 |
|
206 |
+
// NFB seems to always return their embed code with all HTML entities into their applicable characters string.
|
207 |
+
if (strtoupper($urlData->provider_name) === "NATIONAL FILM BOARD OF CANADA") {
|
208 |
+
$parsedContent = html_entity_decode($parsedContent);
|
209 |
+
} else if (strtoupper($urlData->provider_name) === "FACEBOOK") {
|
210 |
+
$plgSettings = Plugin::getSettings();
|
211 |
+
|
212 |
+
// Check if the user wants to force a certain language into Facebook embeds.
|
213 |
+
$locale = isset($plgSettings->fbLanguage) && !empty($plgSettings->fbLanguage) ? $plgSettings->fbLanguage : false;
|
214 |
+
if (!!$locale) {
|
215 |
+
// Replace the automatically detected language by Facebook's API with the language chosen by the user.
|
216 |
+
$parsedContent = preg_replace('/\/[a-z]{2}\_[a-z]{2}\/sdk\.js/i', "/{$locale}/sdk.js", $parsedContent);
|
217 |
+
}
|
218 |
+
|
219 |
+
unset($locale, $plgSettings);
|
220 |
+
}
|
221 |
+
|
222 |
unset($embedTemplate, $urlData, $serviceProvider);
|
223 |
|
224 |
// This assure that the iframe has the same dimensions the user wants to
|
PROVIDERS.md
CHANGED
@@ -2,7 +2,6 @@ In addition to the default WordPress sources, EmbedPress supports these provider
|
|
2 |
|
3 |
- 23h (Images)
|
4 |
- AmCharts (Charts)
|
5 |
-
- Aol On (Videos)
|
6 |
- Bambuser (Videos)
|
7 |
- Cacoo (Charts)
|
8 |
- ChartBlocks (Charts)
|
@@ -15,7 +14,6 @@ In addition to the default WordPress sources, EmbedPress supports these provider
|
|
15 |
- Devianart (Images)
|
16 |
- Dipity (Timelines)
|
17 |
- Dotsub (Videos)
|
18 |
-
- Edocr (Documents)
|
19 |
- Facebook (Posts)
|
20 |
- GettyImages (Images)
|
21 |
- Github Gist (Code)
|
2 |
|
3 |
- 23h (Images)
|
4 |
- AmCharts (Charts)
|
|
|
5 |
- Bambuser (Videos)
|
6 |
- Cacoo (Charts)
|
7 |
- ChartBlocks (Charts)
|
14 |
- Devianart (Images)
|
15 |
- Dipity (Timelines)
|
16 |
- Dotsub (Videos)
|
|
|
17 |
- Facebook (Posts)
|
18 |
- GettyImages (Images)
|
19 |
- Github Gist (Code)
|
assets/css/embedpress.css
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
.ose-videojug.responsive {
|
22 |
overflow: hidden;
|
23 |
position: relative;
|
24 |
-
height:
|
25 |
}
|
26 |
|
27 |
.ose-dailymotion.responsive iframe,
|
21 |
.ose-videojug.responsive {
|
22 |
overflow: hidden;
|
23 |
position: relative;
|
24 |
+
height: auto;
|
25 |
}
|
26 |
|
27 |
.ose-dailymotion.responsive iframe,
|
assets/css/font.css
CHANGED
File without changes
|
assets/css/preview.css
CHANGED
@@ -67,6 +67,7 @@
|
|
67 |
-moz-box-shadow: 0px 10px 44px -5px rgba(0, 0, 0, 0.66);
|
68 |
box-shadow: 0px 10px 44px -5px rgba(0, 0, 0, 0.66);
|
69 |
z-index: 999999;
|
|
|
70 |
}
|
71 |
|
72 |
.embedpress_controller_panel div.embedpress_controller_button {
|
67 |
-moz-box-shadow: 0px 10px 44px -5px rgba(0, 0, 0, 0.66);
|
68 |
box-shadow: 0px 10px 44px -5px rgba(0, 0, 0, 0.66);
|
69 |
z-index: 999999;
|
70 |
+
cursor: default;
|
71 |
}
|
72 |
|
73 |
.embedpress_controller_panel div.embedpress_controller_button {
|
assets/css/vendor/bootstrap/bootstrap.css.map
CHANGED
File without changes
|
assets/js/preview.js
CHANGED
@@ -481,7 +481,7 @@
|
|
481 |
'dailymotion.com/video/*',
|
482 |
|
483 |
// Crowd Ranking (http://crowdranking.com)
|
484 |
-
'
|
485 |
|
486 |
// CircuitLab (https://www.circuitlab.com/)
|
487 |
'circuitlab.com/circuit/*',
|
@@ -500,9 +500,6 @@
|
|
500 |
// SoundCloud (http://soundcloud.com/)
|
501 |
'soundcloud.com/*',
|
502 |
|
503 |
-
// On Aol (http://on.aol.com/)
|
504 |
-
'on.aol.com/video/*',
|
505 |
-
|
506 |
// Kickstarter (http://www.kickstarter.com)
|
507 |
'kickstarter.com/projects/*',
|
508 |
|
@@ -529,6 +526,7 @@
|
|
529 |
|
530 |
// Getty Images (http://www.gettyimages.com/)
|
531 |
'gty.im/*',
|
|
|
532 |
|
533 |
// amCharts Live Editor (http://live.amcharts.com/)
|
534 |
'live.amcharts.com/*',
|
@@ -563,11 +561,8 @@
|
|
563 |
// https://clyp.it
|
564 |
'clyp.it/*',
|
565 |
|
566 |
-
// http://www.edocr.com
|
567 |
-
'edocr.com/doc/*',
|
568 |
-
|
569 |
// https://gist.github.com
|
570 |
-
'gist.github.com
|
571 |
|
572 |
// http://issuu.com
|
573 |
'issuu.com/*',
|
@@ -648,7 +643,7 @@
|
|
648 |
self.addURLsPlaceholder = function(node, url) {
|
649 |
var uid = self.makeId();
|
650 |
|
651 |
-
var wrapperClasses = ["embedpress_wrapper", "embedpress_placeholder"];
|
652 |
|
653 |
var shortcodeAttributes = node.value.getShortcodeAttributes($data.EMBEDPRESS_SHORTCODE);
|
654 |
var customAttributes = shortcodeAttributes;
|
@@ -684,22 +679,24 @@
|
|
684 |
|
685 |
var wrapper = new self.Node('div', 1);
|
686 |
var wrapperSettings = {
|
687 |
-
'class': Array.from(new Set(wrapperClasses)).join(" "),
|
688 |
-
'data-url': url,
|
689 |
-
'data-uid': uid,
|
690 |
-
'id': 'embedpress_wrapper_' + uid,
|
691 |
'data-loading-text': 'Loading your embed...'
|
692 |
};
|
693 |
|
694 |
wrapperSettings = $.extend({}, wrapperSettings, shortcodeAttributes);
|
695 |
|
696 |
-
wrapperSettings.class
|
|
|
|
|
697 |
|
698 |
wrapper.attr(wrapperSettings);
|
699 |
|
700 |
var panel = new self.Node('div', 1);
|
701 |
panel.attr({
|
702 |
-
'id': 'embedpress_controller_panel_' + uid,
|
703 |
'class': 'embedpress_controller_panel embedpress_ignore_mouseout hidden'
|
704 |
});
|
705 |
wrapper.append(panel);
|
@@ -722,7 +719,7 @@
|
|
722 |
|
723 |
var editButton = new self.Node('div', 1);
|
724 |
editButton.attr({
|
725 |
-
'id': 'embedpress_button_edit_' + uid,
|
726 |
'class': 'embedpress_ignore_mouseout embedpress_controller_button'
|
727 |
});
|
728 |
var editButtonIcon = new self.Node('div', 1);
|
@@ -735,7 +732,7 @@
|
|
735 |
|
736 |
var removeButton = new self.Node('div', 1);
|
737 |
removeButton.attr({
|
738 |
-
'id': 'embedpress_button_remove_' + uid,
|
739 |
'class': 'embedpress_ignore_mouseout embedpress_controller_button'
|
740 |
});
|
741 |
var removeButtonIcon = new self.Node('div', 1);
|
@@ -746,6 +743,8 @@
|
|
746 |
removeButton.append(removeButtonIcon);
|
747 |
panel.append(removeButton);
|
748 |
|
|
|
|
|
749 |
node.replace(wrapper);
|
750 |
|
751 |
// Trigger the timeout which will load the content
|
@@ -760,12 +759,33 @@
|
|
760 |
customAttributes = typeof customAttributes === "undefined" ? {} : customAttributes;
|
761 |
|
762 |
url = self.decodeEmbedURLSpecialChars(url, true, customAttributes);
|
|
|
763 |
|
764 |
// Get the parsed embed code from the EmbedPress plugin
|
765 |
self.getParsedContent(url, function getParsedContentCallback(result) {
|
766 |
result.data.content = result.data.content.stripShortcode($data.EMBEDPRESS_SHORTCODE);
|
767 |
|
768 |
var $wrapper = $(self.getElementInContentById('embedpress_wrapper_' + uid));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
769 |
|
770 |
$wrapper.removeClass('is-loading');
|
771 |
|
@@ -809,7 +829,7 @@
|
|
809 |
var iframeDoc = iframeWindow.document;
|
810 |
|
811 |
$(iframe).load(function() {
|
812 |
-
var maximumChecksAllowed =
|
813 |
var checkIndex = 0;
|
814 |
var checkerInterval = setInterval(function() {
|
815 |
if (checkIndex === maximumChecksAllowed) {
|
@@ -821,8 +841,6 @@
|
|
821 |
|
822 |
$wrapper.attr('width', iframe.width);
|
823 |
$wrapper.css('width', iframe.width + 'px');
|
824 |
-
|
825 |
-
$($wrapper).after('<p> </p>');
|
826 |
}, 250);
|
827 |
} else {
|
828 |
if (customAttributes.height) {
|
@@ -868,7 +886,7 @@
|
|
868 |
'}'+
|
869 |
'</style>'+
|
870 |
'</head>'+
|
871 |
-
'<body id="wpview-iframe-sandbox" class="'+ self.editor.getBody().className +'" style="display: inline-block;">'+
|
872 |
$content.html() +
|
873 |
'</body>'+
|
874 |
'</html>'
|
@@ -881,6 +899,9 @@
|
|
881 |
|
882 |
self.appendElementsIntoWrapper($content, $wrapper);
|
883 |
}
|
|
|
|
|
|
|
884 |
});
|
885 |
};
|
886 |
|
@@ -1018,9 +1039,11 @@
|
|
1018 |
self.Node = tinymce.html.Node;
|
1019 |
|
1020 |
function onFindEditorCallback() {
|
1021 |
-
|
1022 |
-
|
1023 |
-
self.addStylesheet(
|
|
|
|
|
1024 |
self.addEvent('paste', self.editor, self.onPaste);
|
1025 |
self.addEvent('nodechange', self.editor, self.onNodeChange);
|
1026 |
self.addEvent('keydown', self.editor, self.onKeyDown);
|
@@ -1028,11 +1051,17 @@
|
|
1028 |
self.addEvent('undo', self.editor, self.onUndo); // TinyMCE
|
1029 |
self.addEvent('undo', self.editor.undoManager, self.onUndo); // JCE
|
1030 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1031 |
// Add the node filter that will convert the url into the preview box for the embed code
|
1032 |
// @todo: Recognize <a> tags as well
|
1033 |
self.editor.parser.addNodeFilter('#text', function addNodeFilterIntoParser(nodes, arg) {
|
1034 |
self.each(nodes, function eachNodeInParser(node) {
|
1035 |
-
var subject = node.value;
|
1036 |
if (!subject.isValidUrl()) {
|
1037 |
if (!subject.match(SHORTCODE_REGEXP)) {
|
1038 |
return;
|
@@ -1065,23 +1094,38 @@
|
|
1065 |
|
1066 |
var wrapper = self.addURLsPlaceholder(node, url);
|
1067 |
|
1068 |
-
|
1069 |
-
|
1070 |
-
if (!!preText.length) {
|
1071 |
-
var text = new self.Node('#text', 3);
|
1072 |
-
text.value = preText.trim();
|
1073 |
|
1074 |
-
|
1075 |
-
|
1076 |
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
var text = new self.Node('#text', 3);
|
1081 |
-
text.value = postText.trim();
|
1082 |
|
1083 |
-
|
1084 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1085 |
} else {
|
1086 |
// No match. So we move on to check the next url pattern.
|
1087 |
tryToMatchContentAgainstUrlPatternWithIndex(urlPatternIndex + 1);
|
@@ -1095,7 +1139,7 @@
|
|
1095 |
self.editor.serializer.addNodeFilter('div', function addNodeFilterIntoSerializer(nodes, arg) {
|
1096 |
self.each(nodes, function eachNodeInSerializer(node) {
|
1097 |
var nodeClasses = (node.attributes.map.class || "").split(' ');
|
1098 |
-
var wrapperFactoryClasses = ["embedpress_wrapper", "embedpress_placeholder"];
|
1099 |
|
1100 |
var isWrapped = nodeClasses.filter(function(n) {
|
1101 |
return wrapperFactoryClasses.indexOf(n) != -1;
|
@@ -1126,12 +1170,25 @@
|
|
1126 |
}
|
1127 |
}
|
1128 |
|
|
|
|
|
1129 |
var text = new self.Node('#text', 3);
|
1130 |
text.value = self.decodeEmbedURLSpecialChars(node.attributes.map['data-url'].trim(), true, customAttributes);
|
1131 |
|
|
|
|
|
1132 |
node.replace(text);
|
|
|
|
|
|
|
|
|
1133 |
|
1134 |
-
|
|
|
|
|
|
|
|
|
|
|
1135 |
}
|
1136 |
});
|
1137 |
});
|
@@ -1268,9 +1325,6 @@
|
|
1268 |
// Remove "www." subdomain from Slideshare.net urls that was causing bugs on TinyMCE.
|
1269 |
content = content.replace(/www\.slideshare\.net\//i, 'slideshare.net/');
|
1270 |
|
1271 |
-
// Make sure that the cursor will be positioned after the embed.
|
1272 |
-
content += '<span> </span>';
|
1273 |
-
|
1274 |
// Let TinyMCE do the heavy lifting for inserting that content into the self.editor.
|
1275 |
// We cancel the default behavior and insert the embed-content using a command to trigger the node change and the parser.
|
1276 |
self.editor.execCommand('mceInsertContent', false, content);
|
@@ -1693,8 +1747,6 @@
|
|
1693 |
}
|
1694 |
}, 500, 8000);
|
1695 |
|
1696 |
-
$wrapper.on('mouseenter', self.onMouseEnter);
|
1697 |
-
$wrapper.on('mouseout', self.onMouseOut);
|
1698 |
$wrapper.data('configured', true);
|
1699 |
}
|
1700 |
}
|
@@ -1751,9 +1803,6 @@
|
|
1751 |
self.addEvent('mousedown', $editButton, self.onClickEditButton);
|
1752 |
self.addEvent('mousedown', $removeButton, self.onClickRemoveButton);
|
1753 |
|
1754 |
-
// Prevent the action of set cursor into the panel after click
|
1755 |
-
self.addEvent('mousedown', $panel, self.cancelEvent);
|
1756 |
-
|
1757 |
$panel.data('event-set', true);
|
1758 |
}
|
1759 |
|
481 |
'dailymotion.com/video/*',
|
482 |
|
483 |
// Crowd Ranking (http://crowdranking.com)
|
484 |
+
'c9ng.com/*/*',
|
485 |
|
486 |
// CircuitLab (https://www.circuitlab.com/)
|
487 |
'circuitlab.com/circuit/*',
|
500 |
// SoundCloud (http://soundcloud.com/)
|
501 |
'soundcloud.com/*',
|
502 |
|
|
|
|
|
|
|
503 |
// Kickstarter (http://www.kickstarter.com)
|
504 |
'kickstarter.com/projects/*',
|
505 |
|
526 |
|
527 |
// Getty Images (http://www.gettyimages.com/)
|
528 |
'gty.im/*',
|
529 |
+
'gettyimages.com/detail/photo/*',
|
530 |
|
531 |
// amCharts Live Editor (http://live.amcharts.com/)
|
532 |
'live.amcharts.com/*',
|
561 |
// https://clyp.it
|
562 |
'clyp.it/*',
|
563 |
|
|
|
|
|
|
|
564 |
// https://gist.github.com
|
565 |
+
'gist.github.com/*/*',
|
566 |
|
567 |
// http://issuu.com
|
568 |
'issuu.com/*',
|
643 |
self.addURLsPlaceholder = function(node, url) {
|
644 |
var uid = self.makeId();
|
645 |
|
646 |
+
var wrapperClasses = ["embedpress_wrapper", "embedpress_placeholder", "wpview", "wpview-wrap"];
|
647 |
|
648 |
var shortcodeAttributes = node.value.getShortcodeAttributes($data.EMBEDPRESS_SHORTCODE);
|
649 |
var customAttributes = shortcodeAttributes;
|
679 |
|
680 |
var wrapper = new self.Node('div', 1);
|
681 |
var wrapperSettings = {
|
682 |
+
'class' : Array.from(new Set(wrapperClasses)).join(" "),
|
683 |
+
'data-url' : url,
|
684 |
+
'data-uid' : uid,
|
685 |
+
'id' : 'embedpress_wrapper_' + uid,
|
686 |
'data-loading-text': 'Loading your embed...'
|
687 |
};
|
688 |
|
689 |
wrapperSettings = $.extend({}, wrapperSettings, shortcodeAttributes);
|
690 |
|
691 |
+
if (wrapperSettings.class.indexOf('is-loading') === -1) {
|
692 |
+
wrapperSettings.class += " is-loading";
|
693 |
+
}
|
694 |
|
695 |
wrapper.attr(wrapperSettings);
|
696 |
|
697 |
var panel = new self.Node('div', 1);
|
698 |
panel.attr({
|
699 |
+
'id' : 'embedpress_controller_panel_' + uid,
|
700 |
'class': 'embedpress_controller_panel embedpress_ignore_mouseout hidden'
|
701 |
});
|
702 |
wrapper.append(panel);
|
719 |
|
720 |
var editButton = new self.Node('div', 1);
|
721 |
editButton.attr({
|
722 |
+
'id' : 'embedpress_button_edit_' + uid,
|
723 |
'class': 'embedpress_ignore_mouseout embedpress_controller_button'
|
724 |
});
|
725 |
var editButtonIcon = new self.Node('div', 1);
|
732 |
|
733 |
var removeButton = new self.Node('div', 1);
|
734 |
removeButton.attr({
|
735 |
+
'id' : 'embedpress_button_remove_' + uid,
|
736 |
'class': 'embedpress_ignore_mouseout embedpress_controller_button'
|
737 |
});
|
738 |
var removeButtonIcon = new self.Node('div', 1);
|
743 |
removeButton.append(removeButtonIcon);
|
744 |
panel.append(removeButton);
|
745 |
|
746 |
+
node.value = node.value.trim();
|
747 |
+
|
748 |
node.replace(wrapper);
|
749 |
|
750 |
// Trigger the timeout which will load the content
|
759 |
customAttributes = typeof customAttributes === "undefined" ? {} : customAttributes;
|
760 |
|
761 |
url = self.decodeEmbedURLSpecialChars(url, true, customAttributes);
|
762 |
+
var rawUrl = url.stripShortcode($data.EMBEDPRESS_SHORTCODE);
|
763 |
|
764 |
// Get the parsed embed code from the EmbedPress plugin
|
765 |
self.getParsedContent(url, function getParsedContentCallback(result) {
|
766 |
result.data.content = result.data.content.stripShortcode($data.EMBEDPRESS_SHORTCODE);
|
767 |
|
768 |
var $wrapper = $(self.getElementInContentById('embedpress_wrapper_' + uid));
|
769 |
+
var wrapperParent = $($wrapper.parent());
|
770 |
+
|
771 |
+
// Check if $wrapper was rendered inside a <p> element.
|
772 |
+
if (wrapperParent.prop('tagName') && wrapperParent.prop('tagName').toUpperCase() === "P") {
|
773 |
+
wrapperParent.replaceWith($wrapper);
|
774 |
+
// Check if there's at least one "space" after $wrapper.
|
775 |
+
var nextSibling = $($wrapper).next();
|
776 |
+
if (!nextSibling.length || nextSibling.prop('tagName').toUpperCase() !== "P") {
|
777 |
+
//$('<p> </p>').insertAfter($wrapper);
|
778 |
+
}
|
779 |
+
nextSibling = null;
|
780 |
+
}
|
781 |
+
wrapperParent = null;
|
782 |
+
|
783 |
+
// Check if the url could not be embedded for some reason.
|
784 |
+
if (rawUrl === result.data.content) {
|
785 |
+
// Echoes the raw url
|
786 |
+
$wrapper.replaceWith($('<p>'+ rawUrl +'</p>'));
|
787 |
+
return;
|
788 |
+
}
|
789 |
|
790 |
$wrapper.removeClass('is-loading');
|
791 |
|
829 |
var iframeDoc = iframeWindow.document;
|
830 |
|
831 |
$(iframe).load(function() {
|
832 |
+
var maximumChecksAllowed = 100;
|
833 |
var checkIndex = 0;
|
834 |
var checkerInterval = setInterval(function() {
|
835 |
if (checkIndex === maximumChecksAllowed) {
|
841 |
|
842 |
$wrapper.attr('width', iframe.width);
|
843 |
$wrapper.css('width', iframe.width + 'px');
|
|
|
|
|
844 |
}, 250);
|
845 |
} else {
|
846 |
if (customAttributes.height) {
|
886 |
'}'+
|
887 |
'</style>'+
|
888 |
'</head>'+
|
889 |
+
'<body id="wpview-iframe-sandbox" class="'+ self.editor.getBody().className +'" style="width: 100%; display: inline-block;">'+
|
890 |
$content.html() +
|
891 |
'</body>'+
|
892 |
'</html>'
|
899 |
|
900 |
self.appendElementsIntoWrapper($content, $wrapper);
|
901 |
}
|
902 |
+
|
903 |
+
$wrapper.append($('<span class="mce-shim"></span>'));
|
904 |
+
$wrapper.append($('<span class="wpview-end"></span>'));
|
905 |
});
|
906 |
};
|
907 |
|
1039 |
self.Node = tinymce.html.Node;
|
1040 |
|
1041 |
function onFindEditorCallback() {
|
1042 |
+
$(window.document.getElementsByTagName('head')[0]).append($('<link rel="stylesheet" type="text/css" href="' + (PLG_SYSTEM_ASSETS_CSS_PATH + '/vendor/bootstrap/bootstrap.min.css?v=' + self.params.versionUID) + '">'));
|
1043 |
+
|
1044 |
+
self.addStylesheet(PLG_SYSTEM_ASSETS_CSS_PATH + '/font.css?v=' + self.params.versionUID);
|
1045 |
+
self.addStylesheet(PLG_SYSTEM_ASSETS_CSS_PATH + '/preview.css?v=' + self.params.versionUID);
|
1046 |
+
self.addStylesheet(PLG_CONTENT_ASSETS_CSS_PATH + '/embedpress.css?v=' + self.params.versionUID);
|
1047 |
self.addEvent('paste', self.editor, self.onPaste);
|
1048 |
self.addEvent('nodechange', self.editor, self.onNodeChange);
|
1049 |
self.addEvent('keydown', self.editor, self.onKeyDown);
|
1051 |
self.addEvent('undo', self.editor, self.onUndo); // TinyMCE
|
1052 |
self.addEvent('undo', self.editor.undoManager, self.onUndo); // JCE
|
1053 |
|
1054 |
+
var doc = self.editor.getDoc();
|
1055 |
+
$(doc).on('mouseenter', '.embedpress_wrapper', self.onMouseEnter);
|
1056 |
+
$(doc).on('mouseout', '.embedpress_wrapper', self.onMouseOut);
|
1057 |
+
$(doc).on('mousedown', '.embedpress_wrapper > .embedpress_controller_panel', self.cancelEvent);
|
1058 |
+
doc = null;
|
1059 |
+
|
1060 |
// Add the node filter that will convert the url into the preview box for the embed code
|
1061 |
// @todo: Recognize <a> tags as well
|
1062 |
self.editor.parser.addNodeFilter('#text', function addNodeFilterIntoParser(nodes, arg) {
|
1063 |
self.each(nodes, function eachNodeInParser(node) {
|
1064 |
+
var subject = node.value.trim();
|
1065 |
if (!subject.isValidUrl()) {
|
1066 |
if (!subject.match(SHORTCODE_REGEXP)) {
|
1067 |
return;
|
1094 |
|
1095 |
var wrapper = self.addURLsPlaceholder(node, url);
|
1096 |
|
1097 |
+
setTimeout(function() {
|
1098 |
+
var doc = self.editor.getDoc();
|
|
|
|
|
|
|
1099 |
|
1100 |
+
var previewWrapper = $(doc.querySelector('#'+ wrapper.attributes.map['id']));
|
1101 |
+
var previewWrapperParent = $(previewWrapper.parent());
|
1102 |
|
1103 |
+
if (previewWrapperParent && previewWrapperParent.prop('tagName') && previewWrapperParent.prop('tagName').toUpperCase() === "P") {
|
1104 |
+
previewWrapperParent.replaceWith(previewWrapper);
|
1105 |
+
}
|
|
|
|
|
1106 |
|
1107 |
+
var previewWrapperOlderSibling = previewWrapper.prev();
|
1108 |
+
if (previewWrapperOlderSibling && previewWrapperOlderSibling.prop('tagName') && previewWrapperOlderSibling.prop('tagName').toUpperCase() === "P" && !previewWrapperOlderSibling.html().replace(/\ \;/i, '').length) {
|
1109 |
+
previewWrapperOlderSibling.remove();
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
var previewWrapperYoungerSibling = previewWrapper.next();
|
1113 |
+
if (previewWrapperYoungerSibling && previewWrapperYoungerSibling.length && previewWrapperYoungerSibling.prop('tagName').toUpperCase() === "P") {
|
1114 |
+
if (!previewWrapperYoungerSibling.next().length && !previewWrapperYoungerSibling.html().replace(/\ \;/i, '').length) {
|
1115 |
+
previewWrapperYoungerSibling.remove();
|
1116 |
+
$('<p> </p>').insertAfter(previewWrapper);
|
1117 |
+
} else {
|
1118 |
+
previewWrapperYoungerSibling.remove();
|
1119 |
+
}
|
1120 |
+
} else {
|
1121 |
+
$('<p> </p>').insertAfter(previewWrapper);
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
setTimeout(function() {
|
1125 |
+
self.editor.selection.select(self.editor.getBody(), true);
|
1126 |
+
self.editor.selection.collapse(false);
|
1127 |
+
}, 50);
|
1128 |
+
}, 50);
|
1129 |
} else {
|
1130 |
// No match. So we move on to check the next url pattern.
|
1131 |
tryToMatchContentAgainstUrlPatternWithIndex(urlPatternIndex + 1);
|
1139 |
self.editor.serializer.addNodeFilter('div', function addNodeFilterIntoSerializer(nodes, arg) {
|
1140 |
self.each(nodes, function eachNodeInSerializer(node) {
|
1141 |
var nodeClasses = (node.attributes.map.class || "").split(' ');
|
1142 |
+
var wrapperFactoryClasses = ["embedpress_wrapper", "embedpress_placeholder", "wpview", "wpview-wrap"];
|
1143 |
|
1144 |
var isWrapped = nodeClasses.filter(function(n) {
|
1145 |
return wrapperFactoryClasses.indexOf(n) != -1;
|
1170 |
}
|
1171 |
}
|
1172 |
|
1173 |
+
var p = new self.Node('p', 1);
|
1174 |
+
|
1175 |
var text = new self.Node('#text', 3);
|
1176 |
text.value = self.decodeEmbedURLSpecialChars(node.attributes.map['data-url'].trim(), true, customAttributes);
|
1177 |
|
1178 |
+
p.append(text.clone());
|
1179 |
+
|
1180 |
node.replace(text);
|
1181 |
+
text.replace(p);
|
1182 |
+
}
|
1183 |
+
});
|
1184 |
+
});
|
1185 |
|
1186 |
+
self.editor.serializer.addNodeFilter('p', function addNodeFilterIntoSerializer(nodes, arg) {
|
1187 |
+
self.each(nodes, function eachNodeInSerializer(node) {
|
1188 |
+
if (node.firstChild == node.lastChild) {
|
1189 |
+
if (node.firstChild.value === " " || !node.firstChild.value.trim().length) {
|
1190 |
+
node.remove();
|
1191 |
+
}
|
1192 |
}
|
1193 |
});
|
1194 |
});
|
1325 |
// Remove "www." subdomain from Slideshare.net urls that was causing bugs on TinyMCE.
|
1326 |
content = content.replace(/www\.slideshare\.net\//i, 'slideshare.net/');
|
1327 |
|
|
|
|
|
|
|
1328 |
// Let TinyMCE do the heavy lifting for inserting that content into the self.editor.
|
1329 |
// We cancel the default behavior and insert the embed-content using a command to trigger the node change and the parser.
|
1330 |
self.editor.execCommand('mceInsertContent', false, content);
|
1747 |
}
|
1748 |
}, 500, 8000);
|
1749 |
|
|
|
|
|
1750 |
$wrapper.data('configured', true);
|
1751 |
}
|
1752 |
}
|
1803 |
self.addEvent('mousedown', $editButton, self.onClickEditButton);
|
1804 |
self.addEvent('mousedown', $removeButton, self.onClickRemoveButton);
|
1805 |
|
|
|
|
|
|
|
1806 |
$panel.data('event-set', true);
|
1807 |
}
|
1808 |
|
assets/js/vendor/bootbox.min.js
CHANGED
File without changes
|
autoloader.php
CHANGED
File without changes
|
changelog.txt
CHANGED
@@ -1,4 +1,22 @@
|
|
1 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
= 1.2.0 =
|
3 |
Release Date: 2016-10-04
|
4 |
|
1 |
== Changelog ==
|
2 |
+
= 1.3.0 =
|
3 |
+
Release Date: 2016-11-04
|
4 |
+
|
5 |
+
* Enhanced Crowd Ranking url detection;
|
6 |
+
* Ability to force a different language into Facebook embeds via settings page;
|
7 |
+
* Minor CSS fixes and enhancements;
|
8 |
+
* Fixed stylesheet conflicting with some other plugins;
|
9 |
+
* Fixed a lot of bugs with Facebook urls;
|
10 |
+
* Fixed bug where the embed controllers were not appearing to some serivce providers;
|
11 |
+
* Fixed a lot of bugs with GettyImage urls;
|
12 |
+
* Fixed a lot of bugs with Github Gist urls;
|
13 |
+
* Fixed a lot of bugs with VideoJug urls;
|
14 |
+
* Fixed a lot of bugs with NFB urls;
|
15 |
+
* Fixed bug where the editor was treating non-embeddable urls as normal embeds;
|
16 |
+
* Fixed bug where nbsp; were added before and after the embed every time the user switch from Visual to Text mode;
|
17 |
+
* Dropped support to Edocr due to embed inconsistency;
|
18 |
+
* Dropped support to Aol On Videos.
|
19 |
+
|
20 |
= 1.2.0 =
|
21 |
Release Date: 2016-10-04
|
22 |
|
embedpress.php
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
* @embedpress
|
13 |
* Plugin Name: EmbedPress
|
14 |
* Plugin URI: http://pressshack.com/embedpress/
|
15 |
-
* Version: 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/
|
12 |
* @embedpress
|
13 |
* Plugin Name: EmbedPress
|
14 |
* Plugin URI: http://pressshack.com/embedpress/
|
15 |
+
* Version: 1.3.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
@@ -16,7 +16,7 @@ if (!defined('EMBEDPRESS_PLG_NAME')) {
|
|
16 |
}
|
17 |
|
18 |
if (!defined('EMBEDPRESS_PLG_VERSION')) {
|
19 |
-
define('EMBEDPRESS_PLG_VERSION', "1.
|
20 |
}
|
21 |
|
22 |
if (!defined('EMBEDPRESS_PATH_BASE')) {
|
16 |
}
|
17 |
|
18 |
if (!defined('EMBEDPRESS_PLG_VERSION')) {
|
19 |
+
define('EMBEDPRESS_PLG_VERSION', "1.3.0");
|
20 |
}
|
21 |
|
22 |
if (!defined('EMBEDPRESS_PATH_BASE')) {
|
library/ostraining/embera/Lib/Embera/Providers/GithubGist.php
CHANGED
@@ -27,13 +27,13 @@ class GithubGist extends \Embera\Adapters\Service
|
|
27 |
$this->url->stripQueryString();
|
28 |
$this->url->stripLastSlash();
|
29 |
|
30 |
-
return (preg_match('~/(?:[
|
31 |
}
|
32 |
|
33 |
/** inline {@inheritdoc} */
|
34 |
protected function normalizeUrl()
|
35 |
{
|
36 |
-
if (preg_match('~github\.com/(?:[^/]+)/([
|
37 |
$this->url->overwrite('https://gist.github.com/' . $matches['1']);
|
38 |
}
|
39 |
|
@@ -41,7 +41,7 @@ class GithubGist extends \Embera\Adapters\Service
|
|
41 |
protected function modifyResponse(array $response = array())
|
42 |
{
|
43 |
$this->url->discardChanges();
|
44 |
-
if (preg_match('~github\.com/([^/]+)/([
|
45 |
$response['html'] = '<script type="text/javascript" src="https://gist.github.com/' . $matches['1'] . '/' . $matches['2'] . '.js"></script>';
|
46 |
|
47 |
return $response;
|
@@ -51,7 +51,7 @@ class GithubGist extends \Embera\Adapters\Service
|
|
51 |
public function fakeResponse()
|
52 |
{
|
53 |
$this->url->discardChanges();
|
54 |
-
if (preg_match('~github\.com/([^/]+)/([
|
55 |
{
|
56 |
return array(
|
57 |
'type' => 'rich',
|
27 |
$this->url->stripQueryString();
|
28 |
$this->url->stripLastSlash();
|
29 |
|
30 |
+
return (preg_match('~/(?:[a-z0-9]+)$~i', $this->url));
|
31 |
}
|
32 |
|
33 |
/** inline {@inheritdoc} */
|
34 |
protected function normalizeUrl()
|
35 |
{
|
36 |
+
if (preg_match('~github\.com/(?:[^/]+)/([a-z0-9]+)/?~i', $this->url, $matches))
|
37 |
$this->url->overwrite('https://gist.github.com/' . $matches['1']);
|
38 |
}
|
39 |
|
41 |
protected function modifyResponse(array $response = array())
|
42 |
{
|
43 |
$this->url->discardChanges();
|
44 |
+
if (preg_match('~github\.com/([^/]+)/([a-z0-9]+)~i', $this->url, $matches))
|
45 |
$response['html'] = '<script type="text/javascript" src="https://gist.github.com/' . $matches['1'] . '/' . $matches['2'] . '.js"></script>';
|
46 |
|
47 |
return $response;
|
51 |
public function fakeResponse()
|
52 |
{
|
53 |
$this->url->discardChanges();
|
54 |
+
if (preg_match('~github\.com/([^/]+)/([a-z0-9]+)~i', $this->url, $matches))
|
55 |
{
|
56 |
return array(
|
57 |
'type' => 'rich',
|
providers.php
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== EmbedPress ===
|
2 |
Contributors: PressShack
|
3 |
-
Tags: 23hq, amcharts, animoto,
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.6.1
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -18,7 +18,6 @@ In addition to the default WordPress sources, EmbedPress supports these provider
|
|
18 |
|
19 |
- [23h](http://23hq.com/) <em>(Images)</em>
|
20 |
- [AmCharts](http://live.amcharts.com/) <em>(Charts)</em>
|
21 |
-
- [Aol On](http://on.aol.com/) <em>(Videos)</em>
|
22 |
- [Bambuser](http://bambuser.com/) <em>(Videos)</em>
|
23 |
- [Cacoo](http://cacoo.com/) <em>(Charts)</em>
|
24 |
- [ChartBlocks](http://chartblocks.com/) <em>(Charts)</em>
|
@@ -31,7 +30,6 @@ In addition to the default WordPress sources, EmbedPress supports these provider
|
|
31 |
- [Devianart](http://deviantart.com/) <em>(Images)</em>
|
32 |
- [Dipity](http://www.dipity.com/) <em>(Timelines)</em>
|
33 |
- [Dotsub](http://dotsub.com/) <em>(Videos)</em>
|
34 |
-
- [Edocr](http://edocr.com/) <em>(Documents)</em>
|
35 |
- [Facebook](https://www.facebook.com/) <em>(Posts)</em>
|
36 |
- [GettyImages](http://www.gettyimages.com/) <em>(Images)</em>
|
37 |
- [Github Gist](https://gist.github.com/) <em>(Code)</em>
|
@@ -92,6 +90,24 @@ There're two ways to install EmbedPress plugin:
|
|
92 |
`
|
93 |
|
94 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
= 1.2.0 =
|
96 |
Release Date: 2016-10-04
|
97 |
|
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.6.1
|
6 |
+
Stable tag: 1.3.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
18 |
|
19 |
- [23h](http://23hq.com/) <em>(Images)</em>
|
20 |
- [AmCharts](http://live.amcharts.com/) <em>(Charts)</em>
|
|
|
21 |
- [Bambuser](http://bambuser.com/) <em>(Videos)</em>
|
22 |
- [Cacoo](http://cacoo.com/) <em>(Charts)</em>
|
23 |
- [ChartBlocks](http://chartblocks.com/) <em>(Charts)</em>
|
30 |
- [Devianart](http://deviantart.com/) <em>(Images)</em>
|
31 |
- [Dipity](http://www.dipity.com/) <em>(Timelines)</em>
|
32 |
- [Dotsub](http://dotsub.com/) <em>(Videos)</em>
|
|
|
33 |
- [Facebook](https://www.facebook.com/) <em>(Posts)</em>
|
34 |
- [GettyImages](http://www.gettyimages.com/) <em>(Images)</em>
|
35 |
- [Github Gist](https://gist.github.com/) <em>(Code)</em>
|
90 |
`
|
91 |
|
92 |
== Changelog ==
|
93 |
+
= 1.3.0 =
|
94 |
+
Release Date: 2016-11-04
|
95 |
+
|
96 |
+
* Enhanced Crowd Ranking url detection;
|
97 |
+
* Ability to force a different language into Facebook embeds via settings page;
|
98 |
+
* Minor CSS fixes and enhancements;
|
99 |
+
* Fixed stylesheet conflicting with some other plugins;
|
100 |
+
* Fixed a lot of bugs with Facebook urls;
|
101 |
+
* Fixed bug where the embed controllers were not appearing to some serivce providers;
|
102 |
+
* Fixed a lot of bugs with GettyImage urls;
|
103 |
+
* Fixed a lot of bugs with Github Gist urls;
|
104 |
+
* Fixed a lot of bugs with VideoJug urls;
|
105 |
+
* Fixed a lot of bugs with NFB urls;
|
106 |
+
* Fixed bug where the editor was treating non-embeddable urls as normal embeds;
|
107 |
+
* Fixed bug where nbsp; were added before and after the embed every time the user switch from Visual to Text mode;
|
108 |
+
* Dropped support to Edocr due to embed inconsistency;
|
109 |
+
* Dropped support to Aol On Videos.
|
110 |
+
|
111 |
= 1.2.0 =
|
112 |
Release Date: 2016-10-04
|
113 |
|