Function __global->add_gallery_media_wrap

Definitions

sources/galleries2.php

  • Take a file in the gallery uploads directory, and add it to a gallery.Intended for bulk operations, where many mixed media files are imported with common settings and other settings derived from metadata/defaults.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: array

Parameters

Name Type Default Set Range Description
$url URLPATH required parameter N/A N/A The URL to the file (must be a URL relative to the base URL)
$_cat ID_TEXT required parameter N/A N/A The gallery to add to
$member_id MEMBER required parameter N/A N/A The ID of the member adding gallery media
$allow_rating integer required parameter N/A N/A Post param indicating whether or not ratings should be allowed
$allow_comments_reviews integer required parameter N/A N/A Post param combination indicating whether to allow comments or reviews
$allow_trackbacks integer required parameter N/A N/A Post param indicating whether or not to allow trackbacks
$watermark boolean required parameter N/A N/A Whether or not to apply the gallery's watermarks to the file if it is an image
$notes string required parameter N/A N/A Staff notes provided for this entry
$privacy_level ID_TEXT required parameter N/A N/A Level of privacy set for this content
$additional_access array required parameter N/A N/A Array of additional members who should have access to this content
$filename ?string Null N/A N/A The filename (null: derive from $url)
$time ?TIME Null N/A N/A Timestamp to use (null: now)
$fallback_title string Blank (empty string) N/A N/A The fallback title to use if a title is required but we could not get one (blank: none)

Return

  • A pair: The media type, The media ID (null: error)
  • Type: ?array
  • Set: N/A
  • Range: N/A