Skip to content

Commit

Permalink
fix: missing undefined $custom_taxonomies
Browse files Browse the repository at this point in the history
  • Loading branch information
lgersman committed Jun 21, 2023
1 parent 4343c4d commit 76eb948
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#6.2",
"core": "WordPress/WordPress#6.2.2",
"plugins": [
"https://downloads.wordpress.org/plugin/gutenberg.zip",
"./plugins/cm4all-wp-impex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function setUp()
\activate_plugin('ninja-forms/ninja-forms.php');
\activate_plugin('wp-content/plugins/ultimate-maps-by-supsystic/ums.php');

// force reexecution of the import profle registration since we depend on the "all" import provider
// force reexecution of the import profile registration since we depend on the "all" import provider
require __DIR__ . '/../../../cm4all-wp-impex/profiles/import-profile-all.php';

require_once __DIR__ . '/../../plugin.php';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ function _export_wp(array $options, int $chunk_max_items = ContentExporter::OPTI
$cats = [];
$tags = [];
$terms = [];
$custom_taxonomies = [];
if (isset($term) && $term) {
$cat = \get_term($term['term_id'], 'category');
$cats = [$cat->term_id => $cat];
Expand All @@ -179,7 +180,7 @@ function _export_wp(array $options, int $chunk_max_items = ContentExporter::OPTI
$categories = \get_categories(['get' => 'all']);
$tags = \get_tags(array('get' => 'all'));

// @TODO: process only taxonomies of exported post types
// @TODO: process only taxonomies of exported post types
$custom_taxonomies = \get_taxonomies(['_builtin' => false], 'objects');
$custom_terms = \get_terms(
[
Expand Down Expand Up @@ -379,7 +380,7 @@ function _terms_list($terms): array
function _nav_menu_terms(array $blacklist): array
{
$nav_menus = \wp_get_nav_menus();
// @TODO: can this happen ??
// @TODO: can this happen ??
$nav_menus = empty($nav_menus) || !is_array($nav_menus) ? [] : $nav_menus;

$blacklisted_term_ids = array_column($blacklist, 'term_id');
Expand Down

0 comments on commit 76eb948

Please sign in to comment.