{"id":17273055,"date":"2023-12-13T03:20:15","date_gmt":"2023-12-13T03:20:15","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/plugin-causing-error-8\/"},"modified":"2023-12-13T03:20:15","modified_gmt":"2023-12-13T03:20:15","slug":"plugin-causing-error-8","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/plugin-causing-error-8\/","title":{"rendered":"Plugin causing error"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi Team,<br \/><br \/>Please be inform that after install and activated the plugin showing this error:<br \/><br \/>head)) { foreach ($data-&gt;head as $elem) { if (property_exists($elem, &#8216;attributes&#8217;)) { $attrs = get_object_vars($elem-&gt;attributes); } else { $attrs = []; } echo &#8220;&lt;{$elem-&gt;tagName} &#8221; . attributes_to_string($attrs) . &#8220;&gt;&#8221;; if (property_exists($elem, &#8216;innerHTML&#8217;)) echo $elem-&gt;innerHTML; else if (property_exists($elem, &#8216;innerText&#8217;)) echo $elem-&gt;innerText; echo &#8220;tagName}&gt;&#8221;; } } if (property_exists($data, &#8216;meta&#8217;) &amp;&amp; !empty($data-&gt;meta)) { foreach ($data-&gt;meta as $elem) { $attrs = get_object_vars($elem-&gt;attributes); echo &#8220;&lt;{$elem-&gt;tagName} &#8221; . attributes_to_string($attrs) . &#8220;&gt;tagName}&gt;&#8221;; } } echo &#8221;; echo &#8221;; } catch (Exception $e) { return; } } function extract_blocks(array $elements, array $blocks = []) { foreach ($elements as $element) { if (array_key_exists(&#8216;widgetType&#8217;, $element) &amp;&amp; $element[&#8216;widgetType&#8217;] === &#8216;noticefaq&#8217;) { $blocks[] = $element; } if (array_key_exists(&#8216;elements&#8217;, $element) &amp;&amp; !empty($element[&#8216;elements&#8217;])) { $blocks = extract_blocks($element[&#8216;elements&#8217;], $blocks); } } return $blocks; } function notice_head() { try { $post = get_post(); $is_elementor = (bool)get_post_meta($post-&gt;ID, &#8216;_elementor_edit_mode&#8217;, true); if ($is_elementor) { $document = Elementor\\Plugin::$instance-&gt;documents-&gt;get($post-&gt;ID); $elements = $document-&gt;get_elements_raw_data(); if (empty($elements)) return; $blocks = extract_blocks($elements); foreach ($blocks as $block) { if (!array_key_exists(&#8216;project_id&#8217;, $block[&#8216;settings&#8217;])) continue; $projectId = $block[&#8216;settings&#8217;][&#8216;project_id&#8217;]; if (empty($projectId)) continue; add_block_head($projectId); } } else { $blocks = parse_blocks($post-&gt;post_content); foreach ($blocks as $block) { if ($block[&#8216;blockName&#8217;] === &#8216;noticefaq\/block&#8217;) { if (!array_key_exists(&#8216;projectId&#8217;, $block[&#8216;attrs&#8217;])) continue; $projectId = $block[&#8216;attrs&#8217;][&#8216;projectId&#8217;]; if (empty($projectId)) continue; add_block_head($projectId); } } } } catch (Exception $e) { return; } }<br \/><br \/>Please check.<\/p>\n","protected":false},"template":"","class_list":["post-17273055","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17273055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17273055\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17273055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}