Function __global->tidy_theme_img_code

Definitions

sources/themes2.php

  • Delete a theme image used for a resource that was added, but only if the theme image is now unused.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$new ?ID_TEXT No No required parameter N/A N/A The new theme image (null: no new one)
$old ID_TEXT No No required parameter N/A N/A The old theme image we might be tidying up
$table ID_TEXT No No required parameter N/A N/A Table to check against
$field ID_TEXT No No required parameter N/A N/A Field in table
$db ?object No No Null N/A N/A Database connector to check against (null: site database)

Preview

Code (PHP)

/**
 * Delete a theme image used for a resource that was added, but only if the theme image is now unused.
 *
 * @param  ?ID_TEXT $new The new theme image (null: no new one)
 * @param  ID_TEXT $old The old theme image we might be tidying up
 * @param  ID_TEXT $table Table to check against
 * @param  ID_TEXT $field Field in table
 * @param  ?object $db Database connector to check against (null: site database)
 */

function tidy_theme_img_code(?string $new, string $old, string $table, string $field, ?object $db = null)