Version Description
(2021-03-04) =
Changed - Now compatible with PHP8
Fixed - An error, caused by curly braces offset access syntax, which is not supported in PHP8.
Download this release
Release Info
Developer | Mekku |
Plugin | Spotlight Social Media Feeds |
Version | 0.6.1 |
Comparing to | |
See all releases |
Code changes from version 0.6 to 0.6.1
- core/Engine/MediaItem.php +2 -2
- core/RestApi/EndPoints/AbstractEndpointHandler.php +19 -4
- plugin.json +1 -1
- plugin.php +2 -2
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/composer/InstalledVersions.php +6 -6
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +6 -6
core/Engine/MediaItem.php
CHANGED
@@ -45,12 +45,12 @@ class MediaItem
|
|
45 |
*/
|
46 |
public static function isExpiredStory(Item $media): bool
|
47 |
{
|
48 |
-
if ($media->data
|
49 |
return false;
|
50 |
}
|
51 |
|
52 |
try {
|
53 |
-
$datetime = new DateTime($media->data
|
54 |
$diff = time() - $datetime->getTimestamp();
|
55 |
|
56 |
return $diff > IgMedia::STORY_MAX_LIFE;
|
45 |
*/
|
46 |
public static function isExpiredStory(Item $media): bool
|
47 |
{
|
48 |
+
if ($media->data[static::SOURCE_TYPE] !== StorySource::TYPE) {
|
49 |
return false;
|
50 |
}
|
51 |
|
52 |
try {
|
53 |
+
$datetime = new DateTime($media->data[static::TIMESTAMP]);
|
54 |
$diff = time() - $datetime->getTimestamp();
|
55 |
|
56 |
return $diff > IgMedia::STORY_MAX_LIFE;
|
core/RestApi/EndPoints/AbstractEndpointHandler.php
CHANGED
@@ -80,7 +80,12 @@ abstract class AbstractEndpointHandler
|
|
80 |
$response->set_data($fData);
|
81 |
$this->responseSent = true;
|
82 |
} catch (Exception $exception) {
|
83 |
-
$this->sendError(
|
|
|
|
|
|
|
|
|
|
|
84 |
}
|
85 |
|
86 |
$this->unregisterErrorHandler();
|
@@ -173,12 +178,17 @@ abstract class AbstractEndpointHandler
|
|
173 |
return;
|
174 |
}
|
175 |
|
176 |
-
$this->sendError($error['type'], $error['message']);
|
177 |
});
|
178 |
|
179 |
// Register the exception handler
|
180 |
$this->prevExceptionHandler = set_exception_handler(function (Throwable $exception) {
|
181 |
-
$this->sendError(
|
|
|
|
|
|
|
|
|
|
|
182 |
});
|
183 |
}
|
184 |
|
@@ -203,8 +213,10 @@ abstract class AbstractEndpointHandler
|
|
203 |
*
|
204 |
* @param int|string $code The error code.
|
205 |
* @param string $message The error message.
|
|
|
|
|
206 |
*/
|
207 |
-
protected function sendError($code, $message)
|
208 |
{
|
209 |
if ($this->responseSent) {
|
210 |
return;
|
@@ -218,6 +230,9 @@ abstract class AbstractEndpointHandler
|
|
218 |
echo json_encode([
|
219 |
'code' => $code,
|
220 |
'message' => $lines[0],
|
|
|
|
|
|
|
221 |
]);
|
222 |
|
223 |
die;
|
80 |
$response->set_data($fData);
|
81 |
$this->responseSent = true;
|
82 |
} catch (Exception $exception) {
|
83 |
+
$this->sendError(
|
84 |
+
$exception->getCode(),
|
85 |
+
$exception->getMessage(),
|
86 |
+
$exception->getFile(),
|
87 |
+
$exception->getLine()
|
88 |
+
);
|
89 |
}
|
90 |
|
91 |
$this->unregisterErrorHandler();
|
178 |
return;
|
179 |
}
|
180 |
|
181 |
+
$this->sendError($error['type'], $error['message'], $error['file'], $error['line']);
|
182 |
});
|
183 |
|
184 |
// Register the exception handler
|
185 |
$this->prevExceptionHandler = set_exception_handler(function (Throwable $exception) {
|
186 |
+
$this->sendError(
|
187 |
+
$exception->getCode(),
|
188 |
+
$exception->getMessage(),
|
189 |
+
$exception->getFile(),
|
190 |
+
$exception->getLine()
|
191 |
+
);
|
192 |
});
|
193 |
}
|
194 |
|
213 |
*
|
214 |
* @param int|string $code The error code.
|
215 |
* @param string $message The error message.
|
216 |
+
* @param string $file
|
217 |
+
* @param int $line
|
218 |
*/
|
219 |
+
protected function sendError($code, $message = '', $file = '', $line = 0)
|
220 |
{
|
221 |
if ($this->responseSent) {
|
222 |
return;
|
230 |
echo json_encode([
|
231 |
'code' => $code,
|
232 |
'message' => $lines[0],
|
233 |
+
'details' => $message,
|
234 |
+
'file' => $file,
|
235 |
+
'line' => $line,
|
236 |
]);
|
237 |
|
238 |
die;
|
plugin.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"name": "Spotlight - Social Media Feeds",
|
3 |
"description": "Easily embed beautiful Instagram feeds on your WordPress site.",
|
4 |
-
"version": "0.6",
|
5 |
"url": "https://spotlightwp.com",
|
6 |
"author": "RebelCode",
|
7 |
"authorUrl": "https://rebelcode.com",
|
1 |
{
|
2 |
"name": "Spotlight - Social Media Feeds",
|
3 |
"description": "Easily embed beautiful Instagram feeds on your WordPress site.",
|
4 |
+
"version": "0.6.1",
|
5 |
"url": "https://spotlightwp.com",
|
6 |
"author": "RebelCode",
|
7 |
"authorUrl": "https://rebelcode.com",
|
plugin.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
*
|
6 |
* Plugin Name: Spotlight - Social Media Feeds
|
7 |
* Description: Easily embed beautiful Instagram feeds on your WordPress site.
|
8 |
-
* Version: 0.6
|
9 |
* Author: RebelCode
|
10 |
* Plugin URI: https://spotlightwp.com
|
11 |
* Author URI: https://rebelcode.com
|
@@ -55,7 +55,7 @@ slInstaRunPlugin(__FILE__, function (SlInstaRuntime $sli) {
|
|
55 |
// The plugin name
|
56 |
define('SL_INSTA_NAME', 'Spotlight - Social Media Feeds');
|
57 |
// The plugin version
|
58 |
-
define('SL_INSTA_VERSION', '0.6');
|
59 |
// The path to the plugin's main file
|
60 |
define('SL_INSTA_FILE', __FILE__);
|
61 |
// The dir to the plugin's directory
|
5 |
*
|
6 |
* Plugin Name: Spotlight - Social Media Feeds
|
7 |
* Description: Easily embed beautiful Instagram feeds on your WordPress site.
|
8 |
+
* Version: 0.6.1
|
9 |
* Author: RebelCode
|
10 |
* Plugin URI: https://spotlightwp.com
|
11 |
* Author URI: https://rebelcode.com
|
55 |
// The plugin name
|
56 |
define('SL_INSTA_NAME', 'Spotlight - Social Media Feeds');
|
57 |
// The plugin version
|
58 |
+
define('SL_INSTA_VERSION', '0.6.1');
|
59 |
// The path to the plugin's main file
|
60 |
define('SL_INSTA_FILE', __FILE__);
|
61 |
// The dir to the plugin's directory
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: Instagram, Instagram feed, Instagram feeds, Instagram widget, Instagram em
|
|
6 |
Requires at least: 5.0
|
7 |
Requires PHP: 7.1
|
8 |
Tested up to: 5.7
|
9 |
-
Stable tag: 0.6
|
10 |
License: GPLv3
|
11 |
|
12 |
Instagram feeds for your WordPress site. A simple no-code solution to connect your Instagram account, design responsive feeds, and embed them anywhere you want.
|
@@ -269,6 +269,14 @@ There are a few reasons that this may happen. We have documented the reasons and
|
|
269 |
|
270 |
== Changelog ==
|
271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
= 0.6 (2021-03-03) =
|
273 |
|
274 |
**Added**
|
6 |
Requires at least: 5.0
|
7 |
Requires PHP: 7.1
|
8 |
Tested up to: 5.7
|
9 |
+
Stable tag: 0.6.1
|
10 |
License: GPLv3
|
11 |
|
12 |
Instagram feeds for your WordPress site. A simple no-code solution to connect your Instagram account, design responsive feeds, and embed them anywhere you want.
|
269 |
|
270 |
== Changelog ==
|
271 |
|
272 |
+
= 0.6.1 (2021-03-04) =
|
273 |
+
|
274 |
+
**Changed**
|
275 |
+
- Now compatible with PHP8
|
276 |
+
|
277 |
+
**Fixed**
|
278 |
+
- An error, caused by curly braces offset access syntax, which is not supported in PHP8.
|
279 |
+
|
280 |
= 0.6 (2021-03-03) =
|
281 |
|
282 |
**Added**
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit5144b910e5855d3ae996cfed67e1c105::getLoader();
|
vendor/composer/InstalledVersions.php
CHANGED
@@ -25,12 +25,12 @@ class InstalledVersions
|
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
-
'pretty_version' => 'dev-
|
29 |
-
'version' => 'dev-
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
-
'reference' => '
|
34 |
'name' => 'rebelcode/instagram',
|
35 |
),
|
36 |
'versions' =>
|
@@ -233,12 +233,12 @@ private static $installed = array (
|
|
233 |
),
|
234 |
'rebelcode/instagram' =>
|
235 |
array (
|
236 |
-
'pretty_version' => 'dev-
|
237 |
-
'version' => 'dev-
|
238 |
'aliases' =>
|
239 |
array (
|
240 |
),
|
241 |
-
'reference' => '
|
242 |
),
|
243 |
'symfony/polyfill-intl-idn' =>
|
244 |
array (
|
25 |
private static $installed = array (
|
26 |
'root' =>
|
27 |
array (
|
28 |
+
'pretty_version' => 'dev-develop',
|
29 |
+
'version' => 'dev-develop',
|
30 |
'aliases' =>
|
31 |
array (
|
32 |
),
|
33 |
+
'reference' => '32e052d7c7225112edadfb79866c4a13d83c6418',
|
34 |
'name' => 'rebelcode/instagram',
|
35 |
),
|
36 |
'versions' =>
|
233 |
),
|
234 |
'rebelcode/instagram' =>
|
235 |
array (
|
236 |
+
'pretty_version' => 'dev-develop',
|
237 |
+
'version' => 'dev-develop',
|
238 |
'aliases' =>
|
239 |
array (
|
240 |
),
|
241 |
+
'reference' => '32e052d7c7225112edadfb79866c4a13d83c6418',
|
242 |
),
|
243 |
'symfony/polyfill-intl-idn' =>
|
244 |
array (
|
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 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInitd2b15adc0cde1ac93a003139ac0b9a99
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,19 +53,19 @@ class ComposerAutoloaderInitd2b15adc0cde1ac93a003139ac0b9a99
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
function
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit5144b910e5855d3ae996cfed67e1c105
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit5144b910e5855d3ae996cfed67e1c105', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit5144b910e5855d3ae996cfed67e1c105', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit5144b910e5855d3ae996cfed67e1c105::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit5144b910e5855d3ae996cfed67e1c105::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequire5144b910e5855d3ae996cfed67e1c105($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
function composerRequire5144b910e5855d3ae996cfed67e1c105($fileIdentifier, $file)
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
@@ -607,9 +607,9 @@ class ComposerStaticInitd2b15adc0cde1ac93a003139ac0b9a99
|
|
607 |
public static function getInitializer(ClassLoader $loader)
|
608 |
{
|
609 |
return \Closure::bind(function () use ($loader) {
|
610 |
-
$loader->prefixLengthsPsr4 =
|
611 |
-
$loader->prefixDirsPsr4 =
|
612 |
-
$loader->classMap =
|
613 |
|
614 |
}, null, ClassLoader::class);
|
615 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit5144b910e5855d3ae996cfed67e1c105
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php',
|
607 |
public static function getInitializer(ClassLoader $loader)
|
608 |
{
|
609 |
return \Closure::bind(function () use ($loader) {
|
610 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit5144b910e5855d3ae996cfed67e1c105::$prefixLengthsPsr4;
|
611 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit5144b910e5855d3ae996cfed67e1c105::$prefixDirsPsr4;
|
612 |
+
$loader->classMap = ComposerStaticInit5144b910e5855d3ae996cfed67e1c105::$classMap;
|
613 |
|
614 |
}, null, ClassLoader::class);
|
615 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
-
'pretty_version' => 'dev-
|
5 |
-
'version' => 'dev-
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
-
'reference' => '
|
10 |
'name' => 'rebelcode/instagram',
|
11 |
),
|
12 |
'versions' =>
|
@@ -209,12 +209,12 @@
|
|
209 |
),
|
210 |
'rebelcode/instagram' =>
|
211 |
array (
|
212 |
-
'pretty_version' => 'dev-
|
213 |
-
'version' => 'dev-
|
214 |
'aliases' =>
|
215 |
array (
|
216 |
),
|
217 |
-
'reference' => '
|
218 |
),
|
219 |
'symfony/polyfill-intl-idn' =>
|
220 |
array (
|
1 |
<?php return array (
|
2 |
'root' =>
|
3 |
array (
|
4 |
+
'pretty_version' => 'dev-develop',
|
5 |
+
'version' => 'dev-develop',
|
6 |
'aliases' =>
|
7 |
array (
|
8 |
),
|
9 |
+
'reference' => '32e052d7c7225112edadfb79866c4a13d83c6418',
|
10 |
'name' => 'rebelcode/instagram',
|
11 |
),
|
12 |
'versions' =>
|
209 |
),
|
210 |
'rebelcode/instagram' =>
|
211 |
array (
|
212 |
+
'pretty_version' => 'dev-develop',
|
213 |
+
'version' => 'dev-develop',
|
214 |
'aliases' =>
|
215 |
array (
|
216 |
),
|
217 |
+
'reference' => '32e052d7c7225112edadfb79866c4a13d83c6418',
|
218 |
),
|
219 |
'symfony/polyfill-intl-idn' =>
|
220 |
array (
|