Skip to content

Commit

Permalink
Automatically load popups when menu item triggers popup
Browse files Browse the repository at this point in the history
Issue #543
  • Loading branch information
fpcorso committed Dec 22, 2020
1 parent 32ba9c1 commit e3803a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/modules/menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit e3803a7

Please sign in to comment.