PostFilter example


    public function outputFilter($source)
    {
        $source = preg_replace('#(src|background)="([^:"./][^:"]+)"#Umsi', '$1="../../campaigns/$2"', $source);
        $callback = [Shopware()->Plugins()->Core()->PostFilter(), 'rewriteSrc'];

        return preg_replace_callback('#<(link|img|script|input|a|form|iframe|td)[^<>]*(href|src|action|background)="([^"]*)".*>#Umsi', $callback$source);
    }

    /** * @deprecated in 5.6, will be private in 5.8 * * Removes the unneeded metadata in the alternative view. * * @param string $source * * @return string */
Home | Imprint | This part of the site doesn't use cookies.