/** * * the base html function * * @return string */ function html_base($content) { $default = array('title' => '', 'image' => NULL, 'img_w' => '', 'img_h' => '', 'img_placeholder' => false, 'text' => '', 'media' => ''); $content = array_merge($default, $content); $image_w = $content['img_w'] != '' ? $content['img_w'] : $this->settings['img_w']; $image_h = $content['img_h'] != '' ? $content['img_h'] : $this->settings['img_h']; $image = ikra_image($content['image'], $image_w, $image_h, $content['img_placeholder']); $href = $this->base_id . '_ikbpc_' . rand(); ?> <div class="<?php echo $this->base_id; ?> <?php echo $this->d_class; ?> <?php echo $this->settings['css_class']; ?> "> <div class="IKBPC_image"> <a href="#<?php echo $href; ?> " class="ikra_magnificPopup_inline"> <img src="<?php echo $image; ?> " alt="<?php echo $content['title']; ?> " height="<?php echo $image_h; ?> " width="<?php echo $image_w; ?> " /> </a> <a href="#<?php echo $href; ?> " class="IKBPC_caption ikra_magnificPopup_inline"><?php echo $content['title']; ?> </a> </div> <div class="IKBPC_content"> <div class="<?php echo $this->base_id; ?> _holder" id="<?php echo $href; ?> "> <div class="IKBPC_holder"> <h4 class="IKBPC_title"><?php echo $content['title']; ?> </h4> <?php if ($content['media'] != NULL) { ?> <div class="IKBPC_media ikra_video"><?php echo $content['media']; ?> </div><?php } ?> <?php if ($content['text'] != NULL) { ?> <div class="IKBPC_text ikra_video"><?php echo $content['text']; ?> </div><?php } ?> </div> <button title="Close (Esc)" type="button" class="mfp-close">×</button> </div> </div> </div> <?php }
/** * * the base html function * * @return string */ function html_base($content) { $default = array('title' => '', 'subtitle' => '', 'image' => NULL, 'img_w' => '', 'img_h' => '', 'img_placeholder' => false, 'more_text' => 'Read More', 'target' => '_self', 'link' => '#', 'text' => '', 'text_limit' => false); $content = array_merge($default, $content); $image_w = $content['img_w'] != '' ? $content['img_w'] : $this->settings['img_w']; $image_h = $content['img_h'] != '' ? $content['img_h'] : $this->settings['img_h']; $text_limit = $content['text_limit'] != '' ? $content['text_limit'] : $this->settings['text_limit']; $image = ikra_image($content['image'], $image_w, $image_h); ?> <div class="<?php echo $this->base_id; ?> <?php echo $this->d_class; ?> <?php echo $this->settings['css_class']; ?> "> <div class="<?php echo $this->base_id; ?> _inner"> <div class="IKBAC_caption"> <span></span> <div class="IKBAC_caption_inner"> <?php if ($content['title'] != NULL) { ?> <h4 class="IKBAC_title"> <a href="<?php echo $content['link']; ?> " target="<?php echo $content['target']; ?> " title="<?php echo $content['title']; ?> "> <?php echo $content['title']; ?> </a> </h4> <?php } ?> <?php if ($content['subtitle'] != NULL) { ?> <h5 class="IKBAC_subtitle"><?php echo $content['subtitle']; ?> </h5><?php } ?> <?php if ($content['text'] != NULL) { ?> <p class="IKBAC_text"><?php echo ikra_string_limit($content['text'], $text_limit); ?> </p><?php } ?> <?php if ($content['link'] != NULL) { ?> <a class="IKBAC_more" href="<?php echo $content['link']; ?> " target="<?php echo $content['target']; ?> " title="<?php echo $content['title']; ?> "> <?php echo $content['more_text']; ?> </a> <?php } ?> </div> </div> </div> <img src="<?php echo $image; ?> " alt="<?php echo $content['title']; ?> " height="<?php echo $image_h; ?> " width="<?php echo $image_w; ?> " /> </div> <?php }