projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated all the contrib modules to their latest versions.
[yaffs-website]
/
web
/
modules
/
contrib
/
metatag
/
src
/
Plugin
/
metatag
/
Tag
/
MetaNameBase.php
diff --git
a/web/modules/contrib/metatag/src/Plugin/metatag/Tag/MetaNameBase.php
b/web/modules/contrib/metatag/src/Plugin/metatag/Tag/MetaNameBase.php
index 5eafb805a04b37e02ea237b7f451cf13f86519c6..9212571ef2f17a72784f639114a21ca0165919cb 100644
(file)
--- a/
web/modules/contrib/metatag/src/Plugin/metatag/Tag/MetaNameBase.php
+++ b/
web/modules/contrib/metatag/src/Plugin/metatag/Tag/MetaNameBase.php
@@
-314,15
+314,17
@@
abstract class MetaNameBase extends PluginBase {
* A render array or an empty string.
*/
public function output() {
* A render array or an empty string.
*/
public function output() {
- // Parse out the image URL, if needed.
- $value = $this->parseImageUrl();
- $value = $this->tidy($value);
-
- if (empty($value)) {
+ if (empty($this->value)) {
// If there is no value, we don't want a tag output.
// If there is no value, we don't want a tag output.
-
$element =
'';
+
return $this->multiple() ? [] :
'';
}
}
- else {
+
+ // Parse out the image URL, if needed.
+ $value = $this->parseImageUrl();
+ $values = $this->multiple() ? explode(',', $value) : [$value];
+ $elements = [];
+ foreach ($values as $value) {
+ $value = $this->tidy($value);
if ($this->requiresAbsoluteUrl()) {
// Relative URL.
if (parse_url($value, PHP_URL_HOST) == NULL) {
if ($this->requiresAbsoluteUrl()) {
// Relative URL.
if (parse_url($value, PHP_URL_HOST) == NULL) {
@@
-339,7
+341,7
@@
abstract class MetaNameBase extends PluginBase {
$value = str_replace('http://', 'https://', $value);
}
$value = str_replace('http://', 'https://', $value);
}
- $element = [
+ $element
s[]
= [
'#tag' => 'meta',
'#attributes' => [
$this->nameAttribute => $this->name,
'#tag' => 'meta',
'#attributes' => [
$this->nameAttribute => $this->name,
@@
-348,7
+350,7
@@
abstract class MetaNameBase extends PluginBase {
];
}
];
}
- return $
element
;
+ return $
this->multiple() ? $elements : reset($elements)
;
}
/**
}
/**