Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Fix names in Person post title
Browse files Browse the repository at this point in the history
  • 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
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function create_custom_custom_post_type(){
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.