Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Commit

Permalink
MIgrate Virtual Y small banner image
Browse files Browse the repository at this point in the history
  • Loading branch information
froboy authored Feb 5, 2021
1 parent 966d111 commit e35a45d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion openy_gated_content.post_update.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ function openy_gated_content_post_update_paragraph_headline(&$sandbox) {
if (!empty($header_prgf->field_prgf_headline->value)) {
$title = $header_prgf->field_prgf_headline->value;
}

if (!empty($header_prgf->field_prgf_image->first())) {
$image = $header_prgf->field_prgf_image->first();
}
if (!empty($header_prgf->field_prgf_description->value)) {
$description = $header_prgf->field_prgf_description->value;
}
Expand All @@ -165,6 +167,9 @@ function openy_gated_content_post_update_paragraph_headline(&$sandbox) {
$gated_content_prgf->field_prgf_description->value = $description;
$gated_content_prgf->field_prgf_description->format = 'full_html';
}
if (empty($gated_content_prgf->field_prgf_image->first())) {
$gated_content_prgf->field_prgf_image->set(0, $image);
}
$gated_content_prgf->save();
}
}

0 comments on commit e35a45d

Please sign in to comment.