當前位置: 首頁>>代碼示例>>PHP>>正文


PHP previous_image_link函數代碼示例

本文整理匯總了PHP中previous_image_link函數的典型用法代碼示例。如果您正苦於以下問題:PHP previous_image_link函數的具體用法?PHP previous_image_link怎麽用?PHP previous_image_link使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了previous_image_link函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: xtreme_image_pagination

function xtreme_image_pagination()
{
    $start = '<div class="pagination image">';
    $end = '</div>';
    if (xtreme_is_html5()) {
        $start = '<nav class="pagination image">';
        $end = '</nav>';
    }
    echo $start;
    ?>
	<div class="previous_link"><?php 
    previous_image_link('thumbnail');
    ?>
</div>
	<div class="next_link"><?php 
    next_image_link('thumbnail');
    ?>
</div>
	<?php 
    echo $end;
}
開發者ID:katikos,項目名稱:xtreme-one,代碼行數:21,代碼來源:xtreme-post-functions.php

示例2: the_post

    the_post();
    ?>

            <article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
>

                <nav id="image-navigation" class="navigation image-navigation">
                    <div class="nav-links">
                        <div
                            class="nav-previous"><?php 
    previous_image_link(false, __('Previous Image', 'twentyfifteen'));
    ?>
</div>
                        <div class="nav-next"><?php 
    next_image_link(false, __('Next Image', 'twentyfifteen'));
    ?>
</div>
                    </div>
                    <!-- .nav-links -->
                </nav>
                <!-- .image-navigation -->

                <header class="entry-header">
                    <?php 
    the_title('<h1 class="entry-title">', '</h1>');
    ?>
開發者ID:richardbota,項目名稱:WordPress-Theme-Development-with-Bootstrap,代碼行數:31,代碼來源:image.php

示例3: get_header

