Skip to content

Commit c5b4534

Browse files
committed
Bug fixed: Checkbox not working in frontend dashboard
1 parent 27693bf commit c5b4534

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

frontend/controller/posts.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,7 @@ function fed_process_dashboard_add_new_post( $post ) {
403403
}
404404

405405
foreach ( $extras as $index => $extra ) {
406-
if ( isset( $post[ $index ] ) ) {
407-
$default['meta_input'][ $index ] = sanitize_text_field( $post[ $index ] );
408-
}
406+
$default['meta_input'][ $index ] = isset( $post[ $index ] ) ? sanitize_text_field( $post[ $index ] ) : '';
409407
}
410408

411409
$success = wp_insert_post( $default );

0 commit comments

Comments
 (0)