本文整理汇总了PHP中hybrid_attachment函数的典型用法代码示例。如果您正苦于以下问题:PHP hybrid_attachment函数的具体用法?PHP hybrid_attachment怎么用?PHP hybrid_attachment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hybrid_attachment函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_header
* @link http://themehybrid.com/themes/hybrid/attachments
*
* @package Hybrid
* @subpackage Template
*/
get_header(); ?>
<?php hybrid_before_content(); // Before content hook ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_ID(); ?><?php hybrid_entry_class(); ?>
<?php hybrid_before_entry(); // Before entry hook ?>
<?php hybrid_attachment(); ?>
<?php the_content( sprintf( __( 'Continue reading %1$s', 'hybrid' ), the_title( ' "', '"', false ) ) ); ?>
<?php echo wp_get_attachment_url(); ?><?php the_title_attribute(); ?><?php echo get_post_mime_type(); ?>
<?php printf( __( 'Download "%1$s"', 'hybrid' ), the_title( '<span class="fn">', '</span>', false) ); ?>
<?php wp_link_pages( array( 'before' => '<p class="page-links pages">' . __( 'Pages:', 'hybrid' ), 'after' => '</p>' ) ); ?>
<?php hybrid_after_entry(); // After entry hook ?>
<?php hybrid_after_singular(); // After singular hook ?>
<?php comments_template( '/comments.php', true ); ?>
<?php endwhile; ?>
示例2: tha_entry_top
tha_entry_top();
?>
<header class="entry-header">
<h1 <?php
hybrid_attr('entry-title');
?>
><?php
single_post_title();
?>
</h1>
</header><!-- .entry-header -->
<div class="entry-content">
<?php
hybrid_attachment();
// Function for handling non-image attachments.
?>
<?php
the_content();
?>
<?php
wp_link_pages();
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<p class="entry-meta">
<time <?php
hybrid_attr('entry-published');
?>
示例3: tamatebako_attachment
/**
* Display any type of Attachment
* @since 0.1.0
*/
function tamatebako_attachment()
{
if (wp_attachment_is_image(get_the_ID())) {
tamatebako_attachment_image();
} else {
hybrid_attachment();
}
}