当前位置: 首页>>代码示例>>PHP>>正文


PHP theme_get_post_class函数代码示例

本文整理汇总了PHP中theme_get_post_class函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_get_post_class函数的具体用法?PHP theme_get_post_class怎么用?PHP theme_get_post_class使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了theme_get_post_class函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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 &times; %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

示例2: 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

示例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(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('', 'footer')));
开发者ID:epiii,项目名称:Clean-Wordpress-theme,代码行数:25,代码来源:content-aside.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: 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

示例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(), 'content' => theme_get_excerpt(), 'after' => theme_get_metadata_icons('date,author,comments,edit', 'footer')));
开发者ID:numfocus,项目名称:website,代码行数:25,代码来源:content-aside.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(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 &times; %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

示例9: 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

示例10: 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


注:本文中的theme_get_post_class函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。