Function __global->get_all_image_codes

Definitions

sources/themes2.php

  • Get all the themes image codes. THIS DOES NOT SEARCH THE DB - DO NOT USE UNLESS IT'S ON A PURE PACKAGED THEME.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$base_path PATH No No required parameter N/A N/A The base-path to where we are searching for images
$search_under PATH No No required parameter N/A N/A The path to search under, relative to the base-path. This is not the same as the base-path, as we are cropping paths to the base-path
$recurse boolean No No True N/A N/A Whether to search recursively from the given directory

Returns

  • A list of image codes
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get all the themes image codes. THIS DOES NOT SEARCH THE DB - DO NOT USE UNLESS IT'S ON A PURE PACKAGED THEME.
 *
 * @param  PATH $base_path The base-path to where we are searching for images
 * @param  PATH $search_under The path to search under, relative to the base-path. This is not the same as the base-path, as we are cropping paths to the base-path
 * @param  boolean $recurse Whether to search recursively from the given directory
 * @return array A list of image codes
 */

function get_all_image_codes(string $base_path, string $search_under, bool $recurse = true) : array