_media() public method

Renders internal and external media
Author: Andreas Gohr (andi@splitbrain.org)
public _media ( string $src, string $title = null, string $align = null, integer $width = null, integer $height = null, string $cache = null, boolean $render = true ) : string
$src string media ID
$title string descriptive text
$align string left|center|right
$width integer width of media in pixel
$height integer height of media in pixel
$cache string cache|recache|nocache
$render boolean should the media be embedded inline or just linked
return string
示例#1
0
 /**
  * Wrap centered media in a div to center it
  */
 function _media($src, $title = NULL, $align = NULL, $width = NULL, $height = NULL, $cache = NULL, $render = true)
 {
     $out = '';
     if ($align == 'center') {
         $out .= '<div align="center" style="text-align: center">';
     }
     $out .= parent::_media($src, $title, $align, $width, $height, $cache, $render);
     if ($align == 'center') {
         $out .= '</div>';
     }
     return $out;
 }