File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/dashboard/widgets Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public function init() {
1818 register_post_type ( self ::notepad_post_type, array (
1919 'rewrite ' => false ,
2020 'label ' => __ ( 'Dashboard Note ' , 'edit-flow ' )
21- )
21+ )
2222 );
2323
2424 $ this ->edit_cap = apply_filters ( 'ef_dashboard_notepad_edit_cap ' , $ this ->edit_cap );
@@ -45,13 +45,13 @@ public function handle_notepad_update() {
4545 }
4646
4747 $ note_data = array (
48- 'post_content ' => wp_filter_nohtml_kses ( $ _POST ['note ' ] ),
48+ 'post_content ' => isset ( $ _POST [ ' note ' ] ) ? wp_filter_nohtml_kses ( $ _POST ['note ' ] ) : '' ,
4949 'post_type ' => self ::notepad_post_type,
5050 'post_status ' => 'draft ' ,
5151 'post_author ' => get_current_user_id (),
5252 );
5353
54- $ existing_notepad = get_post ( absint ( $ _POST ['notepad-id ' ] ) );
54+ $ existing_notepad = isset ( $ _POST [ ' notepad-id ' ] ) ? get_post ( absint ( $ _POST ['notepad-id ' ] ) ) : null ;
5555 if ( isset ( $ existing_notepad ->post_type ) && self ::notepad_post_type === $ existing_notepad ->post_type ) {
5656 $ note_data ['ID ' ] = $ existing_notepad ->ID ;
5757 }
You can’t perform that action at this time.
0 commit comments