Skip to content

Commit

Permalink
updated field name to read language code from new field for #80
Browse files Browse the repository at this point in the history
  • Loading branch information
wgilling committed Sep 30, 2021
1 parent 119f2f4 commit 03dcacb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ public function build() {
$node_language = $node->get('field_language')->entity;
$link_hreflang = [];
if ($node_language) {
if ($node_language->hasField('langcode_2digits') && $node_language->get('langcode_2digits')->value) {
$link_hreflang = ['hreflang' => $node_language->get('langcode_2digits')->value];
if ($node_language->hasField('field_langcode_2digits') && $node_language->get('field_langcode_2digits')->value) {
$link_hreflang = ['hreflang' => $node_language->get('field_langcode_2digits')->value];
}
}
if ($origfile && $origfile->bundle() <> 'remote_video') {
Expand Down

0 comments on commit 03dcacb

Please sign in to comment.