Skip to content

Commit 7001d8d

Browse files
committed
Pass empty post id to 'siteorigin_panels_data' filter to avoid potential fatal errors.
1 parent 4a0f340 commit 7001d8d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
lang/siteorigin-panels.mo
1+
lang/*
2+
languages/*
23
.DS_Store
34
*.min.js
45
node_modules/

inc/admin-layouts.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function action_get_prebuilt_layout() {
269269
$panels_data = get_post_meta( $_REQUEST['lid'], 'panels_data', true );
270270
}
271271

272-
$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data );
272+
$panels_data = apply_filters( 'siteorigin_panels_data', $panels_data, false );
273273

274274
$panels_data['widgets'] = SiteOrigin_Panels_Admin::single()->process_raw_widgets( $panels_data['widgets'], array(), true, true );
275275

@@ -322,4 +322,4 @@ function action_directory_enable() {
322322
update_user_meta( $user, 'so_panels_directory_enabled', true );
323323
wp_die();
324324
}
325-
}
325+
}

0 commit comments

Comments
 (0)