Version Description
Release Date: June 30, 2022.
- Fixes an issue with inserting external media by URL.
Download this release
Release Info
| Developer | swissspidy |
| Plugin | |
| Version | 1.22.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.22.0 to 1.22.1
- includes/REST_API/Hotlinking_Controller.php +79 -48
- includes/namespace.php +5 -0
- includes/vendor/autoload.php +1 -1
- includes/vendor/composer/autoload_real.php +4 -4
- includes/vendor/composer/autoload_static.php +2 -2
- readme.txt +10 -15
- third-party/vendor/autoload.php +1 -1
- third-party/vendor/composer/autoload_real.php +4 -4
- third-party/vendor/composer/autoload_static.php +2 -2
- web-stories.php +2 -2
includes/REST_API/Hotlinking_Controller.php
CHANGED
|
@@ -193,11 +193,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 193 |
$raw_url = $request['url'];
|
| 194 |
$raw_url = untrailingslashit( $raw_url );
|
| 195 |
|
| 196 |
-
$
|
| 197 |
|
| 198 |
$host = wp_parse_url( $raw_url, PHP_URL_HOST );
|
| 199 |
|
| 200 |
-
if ( ! $
|
| 201 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 400 ] );
|
| 202 |
}
|
| 203 |
|
|
@@ -206,11 +206,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 206 |
*
|
| 207 |
* @since 1.11.0
|
| 208 |
*
|
| 209 |
-
* @param int
|
| 210 |
-
* @param string $url
|
| 211 |
*/
|
| 212 |
-
$cache_ttl = apply_filters( 'web_stories_hotlinking_url_data_cache_ttl', DAY_IN_SECONDS, $
|
| 213 |
-
$cache_key = 'web_stories_url_data_' . md5( $
|
| 214 |
|
| 215 |
$data = get_transient( $cache_key );
|
| 216 |
if ( \is_string( $data ) && ! empty( $data ) ) {
|
|
@@ -227,8 +227,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 227 |
}
|
| 228 |
}
|
| 229 |
|
|
|
|
|
|
|
|
|
|
| 230 |
$response = wp_safe_remote_head(
|
| 231 |
-
$
|
| 232 |
[
|
| 233 |
'redirection' => 0, // No redirects allowed.
|
| 234 |
'headers' => [
|
|
@@ -236,6 +239,9 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 236 |
],
|
| 237 |
]
|
| 238 |
);
|
|
|
|
|
|
|
|
|
|
| 239 |
if ( is_wp_error( $response ) && 'http_request_failed' === $response->get_error_code() ) {
|
| 240 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 404 ] );
|
| 241 |
}
|
|
@@ -252,12 +258,7 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 252 |
}
|
| 253 |
$file_size = (int) $headers['content-length'];
|
| 254 |
|
| 255 |
-
|
| 256 |
-
* The URL's path.
|
| 257 |
-
*
|
| 258 |
-
* @var string|false|null $path
|
| 259 |
-
*/
|
| 260 |
-
$path = wp_parse_url( $url, PHP_URL_PATH );
|
| 261 |
|
| 262 |
if ( ! \is_string( $path ) ) {
|
| 263 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 404 ] );
|
|
@@ -314,11 +315,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 314 |
$raw_url = $request['url'];
|
| 315 |
$raw_url = untrailingslashit( $raw_url );
|
| 316 |
|
| 317 |
-
$
|
| 318 |
|
| 319 |
$host = wp_parse_url( $raw_url, PHP_URL_HOST );
|
| 320 |
|
| 321 |
-
if ( ! $
|
| 322 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 400 ] );
|
| 323 |
}
|
| 324 |
|
|
@@ -343,8 +344,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 343 |
'redirection' => 0, // No redirects allowed.
|
| 344 |
];
|
| 345 |
|
|
|
|
|
|
|
|
|
|
| 346 |
$http = _wp_http_get_object();
|
| 347 |
-
$transport = $http->_get_first_available_transport( $args, $
|
| 348 |
|
| 349 |
// When cURL is available, we might be able to use it together with fopen().
|
| 350 |
if ( 'WP_Http_Curl' === $transport ) {
|
|
@@ -359,17 +363,16 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 359 |
|
| 360 |
if ( $stream_handle ) {
|
| 361 |
$this->stream_handle = $stream_handle;
|
| 362 |
-
$this->proxy_url_curl( $
|
|
|
|
| 363 |
}
|
| 364 |
-
exit;
|
| 365 |
}
|
| 366 |
|
| 367 |
-
// If either cURL is not available or fopen() did not succeed,
|
| 368 |
-
// using
|
| 369 |
-
//
|
| 370 |
-
// or just cURL but without .
|
| 371 |
unset( $args['blocking'] );
|
| 372 |
-
$this->proxy_url_fallback( $
|
| 373 |
|
| 374 |
exit;
|
| 375 |
}
|
|
@@ -537,7 +540,11 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 537 |
*/
|
| 538 |
public function parse_url_permissions_check() {
|
| 539 |
if ( ! $this->story_post_type->has_cap( 'edit_posts' ) ) {
|
| 540 |
-
return new WP_Error(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
}
|
| 542 |
|
| 543 |
return true;
|
|
@@ -579,7 +586,7 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 579 |
* @since 1.22.0
|
| 580 |
*
|
| 581 |
* @param string $url Request URL.
|
| 582 |
-
* @return string|false URL or false on failure.
|
| 583 |
*/
|
| 584 |
private function validate_url( string $url ) {
|
| 585 |
if ( '' === $url || is_numeric( $url ) ) {
|
|
@@ -592,12 +599,6 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 592 |
return false;
|
| 593 |
}
|
| 594 |
|
| 595 |
-
/**
|
| 596 |
-
* URL parts.
|
| 597 |
-
*
|
| 598 |
-
* @var array|false $parsed_url
|
| 599 |
-
* @phpstan-var URLParts|false $parsed_url
|
| 600 |
-
*/
|
| 601 |
$parsed_url = wp_parse_url( $url );
|
| 602 |
if ( ! $parsed_url || ! isset( $parsed_url['host'], $parsed_url['scheme'] ) ) {
|
| 603 |
return false;
|
|
@@ -618,12 +619,6 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 618 |
*/
|
| 619 |
$home_url = get_option( 'home' );
|
| 620 |
|
| 621 |
-
/**
|
| 622 |
-
* URL parts of home URL.
|
| 623 |
-
*
|
| 624 |
-
* @var array|false $parsed_home
|
| 625 |
-
* @phpstan-var URLParts|false $parsed_home
|
| 626 |
-
*/
|
| 627 |
$parsed_home = wp_parse_url( $home_url );
|
| 628 |
|
| 629 |
if ( ! $parsed_home ) {
|
|
@@ -654,15 +649,8 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 654 |
return false;
|
| 655 |
}
|
| 656 |
|
| 657 |
-
//
|
| 658 |
-
$validated_url =
|
| 659 |
-
'%1$s://%2$s%3$s%4$s%5$s',
|
| 660 |
-
$parsed_url['scheme'],
|
| 661 |
-
$ip,
|
| 662 |
-
isset( $parsed_url['port'] ) ? ":${parsed_url['port']}" : '',
|
| 663 |
-
$parsed_url['path'] ?? '',
|
| 664 |
-
isset( $parsed_url['query'] ) ? "?${parsed_url['query']}" : ''
|
| 665 |
-
);
|
| 666 |
}
|
| 667 |
|
| 668 |
/** This filter is documented in wp-includes/http.php */
|
|
@@ -681,14 +669,57 @@ class Hotlinking_Controller extends REST_Controller implements HasRequirements {
|
|
| 681 |
return false;
|
| 682 |
}
|
| 683 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 684 |
/**
|
| 685 |
* Modifies the cURL configuration before the request is executed.
|
| 686 |
*
|
| 687 |
* @since 1.15.0
|
| 688 |
*
|
| 689 |
-
* @param resource $handle The cURL handle returned by curl_init() (passed by reference).
|
| 690 |
*/
|
| 691 |
-
public function modify_curl_configuration(
|
| 692 |
// Just some safeguard in case cURL is not really available,
|
| 693 |
// despite this method being run in the context of WP_Http_Curl.
|
| 694 |
if ( ! function_exists( 'curl_setopt' ) ) {
|
| 193 |
$raw_url = $request['url'];
|
| 194 |
$raw_url = untrailingslashit( $raw_url );
|
| 195 |
|
| 196 |
+
$url_or_ip = $this->validate_url( $raw_url );
|
| 197 |
|
| 198 |
$host = wp_parse_url( $raw_url, PHP_URL_HOST );
|
| 199 |
|
| 200 |
+
if ( ! $url_or_ip || ! $host ) {
|
| 201 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 400 ] );
|
| 202 |
}
|
| 203 |
|
| 206 |
*
|
| 207 |
* @since 1.11.0
|
| 208 |
*
|
| 209 |
+
* @param int $time Time to live (in seconds). Default is 1 day.
|
| 210 |
+
* @param string $url The attempted URL.
|
| 211 |
*/
|
| 212 |
+
$cache_ttl = apply_filters( 'web_stories_hotlinking_url_data_cache_ttl', DAY_IN_SECONDS, $raw_url );
|
| 213 |
+
$cache_key = 'web_stories_url_data_' . md5( $raw_url );
|
| 214 |
|
| 215 |
$data = get_transient( $cache_key );
|
| 216 |
if ( \is_string( $data ) && ! empty( $data ) ) {
|
| 227 |
}
|
| 228 |
}
|
| 229 |
|
| 230 |
+
$callback = $this->get_curl_resolve_callback( $raw_url, $url_or_ip );
|
| 231 |
+
add_action( 'http_api_curl', $callback );
|
| 232 |
+
|
| 233 |
$response = wp_safe_remote_head(
|
| 234 |
+
$raw_url,
|
| 235 |
[
|
| 236 |
'redirection' => 0, // No redirects allowed.
|
| 237 |
'headers' => [
|
| 239 |
],
|
| 240 |
]
|
| 241 |
);
|
| 242 |
+
|
| 243 |
+
remove_action( 'http_api_curl', $callback );
|
| 244 |
+
|
| 245 |
if ( is_wp_error( $response ) && 'http_request_failed' === $response->get_error_code() ) {
|
| 246 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 404 ] );
|
| 247 |
}
|
| 258 |
}
|
| 259 |
$file_size = (int) $headers['content-length'];
|
| 260 |
|
| 261 |
+
$path = wp_parse_url( $raw_url, PHP_URL_PATH );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
|
| 263 |
if ( ! \is_string( $path ) ) {
|
| 264 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 404 ] );
|
| 315 |
$raw_url = $request['url'];
|
| 316 |
$raw_url = untrailingslashit( $raw_url );
|
| 317 |
|
| 318 |
+
$url_or_ip = $this->validate_url( $raw_url );
|
| 319 |
|
| 320 |
$host = wp_parse_url( $raw_url, PHP_URL_HOST );
|
| 321 |
|
| 322 |
+
if ( ! $url_or_ip || ! $host ) {
|
| 323 |
return new WP_Error( 'rest_invalid_url', __( 'Invalid URL', 'web-stories' ), [ 'status' => 400 ] );
|
| 324 |
}
|
| 325 |
|
| 344 |
'redirection' => 0, // No redirects allowed.
|
| 345 |
];
|
| 346 |
|
| 347 |
+
$callback = $this->get_curl_resolve_callback( $raw_url, $url_or_ip );
|
| 348 |
+
add_action( 'http_api_curl', $callback );
|
| 349 |
+
|
| 350 |
$http = _wp_http_get_object();
|
| 351 |
+
$transport = $http->_get_first_available_transport( $args, $raw_url );
|
| 352 |
|
| 353 |
// When cURL is available, we might be able to use it together with fopen().
|
| 354 |
if ( 'WP_Http_Curl' === $transport ) {
|
| 363 |
|
| 364 |
if ( $stream_handle ) {
|
| 365 |
$this->stream_handle = $stream_handle;
|
| 366 |
+
$this->proxy_url_curl( $raw_url, $args );
|
| 367 |
+
exit;
|
| 368 |
}
|
|
|
|
| 369 |
}
|
| 370 |
|
| 371 |
+
// If either cURL is not available or fopen() did not succeed,
|
| 372 |
+
// fall back to using whatever else is set up on the site,
|
| 373 |
+
// presumably WP_Http_Streams or still WP_Http_Curl but without streams.
|
|
|
|
| 374 |
unset( $args['blocking'] );
|
| 375 |
+
$this->proxy_url_fallback( $raw_url, $args );
|
| 376 |
|
| 377 |
exit;
|
| 378 |
}
|
| 540 |
*/
|
| 541 |
public function parse_url_permissions_check() {
|
| 542 |
if ( ! $this->story_post_type->has_cap( 'edit_posts' ) ) {
|
| 543 |
+
return new WP_Error(
|
| 544 |
+
'rest_forbidden',
|
| 545 |
+
__( 'Sorry, you are not allowed to insert external media.', 'web-stories' ),
|
| 546 |
+
[ 'status' => rest_authorization_required_code() ]
|
| 547 |
+
);
|
| 548 |
}
|
| 549 |
|
| 550 |
return true;
|
| 586 |
* @since 1.22.0
|
| 587 |
*
|
| 588 |
* @param string $url Request URL.
|
| 589 |
+
* @return string|false Original URL, resolved IP address, or false on failure.
|
| 590 |
*/
|
| 591 |
private function validate_url( string $url ) {
|
| 592 |
if ( '' === $url || is_numeric( $url ) ) {
|
| 599 |
return false;
|
| 600 |
}
|
| 601 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 602 |
$parsed_url = wp_parse_url( $url );
|
| 603 |
if ( ! $parsed_url || ! isset( $parsed_url['host'], $parsed_url['scheme'] ) ) {
|
| 604 |
return false;
|
| 619 |
*/
|
| 620 |
$home_url = get_option( 'home' );
|
| 621 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 622 |
$parsed_home = wp_parse_url( $home_url );
|
| 623 |
|
| 624 |
if ( ! $parsed_home ) {
|
| 649 |
return false;
|
| 650 |
}
|
| 651 |
|
| 652 |
+
// Use resolved IP address to avoid DNS rebinding issues.
|
| 653 |
+
$validated_url = $ip;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 654 |
}
|
| 655 |
|
| 656 |
/** This filter is documented in wp-includes/http.php */
|
| 669 |
return false;
|
| 670 |
}
|
| 671 |
|
| 672 |
+
/**
|
| 673 |
+
* Returns a callback to modify the cURL configuration before the request is executed.
|
| 674 |
+
*
|
| 675 |
+
* @since 1.22.1
|
| 676 |
+
*
|
| 677 |
+
* @param string $url URL.
|
| 678 |
+
* @param string $url_or_ip URL or IP address.
|
| 679 |
+
*/
|
| 680 |
+
public function get_curl_resolve_callback( string $url, string $url_or_ip ): callable {
|
| 681 |
+
/**
|
| 682 |
+
* CURL configuration callback.
|
| 683 |
+
*
|
| 684 |
+
* @param resource $handle The cURL handle returned by curl_init() (passed by reference).
|
| 685 |
+
*/
|
| 686 |
+
return static function( $handle ) use ( $url, $url_or_ip ): void {
|
| 687 |
+
// Just some safeguard in case cURL is not really available,
|
| 688 |
+
// despite this method being run in the context of WP_Http_Curl.
|
| 689 |
+
if ( ! function_exists( 'curl_setopt' ) ) {
|
| 690 |
+
return;
|
| 691 |
+
}
|
| 692 |
+
|
| 693 |
+
if ( $url === $url_or_ip ) {
|
| 694 |
+
return;
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
$host = wp_parse_url( $url, PHP_URL_HOST );
|
| 698 |
+
$scheme = wp_parse_url( $url, PHP_URL_SCHEME ) ?? 'http';
|
| 699 |
+
$port = wp_parse_url( $url, PHP_URL_PORT ) ?? 'http' === $scheme ? 80 : 443;
|
| 700 |
+
|
| 701 |
+
// phpcs:disable WordPress.WP.AlternativeFunctions.curl_curl_setopt
|
| 702 |
+
|
| 703 |
+
curl_setopt(
|
| 704 |
+
$handle,
|
| 705 |
+
CURLOPT_RESOLVE,
|
| 706 |
+
[
|
| 707 |
+
"$host:$port:$url_or_ip",
|
| 708 |
+
]
|
| 709 |
+
);
|
| 710 |
+
|
| 711 |
+
// phpcs:enable WordPress.WP.AlternativeFunctions.curl_curl_setopt
|
| 712 |
+
};
|
| 713 |
+
}
|
| 714 |
+
|
| 715 |
/**
|
| 716 |
* Modifies the cURL configuration before the request is executed.
|
| 717 |
*
|
| 718 |
* @since 1.15.0
|
| 719 |
*
|
| 720 |
+
* @param resource $handle The cURL handle returned by {@see curl_init()} (passed by reference).
|
| 721 |
*/
|
| 722 |
+
public function modify_curl_configuration( $handle ): void {
|
| 723 |
// Just some safeguard in case cURL is not really available,
|
| 724 |
// despite this method being run in the context of WP_Http_Curl.
|
| 725 |
if ( ! function_exists( 'curl_setopt' ) ) {
|
includes/namespace.php
CHANGED
|
@@ -198,6 +198,11 @@ function rest_preload_api_request( $memo, $path ): array {
|
|
| 198 |
}
|
| 199 |
}
|
| 200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 201 |
$path_parts = wp_parse_url( (string) $path );
|
| 202 |
if ( ! \is_array( $path_parts ) ) {
|
| 203 |
return $memo;
|
| 198 |
}
|
| 199 |
}
|
| 200 |
|
| 201 |
+
/**
|
| 202 |
+
* URL parts.
|
| 203 |
+
*
|
| 204 |
+
* @var array{path:string, query?: string} $path_parts
|
| 205 |
+
*/
|
| 206 |
$path_parts = wp_parse_url( (string) $path );
|
| 207 |
if ( ! \is_array( $path_parts ) ) {
|
| 208 |
return $memo;
|
includes/vendor/autoload.php
CHANGED
|
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
| 9 |
|
| 10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 11 |
|
| 12 |
-
return
|
| 9 |
|
| 10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 11 |
|
| 12 |
+
return ComposerAutoloaderInitb24927f7c847b7d88709f1389384aa65::getLoader();
|
includes/vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -22,12 +22,12 @@ class ComposerAutoloaderInitd83ce37d3c4c87220357a20820df86f1
|
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
-
spl_autoload_register(array('
|
| 26 |
self::$loader = $loader = new \Google_Web_Stories_Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
| 27 |
-
spl_autoload_unregister(array('
|
| 28 |
|
| 29 |
require __DIR__ . '/autoload_static.php';
|
| 30 |
-
call_user_func(\Google_Web_Stories_Composer\Autoload\
|
| 31 |
|
| 32 |
$loader->setClassMapAuthoritative(true);
|
| 33 |
$loader->register(true);
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInitb24927f7c847b7d88709f1389384aa65
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
+
spl_autoload_register(array('ComposerAutoloaderInitb24927f7c847b7d88709f1389384aa65', 'loadClassLoader'), true, true);
|
| 26 |
self::$loader = $loader = new \Google_Web_Stories_Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
| 27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitb24927f7c847b7d88709f1389384aa65', 'loadClassLoader'));
|
| 28 |
|
| 29 |
require __DIR__ . '/autoload_static.php';
|
| 30 |
+
call_user_func(\Google_Web_Stories_Composer\Autoload\ComposerStaticInitb24927f7c847b7d88709f1389384aa65::getInitializer($loader));
|
| 31 |
|
| 32 |
$loader->setClassMapAuthoritative(true);
|
| 33 |
$loader->register(true);
|
includes/vendor/composer/autoload_static.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
namespace Google_Web_Stories_Composer\Autoload;
|
| 6 |
|
| 7 |
-
class
|
| 8 |
{
|
| 9 |
public static $classMap = array (
|
| 10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -184,7 +184,7 @@ class ComposerStaticInitd83ce37d3c4c87220357a20820df86f1
|
|
| 184 |
public static function getInitializer(ClassLoader $loader)
|
| 185 |
{
|
| 186 |
return \Closure::bind(function () use ($loader) {
|
| 187 |
-
$loader->classMap =
|
| 188 |
|
| 189 |
}, null, ClassLoader::class);
|
| 190 |
}
|
| 4 |
|
| 5 |
namespace Google_Web_Stories_Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInitb24927f7c847b7d88709f1389384aa65
|
| 8 |
{
|
| 9 |
public static $classMap = array (
|
| 10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
| 184 |
public static function getInitializer(ClassLoader $loader)
|
| 185 |
{
|
| 186 |
return \Closure::bind(function () use ($loader) {
|
| 187 |
+
$loader->classMap = ComposerStaticInitb24927f7c847b7d88709f1389384aa65::$classMap;
|
| 188 |
|
| 189 |
}, null, ClassLoader::class);
|
| 190 |
}
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Contributors: google
|
| 4 |
Tested up to: 6.0
|
| 5 |
Requires at least: 5.5
|
| 6 |
-
Stable tag: 1.
|
| 7 |
License: Apache License 2.0
|
| 8 |
License URI: https://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
Tags: web stories, stories, amp, storytelling, google
|
|
@@ -109,6 +109,12 @@ Web Stories are powered by [AMP](https://amp.dev/), which adds some restrictions
|
|
| 109 |
|
| 110 |
For the plugin's full changelog, please see [the Releases page on GitHub](https://github.com/googleforcreators/web-stories-wp/releases).
|
| 111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
= 1.22.0 =
|
| 113 |
|
| 114 |
**Release Date:** June 21, 2022.
|
|
@@ -124,18 +130,11 @@ For the plugin's full changelog, please see [the Releases page on GitHub](https:
|
|
| 124 |
|
| 125 |
* Fixes an issue related to roles and capabilities that caused interference with other plugins.
|
| 126 |
|
| 127 |
-
|
| 128 |
|
| 129 |
-
|
| 130 |
|
| 131 |
-
|
| 132 |
-
* Enhancement: added support for hotlinking background audio and caption files
|
| 133 |
-
* Enhancement: added support for locking layers/elements on the canvas
|
| 134 |
-
* Enhancement: added warning when using animations on the first page of a story
|
| 135 |
-
* Enhancement: improved user feedback when submitting a story for review
|
| 136 |
-
* Bug fixes and performance improvements.
|
| 137 |
-
|
| 138 |
-
== Upgrade Notice ==
|
| 139 |
|
| 140 |
= 1.22.0 =
|
| 141 |
|
|
@@ -144,7 +143,3 @@ This release brings shopping support, layers grouping/masking/naming, and catego
|
|
| 144 |
= 1.21.1 =
|
| 145 |
|
| 146 |
This releases fixes an issue related to roles and capabilities that caused interference with other plugins.
|
| 147 |
-
|
| 148 |
-
= 1.21.0 =
|
| 149 |
-
|
| 150 |
-
This release includes WordPress 6.0 compatibility, audio and captions hotlinking, the ability to lock individual layers, as well as various bug fixes and performance improvements.
|
| 3 |
Contributors: google
|
| 4 |
Tested up to: 6.0
|
| 5 |
Requires at least: 5.5
|
| 6 |
+
Stable tag: 1.22.0
|
| 7 |
License: Apache License 2.0
|
| 8 |
License URI: https://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
Tags: web stories, stories, amp, storytelling, google
|
| 109 |
|
| 110 |
For the plugin's full changelog, please see [the Releases page on GitHub](https://github.com/googleforcreators/web-stories-wp/releases).
|
| 111 |
|
| 112 |
+
= 1.22.1 =
|
| 113 |
+
|
| 114 |
+
**Release Date:** June 30, 2022.
|
| 115 |
+
|
| 116 |
+
* Fixes an issue with inserting external media by URL.
|
| 117 |
+
|
| 118 |
= 1.22.0 =
|
| 119 |
|
| 120 |
**Release Date:** June 21, 2022.
|
| 130 |
|
| 131 |
* Fixes an issue related to roles and capabilities that caused interference with other plugins.
|
| 132 |
|
| 133 |
+
== Upgrade Notice ==
|
| 134 |
|
| 135 |
+
= 1.22.1 =
|
| 136 |
|
| 137 |
+
This release fixes an issue with inserting external media by URL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
= 1.22.0 =
|
| 140 |
|
| 143 |
= 1.21.1 =
|
| 144 |
|
| 145 |
This releases fixes an issue related to roles and capabilities that caused interference with other plugins.
|
|
|
|
|
|
|
|
|
|
|
|
third-party/vendor/autoload.php
CHANGED
|
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
| 9 |
|
| 10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 11 |
|
| 12 |
-
return
|
| 9 |
|
| 10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 11 |
|
| 12 |
+
return ComposerAutoloaderInitdc847881a01fb215d192e481a3aba463::getLoader();
|
third-party/vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -22,12 +22,12 @@ class ComposerAutoloaderInit7d026df26f0bd298912546a3b4bfdf6a
|
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
-
spl_autoload_register(array('
|
| 26 |
self::$loader = $loader = new \Google_Web_Stories_Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
| 27 |
-
spl_autoload_unregister(array('
|
| 28 |
|
| 29 |
require __DIR__ . '/autoload_static.php';
|
| 30 |
-
call_user_func(\Google_Web_Stories_Composer\Autoload\
|
| 31 |
|
| 32 |
$loader->setClassMapAuthoritative(true);
|
| 33 |
$loader->register(true);
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInitdc847881a01fb215d192e481a3aba463
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 22 |
return self::$loader;
|
| 23 |
}
|
| 24 |
|
| 25 |
+
spl_autoload_register(array('ComposerAutoloaderInitdc847881a01fb215d192e481a3aba463', 'loadClassLoader'), true, true);
|
| 26 |
self::$loader = $loader = new \Google_Web_Stories_Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
| 27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitdc847881a01fb215d192e481a3aba463', 'loadClassLoader'));
|
| 28 |
|
| 29 |
require __DIR__ . '/autoload_static.php';
|
| 30 |
+
call_user_func(\Google_Web_Stories_Composer\Autoload\ComposerStaticInitdc847881a01fb215d192e481a3aba463::getInitializer($loader));
|
| 31 |
|
| 32 |
$loader->setClassMapAuthoritative(true);
|
| 33 |
$loader->register(true);
|
third-party/vendor/composer/autoload_static.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
namespace Google_Web_Stories_Composer\Autoload;
|
| 6 |
|
| 7 |
-
class
|
| 8 |
{
|
| 9 |
public static $classMap = array (
|
| 10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -1213,7 +1213,7 @@ class ComposerStaticInit7d026df26f0bd298912546a3b4bfdf6a
|
|
| 1213 |
public static function getInitializer(ClassLoader $loader)
|
| 1214 |
{
|
| 1215 |
return \Closure::bind(function () use ($loader) {
|
| 1216 |
-
$loader->classMap =
|
| 1217 |
|
| 1218 |
}, null, ClassLoader::class);
|
| 1219 |
}
|
| 4 |
|
| 5 |
namespace Google_Web_Stories_Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInitdc847881a01fb215d192e481a3aba463
|
| 8 |
{
|
| 9 |
public static $classMap = array (
|
| 10 |
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
| 1213 |
public static function getInitializer(ClassLoader $loader)
|
| 1214 |
{
|
| 1215 |
return \Closure::bind(function () use ($loader) {
|
| 1216 |
+
$loader->classMap = ComposerStaticInitdc847881a01fb215d192e481a3aba463::$classMap;
|
| 1217 |
|
| 1218 |
}, null, ClassLoader::class);
|
| 1219 |
}
|
web-stories.php
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
* Plugin URI: https://wp.stories.google/
|
| 10 |
* Author: Google
|
| 11 |
* Author URI: https://opensource.google.com/
|
| 12 |
-
* Version: 1.22.
|
| 13 |
* Requires at least: 5.5
|
| 14 |
* Requires PHP: 7.2
|
| 15 |
* Text Domain: web-stories
|
|
@@ -40,7 +40,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
| 40 |
exit;
|
| 41 |
}
|
| 42 |
|
| 43 |
-
define( 'WEBSTORIES_VERSION', '1.22.
|
| 44 |
define( 'WEBSTORIES_DB_VERSION', '3.0.14' );
|
| 45 |
define( 'WEBSTORIES_AMP_VERSION', '2.3.0-alpha' ); // Version of the AMP library included in the plugin.
|
| 46 |
define( 'WEBSTORIES_PLUGIN_FILE', __FILE__ );
|
| 9 |
* Plugin URI: https://wp.stories.google/
|
| 10 |
* Author: Google
|
| 11 |
* Author URI: https://opensource.google.com/
|
| 12 |
+
* Version: 1.22.1
|
| 13 |
* Requires at least: 5.5
|
| 14 |
* Requires PHP: 7.2
|
| 15 |
* Text Domain: web-stories
|
| 40 |
exit;
|
| 41 |
}
|
| 42 |
|
| 43 |
+
define( 'WEBSTORIES_VERSION', '1.22.1' );
|
| 44 |
define( 'WEBSTORIES_DB_VERSION', '3.0.14' );
|
| 45 |
define( 'WEBSTORIES_AMP_VERSION', '2.3.0-alpha' ); // Version of the AMP library included in the plugin.
|
| 46 |
define( 'WEBSTORIES_PLUGIN_FILE', __FILE__ );
|
