comicpress-core/classes/ComicPressBackend.inc

21 lines
548 B
PHP

<?php
class ComicPressBackend {
function _embed_image($size) {
$extras = array();
$dims = $this->dims($size);
if (!empty($dims)) {
if (is_array($dims)) {
$extras = array_merge($extras, $dims);
}
}
foreach ($extras as $field => $value) {
$extras[] = "${field}=\"${value}\" ";
unset($extras[$field]);
}
$output = sprintf('<img src="%s" alt="%s" title="%s" %s/>', $this->url(), $this->alt(), $this->title(), implode("", $extras));
return apply_filters('comicpress_embed_image', $output, $this);
}
}