0
if ( isset( $_POST['cloudlyup_maulti_location_gmap_fields'] )){
$old = get_post_meta( $post_id, 'cloudlyup_maulti_location_gmap_fields', true );

 $new = sanitize_meta( 'cloudlyup_maulti_location_gmap_fields', $_POST['cloudlyup_maulti_location_gmap_fields'], 'post' );

 function sanitize_cloudlyup_maulti_location_gmap_fields($gmapfs) {


    $value =  wp_kses( $_POST['cloudlyup_maulti_location_gmap_fields'], array() );


     return $value;
 }
 add_filter( 'sanitize_post_meta_cloudlyup_maulti_location_gmap_fields', 'sanitize_cloudlyup_maulti_location_gmap_fields' );

if ( $new && $new !== $old ) {
    update_post_meta( $post_id, 'cloudlyup_maulti_location_gmap_fields', $new );
} elseif ( '' === $new && $old ) {
    delete_post_meta( $post_id, 'cloudlyup_maulti_location_gmap_fields', $old );
}
}

}

I have created a pot type clupmap and meta box and some fields the data is not saving if we remove the WP_Kses function it working ok

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.