( count( $types ) === 1 ) ? $types[0] : $types, '@id' => $context['url'] . '#webpage', 'url' => $context['url'], 'name' => $context['title'], 'isPartOf' => array( '@id' => $ids['website'], ), ); if ( $language ) { $schema['inLanguage'] = $language; } if ( ! empty( $primary_image ) ) { $schema['primaryImageOfPage'] = $primary_image; } return $schema; } }