Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




deslash [ ]

deslash ( $content )
Parameters:
  • (string) $content
Returns:
  • (string)
Defined at:
Codex



{@internal Missing Short Description}}

{@internal Missing Long Description}}

Source

function deslash($content) {
	// Note: \\\ inside a regex denotes a single backslash.

	// Replace one or more backslashes followed by a single quote with
	// a single quote.
	$content = preg_replace("/\\\+'/", "'", $content);

	// Replace one or more backslashes followed by a double quote with
	// a double quote.
	$content = preg_replace('/\\\+"/', '"', $content);

	// Replace one or more backslashes with one backslash.
	$content = preg_replace("/\\\+/", "\\", $content);

	return $content;
}

Top Google Search Results

More ...

User discussions [ wordpress.org ]

User Note(s)