ucfirst strtolower

This commit is contained in:
Dan Ballard 2014-01-06 23:06:37 -05:00
parent be2c7cffa2
commit da3a9031f1
1 changed files with 2 additions and 2 deletions

View File

@ -39,11 +39,11 @@ function simple_location_post_save($post_id) {
} }
} }
if ($_POST['city'] == '') { if ($_POST['city'] == '') {
$_POST['city'] = $locations['cityName']; $_POST['city'] = ucfirst(strtolower($locations['cityName']));
} }
update_post_meta($post_id, '_simple_location_city', sanitize_text_field($_POST['city'])); update_post_meta($post_id, '_simple_location_city', sanitize_text_field($_POST['city']));
if ($_POST['country'] == '') { if ($_POST['country'] == '') {
$_POST['country'] = $locations['countryName']; $_POST['country'] = ucfirst(strtolower($locations['countryName']));
} }
update_post_meta($post_id, '_simple_location_country', sanitize_text_field($_POST['country'])); update_post_meta($post_id, '_simple_location_country', sanitize_text_field($_POST['country']));
} }