We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4089f27 commit 6a242aeCopy full SHA for 6a242ae
functions/events.php
@@ -106,6 +106,10 @@ function sunflower_add_event_meta_boxes() {
106
function sunflower_save_event_meta_boxes() {
107
global $post;
108
109
+ if ( ! isset( $post->ID ) || empty( $_POST ) ) {
110
+ return;
111
+ }
112
+
113
// Do not save, if nonce is invalid.
114
if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $post->ID ) ) {
115
return;
@@ -118,10 +122,6 @@ function sunflower_save_event_meta_boxes() {
118
122
119
123
$sunflower_event_fields = sunflower_get_event_fields();
120
124
121
- if ( ! isset( $post->ID ) ) {
- return;
- }
-
125
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
126
127
}
0 commit comments