Skip to content

Commit

Permalink
fix: made theme mods access safe
Browse files Browse the repository at this point in the history
  • Loading branch information
lgersman committed Jan 15, 2024
1 parent 9fa652e commit c50f841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/cm4all-wp-impex/inc/class-impex-import.php
Expand Up @@ -320,8 +320,8 @@ function _backfill_ids(array &$imported) : void {

// check/fix menus of current theme
$theme_slug = \get_option('stylesheet');
$theme_mods = \get_option("theme_mods_${theme_slug}");
$nav_menu_locations = $theme_mods['nav_menu_locations'] ?: [];
$theme_mods = \get_option("theme_mods_${theme_slug}", \get_theme_mods());
$nav_menu_locations = $theme_mods['nav_menu_locations'] ?? [];
// https://wordpress.stackexchange.com/questions/124658/setting-a-default-theme-location-when-creating-a-menu

$nav_menus = \wp_get_nav_menus();
Expand Down

0 comments on commit c50f841

Please sign in to comment.