示例#1
0
 protected function get_caption()
 {
     if (!$this->show_caption) {
         return;
     }
     $caption = parent::get_caption();
     if (empty($caption)) {
         return;
     }
     $this->captions .= "<span class=\"orbit-caption\" id=\"post" . get_the_ID() . "\">{$caption}</span>";
 }
示例#2
0
 protected function get_caption($i = 0)
 {
     $caption = parent::get_caption();
     $position = get_post_meta(get_the_ID(), 's3_caption_position', true);
     if (empty($position)) {
         $position = $this->default_position;
     }
     if ($position == 'left-right') {
         $i % 2 == 0 ? $position = 'right' : ($position = 'left');
     }
     return "<span class=\"s3slider-{$position}\">{$caption}</span>";
 }
示例#3
0
 protected function get_caption()
 {
     if (!$this->show_caption) {
         return;
     }
     $caption = parent::get_caption();
     if (empty($caption)) {
         return;
     }
     $position = get_post_meta(get_the_ID(), 'coin_caption_position', true);
     if (empty($position)) {
         $position = $this->default_position;
     }
     return "<span class=\"{$position}\">{$caption}</span>";
 }
示例#4
0
文件: Slider.php 项目: kotow/work
 public function delete($con = null)
 {
     try {
         $con = Propel::getConnection();
         $con->begin();
         //deletes generic document
         $genericDocument = Document::getGenericDocument($this);
         $genericDocument->delete();
         parent::delete();
         $con->commit();
         Document::deleteObjCache($this);
         return true;
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
示例#5
0
文件: BaseSlider.php 项目: kotow/work
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new SliderPeer();
     }
     return self::$peer;
 }
示例#6
0
 protected function get_caption()
 {
     if (!$this->show_caption) {
         return;
     }
     $caption = parent::get_caption();
     if (empty($caption)) {
         return;
     }
     $position = get_post_meta(get_the_ID(), 'nivo_caption_position', true);
     if (empty($position)) {
         $position = $this->default_position;
     }
     $this->captions .= "<div id=\"slide-" . get_the_ID() . "\" class=\"nivo-html-caption\" data-position=\"{$position}\">{$caption}</div>";
 }
示例#7
0
 public function __construct()
 {
     add_image_size('slider_roundabout', 400, 220, true);
     parent::__construct();
 }
示例#8
0
 public function __construct()
 {
     add_image_size('slider_round', 400, 220, true);
     $this->use_thumb_filter = false;
     parent::__construct();
 }
示例#9
0
    public function render($loop)
    {
        ?>
		<ul id="anythingSlider" style="display:none;">
			<?php 
        while ($loop->have_posts()) {
            $loop->the_post();
            $this->target_link = metaboxesGenerator::the_superlink();
            $slide_type = get_post_meta(get_the_ID(), 'anything_slide_type', true);
            $video_link = get_post_meta(get_the_ID(), 'anything_video_link', true);
            if (!empty($video_link)) {
                $slide_type = 'video';
            }
            ?>
			<li><?php 
            switch ($slide_type) {
                case 'video':
                    echo $this->getVideoObject($video_link);
                    break;
                case 'text':
                    the_content();
                    break;
                case 'image_text':
                    if (!get_post_thumbnail_id()) {
                        continue;
                    }
                    $caption = parent::get_caption();
                    $position = get_post_meta(get_the_ID(), 'anything_text_position', true);
                    if (empty($position)) {
                        $position = $this->default_text_position;
                    }
                    ?>
						<div class="text_slide_<?php 
                    echo $position;
                    ?>
">
							<div class="pic"><?php 
                    the_post_thumbnail('slider_anything_small', array('title' => false));
                    ?>
</div>
							<div class="txt"><?php 
                    echo $caption;
                    ?>
</div>
							<div class="clear"></div>
						</div>
					<?php 
                    break;
                case 'image':
                default:
                    if (!get_post_thumbnail_id()) {
                        continue;
                    }
                    echo $this->get_caption();
                    the_post_thumbnail('slider_anything_big', array('title' => false));
                    break;
            }
            ?>
</li>
			<?php 
        }
        ?>
		</ul>
<?php 
    }