Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix names in Person post title
  • Loading branch information
szk11001 committed Sep 2, 2015
1 parent 1a75f09 commit 7e6c53a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions uc-people.php
Expand Up @@ -79,7 +79,7 @@ add_action( 'init', 'create_custom_custom_post_type', 0 );
add_filter('title_save_pre', 'save_title');
function save_title($my_post_title) {
if ($_POST['post_type'] == 'person') :
$new_title = $_POST['acf']['field_first_name'].' '.$_POST['acf']['field_first_name'];
$new_title = $_POST['acf']['field_first_name'].' '.$_POST['acf']['field_last_name'];
$my_post_title = $new_title;
endif;
return $my_post_title;
Expand All @@ -88,7 +88,7 @@ function save_title($my_post_title) {
add_filter('name_save_pre', 'save_name');
function save_name($my_post_name) {
if ($_POST['post_type'] == 'post_type_name') :
$new_name = strtolower($_POST['acf']['field_first_name'].' '.$_POST['acf']['field_first_name']);
$new_name = strtolower($_POST['acf']['field_first_name'].' '.$_POST['acf']['field_last_name']);
$my_post_name = $new_name;
endif;
return $my_post_name;
Expand Down

0 comments on commit 7e6c53a

Please sign in to comment.