<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Elementor &#8211; SOAP.ZONE</title>
	<atom:link href="https://soap.zone/category/elementor/feed/" rel="self" type="application/rss+xml" />
	<link>https://soap.zone</link>
	<description>Creativity Internet Studio</description>
	<lastBuildDate>Mon, 12 Aug 2024 12:12:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.6</generator>

<image>
	<url>https://soap.zone/wp-content/uploads/2025/02/cropped-LOGO-1-32x32.jpg</url>
	<title>Elementor &#8211; SOAP.ZONE</title>
	<link>https://soap.zone</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Elementor</title>
		<link>https://soap.zone/2024/08/12/elementor/</link>
					<comments>https://soap.zone/2024/08/12/elementor/#respond</comments>
		
		<dc:creator><![CDATA[soap.zone]]></dc:creator>
		<pubDate>Mon, 12 Aug 2024 12:04:47 +0000</pubDate>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Elementor]]></category>
		<guid isPermaLink="false">https://soap.zone/?p=1765</guid>

					<description><![CDATA[Удаляем все целевые элементы перед рендерингом страницы, точное удаление с использованием DOMDocument в PHP: строку Elementor если в ней присутствует слово Elementor элементы с классом .edit_with_elementor , с id=elementor-editor, с id=ementor-switch-mode function hide_elementor_admin_elements() { ob_start(function($content) { // Загружаем содержимое в DOMDocument $dom = new DOMDocument(); libxml_use_internal_errors(true); // Игнорируем ошибки парсинга HTML $dom->loadHTML($content, LIBXML_HTML_NOIMPLIED &#124; LIBXML_HTML_NODEFDTD); [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Удаляем все целевые элементы перед рендерингом страницы, точное удаление с использованием DOMDocument в PHP:<br />
строку <span class="post-state">Elementor</span> если в ней присутствует слово Elementor<br />
элементы  с классом .edit_with_elementor , с id=elementor-editor, с id=ementor-switch-mode</p>
<pre>
function hide_elementor_admin_elements() {
    ob_start(function($content) {
        // Загружаем содержимое в DOMDocument
        $dom = new DOMDocument();
        libxml_use_internal_errors(true); // Игнорируем ошибки парсинга HTML
        $dom->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
        libxml_clear_errors();

        // Удаляем элементы <span class="post-state">, содержащие "Elementor"
        $spans = $dom->getElementsByTagName('span');
        for ($i = $spans->length - 1; $i >= 0; $i--) {
            $span = $spans->item($i);
            if ($span->hasAttribute('class') && strpos($span->getAttribute('class'), 'post-state') !== false) {
                if (trim($span->nodeValue) === 'Elementor') {
                    $span->parentNode->removeChild($span);
                }
            }
        }

        // Удаляем элементы с классом .edit_with_elementor
        $xpath = new DOMXPath($dom);
        foreach ($xpath->query('//*[@class="edit_with_elementor"]') as $node) {
            $node->parentNode->removeChild($node);
        }

        // Удаляем элемент с id="elementor-editor"
        $editor = $dom->getElementById('elementor-editor');
        if ($editor) {
            $editor->parentNode->removeChild($editor);
        }

        // Удаляем элемент с id="elementor-switch-mode"
        $switch_mode = $dom->getElementById('elementor-switch-mode');
        if ($switch_mode) {
            $switch_mode->parentNode->removeChild($switch_mode);
        }

        // Возвращаем модифицированный контент
        return $dom->saveHTML();
    });
}
add_action('admin_init', 'hide_elementor_admin_elements');

function end_ob_clean() {
    ob_end_flush();
}
add_action('shutdown', 'end_ob_clean');
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://soap.zone/2024/08/12/elementor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
