From e3803a72f01852df17ac3e891b0597800e002add Mon Sep 17 00:00:00 2001 From: Frank Corso Date: Tue, 22 Dec 2020 11:05:00 -0500 Subject: [PATCH] Automatically load popups when menu item triggers popup Issue #543 --- includes/modules/menus.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/modules/menus.php b/includes/modules/menus.php index 6faad872c..cd789d759 100644 --- a/includes/modules/menus.php +++ b/includes/modules/menus.php @@ -115,6 +115,10 @@ public static function merge_item_data( $item ) { } if ( isset( $item->popup_id ) ) { + $popup = pum_get_popup( $item->popup_id ); + if ( $popup->is_enabled() ) { + PUM_Site_Popups::preload_popup( $popup ); + } $item->classes[] = 'popmake-' . $item->popup_id; }