All File Type Support For Wordpress
NO CSRF For you');
}
if (!wp_verify_nonce($_POST['ist_settings_non'],'ist_settings_non_num'))
{
die('
NO CSRF For you');
}
// saving value in option variable into option table , after sanitizing
$ist_post_type_temp =$_POST['ist_image_type'];
foreach($ist_post_type_temp as $keys => $element){
$ist_post_type[] = sanitize_text_field( $element );
}
if(!empty($ist_post_type) && is_array($ist_post_type)) {
$ist_post_type = implode(",",$ist_post_type);
}else $ist_post_type =''; // if empty
$ist_post_type = sanitize_text_field($ist_post_type); // sanitize data
update_option('ist_img_types',$ist_post_type);
// Success message
echo sprintf(__( '
updated successfully.
' ));
}
?>
Select file type: