https://t.me/RX1948
Server : LiteSpeed
System : Linux srv104790275 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
User : dewac4139 ( 1077)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /home/dewa95.com/public_html/wp-content/plugins/amp/vendor/ampproject/amp-toolbox/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/dewa95.com/public_html/wp-content/plugins/amp/vendor/ampproject/amp-toolbox/src/DevMode.php
<?php

namespace AmpProject;

use AmpProject\Dom\Document;
use AmpProject\Dom\Element;
use DOMNode;

/**
 * Helper functionality to deal with AMP dev-mode.
 *
 * @link    https://github.com/ampproject/amphtml/issues/20974
 *
 * @package ampproject/amp-toolbox
 */
final class DevMode
{
    /**
     * Attribute name for AMP dev mode.
     *
     * @var string
     */
    const DEV_MODE_ATTRIBUTE = 'data-ampdevmode';

    /**
     * Check whether the provided document is in dev mode.
     *
     * @param Document $document Document for which to check whether dev mode is active.
     * @return bool Whether the document is in dev mode.
     */
    public static function isActiveForDocument(Document $document)
    {
        return $document->documentElement->hasAttribute(self::DEV_MODE_ATTRIBUTE);
    }

    /**
     * Check whether a node is exempt from validation during dev mode.
     *
     * @param DOMNode $node Node to check.
     * @return bool Whether the node should be exempt during dev mode.
     */
    public static function hasExemptionForNode(DOMNode $node)
    {
        if (! $node instanceof Element) {
            return false;
        }

        $document = self::getDocument($node);

        if ($node === $document->documentElement) {
            return $document->hasInitialAmpDevMode();
        }

        return $node->hasAttribute(self::DEV_MODE_ATTRIBUTE);
    }

    /**
     * Check whether a certain node should be exempt from validation.
     *
     * @param DOMNode $node Node to check.
     * @return bool Whether the node should be exempt from validation.
     */
    public static function isExemptFromValidation(DOMNode $node)
    {
        $document = self::getDocument($node);
        return self::isActiveForDocument($document) && self::hasExemptionForNode($node);
    }

    /**
     * Get the document from the specified node.
     *
     * @param DOMNode $node The Node from which the document should be retrieved.
     * @return Document
     */
    private static function getDocument(DOMNode $node)
    {
        $document = $node->ownerDocument;
        if (! $document instanceof Document) {
            $document = Document::fromNode($node);
        }

        return $document;
    }
}

https://t.me/RX1948 - 2025