Version Description
Download this release
Release Info
| Developer | andergmartins |
| Plugin | |
| Version | 2.2.2 |
| Comparing to | |
| See all releases | |
Code changes from version 2.2.1 to 2.2.2
- EmbedPress/Core.php +26 -11
- embedpress.php +1 -1
- includes.php +1 -1
- readme.txt +7 -2
EmbedPress/Core.php
CHANGED
|
@@ -123,7 +123,6 @@ class Core
|
|
| 123 |
|
| 124 |
add_filter('oembed_providers', [$this, 'addOEmbedProviders']);
|
| 125 |
add_action('rest_api_init', [$this, 'registerOEmbedRestRoutes']);
|
| 126 |
-
// add_filter('oembed_result', [$this, 'oembedResult'], 10, 3);
|
| 127 |
|
| 128 |
if (is_admin()) {
|
| 129 |
$plgSettings = self::getSettings();
|
|
@@ -162,15 +161,6 @@ class Core
|
|
| 162 |
$this->loaderInstance->run();
|
| 163 |
}
|
| 164 |
|
| 165 |
-
public function oembedResult($html, $url, $args)
|
| 166 |
-
{
|
| 167 |
-
// apply_filters( 'oembed_result', $this->data2html( $data, $url ), $url, $args );
|
| 168 |
-
var_dump($html, $url, $args);
|
| 169 |
-
die;
|
| 170 |
-
|
| 171 |
-
return $html;
|
| 172 |
-
}
|
| 173 |
-
|
| 174 |
/**
|
| 175 |
* @param $providers
|
| 176 |
*
|
|
@@ -325,8 +315,33 @@ class Core
|
|
| 325 |
'#https?://(.+\.)?fast\.wistia\.com/embed/medias/.+#i\.jsonp' => 'wistia',
|
| 326 |
];
|
| 327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 328 |
foreach ($newProviders as $url => &$data) {
|
| 329 |
-
$data = [
|
|
|
|
|
|
|
|
|
|
| 330 |
}
|
| 331 |
|
| 332 |
$providers = array_merge($providers, $newProviders);
|
| 123 |
|
| 124 |
add_filter('oembed_providers', [$this, 'addOEmbedProviders']);
|
| 125 |
add_action('rest_api_init', [$this, 'registerOEmbedRestRoutes']);
|
|
|
|
| 126 |
|
| 127 |
if (is_admin()) {
|
| 128 |
$plgSettings = self::getSettings();
|
| 161 |
$this->loaderInstance->run();
|
| 162 |
}
|
| 163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 164 |
/**
|
| 165 |
* @param $providers
|
| 166 |
*
|
| 315 |
'#https?://(.+\.)?fast\.wistia\.com/embed/medias/.+#i\.jsonp' => 'wistia',
|
| 316 |
];
|
| 317 |
|
| 318 |
+
/**
|
| 319 |
+
* ========================================
|
| 320 |
+
* Make sure the $wp_write global is set.
|
| 321 |
+
* This fix compatibility with JetPack, Classical Editor and Disable Gutenberg. JetPack makes
|
| 322 |
+
* the oembed_providers filter be called and this activates our class too, but one dependency
|
| 323 |
+
* of the rest_url method is not loaded yet.
|
| 324 |
+
*/
|
| 325 |
+
global $wp_rewrite;
|
| 326 |
+
|
| 327 |
+
if ( ! class_exists('\\WP_Rewrite')) {
|
| 328 |
+
$path = ABSPATH . WPINC . '/class-wp-rewrite.php';
|
| 329 |
+
if (file_exists($path)) {
|
| 330 |
+
require_once $path;
|
| 331 |
+
}
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
if ( ! is_object($wp_rewrite)) {
|
| 335 |
+
$wp_rewrite = new \WP_Rewrite();
|
| 336 |
+
$_GLOBALS['wp_write'] = $wp_rewrite;
|
| 337 |
+
}
|
| 338 |
+
/*========================================*/
|
| 339 |
+
|
| 340 |
foreach ($newProviders as $url => &$data) {
|
| 341 |
+
$data = [
|
| 342 |
+
rest_url('embedpress/v1/oembed/' . $data),
|
| 343 |
+
true,
|
| 344 |
+
];
|
| 345 |
}
|
| 346 |
|
| 347 |
$providers = array_merge($providers, $newProviders);
|
embedpress.php
CHANGED
|
@@ -6,7 +6,7 @@
|
|
| 6 |
* Facebook, Google Maps, Google Docs, UStream! Just use the URL!
|
| 7 |
* Author:EmbedPress
|
| 8 |
* Author URI:http://embedpress.com
|
| 9 |
-
* Version: 2.2.
|
| 10 |
* Text Domain: embedpress
|
| 11 |
* Domain Path: /languages
|
| 12 |
*
|
| 6 |
* Facebook, Google Maps, Google Docs, UStream! Just use the URL!
|
| 7 |
* Author:EmbedPress
|
| 8 |
* Author URI:http://embedpress.com
|
| 9 |
+
* Version: 2.2.2
|
| 10 |
* Text Domain: embedpress
|
| 11 |
* Domain Path: /languages
|
| 12 |
*
|
includes.php
CHANGED
|
@@ -21,7 +21,7 @@ if ( ! defined('EMBEDPRESS_PLG_NAME')) {
|
|
| 21 |
}
|
| 22 |
|
| 23 |
if ( ! defined('EMBEDPRESS_VERSION')) {
|
| 24 |
-
define('EMBEDPRESS_VERSION', "2.2.
|
| 25 |
/**
|
| 26 |
* @deprecated 2.2.0
|
| 27 |
*/
|
| 21 |
}
|
| 22 |
|
| 23 |
if ( ! defined('EMBEDPRESS_VERSION')) {
|
| 24 |
+
define('EMBEDPRESS_VERSION', "2.2.2");
|
| 25 |
/**
|
| 26 |
* @deprecated 2.2.0
|
| 27 |
*/
|
readme.txt
CHANGED
|
@@ -4,8 +4,8 @@ Author: EmbedPress, PressShack
|
|
| 4 |
Author URI: https://embedpress.com
|
| 5 |
Tags: YouTube, Google, Facebook, Wistia, Vimeo
|
| 6 |
Requires at least: 4.6
|
| 7 |
-
Tested up to:
|
| 8 |
-
Stable tag: 2.2.
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
|
@@ -184,6 +184,11 @@ Not at all. You can set up everything your team needs without any coding knowled
|
|
| 184 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
| 185 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
= [2.2.1] - 2018-12-10 =
|
| 188 |
|
| 189 |
* Add constant EMBEDPRESS_PLG_VERSION for keep backward compatibility with not updated add-ons;
|
| 4 |
Author URI: https://embedpress.com
|
| 5 |
Tags: YouTube, Google, Facebook, Wistia, Vimeo
|
| 6 |
Requires at least: 4.6
|
| 7 |
+
Tested up to: 5.0
|
| 8 |
+
Stable tag: 2.2.2
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 184 |
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
| 185 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 186 |
|
| 187 |
+
= [2.2.2] - 2018-12-14 =
|
| 188 |
+
|
| 189 |
+
* Fixed compatibility with Disable Gutenberg plugin if installed with JetPack and Classic Editor;
|
| 190 |
+
* Updated the "Tested Up To" version to 5.0 in the readme file;
|
| 191 |
+
|
| 192 |
= [2.2.1] - 2018-12-10 =
|
| 193 |
|
| 194 |
* Add constant EMBEDPRESS_PLG_VERSION for keep backward compatibility with not updated add-ons;
|
