本文整理汇总了PHP中theme_post_wrapper函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_post_wrapper函数的具体用法?PHP theme_post_wrapper怎么用?PHP theme_post_wrapper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了theme_post_wrapper函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: theme_404_content_cat
function theme_404_content_cat($args = '')
{
$args = wp_parse_args($args, array('error_title' => __('Pàgina no trobada', THEME_NS), 'error_message' => __('No s\'ha trobat la pàgina que busques. Vols provar a cercar alguna cosa ?', THEME_NS), 'focus_script' => '<script type="text/javascript">jQuery(\'div.mmb-content input[name="s"]\').focus();</script>'));
extract($args);
theme_post_wrapper(array('title' => $error_title, 'content' => '<p class="center">' . $error_message . '</p>' . "\n" . theme_get_search() . $focus_script));
if (theme_get_option('theme_show_random_posts_on_404_page')) {
theme_ob_start();
echo '<h4 class="box-title">' . theme_get_option('theme_show_random_posts_title_on_404_page') . '</h4>';
?>
<ul>
<?php
global $post;
$rand_posts = get_posts('numberposts=5&orderby=rand');
foreach ($rand_posts as $post) {
?>
<li><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></li>
<?php
}
?>
</ul>
<?php
theme_post_wrapper(array('content' => theme_ob_get_clean()));
}
if (theme_get_option('theme_show_tags_on_404_page')) {
theme_ob_start();
echo '<h4 class="box-title">' . theme_get_option('theme_show_tags_title_on_404_page') . '</h4>';
wp_tag_cloud('smallest=9&largest=22&unit=pt&number=200&format=flat&orderby=name&order=ASC');
theme_post_wrapper(array('content' => theme_ob_get_clean()));
}
}
开发者ID:JordiCruells,项目名称:mwt,代码行数:36,代码来源:functions.php
示例2: get_header
*
* The search results template. Used when a search is performed.
*
*/
get_header();
?>
<div class="art-layout-wrapper">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell art-content">
<?php
get_sidebar('top');
?>
<?php
if (have_posts()) {
theme_post_wrapper(array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span class="search-query-string">' . get_search_query() . '</span>') . '</h4>'));
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_top_posts_navigation')) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', get_post_format());
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content(array('error_title' => __('Nothing Found', THEME_NS), 'error_message' => __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS)));
开发者ID:numfocus,项目名称:website,代码行数:31,代码来源:search.php
示例3: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_page_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('edit', 'header'), 'content' => theme_get_content()));
?>
开发者ID:numfocus,项目名称:website,代码行数:26,代码来源:content-page.php
示例4: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '', 'heading' => theme_get_option('theme_single_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_content(), 'after' => theme_get_metadata_icons('category,tag', 'footer')));
开发者ID:numfocus,项目名称:website,代码行数:25,代码来源:content-single.php
示例5: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>' : '', 'heading' => theme_get_option('theme_posts_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_highlight_excerpt(get_search_query(), theme_get_content()), 'after' => theme_get_metadata_icons('category,tag', 'footer')));
开发者ID:spadwen,项目名称:shop.bentleigh-discount-lolly.com.au,代码行数:25,代码来源:content-search.php
示例6: _e
<label for="url"><small><?php
_e('Website', THEME_NS);
?>
</small></label></p>
<?php
}
?>
<!--<p><small><?php
printf(__('You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: %s', THEME_NS), ' <code>' . allowed_tags() . '</code>');
?>
</small></p>-->
<p><textarea name="comment" id="comment" cols="40" rows="10" tabindex="4"></textarea></p>
<p>
<span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span>
<input class="art-button" type="submit" name="submit" tabindex="5" value="<?php
_e('Submit Comment', THEME_NS);
?>
" />
</span>
<?php
comment_id_fields();
?>
</p>
<?php
do_action('comment_form', $post->ID);
?>
</form>
<?php
}
theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'respond'));
}
开发者ID:uniquegel,项目名称:Feminnova,代码行数:31,代码来源:comments.php
示例7: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'thumbnail' => theme_get_post_thumbnail(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_single() ? 'single' : 'posts') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('category,tag,comments', 'footer')));
开发者ID:numfocus,项目名称:website,代码行数:25,代码来源:content.php
示例8: wp_get_attachment_url
// filterable image width with, essentially, no limit for image height.
?>
</a>
</p>
<?php
} else {
?>
<p class="attachment center">
<a href="<?php
echo wp_get_attachment_url();
?>
" title="<?php
echo esc_attr(strip_tags(get_the_title()));
?>
" rel="attachment">
<?php
echo basename(get_permalink());
?>
</a>
</p>
<?php
}
echo theme_get_content();
if (wp_attachment_is_image()) {
$metadata = wp_get_attachment_metadata();
echo '<p class="center">' . sprintf(__('Full size is %s pixels', THEME_NS), sprintf('<a href="%1$s" title="%2$s">%3$s × %4$s</a>', wp_get_attachment_url(), esc_attr(__('Link to full-size image', THEME_NS)), $metadata['width'], $metadata['height'])) . '</p>';
}
/* Display navigation to next/previous pages when applicable */
theme_post_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false)));
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_ob_get_clean()));
开发者ID:spadwen,项目名称:shop.bentleigh-discount-lolly.com.au,代码行数:30,代码来源:content-attachment.php
示例9: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('', 'footer')));
开发者ID:epiii,项目名称:Clean-Wordpress-theme,代码行数:25,代码来源:content-aside.php
示例10: theme_post_wrapper
<?php
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'thumbnail' => theme_get_post_thumbnail(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . get_the_title() . '">' . get_the_title() . '</a>', 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('category,tag,comments', 'footer')));
开发者ID:uniquegel,项目名称:Feminnova,代码行数:4,代码来源:content.php
示例11: theme_post_wrapper
<?php
/**
*
* content*.php
*
* The post format template. You can change the structure of your posts or add/remove post elements here.
*
* 'id' - post id
* 'class' - post class
* 'thumbnail' - post icon
* 'title' - post title
* 'before' - post header metadata
* 'content' - post content
* 'after' - post footer metadata
*
* To create a new custom post format template you must create a file "content-YourTemplateName.php"
* Then copy the contents of the existing content.php into your file and edit it the way you want.
*
* Change an existing get_template_part() function as follows:
* get_template_part('content', 'YourTemplateName');
*
*/
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('date,author,comments,edit', 'footer')));
开发者ID:numfocus,项目名称:website,代码行数:25,代码来源:content-aside.php
示例12: wp_get_attachment_url
// filterable image width with, essentially, no limit for image height.
?>
</a>
</p>
<?php
} else {
?>
<p class="attachment center">
<a href="<?php
echo wp_get_attachment_url();
?>
" title="<?php
echo esc_attr(get_the_title());
?>
" rel="attachment">
<?php
echo basename(get_permalink());
?>
</a>
</p>
<?php
}
echo theme_get_content();
if (wp_attachment_is_image()) {
$metadata = wp_get_attachment_metadata();
echo '<p class="center">' . sprintf(__('Full size is %s pixels', THEME_NS), sprintf('<a href="%1$s" title="%2$s">%3$s × %4$s</a>', wp_get_attachment_url(), esc_attr(__('Link to full-size image', THEME_NS)), $metadata['width'], $metadata['height'])) . '</p>';
}
/* Display navigation to next/previous pages when applicable */
theme_page_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false)));
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . get_the_title() . '">' . get_the_title() . '</a>', 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => ob_get_clean()));
开发者ID:uniquegel,项目名称:Feminnova,代码行数:30,代码来源:content-attachment.php
示例13: theme_post_navigation
function theme_post_navigation($args = '')
{
$args = wp_parse_args($args, array('wrap' => true, 'prev_link' => false, 'next_link' => false));
$prev_link = $args['prev_link'];
$next_link = $args['next_link'];
$content = '';
$prev_align = 'left';
$next_align = 'right';
if (is_rtl()) {
$prev_align = 'right';
$next_align = 'left';
}
if ($prev_link || $next_link) {
$content = <<<EOL
<div class="navigation">
\t<div class="align{$prev_align}">{$prev_link}</div>
\t<div class="align{$next_align}">{$next_link}</div>
</div>
EOL;
}
if ($args['wrap']) {
theme_post_wrapper(array('content' => $content));
} else {
echo $content;
}
}
开发者ID:epiii,项目名称:Clean-Wordpress-theme,代码行数:26,代码来源:functions.php
示例14: theme_post_wrapper
<?php
global $post;
theme_post_wrapper(array('id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '', 'content' => theme_get_content()));
开发者ID:uniquegel,项目名称:Feminnova,代码行数:4,代码来源:content-single.php
示例15: die
die('Please do not load this page directly. Thanks!');
}
if (post_password_required()) {
theme_post_wrapper(array('content' => '<p class="nocomments">' . __('This post is password protected. Enter the password to view any comments.', THEME_NS) . '</p>'));
return;
}
if (have_comments()) {
theme_ob_start();
printf(_n('One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), THEME_NS), number_format_i18n(get_comments_number()), '<em>' . get_the_title() . '</em>');
theme_post_wrapper(array('content' => '<h4 id="comments">' . theme_ob_get_clean() . '</h4>'));
$prev_link = get_previous_comments_link(__('<span class="meta-nav">←</span> Older Comments', THEME_NS));
$next_link = get_next_comments_link(__('Newer Comments <span class="meta-nav">→</span>', THEME_NS));
theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
echo '<ul id="comments-list">';
wp_list_comments('type=all&callback=theme_comment');
echo '</ul>';
theme_page_navigation(array('prev_link' => $prev_link, 'next_link' => $next_link));
}
theme_ob_start();
$args = array();
if (theme_get_option('theme_comment_use_smilies')) {
function theme_comment_form_field_comment($form_field)
{
theme_include_lib('smiley.php');
return theme_get_smilies_js() . '<p class="smilies">' . theme_get_smilies() . '</p>' . $form_field;
}
add_filter('comment_form_field_comment', 'theme_comment_form_field_comment');
}
comment_form();
theme_post_wrapper(array('content' => str_replace(array(' id="respond"', 'type="submit"'), array('', 'class="art-button" type="submit"'), theme_ob_get_clean()), 'id' => 'respond'));
开发者ID:slavam,项目名称:adult-childhood,代码行数:30,代码来源:comments.php
示例16: sprintf
echo '<h4>' . sprintf(__('Monthly Archives: <span>%s</span>', THEME_NS), get_the_date('F Y')) . '</h4>';
} elseif (is_year()) {
echo '<h4>' . sprintf(__('Yearly Archives: <span>%s</span>', THEME_NS), get_the_date('Y')) . '</h4>';
} elseif (is_author()) {
the_post();
echo theme_get_avatar(array('id' => get_the_author_meta('user_email')));
echo '<h4>' . get_the_author() . '</h4>';
$desc = get_the_author_meta('description');
if ($desc) {
echo '<div class="author-description">' . $desc . '</div>';
}
rewind_posts();
} elseif (isset($_GET['paged']) && !empty($_GET['paged'])) {
echo '<h4>' . __('Blog Archives', THEME_NS) . '</h4>';
}
theme_post_wrapper(array('content' => ob_get_clean(), 'class' => 'breadcrumbs'));
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_top_posts_navigation')) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', get_post_format());
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_404_content();
开发者ID:numfocus,项目名称:website,代码行数:31,代码来源:archive.php
示例17: _e
echo $comment_author_url;
?>
" size="22" tabindex="3" />
<label for="url"><small><?php
_e('Website', THEME_NS);
?>
</small></label></p>
<?php
}
?>
<p><textarea name="comment" id="comment" cols="20" rows="10" tabindex="4"></textarea></p>
<p>
<span class="art-button-wrapper"><span class="art-button-l"> </span><span class="art-button-r"> </span>
<input class="art-button" type="submit" name="submit" tabindex="5" value="<?php
_e('Submit Comment', THEME_NS);
?>
" />
</span>
<input type="hidden" name="comment_post_ID" value="<?php
echo $id;
?>
" /></p>
<?php
do_action('comment_form', $post->ID);
?>
</form>
<?php
}
theme_post_wrapper(array('content' => ob_get_clean()));
}
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:31,代码来源:legacy-comments.php
示例18: theme_comment
function theme_comment($comment, $args, $depth)
{
$GLOBALS['comment'] = $comment;
switch ($comment->comment_type) {
case '':
?>
<li <?php
comment_class();
?>
id="li-comment-<?php
comment_ID();
?>
">
<?php
ob_start();
?>
<div class="comment-author vcard">
<?php
echo theme_get_avatar(array('id' => $comment, 'size' => 48));
?>
<?php
printf(__('%s <span class="says">says:</span>', THEME_NS), sprintf('<cite class="fn">%s</cite>', get_comment_author_link()));
?>
</div>
<?php
if ($comment->comment_approved == '0') {
?>
<em><?php
_e('Your comment is awaiting moderation.', THEME_NS);
?>
</em>
<br />
<?php
}
?>
<div class="comment-meta commentmetadata"><a href="<?php
echo esc_url(get_comment_link($comment->comment_ID));
?>
">
<?php
printf(__('%1$s at %2$s', THEME_NS), get_comment_date(), get_comment_time());
?>
</a><?php
edit_comment_link(__('(Edit)', THEME_NS), ' ');
?>
</div>
<div class="comment-body"><?php
comment_text();
?>
</div>
<div class="reply">
<?php
comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
?>
</div>
<?php
theme_post_wrapper(array('content' => ob_get_clean(), 'id' => 'comment-' . get_comment_ID()));
?>
<?php
break;
case 'pingback':
case 'trackback':
?>
<li class="post pingback">
<?php
ob_start();
?>
<p><?php
_e('Pingback:', THEME_NS);
?>
<?php
comment_author_link();
edit_comment_link(__('(Edit)', THEME_NS), ' ');
?>
</p>
<?php
theme_post_wrapper(array('content' => ob_get_clean(), 'class' => $comment->comment_type));
break;
}
}
开发者ID:bexandy,项目名称:ninacleaning,代码行数:85,代码来源:functions.php
示例19: theme_post_wrapper
theme_post_wrapper(array('content' => '<h4 class="box-title">' . sprintf(__('Search Results for: %s', THEME_NS), '<span>' . get_search_query() . '</span>') . '</h4>'));
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_top_posts_navigation')) {
theme_page_navigation();
}
/* Start the Loop */
while (have_posts()) {
the_post();
get_template_part('content', get_post_format());
}
/* Display navigation to next/previous pages when applicable */
if (theme_get_option('theme_bottom_posts_navigation')) {
theme_page_navigation();
}
} else {
theme_post_wrapper(array('title' => __('Nothing Found', THEME_NS), 'content' => '<p class="center">' . __('Sorry, but nothing matched your search criteria. Please try again with some different keywords.', THEME_NS) . '</p>' . "\n" . theme_get_search()));
}
?>
<?php
get_sidebar('bottom');
?>
<div class="cleared"></div>
</div>
<div class="art-layout-cell art-sidebar2">
<div class="art-layout-glare">
<div class="art-layout-glare-image"></div>
</div>
<?php
get_sidebar('secondary');
?>
<div class="cleared"></div>
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:31,代码来源:search.php
注:本文中的theme_post_wrapper函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论