Function __global->render_media_url

Definitions

sources/media_renderer.php

  • Render a media URL in the best way we can.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: object

Parameters

Name Type Default Set Range Description
$url mixed required parameter N/A N/A The URL
$url_safe mixed required parameter N/A N/A URL to render (no sessions etc)
$attributes array required parameter N/A N/A Attributes (e.g. width, height, length). IMPORTANT NOTE: Only pass in 'mime_type' from user data if you have verified privileges to do so, no verification is done within the media API.
$as_admin boolean False N/A N/A Whether there are admin privileges, to render dangerous media types
$source_member ?MEMBER Null N/A N/A Member to run as (null: current member)
$acceptable_media integer 15 N/A N/A Bitmask of media that we will support
$limit_to ?ID_TEXT Null N/A N/A Limit to a media rendering hook (null: no limit)
$url_to_scan_against ?URLPATH Null N/A N/A The URL to do media detection against (null: use $url)
$original_filename ?string Null N/A N/A Originally filename to display as a link caption where appropriate (null: use $url_safe)

Return

  • The rendered version (null: cannot render)
  • Type: ?Tempcode
  • Set: N/A
  • Range: N/A