lib/LocationManager.php
public static function get_calling_script_file( $offset = 0 ) {
		$callers = array();
		$backtrace = debug_backtrace();
		foreach ( $backtrace as $trace ) {
			if ( array_key_exists('file', $trace) && $trace['file'] != __FILE__ ) {
				$callers[] = $trace['file'];
			}
		}		
		$callers = array_unique($callers);
		$callers = array_values($callers);
		return $callers[$offset];
	}
public static function get_calling_script_file( $offset = 0 ) {
		$callers = array();
		$backtrace = debug_backtrace();
		foreach ( $backtrace as $trace ) {
			if ( array_key_exists('file', $trace) && $trace['file'] != __FILE__ ) {
				$callers[] = $trace['file'];
			}
		}		
		$callers = array_unique($callers);
		$callers = array_values($callers);
		return $callers[$offset];
	}
public static function get_calling_script_file ( $ offset = 0 ) { $ callers = array ( ) ; $ backtrace = debug_backtrace ( ) ; foreach ( $ backtrace as $ trace ) { if ( array_key_exists ( 'file' , $ trace ) && $ trace [ 'file' ] != __FILE__ ) { $ callers [ ] = $ trace [ 'file' ] ; } } $ callers = array_unique ( $ callers ) ; $ callers = array_values ( $ callers ) ; return $ callers [ $ offset ] ; }
Get calling script file.
@api
@param int     $offset
@return string|null
Get calling script file .