private function insertOrReplaceTag($content, $search, $replace)
    {
        $newContent =  null;

        $regexSearch = "/(\<$search\>\<\!\[CDATA\[([0-9.])+\]\]\>\<\/$search\>)/";
        if(preg_match($regexSearch, $content)) {
            $newContent = preg_replace($regexSearch, $replace, $content);
        }
        else {
            $newContent = $content . $replace;

        }

        return $newContent;
    }
private function insertOrReplaceTag($content, $search, $replace)
    {
        $newContent =  null;

        $regexSearch = "/(\<$search\>\<\!\[CDATA\[([0-9.])+\]\]\>\<\/$search\>)/";
        if(preg_match($regexSearch, $content)) {
            $newContent = preg_replace($regexSearch, $replace, $content);
        }
        else {
            $newContent = $content . $replace;

        }

        return $newContent;
    }
private function insertOrReplaceTag ( $ content , $ search , $ replace ) { $ newContent = null ; $ regexSearch = "/(\<$search\>\<\!\[CDATA\[([0-9.])+\]\]\>\<\/$search\>)/" ; if ( preg_match ( $ regexSearch , $ content ) ) { $ newContent = preg_replace ( $ regexSearch , $ replace , $ content ) ; } else { $ newContent = $ content . $ replace ; } return $ newContent ; }
This method modifies the XML plugin data and looks
for width tags and replaces the value
@param $content
@param $search
@param $replace
@return mixed|null|string
This method modifies the XML plugin data and looks for width tags and replaces the value