Skip to content

Commit

Permalink
fix(shownotes): osf import
Browse files Browse the repository at this point in the history
  • Loading branch information
eteubert committed Mar 20, 2021
1 parent 6788f8e commit 1b62aca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/modules/shownotes/rest_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,13 @@ public function import_osf($request)
];
$parsed = osf_parser($shownotes, $data);

$links = $parsed['export'][0]['subitems'];
$links = [];

foreach ($parsed['export'] as $group) {
foreach ($group['subitems'] as $link) {
$links[] = $link;
}
}

if (!is_array($links)) {
return new \WP_Error(
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ This product includes GeoLite2 data created by MaxMind, available from http://ww
= 2021-03-20 =

- shownotes: show images
- shownotes: fix osf importer
- #1194 fix calling wptexturize too early

= 2021-03-11 =
Expand Down

0 comments on commit 1b62aca

Please sign in to comment.