当前位置: 首页>>代码示例>>PHP>>正文


PHP Attachments::image方法代码示例

本文整理汇总了PHP中Attachments::image方法的典型用法代码示例。如果您正苦于以下问题:PHP Attachments::image方法的具体用法?PHP Attachments::image怎么用?PHP Attachments::image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Attachments的用法示例。


在下文中一共展示了Attachments::image方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Attachments

        global $category_ids;
        $term = $category_ids[$term];
    });
    $custom = get_post_custom($project->ID);
    $attachments = new Attachments('attachments', $project->ID);
    ?>
						<a class="col-sm-6 col-md-4 <?php 
    echo implode(' ', $categories);
    ?>
" href="<?php 
    echo get_permalink($project->ID);
    ?>
">
							<?php 
    if ($attachments->exist()) {
        echo $attachments->image('medium', 0);
    }
    ?>
							<?php 
    echo $project->post_title;
    ?>
						</a>
					<?php 
}
?>
				</div>
			</div>
		</div>
	</div>
</main>
开发者ID:joshreisner,项目名称:consilience,代码行数:30,代码来源:archive-project.php

示例2: while

				<div class="row">
					<div class="col-md-12 gallery">
						<div id="gallery" class="carousel slide" data-ride="carousel">
							<div class="carousel-inner" role="listbox">
							<?php 
    while ($index = $attachments->get()) {
        ?>
								<div class="item<?php 
        if ($index->id == $attachments->id(0)) {
            ?>
 active<?php 
        }
        ?>
">
									<?php 
        echo $attachments->image('full');
        ?>
									<div class="carousel-caption">
										<?php 
        echo $attachments->field('caption');
        ?>
									</div>
								</div>
							<?php 
    }
    ?>
							</div>
						</div>
					</div>
				</div>
				<?php 
开发者ID:joshreisner,项目名称:consilience,代码行数:31,代码来源:page-contact.php

示例3: while

			<?php 
        $count = -1;
        if ($attachments->exist()) {
            ?>
			  <div id="project-list" class="individual-list">
			    <?php 
            while ($attachments->get()) {
                $count++;
                ?>
      			<div class="project-thumb">
      				<a href="#" data-slide="<?php 
                echo $count;
                ?>
">
      					<?php 
                echo $attachments->image('portfolio-thumb');
                ?>
      				</a>
      			</div>
			    <?php 
            }
            ?>
			  </div>
			<?php 
        }
        ?>
			<?php 
        $attachments = new Attachments('my_attachments');
        ?>
			<?php 
        if ($attachments->exist()) {
开发者ID:englsergio,项目名称:allsensations,代码行数:31,代码来源:single-project.php

示例4: Attachments

    the_post();
    ?>
	<?php 
    $attachments = new Attachments('exhibit_attachments');
    /* pass the instance name */
    ?>
	<div class="horizontal-slider">
	<?php 
    if ($attachments->exist()) {
        ?>
		<?php 
        while ($attachments->get()) {
            ?>

			<a class="swipebox" href="<?php 
            echo $attachments->src('full');
            ?>
">
			<?php 
            echo $attachments->image('gallery');
            ?>
			</a>
		<?php 
        }
        ?>
		</div>
	<?php 
    }
}
// end of the loop.
get_footer();
开发者ID:englsergio,项目名称:allsensations,代码行数:31,代码来源:single-gallery.php

示例5: Attachments

<?php

$attachments = new Attachments('attachments');
/* pass the instance name */
if ($attachments->exist()) {
    ?>
  <h3 class="page-header">Page attachments</h3>
  <div id="page-attachments">
    <?php 
    while ($attachments->get()) {
        ?>
      <div class="row-fluid">
		<div class="span1"><?php 
        echo $attachments->image('thumbnail');
        ?>
</div>
		<div class="span11">
			<a target="_blank" href="<?php 
        echo $attachments->url();
        ?>
" title="Download"><i class="icon-download-alt"></i> <?php 
        echo $attachments->field('title');
        ?>
 / <?php 
        echo $attachments->filesize();
        ?>
 (<?php 
        echo $attachments->subtype();
        ?>
)</a>
			<?php 
开发者ID:chhavinav,项目名称:fr.ilovejuice,代码行数:31,代码来源:attachments-list.php

示例6: get_attachments_array

function get_attachments_array($name, $srcSize = 'full')
{
    $return = array();
    $attachments = new Attachments($name);
    if ($attachments->exist()) {
        $i = 0;
        while ($attachments->get()) {
            $return[$i]['id'] = $attachments->id();
            $return[$i]['type'] = $attachments->type();
            $return[$i]['subtype'] = $attachments->subtype();
            $return[$i]['url'] = $attachments->url();
            $return[$i]['thumbnail'] = $attachments->image('thumbnail');
            $return[$i]['srcfull'] = $attachments->src('full');
            $return[$i]['src'] = $attachments->src($srcSize);
            $return[$i]['filesize'] = $attachments->filesize();
            $return[$i]['title'] = $attachments->field('title');
            $return[$i]['caption'] = $attachments->field('caption');
            $i++;
        }
    }
    return $return;
}
开发者ID:santikrass,项目名称:apache,代码行数:22,代码来源:functions.php


注:本文中的Attachments::image方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。