Function __global->find_template_guids

Definitions

sources/themes2.php

  • Find GUIDs used for a template, for use with the template editor.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$file ID_TEXT No No required parameter N/A N/A The template (including subdirectory and suffix)
$active_guid ?ID_TEXT No No Null N/A N/A GUID currently in use, to highlight; e.g. opening up the editor on a template instance within a screen meta-tree (null: none)

Returns

  • List of GUID details (template-ready)
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find GUIDs used for a template, for use with the template editor.
 *
 * @param  ID_TEXT $file The template (including subdirectory and suffix)
 * @param  ?ID_TEXT $active_guid GUID currently in use, to highlight; e.g. opening up the editor on a template instance within a screen meta-tree (null: none)
 * @return array List of GUID details (template-ready)
 */

function find_template_guids(string $file, ?string $active_guid = null) : array