Function __global->generate_logo

Definitions

sources/themewizard.php

  • Generate a logo from the template.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$name string No No required parameter N/A N/A The site name
$font_choice ?string No No Null N/A N/A The font name (in data/fonts) (null: default)
$colour ?string No No Null N/A N/A The text colour; may be overridden for certain logos (null: default)
$logo_theme_image string No No logo/default_logos/logo1 N/A N/A The logo theme image
$background_theme_image string No No logo/default_backgrounds/banner1 N/A N/A The background theme image. Not used for 'small' and 'small_white' $logo_type.
$raw boolean No No False N/A N/A Whether to output the logo to the browser, destroy then image, and exit the script (i.e. never returns)
$theme ?string No No Null N/A N/A The theme to use the logo template from (null: default root zone theme)
$logo_type string No No large N/A N/A Logo type/size to generate. 'large' is for the bigger logo with background image, 'standalone' crops the background a bit, for use in e-mails etc., 'small' is the transparent logo without background, used for the small header type, and 'small_white' is used when the small header has a dark background

Returns

  • The image resource
  • Type: resource
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate a logo from the template.
 *
 * @param  string $name The site name
 * @param  ?string $font_choice The font name (in data/fonts) (null: default)
 * @param  ?string $colour The text colour; may be overridden for certain logos (null: default)
 * @param  string $logo_theme_image The logo theme image
 * @param  string $background_theme_image The background theme image. Not used for 'small' and 'small_white' $logo_type.
 * @param  boolean $raw Whether to output the logo to the browser, destroy then image, and exit the script (i.e. never returns)
 * @param  ?string $theme The theme to use the logo template from (null: default root zone theme)
 * @param  string $logo_type Logo type/size to generate. 'large' is for the bigger logo with background image, 'standalone' crops the background a bit, for use in e-mails etc., 'small' is the transparent logo without background, used for the small header type, and 'small_white' is used when the small header has a dark background
 * @return resource The image resource
 */

function generate_logo(string $name, ?string $font_choice = null, ?string $colour = null, string $logo_theme_image = 'logo/default_logos/logo1', string $background_theme_image = 'logo/default_backgrounds/banner1', bool $raw = false, ?string $theme = null, string $logo_type = 'large')