You are here

function hook_scanner_preg_replace in Search and Replace Scanner 7

Wrapper for preg_replace() to allow customizations at the field level.

Parameters

object $node: The full node object being modified. Changes are expected to be made directly to the node.

string $field: The field being modified.

array $matches: Expected to be passed to preg_replace() as the third argument.

string $regextr: The regular expression being used for the query.

object $row: The results row from the search process.

string $replace: The new string being replaced into the $node based upon what is identified in $matches.

string $suffix: The

Return value

int The number of items replaced.

3 functions implement hook_scanner_preg_replace()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

link_scanner_preg_replace in ./scanner.module
Implements hook_scanner_preg_replace().
scanner_scanner_preg_replace in ./scanner.module
Implements hook_scanner_preg_replace().
text_scanner_preg_replace in ./scanner.module
Implements hook_scanner_preg_replace().
1 invocation of hook_scanner_preg_replace()
scanner_execute in ./scanner.module
Handles the actual search and replace.

File

./scanner.api.php, line 79
API documentation and examples for the Search and Replace Scanner module.

Code

function hook_scanner_preg_replace(&$node, $field, $matches, $row, $regexstr, $replace, $suffix) {
}