if (empty($vkposter_onoff)) {
if (get_post_meta($post->ID, '_vkposter_meta_value_key', true) == 'on') {
$cheked = 'checked';
} else {
$cheked = '';
}
} elseif (!empty($vkposter_onoff)) {
$cheked = 'checked';
}
echo '<input type="checkbox" name="vkposter_new_field" ' . $cheked . '/>';