diff --git a/src/Plugin/Prerender/Captcha.php b/src/Plugin/Prerender/Captcha.php new file mode 100644 index 0000000000000000000000000000000000000000..356343637889327fd412ea5227e3b675eddf52c4 --- /dev/null +++ b/src/Plugin/Prerender/Captcha.php @@ -0,0 +1,29 @@ +setProperty('smart_description', FALSE, TRUE); + } + +} diff --git a/src/Utility/Element.php b/src/Utility/Element.php index 84df3f77351de0d6bef30d7063bbef089e0d9408..67270e45310c55338807f689da6c2cbdb4e6f09a 100644 --- a/src/Utility/Element.php +++ b/src/Utility/Element.php @@ -671,11 +671,18 @@ class Element extends DrupalAttributes { * The name of the property to set. * @param mixed $value * The value of the property to set. + * @param bool $recurse + * Flag indicating wither to set the same property on child elements. * * @return $this */ - public function setProperty($name, $value) { + public function setProperty($name, $value, $recurse = FALSE) { $this->array["#$name"] = $value instanceof Element ? $value->getArray() : $value; + if ($recurse) { + foreach ($this->children() as $child) { + $child->setProperty($name, $value, $recurse); + } + } return $this; }