$args = ['post_subtitle','postType','pageUrl'];
foreach ($args as $arg) {
if (array_key_exists($arg, $_POST)) {
update_post_meta( $post_id, $arg, sanitize_text_field( $_POST[$arg] ) );
}
}
$args = ['post_subtitle','postType','pageUrl'];
foreach ($args as $arg) {
if (array_key_exists($arg, $_POST)) {
update_post_meta( $post_id, $arg, sanitize_text_field( $_POST[$arg] ) );
}
}