Switch content to alternate version
@param  string $content Default content
@return string       Modified content
761425
public function easyReadingContent($content)
	{
		global $post;

		if (isset($_GET['readable']) && $_GET['readable'] == '1' && get_field('easy_reading_select') == true && is_object($post) && isset($post->post_content) && in_the_loop() && is_main_query()) {
			$post_content = $post->post_content;
			if (strpos($post_content,  '<!--more-->') !== false) {
				$content_parts = explode('<!--more-->', $post_content);
				$post_content  = $content_parts[1];
			}
			$post_content 	   = preg_replace('/[^a-z]/i', '', sanitize_text_field($post_content));
			$sanitized_content = preg_replace('/[^a-z]/i', '', sanitize_text_field($content));

			if ($post_content == $sanitized_content) {
				$content = get_field('easy_reading_content');
				if (strpos($content,  '<!--more-->') !== false) {
					$content_parts = explode('<!--more-->', $content);
					$content = '<p class="lead">' . sanitize_text_field($content_parts[0]) . '</p>' . $content_parts[1];
				}
			}
		}

		return $content;
	}
186592
public function handle(?string $content = null): string
    {
        return trim((string) preg_replace('/\s+/', ' ', $this->ipsum));
    }
1289760
protected static function replaceEnvironmentVariables($content) : string
    {
        preg_match_all("/\:\:getenv\(\'(.*)\'\)/", $content, $result);

        $findEnvs = [];

        foreach ($result[1] as $envVar)
        {
            if(!in_array($envVar, $findEnvs))
            {
                $toReplace = "::getenv('{$envVar}')";
                $replaceWith = getenv($envVar);
                $content = str_replace($toReplace, $replaceWith, $content);
                unset($replaceWith);
            }
        }

        return $content;
    }
1311727
static function UTF8ToHTML($content="")
	{
		$contents = self::unicode_string_to_array($content);
		$swap = "";
		$iCount = count($contents);
		for ($o=0;$o<$iCount;$o++) {
			$contents[$o] = self::unicode_entity_replace($contents[$o]);
			$swap .= $contents[$o];
		}
		return mb_convert_encoding($swap,"UTF-8"); //not really necessary, but why not.
	}
742238
public function transform($content, $options = [])
    {
        if (!$content || !is_string($content)) {
            return $content;
        }

        if (strpos($content, self::TRANSFORM_DELIMITER) === false) {
            return lcfirst($content);
        }

        $tmp = explode('-', $content);
        array_walk($tmp, function (&$a) {
            $a = ucfirst($a);
        });

        return lcfirst((string)implode('', $tmp));
    }
74358
public function prependContent($content)
    {
        if (!empty($content)) {
            if (is_array($this->content)) {
                array_unshift($this->content, $content);
            } else {
                $this->content = $content . $this->content;
            }
        }
        return $this;
    }
554012
public function edit($content)
    {
        $parent = BlockSelectOption::where('block_id', '=', $this->_block->id)->where('option', '=', 'parent')->first();
        $parentPageId = !empty($parent) ? $parent->value : 0;
        $this->_editViewData['selectOptions'] = [0 => '-- No Page Selected --'] + Page::get_page_list(['parent' => $parentPageId]);
        return parent::edit($content);
    }
254833
public function parseNoTemplate($content) {
        $this->_content = $content;
        $this->_parseDebugStart();
        $this->_parseExtend();
        $this->_parseInclude();
        $this->_parsePath();
        $this->_parseGravatar();
        $this->_parseAsset();
        $this->_parseUrl();
        $this->_parsePhp();
        $this->_parseLang();
        $this->_parseForeach();
        $this->_parseFor();
        $this->_parseVar();
        $this->_parseVarFunc();
        $this->_parseCondition();
        $this->_parseFunction();
        $this->_parseException();
        $this->_parseMinify();
        $this->_parseDebugEnd();

        return $this->_content;
    }
