FIX Smoother handling of related member selected on author post type item
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0d0414453a
commit
e05c66a6a4
|
|
@ -15,6 +15,8 @@ function dynamiques_save_auteurs_post($post_id)
|
|||
$is_carhop_member = $_POST['acf']['field_691c8279b6458'];
|
||||
$carhop_member_id = $_POST['acf']['field_691c831e94029'] ?? null;
|
||||
|
||||
if ($carhop_member_id === 0) return;
|
||||
|
||||
$first_name = null;
|
||||
$last_name = null;
|
||||
|
||||
|
|
@ -29,22 +31,6 @@ function dynamiques_save_auteurs_post($post_id)
|
|||
$last_name = get_field('last_name', $carhop_member_id);
|
||||
$comity = get_field('comity', $carhop_member_id);
|
||||
|
||||
write_log($comity);
|
||||
|
||||
// $membre_carhop = get_post($carhop_member_id);
|
||||
// write_log($_POST['acf']);
|
||||
// $description = get_field('description', $carhop_member_id);
|
||||
// $comity = get_field('comity', $carhop_member_id);
|
||||
// $email = get_field('email', $carhop_member_id);
|
||||
|
||||
|
||||
// write_log($first_name);
|
||||
// write_log($last_name);
|
||||
// write_log($description);
|
||||
// write_log($email);
|
||||
|
||||
$display_name = $first_name . ' ' . $last_name;
|
||||
|
||||
restore_current_blog();
|
||||
|
||||
update_field('comity', $comity, $post_id);
|
||||
|
|
@ -64,7 +50,9 @@ function dynamiques_save_auteurs_post($post_id)
|
|||
|
||||
add_filter('acf/load_field/name=carhop_member', function ($field) {
|
||||
|
||||
$field['choices'] = [];
|
||||
$field['choices'] = [
|
||||
0 => 'Choisissez un membre à relier à cet fiche auteur',
|
||||
];
|
||||
|
||||
switch_to_blog(1);
|
||||
$equipe_members = get_posts(array(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user