get_header(); ?>

	<div id="primary" class="content-area">
		<main id="main" class="site-main" role="main">

			<?php
				// Start the loop.
				while ( have_posts() ) : the_post();
			?>

				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

					<nav id="image-navigation" class="navigation image-navigation">
						<div class="nav-links">
							<div class="nav-previous"><?php previous_image_link( false, __( 'Previous Image', 'twentyfifteen' ) ); ?></div><div class="nav-next"><?php next_image_link( false, __( 'Next Image', 'twentyfifteen' ) ); ?></div>
						</div><!-- .nav-links -->
					</nav><!-- .image-navigation -->

					<header class="entry-header">
						<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
					</header><!-- .entry-header -->

					<div class="entry-content">

						<div class="entry-attachment">
							<?php
								/**
								 * Filter the default Twenty Fifteen image attachment size.
								 *
								 * @since Twenty Fifteen 1.0
開發者ID:pombredanne,項目名稱:ArcherSys,代碼行數:30,代碼來源:image.php

示例4: esc_url

        ?>
									<img src="<?php 
        echo esc_url($image_attributes[0]);
        ?>
" width="<?php 
        echo $image_attributes[1];
        ?>
" height="<?php 
        echo $image_attributes[2];
        ?>
" />
								</div><!-- ./content -->
								<div id="image-thumbnails" class="clearfix">
									<div class="fl">
										<?php 
        previous_image_link();
        ?>
									</div>
									<div class="fr">
										<?php 
        next_image_link();
        ?>
									</div>
								</div><!-- /#image-thumbmails -->
							</div><!-- /.entry-content -->
						</div> <!-- /#post -->						
						<?php 
        comments_template('', true);
        ?>
						<?php 
        get_template_part('pagination');
開發者ID:ajmorris,項目名稱:standard,代碼行數:31,代碼來源:image.php

示例5: get_the_title

$post_title = get_the_title($post->post_parent);
if (empty($post_title) || 0 == $post->post_parent) {
    $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>';
}
printf($published_text, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_permalink($post->post_parent)), esc_attr(strip_tags($post_title)), $post_title);
$metadata = wp_get_attachment_metadata();
printf('<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s &times; %5$s)</a></span>', esc_url(wp_get_attachment_url()), esc_attr__('Link to full-size image', 'twentythirteen'), __('Full resolution', 'twentythirteen'), $metadata['width'], $metadata['height']);
edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>');
?>
					</div><!-- .entry-meta -->
				</header><!-- .entry-header -->

				<div class="entry-content">
					<nav id="image-navigation" class="navigation image-navigation" role="navigation">
						<span class="nav-previous"><?php 
previous_image_link(false, __('<span class="meta-nav">&larr;</span> Previous', 'twentythirteen'));
?>
</span>
						<span class="nav-next"><?php 
next_image_link(false, __('Next <span class="meta-nav">&rarr;</span>', 'twentythirteen'));
?>
</span>
					</nav><!-- #image-navigation -->

					<div class="entry-attachment">
						<div class="attachment">
							<?php 
twentythirteen_the_attached_image();
?>

							<?php 
開發者ID:harrisonsmith,項目名稱:active-progression,代碼行數:31,代碼來源:image.php

示例6: get_the_title

$post_title = get_the_title($post->post_parent);
if (empty($post_title) || 0 == $post->post_parent) {
    $published_text = '<span class="attachment-meta"><time class="entry-date" datetime="%1$s">%2$s</time></span>';
}
printf($published_text, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(get_permalink($post->post_parent)), esc_attr(strip_tags($post_title)), $post_title);
$metadata = wp_get_attachment_metadata();
printf('<span class="attachment-meta full-size-link"><a href="%1$s" title="%2$s">%3$s (%4$s &times; %5$s)</a></span>', esc_url(wp_get_attachment_url()), esc_attr__('Link to full-size image', 'mckinley'), __('Full resolution', 'mckinley'), $metadata['width'], $metadata['height']);
edit_post_link(__('Edit', 'mckinley'), '<span class="edit-link">', '</span>');
?>
					</div><!-- .entry-meta -->
				</header><!-- .entry-header -->

				<div class="entry-content">
					<nav id="image-navigation" class="navigation image-navigation" role="navigation">
						<span class="nav-previous"><?php 
previous_image_link(false, __('<span class="meta-nav">&larr;</span> Previous', 'mckinley'));
?>
</span>
						<span class="nav-next"><?php 
next_image_link(false, __('Next <span class="meta-nav">&rarr;</span>', 'mckinley'));
?>
</span>
					</nav><!-- #image-navigation -->

					<div class="entry-attachment">
						<div class="attachment">
							<?php 
mckinley_the_attached_image();
?>

							<?php 
開發者ID:pixwind,項目名稱:pixwind,代碼行數:31,代碼來源:image.php

示例7: get_header

<?php
/**
 * @package WordPress
 * @subpackage Duster
 */

get_header(); ?>

		<div id="primary" class="image-attachment">
			<div id="content" role="main">

			<?php while ( have_posts() ) : the_post(); ?>

			<nav id="nav-single">
				<span class="nav-previous"><?php previous_image_link( false, __( '&larr; Previous' , 'duster' ) ); ?></span>
				<span class="nav-next"><?php next_image_link( false, __( 'Next &rarr;' , 'duster' ) ); ?></span>
			</nav><!-- #nav-single -->

				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
					<header class="entry-header">
						<h1 class="entry-title"><?php the_title(); ?></h1>

						<div class="entry-meta">
							<?php
								$metadata = wp_get_attachment_metadata();
								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'duster' ),
									esc_attr( get_the_time() ),
									get_the_date(),
									wp_get_attachment_url(),
									$metadata['width'],
									$metadata['height'],
開發者ID:kevinreilly,項目名稱:mendelements.com,代碼行數:31,代碼來源:image.php

