Fix Description submission.

This commit is contained in:
Hoang Huu
2019-12-06 14:10:12 +07:00
parent 26a14d2998
commit 9c9670155a
2 changed files with 11 additions and 5 deletions

View File

@@ -499,8 +499,10 @@ class OpalEstate_Submission {
$featured_image = get_post_meta( $post_id, $prefix . 'featured_image', true );
if ( ! empty( $_POST[ $prefix . 'featured_image' ] ) && isset( $_POST[ $prefix . 'featured_image' ] ) ) {
foreach ( $_POST[ $prefix . 'featured_image' ] as $key => $value ) {
set_post_thumbnail( $post_id, $key );
if ( $_POST[ $prefix . 'featured_image' ] && is_array( $_POST[ $prefix . 'featured_image' ] ) ) {
foreach ( $_POST[ $prefix . 'featured_image' ] as $key => $value ) {
set_post_thumbnail( $post_id, $key );
}
}
unset( $_POST[ $prefix . 'featured_image' ] );
} else {