本文整理汇总了PHP中theme_get_meta_option函数的典型用法代码示例。如果您正苦于以下问题:PHP theme_get_meta_option函数的具体用法?PHP theme_get_meta_option怎么用?PHP theme_get_meta_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了theme_get_meta_option函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: theme_get_widget_style
function theme_get_widget_style($id, $style = null)
{
if (theme_is_vmenu_widget($id)) {
return 'vmenu';
}
$result = theme_get_meta_option($id, 'theme_widget_styles');
global $theme_widgets_style;
if (!in_array($result, array_keys($theme_widgets_style))) {
$result = 'default';
}
if ($style != null) {
if (!in_array($style, array('block', 'post', 'simple'))) {
$style = 'block';
}
if ($result == 'default') {
$result = $style;
}
}
return $result;
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:20,代码来源:widgets.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_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
示例3: theme_init_layout
function theme_init_layout()
{
global $theme_layout;
$theme_layout = array('header' => 1, 'left_sidebar' => 1);
if (is_page()) {
foreach ($theme_layout as $layout_part_name => $included) {
$theme_layout[$layout_part_name] = theme_get_meta_option(theme_get_the_ID(), 'theme_layout_template_' . $layout_part_name);
}
} elseif (is_attachment()) {
$theme_layout['left_sidebar'] = 0;
}
}
开发者ID:slavam,项目名称:adult-childhood,代码行数:12,代码来源:functions.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: theme_print_page_header_image_meta_box
function theme_print_page_header_image_meta_box($post)
{
$theme_header_image = theme_get_meta_option($post->ID, 'theme_header_image');
$theme_header_image_with_flash = theme_get_meta_option($post->ID, 'theme_header_image_with_flash') ? 'checked="checked" ' : '';
?>
<input id="upload_image_input" type="hidden" size="20" tabindex="6" name="theme_header_image" value="<?php
echo $theme_header_image;
?>
" autocomplete="off" />
<p class="hide-if-no-js image_control">
<a href="#" class="upload_image">
<img id="upload_image_image" src="<?php
echo $theme_header_image;
?>
" width="260" alt="Header Image" />
</a>
<br>
<a href="#" id="remove_image_button"><?php
echo __("Remove header image", THEME_NS);
?>
</a>
</p>
<p class="hide-if-no-js">
<a href="#" class="upload_image" id="upload_image_button" ><?php
echo __("Set header image", THEME_NS);
?>
</a>
</p>
<style>
</style>
<script>
if(jQuery("#upload_image_input").val() == ""){
jQuery('.image_control').hide();
} else {
jQuery("#upload_image_button").hide();
}
jQuery(document).ready(function($) {
jQuery(".upload_image").click(function() {
window.send_to_editor_default = window.send_to_editor;
window.send_to_editor = function(html) {
imgurl = jQuery("img", html).attr("src");
jQuery("#upload_image_image").attr("src", imgurl);
jQuery("#upload_image_input").val(imgurl);
jQuery("#upload_image_button").hide();
jQuery('.image_control').show();
tb_remove();
};
tb_show("", "media-upload.php?type=image_header&post_id=<?php
echo $post->ID;
?>
&TB_iframe=true");
return false;
});
jQuery("#remove_image_button").click(function() {
jQuery("#upload_image_image").attr("src", "");
jQuery("#upload_image_input").val("");
jQuery('.image_control').hide();
jQuery("#upload_image_button").show();
return false;
});
jQuery("#TB_window").live("tb_unload", function(){
if (window.send_to_editor_default)
window.send_to_editor = window.send_to_editor_default;
});
});
</script>
<?php
}
开发者ID:slavam,项目名称:adult-childhood,代码行数:69,代码来源:admins.php
示例7: theme_get_pages
function theme_get_pages($pages)
{
if (is_admin()) {
return $pages;
}
$excluded_ids = array();
foreach ($pages as $page) {
if (!theme_get_meta_option($page->ID, 'theme_show_in_menu')) {
$excluded_ids[] = $page->ID;
}
}
$excluded_parent_ids = array();
foreach ($pages as $page) {
$title = theme_get_meta_option($page->ID, 'theme_title_in_menu');
if ($title) {
$page->post_title = $title;
}
if (in_array($page->ID, $excluded_ids)) {
$excluded_parent_ids[$page->ID] = $page->post_parent;
}
}
$length = count($pages);
for ($i = 0; $i < $length; $i++) {
$page =& $pages[$i];
if (in_array($page->post_parent, $excluded_ids)) {
$page->post_parent = theme_get_array_value($excluded_parent_ids, $page->post_parent, $page->post_parent);
}
if (in_array($page->ID, $excluded_ids)) {
unset($pages[$i]);
}
}
if (!is_array($pages)) {
$pages = (array) $pages;
}
$pages = array_values($pages);
return $pages;
}
开发者ID:JordiCruells,项目名称:mwt,代码行数:37,代码来源:navigation.php
示例8: theme_init_layout
function theme_init_layout()
{
global $theme_layout;
$theme_layout = array('header' => 1, 'default_sidebar' => 1);
$page_id = 0;
if (is_page()) {
$page_id = (int) theme_get_the_ID();
}
if (is_home()) {
$posts_page_id = (int) get_option('page_for_posts');
if ($posts_page_id > 0) {
$page_id = $posts_page_id;
}
}
if ($page_id > 0) {
foreach ($theme_layout as $layout_part_name => $included) {
$theme_layout[$layout_part_name] = theme_get_meta_option($page_id, 'theme_layout_template_' . $layout_part_name);
}
}
if (is_attachment()) {
$theme_layout['default_sidebar'] = 0;
}
}
开发者ID:epiii,项目名称:Clean-Wordpress-theme,代码行数:23,代码来源:functions.php
示例9: theme_print_meta_box
function theme_print_meta_box($post, $meta_options)
{
// Use nonce for verification
wp_nonce_field('theme_meta_options', 'theme_meta_noncename');
if (!isset($post)) {
return;
}
foreach ($meta_options as $option) {
$id = theme_get_array_value($option, 'id');
$name = theme_get_array_value($option, 'name');
$desc = theme_get_array_value($option, 'desc');
$value = theme_get_meta_option($post->ID, $id);
$necessary = theme_get_array_value($option, 'necessary');
if ($necessary && !current_user_can($necessary)) {
continue;
}
echo '<p class="meta-options"><label class="selectit" for="' . $id . '"><strong>' . $name . '</strong></label><br />';
theme_print_option_control($option, $value);
if ($desc) {
echo '<em>' . $desc . '</em>';
}
echo '</p>';
}
}
开发者ID:dreamteam111,项目名称:dreamteam,代码行数:24,代码来源:admins.php
示例10: theme_get_content
function theme_get_content($args = array())
{
global $wp_query;
$post_id = get_queried_object_id();
$more_tag = theme_get_array_value($args, 'more_tag', __('Continue reading <span class="meta-nav">→</span>', THEME_NS));
$ignore_wpautop = theme_get_meta_option($post_id, 'theme_use_wpautop') === '0';
if ($ignore_wpautop) {
remove_filter('the_content', 'wpautop');
}
theme_ob_start();
the_content($more_tag);
$content = theme_ob_get_clean();
if ($ignore_wpautop) {
add_filter('the_content', 'wpautop');
}
return $content . wp_link_pages(array('before' => '<p><span class="page-navi-outer page-navi-caption"><span class="page-navi-inner">' . __('Pages', THEME_NS) . ': </span></span>', 'after' => '</p>', 'link_before' => '<span class="page-navi-outer"><span class="page-navi-inner">', 'link_after' => '</span></span>', 'echo' => 0));
}
开发者ID:Wickwood-LLC,项目名称:trlf-artisteer,代码行数:17,代码来源:functions.php
示例11: 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
注:本文中的theme_get_meta_option函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论