Function __global->define_redirects

Definitions

sources/zones3.php

  • Define a redirect structure programmatically.This function is intended for programmers, writing upgrade scripts for a custom site (dev>staging>live).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$redirects array No No required parameter N/A N/A Simple redirect map between page names (see function code for an example)
$zone string No No Blank (empty string) N/A N/A The zone to do this in
$overwrite_all boolean No No False N/A N/A Whether to flush out all existing data

Preview

Code (PHP)

/**
 * Define a redirect structure programmatically.This function is intended for programmers, writing upgrade scripts for a custom site (dev>staging>live).
 *
 * @param  array $redirects Simple redirect map between page names (see function code for an example)
 * @param  string $zone The zone to do this in
 * @param  boolean $overwrite_all Whether to flush out all existing data
 */

function define_redirects(array $redirects, string $zone = '', bool $overwrite_all = false)