Function __global->upgrade_theme
Definitions
sources/upgrade_themes.php
- Upgrade a theme automatically, using hand-coded migration arrays.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $theme | ID_TEXT | No | No | required parameter | N/A | N/A | Theme to be upgraded |
| $from_version | float | No | No | required parameter | N/A | N/A | From version |
| $to_version | float | No | No | required parameter | N/A | N/A | Target version |
| $test_run | boolean | No | No | True | N/A | N/A | Whether executing a test run (i.e. not do anything) |
Returns
- A pair: List of errors, List of successes
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Upgrade a theme automatically, using hand-coded migration arrays.
*
* @param ID_TEXT $theme Theme to be upgraded
* @param float $from_version From version
* @param float $to_version Target version
* @param boolean $test_run Whether executing a test run (i.e. not do anything)
* @return array A pair: List of errors, List of successes
*/
function upgrade_theme(string $theme, float $from_version, float $to_version, bool $test_run = true) : array
* Upgrade a theme automatically, using hand-coded migration arrays.
*
* @param ID_TEXT $theme Theme to be upgraded
* @param float $from_version From version
* @param float $to_version Target version
* @param boolean $test_run Whether executing a test run (i.e. not do anything)
* @return array A pair: List of errors, List of successes
*/
function upgrade_theme(string $theme, float $from_version, float $to_version, bool $test_run = true) : array

