WordPress at a glance
function is not described

scossdl_off_rewriter() WPSCache 1.0

Rewriter of URLs, used as replace-callback.

Called by #scossdl_off_filter.

No Hooks.

Return

Null. Nothing.

Usage

scossdl_off_rewriter( $match );

Code of scossdl_off_rewriter() WPSCache 1.7.1

<?php
function scossdl_off_rewriter( $match ) {
	global $ossdl_off_blog_url, $ossdl_https, $ossdl_off_excludes, $ossdl_arr_of_cnames;
	static $count_cnames = null, $include_dirs = null;

	// Set up static variables. Run once only.
	if ( ! isset( $count_cnames ) ) {
		$count_cnames = count( $ossdl_arr_of_cnames );
		$include_dirs = scossdl_off_additional_directories();
	}

	if ( $ossdl_https && 0 === strpos( $match[0], 'https' ) ) {
		return $match[0];
	}

	if ( scossdl_off_exclude_match( $match[0], $ossdl_off_excludes ) ) {
		return $match[0];
	}

	if ( preg_match( '`(' . $include_dirs . ')`', $match[0] ) ) {
		$offset = scossdl_string_mod( $match[1], $count_cnames );
		return str_replace( $ossdl_off_blog_url, $ossdl_arr_of_cnames[ $offset ], $match[0] );
	}

	return $match[0];
}