本文整理汇总了PHP中html::part方法的典型用法代码示例。如果您正苦于以下问题:PHP html::part方法的具体用法?PHP html::part怎么用?PHP html::part使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类html
的用法示例。
在下文中一共展示了html::part方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __toString
function __toString()
{
ob_start();
$config = $this->getConfig();
if (!$this->isAjaxRequest) {
$this->_form();
}
$class = get_class($this);
$div_id = strtolower(get_class($this) . '-' . $this->id);
if (!$this->isAjaxRequest) {
?>
<div id="<?php
echo $div_id;
?>
" class="<?php
echo strtolower($class);
?>
"><?php
}
if ($this->template_part) {
html::part($this->template_part, array('self' => $this, 'config' => $config));
} else {
$this->widget($config);
}
if (!$this->isAjaxRequest) {
?>
</div><?php
}
$html = ob_get_clean();
return is_string($html) ? $html : '';
}
示例2: comments_number
?>
"><?php
comments_number('0', '1', '%');
?>
</div>
<div class="commenters-number" title="<?php
_e('número de pessoas que comentaram', 'consulta');
?>
"><span class="commenters-number-icon"></span><?php
echo get_num_pessoas_comentarios($post->ID);
?>
</div>
<?php
html::part('show_evaluation');
?>
</div>
<?php
if (get_theme_option('evaluation_show_on_list')) {
?>
<div class="evaluation_container" style="display: none;">
<?php
html::part('evaluation');
?>
</div>
<?php
}
?>
</li>
示例3: while
<?php
while ($suggested->have_posts()) {
$suggested->the_post();
html::part('loop-single-list-title');
}
?>
</ul>
<?php
}
?>
<?php
if (!have_posts() && !$suggested->have_posts()) {
?>
<p><?php
echo $post_type_object->labels->not_found;
?>
</p>
<?php
}
?>
<?php
html::part('add_new_object');
?>
</section>
</section>
<!-- #main-section -->
<?php
get_sidebar();
get_footer();
示例4: the_content
</header>
<div class="post-content clearfix">
<div class="post-entry">
<?php
the_content();
?>
</div>
<?php
wp_link_pages(array('before' => '<nav class="page-link">' . __('Pages:', 'consulta'), 'after' => '</nav>'));
?>
</div>
<!-- .post-content -->
<footer class="clearfix">
<?php
html::part('interaction');
?>
</footer>
</article>
<!-- .post -->
<?php
} else {
?>
<p>Página não encontrada</p>
<?php
}
?>
</section>
<!-- #main-section -->
示例5: WP_Query
<?php
$homefeatures = new WP_Query('posts_per_page=-1&meta_key=_home&meta_value=1&ignore_sticky_posts=1');
?>
<section id="home-features" class="hl-carrousel clearfix" data-scroll-num="1">
<?php
if ($homefeatures->have_posts()) {
?>
<div class="hl-wrapper">
<h3>Destaques</h3>
<?php
while ($homefeatures->have_posts()) {
$homefeatures->the_post();
?>
<?php
html::part('loop', 'feature');
?>
<?php
}
?>
</div>
<?php
if ($homefeatures->post_count > 1) {
?>
<nav class="clearfix">
<a class="hl-nav-left">Anterior</a>
<a class="hl-nav-right">Próximo</a> <!-- qualquer elemento com a classe hl-nav-right -->
</nav>
<?php
}
?>
示例6: get_header
<?php
get_header();
?>
<?php
get_sidebar();
?>
<section id="main-section">
<?php
if (have_posts()) {
while (have_posts()) {
the_post();
?>
<?php
html::part('loop');
?>
<?php
}
?>
<?php
if ($wp_query->max_num_pages > 1) {
?>
<nav id="posts-nav" class="clearfix">
<div class="alignleft"><?php
next_posts_link(__('« Previous posts', 'campanha'));
?>
</div>
<div class="alignright"><?php
previous_posts_link(__('Next posts »', 'campanha'));
?>
</div>
示例7: get_header
<?php
get_header();
?>
<section id="main-section" class="span-15 prepend-1 append-1">
<?php
if (have_posts()) {
the_post();
?>
<?php
html::part('loop', 'single');
?>
<?php
comments_template();
?>
<!-- comentários -->
<nav id="posts-nav" class="clearfix">
<span class="alignleft"><?php
next_post_link('%link', __i('« Artigo anterior', 'blog: link artigo anterior'));
?>
</span>
<span class="alignright"><?php
previous_post_link('%link', __i('Próximo artigo »', 'blog: link próximo artigo'));
?>
</span>
</nav>
<!-- #posts-nav -->
<?php
示例8: while
?>
">Ver eventos passados »</a>
</h2>
<?php
}
?>
<?php
if (have_posts()) {
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
html::part('loop', 'agenda');
?>
<?php
}
?>
<?php
if ($wp_query->max_num_pages > 1) {
?>
<nav id="posts-nav" class="clearfix">
<div class="alignleft"><?php
next_posts_link(__('« Previous posts', 'magazine01'));
?>
</div>
<div class="alignright"><?php
previous_posts_link(__('Next posts »', 'magazine01'));
?>
示例9: get_post_type_object
<?php
$post_type_object = get_post_type_object('object');
get_header();
?>
<section id="main-section" class="span-15 prepend-1 append-1">
<?php
if (have_posts()) {
the_post();
?>
<?php
html::part('loop', 'single-meta');
?>
<?php
comments_template('/comments-objects.php');
?>
<!-- comentários -->
<!--
<nav id="posts-nav" class="clearfix">
<span class="alignleft"><?php
next_post_link('%link', __('« Previous post', 'consulta'));
?>
</span>
<span class="alignright"><?php
previous_post_link('%link', __('Next post »', 'consulta'));
?>
示例10: the_content
?>
</p>
</header>
<div class="post-content clearfix">
<?php
the_content();
?>
<?php
wp_link_pages(array('before' => '<nav class="page-link">' . __('Pages:', 'magazine01'), 'after' => '</nav>'));
?>
</div>
<!-- .post-content -->
<footer class="clearfix">
<?php
html::part("interaction");
?>
<p class="taxonomies">
<span><?php
_e('Categories', 'magazine01');
?>
:</span> <?php
the_category(', ');
?>
<br />
<?php
the_tags('<span>Tags:</span> ', ', ');
?>
</p>
</footer>
<?php