Hi Team,
Please be inform that after install and activated the plugin showing this error:
head)) { foreach ($data->head as $elem) { if (property_exists($elem, ‘attributes’)) { $attrs = get_object_vars($elem->attributes); } else { $attrs = []; } echo “<{$elem->tagName} ” . attributes_to_string($attrs) . “>”; if (property_exists($elem, ‘innerHTML’)) echo $elem->innerHTML; else if (property_exists($elem, ‘innerText’)) echo $elem->innerText; echo “tagName}>”; } } if (property_exists($data, ‘meta’) && !empty($data->meta)) { foreach ($data->meta as $elem) { $attrs = get_object_vars($elem->attributes); echo “<{$elem->tagName} ” . attributes_to_string($attrs) . “>tagName}>”; } } echo ”; echo ”; } catch (Exception $e) { return; } } function extract_blocks(array $elements, array $blocks = []) { foreach ($elements as $element) { if (array_key_exists(‘widgetType’, $element) && $element[‘widgetType’] === ‘noticefaq’) { $blocks[] = $element; } if (array_key_exists(‘elements’, $element) && !empty($element[‘elements’])) { $blocks = extract_blocks($element[‘elements’], $blocks); } } return $blocks; } function notice_head() { try { $post = get_post(); $is_elementor = (bool)get_post_meta($post->ID, ‘_elementor_edit_mode’, true); if ($is_elementor) { $document = Elementor\Plugin::$instance->documents->get($post->ID); $elements = $document->get_elements_raw_data(); if (empty($elements)) return; $blocks = extract_blocks($elements); foreach ($blocks as $block) { if (!array_key_exists(‘project_id’, $block[‘settings’])) continue; $projectId = $block[‘settings’][‘project_id’]; if (empty($projectId)) continue; add_block_head($projectId); } } else { $blocks = parse_blocks($post->post_content); foreach ($blocks as $block) { if ($block[‘blockName’] === ‘noticefaq/block’) { if (!array_key_exists(‘projectId’, $block[‘attrs’])) continue; $projectId = $block[‘attrs’][‘projectId’]; if (empty($projectId)) continue; add_block_head($projectId); } } } } catch (Exception $e) { return; } }
Please check.