示例8: the_excerpt

        ?>
						<div class="entry-caption">
							<?php 
        the_excerpt();
        ?>
						</div>
						<?php 
    }
    ?>
					</div><!-- .attachment -->

				</div><!-- .entry-attachment -->

				<div id="image-navigation" class="navigation clearfix">
					<span class="previous-image"><?php 
    previous_image_link(false, __('&larr; Previous', 'Explorable'));
    ?>
</span>
					<span class="next-image"><?php 
    next_image_link(false, __('Next &rarr;', 'Explorable'));
    ?>
</span>
				</div><!-- #image-navigation -->

				<div class="entry-description">
					<?php 
    the_content();
    ?>
					<?php 
    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'Explorable'), 'after' => '</div>'));
    ?>
開發者ID:iinspiration,項目名稱:theme,代碼行數:31,代碼來源:image.php

示例9: the_title

				<header class="entry-header">
					<?php 
    the_title('<h1 class="entry-title">', '</h1>');
    ?>

					<div class="entry-meta">
						<?php 
    $metadata = wp_get_attachment_metadata();
    printf(__('Published <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', 'alexandria'), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height'], esc_url(get_permalink($post->post_parent)), esc_attr(strip_tags(get_the_title($post->post_parent))), get_the_title($post->post_parent));
    edit_post_link(__('Edit', 'alexandria'), '<span class="edit-link">', '</span>');
    ?>
					</div><!-- .entry-meta -->

					<nav role="navigation" id="image-navigation" class="image-navigation">
						<div class="nav-previous"><?php 
    previous_image_link(false, __('<span class="meta-nav">&larr;</span> Previous', 'alexandria'));
    ?>
</div>
						<div class="nav-next"><?php 
    next_image_link(false, __('Next <span class="meta-nav">&rarr;</span>', 'alexandria'));
    ?>
</div>
					</nav><!-- #image-navigation -->
				</header><!-- .entry-header -->

				<div class="entry-content">
					<div class="entry-attachment">
						<div class="attachment">
							<?php 
    alexandria_the_attached_image();
    ?>
開發者ID:jimdough,項目名稱:Roadmaster,代碼行數:31,代碼來源:image.php

示例10: the_title

                    <header class="entry-header">
                        <?php 
    the_title('<h1 class="entry-title">', '</h1>');
    ?>
    
                        <div class="entry-meta">
                            <?php 
    $metadata = wp_get_attachment_metadata();
    printf(__('Published <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s">%4$s &times; %5$s</a> in <a href="%6$s" rel="gallery">%7$s</a>', 'restaurant'), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height'], esc_url(get_permalink($post->post_parent)), get_the_title($post->post_parent));
    edit_post_link(__('Edit', 'restaurant'), '<span class="edit-link">', '</span>');
    ?>
                        </div><!-- .entry-meta -->
    
                        <nav role="navigation" id="image-navigation" class="image-navigation">
                            <div class="nav-previous"><?php 
    previous_image_link(false, __('<span class="meta-nav">&larr;</span> Previous', 'restaurant'));
    ?>
</div>
                            <div class="nav-next"><?php 
    next_image_link(false, __('Next <span class="meta-nav">&rarr;</span>', 'restaurant'));
    ?>
</div>
                        </nav><!-- #image-navigation -->
                    </header><!-- .entry-header -->
    
                    <div class="entry-content">
                        <div class="entry-attachment">
                            <div class="attachment">
                                <?php 
    restaurant_the_attached_image();
    ?>
開發者ID:beatrixmichella,項目名稱:fufyflorist,代碼行數:31,代碼來源:image.php

示例11: thinkup_input_imagesnav

    function thinkup_input_imagesnav()
    {
        global $wp_query, $post;
        ?>

	<nav role="navigation" id="nav-below">
		<div class="nav-previous"><?php 
        previous_image_link('false', '<div class="nav-previous"><span class="meta-icon"><i class="fa fa-angle-left fa-lg"></i></span><span class="meta-nav">' . __('Previous', 'sento') . '</span></div>');
        ?>
</div>
		<div class="nav-next"><?php 
        next_image_link('false', '<span class="meta-nav">' . __('Next', 'sento') . '</span><span class="meta-icon"><i class="fa fa-angle-right fa-lg"></i></span>');
        ?>
</div>
	</nav><!-- #image-navigation -->

<?php 
    }
開發者ID:EasyDayCleaning,項目名稱:Easy-Day-Team2,代碼行數:18,代碼來源:template-tags.php

示例12: the_title

>
					<header class="entry-header">
						<h1 class="entry-title"><?php 
    the_title();
    ?>
</h1>

						<div class="entry-meta">
							<?php 
    dazzling_posted_on();
    ?>
						</div><!-- .entry-meta -->

						<nav role="navigation" id="image-navigation" class="navigation-image nav-links">
							<div class="nav-previous"><?php 
    previous_image_link(false, __('<i class="fa fa-chevron-left"></i> Previous', 'dazzling'));
    ?>
</div>
							<div class="nav-next"><?php 
    next_image_link(false, __('Next <i class="fa fa-chevron-right"></i>', 'dazzling'));
    ?>
</div>
						</nav><!-- #image-navigation -->
					</header><!-- .entry-header -->

					<div class="entry-content">

						<div class="entry-attachment">
							<div class="attachment">
								<?php 
    /**
開發者ID:saranshkataria,項目名稱:Dazzling,代碼行數:31,代碼來源:image.php

示例13: get_attachment_link

            }
        }
        $k++;
        if (count($attachments > 1)) {
            if (isset($attachments[$k])) {
                $next_attachments_url = get_attachment_link($attachments[$k]->ID);
            } else {
                $next_attachments_url = get_attachment_link($attachments[0]->ID);
            }
        } else {
            $next_attachments_url = wp_get_attachment();
        }
        ?>
            	<div class="pic-box">
                    <span><?php 
        previous_image_link(0, '&nbsp;');
        ?>
</span>
            		<img src="<?php 
        echo wp_get_attachment_image_src($post->ID, 'medium')[0];
        ?>
" width="100%" class="img-responsive">
            		<span><?php 
        next_image_link(0, '&nbsp;');
        ?>
</span>
            	</div>
            <?php 
    }
    ?>
        <?php 
開發者ID:jqjjian,項目名稱:fcye,代碼行數:31,代碼來源:attachment.php

示例14: while

while (have_posts()) {
    the_post();
    ?>

				<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
>

					<nav id="image-navigation" class="navigation image-navigation">
						<div class="nav-links">
							<div class="nav-previous"><?php 
    previous_image_link(false, __('Previous Image', 'esc'));
    ?>
</div><div class="nav-next"><?php 
    next_image_link(false, __('Next Image', 'esc'));
    ?>
</div>
						</div><!-- .nav-links -->
					</nav><!-- .image-navigation -->

					<header class="entry-header">
						<?php 
    the_title('<h1 class="entry-title">', '</h1>');
    ?>
					</header><!-- .entry-header -->

					<div class="entry-content">
開發者ID:jaiweb,項目名稱:esolutions-wp-base,代碼行數:31,代碼來源:image.php

示例15: the_excerpt

        the_excerpt();
        ?>
								</div><!-- .entry-caption -->
							<?php 
    }
    ?>
						</div>
						<!-- .entry-attachment -->

						<?php 
    the_content();
    ?>

						<nav id="image-navigation" class="site-navigation">
							<span class="previous-image"><?php 
    previous_image_link(false, __('&larr; Previous image', 'independent-publisher'));
    ?>
</span>
							<span class="next-image"><?php 
    next_image_link(false, __('Next image &rarr;', 'independent-publisher'));
    ?>
</span>
						</nav>
						<!-- #image-navigation -->

					</div>
					<!-- .entry-content -->

					<?php 
    independent_publisher_posted_author_bottom_card();
    ?>
開發者ID:n-i-m-a,項目名稱:independent-publisher,代碼行數:31,代碼來源:image.php


注:本文中的previous_image_link函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。