本文整理汇总了PHP中theme_post_wrapper函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_post_wrapper函数的具体用法?PHP theme_post_wrapper怎么用?PHP theme_post_wrapper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了theme_post_wrapper函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()));
}
}
示例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)));
示例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()));
?>
示例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')));
示例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')));
示例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'));
}
示例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')));
示例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()));
示例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')));
示例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')));
示例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')));
示例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()));
示例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;
}
}
示例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()));
示例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'));