938456
public function transform($content)
    {
        $keywords = array();
        foreach ($content->getKeywords() as $keyword) {
            $keywords[] = $keyword->getLabel();
        }

        $documentData = array(
            'id' => $content->getContentId() . '-' . $content->getLanguage(),
            'elementId' => $content->getId(),
            'contentId' => $content->getContentId(),
            'name' => $content->getName(),
            'siteId' => $content->getSiteId(),
            'linkedToSite' => $content->isLinkedToSite(),
            'language' => $content->getLanguage(),
            'contentType' => $content->getContentType(),
            'keywords' => implode(',', $keywords),
            'updatedAt' => $content->getUpdatedAt()->getTimestamp(),
        );

        /** @var ContentAttributeInterface $attribute */
        foreach ($content->getAttributes() as $attribute) {
            if (null !== $attribute->getValue() && '' !== $attribute->getValue()) {
                $documentData['attribute_' . $attribute->getName()] = $attribute->getValue();
                $documentData['attribute_' . $attribute->getName() . '_stringValue'] = $attribute->getStringValue();
            }
        }

        return new Document($documentData['id'], $documentData);
    }
1354888
public function parseRelease(&$content)
	{
		$release = new Release;
		$types = [];
		$lastType = '';
		$nameSet = false;

		$line = current($content);
		while ($line !== false)
		{
			$line = ltrim($line);

			if ($this->startsWith($line, '###'))
			{
				$type = $this->trimHashes($line);
				$types[$type] = [];
				$lastType = $type;
			}
			elseif ($nameSet &&
				$this->startsWith($line, '##') ||
				$this->startsWith($line, '[')
			)
			{
				prev($content);
				break;
			}
			elseif ($this->startsWith($line, '##'))
			{
				$this->handleName($release, $line);
				$nameSet = true;
			}
			else
			{
				$change = ltrim($line, "\t\n\r\0\x0B -");

				if ($change !== '')
				{
					$types[$lastType][] = $change;
				}
			}

			$line = next($content);
		}

		$release->setAllChanges($types);
		return $release;
	}
1032035
public function strip($content)
    {
        $handlers = new HandlerContainer();
        $handlers->setDefault(function(ShortcodeInterface $s) { return $s->getContent(); });
        $processor = new Processor(new RegexParser(), $handlers);

        return $processor->process($content);
    }
1280738
public function removeContent( ...$content ) {
		if ( is_array( $content[ 0 ] ) ) {
			$content = $content[ 0 ];
		}
		foreach ( $content as $item ) {
			if ( !is_string( $item ) ) {
				// Use strict type comparions so we don't
				// compare objects with existing strings
				$index = array_search( $item, $this->content, true );
				if ( $index !== false ) {
					array_splice( $this->content, $index, 1 );
				}
			}
		}
		return $this;
	}
1316009
public function parse($content)
    {
        $content = $this->normalize($content);

        list($method, $path, $scheme) = $this->getStatus($content);

        // resolve uri path
        if ($this->baseUrl !== null) {
            $path = UriResolver::resolve($this->baseUrl, new Uri($path));
        } else {
            $path = new Uri($path);
        }

        $request = new Request($path, $method);
        $request->setProtocolVersion($scheme);

        list($header, $body) = $this->splitMessage($content);

        $this->headerToArray($request, $header);

        $request->setBody(new StringStream($body));

        return $request;
    }
1294633
public static function get_content_value($content) {
        $arr = explode('##', $content->content);

        $strvalue = '';
        foreach ($arr as $a) {
            $strvalue .= $a . ' ';
        }

        return trim($strvalue, "\r\n ");
    }
239983
public function transform($content, $options = [])
    {
        if (!$content || !is_string($content)) {
            return $content;
        }

        // prepend slashes if necessary
        if (strpos((string) $content, self::NAMESPACE_DELIMITER) !== 0) {
            $content = self::NAMESPACE_DELIMITER . $content;
        }

        if (empty($options[self::NAMESPACE_OPTION_INDEX])) {
            return $content;
        }

        if (strpos($content, $options[self::NAMESPACE_OPTION_INDEX]) === false) {
            if (strpos($options[self::NAMESPACE_OPTION_INDEX], self::NAMESPACE_DELIMITER) !== 0) {
                $content = self::NAMESPACE_DELIMITER . $options[self::NAMESPACE_OPTION_INDEX] . $content;
            } else {
                $content = $options[self::NAMESPACE_OPTION_INDEX] . $content;
            }
        }

        return $content;
    }
621900
public function replace($content)
    {
        foreach ($this->hasChild as $name => $value) {
            $name = $this->placeholder($name);
            $this->blocks[$name] = $this->_replace($this->blocks[$name]);
        }

        return $this->_replace($content);
    }
1205005
protected function _replaceCdata($content) {
		foreach ($this->_cdata as $n => $data) {
			$data = '<![CDATA[' . $data . ']]>';
			$content = str_replace('###CDATA-' . $n . '###', $data, $content);
		}
		return $content;
	}