Function __global->add_download

Definitions

sources/downloads2.php

  • Add a download.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$default_pic integer No No 1 N/A N/A The ordered number of the gallery image to use as the download representative image
$url_redirect URLPATH No No Blank (empty string) N/A N/A The URL to redirect

Returns

  • The ID of the newly added download
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Add a download.
 *
 * @param  integer $default_pic The ordered number of the gallery image to use as the download representative image
 * @param  URLPATH $url_redirect The URL to redirect
 * @return AUTO_LINK The ID of the newly added download
 */

function add_download(int $default_pic = 1, string $url_redirect = '') : int