• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP yit_get_post_meta函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: custom_columns

 /**
  * Customize the columns in the table of all post types
  * 
  * @since 1.0.0          
  */
 public function custom_columns($column)
 {
     global $post;
     switch ($column) {
         case "image":
             if (has_post_thumbnail()) {
                 echo get_the_post_thumbnail(null, 'thumb-testimonial');
             }
             break;
         case 'story':
             the_excerpt();
             break;
         case 'website':
             $label = yit_get_post_meta(get_the_ID(), '_site-label');
             $siteurl = yit_get_post_meta(get_the_ID(), '_site-url');
             if ($siteurl != '') {
                 if ($label != '') {
                     echo '<a href="' . esc_url($siteurl) . '">' . $label . '</a>';
                 } else {
                     echo '<a href="' . esc_url($siteurl) . '">' . $siteurl . '</a>';
                 }
             }
             break;
     }
 }
开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:30,代码来源:Testimonial.php


示例2: custom_columns

 /**
  * Customize the columns in the table of all post types
  * 
  * @since 1.0.0          
  */
 public function custom_columns($column)
 {
     global $post;
     switch ($column) {
         /*		
                     case "image": 
                         if ( has_post_thumbnail() ) echo get_the_post_thumbnail( null, 'thumb-logo' );                         
                         break;
         case 'story':
         	the_excerpt();
         	break;
         */
         case 'link':
             $link = yit_get_post_meta(get_the_ID(), '_site-link');
             if ($link != '') {
                 echo '<a href="' . esc_url($link) . '">' . $link . '</a>';
             }
             break;
     }
 }
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:25,代码来源:Logo.php


示例3: wp_nonce_field

// Use nonce for verification
wp_nonce_field('metaboxes-fields-nonce', 'yit_metaboxes_nonce');
?>
    <?php 
foreach ($tabs as $tab) {
    ?>
    <div class="tabs-panel" id="<?php 
    echo sanitize_key($tab);
    ?>
">
        <?php 
    if (!isset($options[$tab])) {
        continue;
    }
    foreach ($options[$tab] as $option) {
        $value = yit_get_post_meta($post->ID, $option['name']);
        $option['value'] = $value != '' ? $value : (isset($option['std']) ? $option['std'] : '');
        $option['name'] = yit_option_metabox_name($option['name']);
        ?>
        <div class="the-metabox <?php 
        echo $option['type'];
        ?>
 clearfix<?php 
        if (empty($option['title'])) {
            ?>
 no-label<?php 
        }
        ?>
">
            <?php 
        yit_get_template('admin/metaboxes/types/' . $option['type'] . '.php', array('args' => $option));
开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:31,代码来源:tab.php


示例4: yit_get_post_meta

<?php

/**
 * Info Tab
 */
global $post;
$show = yit_get_post_meta($post->ID, '_use_ask_info');
$form_id = yit_get_option('shop-products-details-contact-form');
if ($form_id != -1 && ($show || $show == '')) {
    ?>
		<?php 
    echo do_shortcode('[contact_form name="' . $form_id . '" ]');
}
开发者ID:zgomotos,项目名称:Bazar,代码行数:13,代码来源:info.php


示例5: yit_get_post_meta

<?php

/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <[email protected]>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
$bg_slider = yit_get_post_meta(yit_post_id(), '_bg_slider');
echo do_shortcode('[slider name="' . $bg_slider . '"]');
开发者ID:jayeshnair,项目名称:ctp,代码行数:16,代码来源:bg-slider.php


示例6: yit_get_sidebar_layout

}
?>
		<?php 
$i = 0;
$row = yit_get_sidebar_layout() == 'sidebar-no' ? 4 : 3;
while ($tests->have_posts()) {
    $tests->the_post();
    if ($i == 0 || $i % $row == 0) {
        echo '<div class="row">';
    }
    $fulltext = '';
    $text = strcmp(yit_get_option('text-type-testimonials'), 'content') == 0 ? get_the_content() : get_the_excerpt();
    $title = yit_get_option('link-testimonials') ? the_title('<a href="' . get_permalink() . '" class="name">', '</a>', false) : the_title('<p class="name">', '</p>', false);
    $label = yit_get_post_meta(get_the_ID(), '_site-label');
    $siteurl = yit_get_post_meta(get_the_ID(), '_site-url');
    $smallquote = yit_get_post_meta(get_the_ID(), '_small-quote');
    $website = '';
    if ($siteurl != '') {
        if ($label != '') {
            $website = '<a class="website" href="' . esc_url($siteurl) . '">' . $label . '</a>';
        } else {
            $website = '<a class="website" href="' . esc_url($siteurl) . '">' . $siteurl . '</a>';
        }
    } else {
        $website = '<span class="website">' . $label . '</span>';
    }
    ?>
			<div class="span3">
			<div class="testimonial">
				<?php 
    if (isset($smallquote) && $smallquote != '') {
开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:31,代码来源:testimonials.php


示例7: create_function

 $tests->the_post();
 if ($i == 0 || $i % $row == 0) {
     echo '<div class="row-fluid">';
 }
 if ($text_type == 'excerpt') {
     $length = create_function('', "return {$limit};");
     add_filter('excerpt_length', $length);
     $text = get_the_excerpt();
     remove_filter('excerpt_length', $length);
 } else {
     $text = get_the_content();
 }
 $title = the_title('<p class="name">', '</p>', false);
 $label = yit_get_post_meta(get_the_ID(), '_yit_testimonial_social');
 $siteurl = yit_get_post_meta(get_the_ID(), '_yit_testimonial_website');
 $small_quote = yit_get_post_meta(get_the_ID(), '_yit_testimonial_small_quote');
 $website = '';
 $has_post_thumbnail = has_post_thumbnail();
 if ($siteurl != '') {
     if ($label != '') {
         $website = '<span class="testimonialwebsite">' . $title . ' - ' . '<a  href="' . esc_url($siteurl) . '">' . $label . '</a> </span>';
     } else {
         $website = '<span class="testimonialwebsite">' . $title . ' - ' . '<a  href="' . esc_url($siteurl) . '">' . $siteurl . '</a> </span>';
     }
 } elseif ($label != '') {
     $website = '<span class="testimonialwebsite">' . $title . '</span>';
 } else {
     $website = '<span class="testimonialwebsite">' . $title . '</span>';
 }
 ?>
 <div class="testimonial">
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:testimonial.php


示例8: yit_body_background

    /**
     * Define the body background for the page. 
     * 
     * First get the setting for the current page. If a setting is not defined 
     * in the current page, will be get the setting from the theme options.
     * All css will be shown in head tag, by the action 'wp_head'                    
     * 
     * @since 1.0.0
     */
    function yit_body_background()
    {
        $post_id = yit_post_id();
        // get color and background from postmeta
        $color = yit_get_post_meta($post_id, '_bg_color', true);
        $image = yit_get_post_meta($post_id, '_bg_image', true);
        // get the color and background from theme options, if above are empty
        $background = yit_get_option('background-style');
        if (empty($image) && empty($color)) {
            $image = $background['image'];
            if ($image == 'custom') {
                $image = yit_get_option('bg_image');
            }
        }
        if (empty($color)) {
            $color = $background['color'];
        }
        $image_repeat = yit_get_option('bg_image_repeat');
        $image_position = yit_get_option('bg_image_position');
        $image_attachment = yit_get_option('bg_image_attachment');
        $css = array();
        if (!empty($color)) {
            $css[] = "background-color: {$color};";
        }
        if (!empty($image) && $image != 'none') {
            $css[] = "background-image: url('{$image}');";
        }
        if (!empty($image) && !empty($image_repeat)) {
            $css[] = "background-repeat: {$image_repeat};";
        }
        if (!empty($image) && !empty($image_position)) {
            $css[] = "background-position: {$image_position};";
        }
        if (!empty($image) && !empty($image_attachment)) {
            $css[] = "background-attachment: {$image_attachment};";
        }
        if (empty($css)) {
            return;
        }
        ?>
        <style type="text/css">
            body { <?php 
        echo implode(' ', $css);
        ?>
 }      
        </style>
        <?php 
    }
开发者ID:jayeshnair,项目名称:ctp,代码行数:57,代码来源:functions-core.php


示例9: yit_post_id

 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <[email protected]>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
global $post;
if (!isset($post->ID)) {
    return;
}
$post_id = yit_post_id();
$show_title = is_page() ? yit_get_post_meta($post_id, '_show-title') : false;
$show_breadcrumb = is_page() ? yit_get_post_meta($post_id, '_show-breadcrumb') : (bool) yit_get_option('breadcrumb');
if ($show_title || $show_breadcrumb) {
    $tag_title = apply_filters('yit_page_slogan_tag', 'h1');
    ?>
<!-- START PAGE META -->
<div id="page-meta" class="group margin-top">
	<div class="container">
	<div class="row">
		<div class="span12">
    <?php 
    if ($show_title) {
        ?>
        <!-- TITLE -->
        <div class="title">
        <?php 
        if (is_category()) {
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:page-meta.php


示例10: yit_post_id

/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <[email protected]>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
global $post;
$post_id = yit_post_id();
$slogan = yit_get_post_meta($post_id, '_slogan');
$sub_slogan = yit_get_post_meta($post_id, '_sub-slogan');
if ($slogan) {
    $tag_slogan = apply_filters('yit_page_slogan_tag', 'h2');
    $tag_sub_slogan = apply_filters('yit_page_sub_slogan_tag', 'h3');
    ?>
    <!-- SLOGAN -->
    <div class="slogan">
    <?php 
    do_action('yit_before_slogan');
    yit_string('<' . $tag_slogan . '>', yit_decode_title($slogan), '</' . $tag_slogan . '>');
    if ($sub_slogan) {
        do_action('yit_before_sub_slogan');
        yit_string('<' . $tag_sub_slogan . '>', yit_decode_title($sub_slogan), '</' . $tag_sub_slogan . '>');
    }
    ?>
    	<div class="border margin-top"></div>
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:slogan.php


示例11: yit_get_post_meta

        <?php 
} else {
    ?>
            <?php 
    echo $image;
    ?>
        <?php 
}
?>

        <?php 
if ($_show_overlay_box) {
    ?>
            <?php 
    $google_map_overlay_address = yit_get_post_meta(get_the_ID(), '_google_map_overlay_address');
    $google_map_overlay_info = yit_get_post_meta(get_the_ID(), '_google_map_overlay_info');
    ?>
               <div class="map_info">
                   <div class="row">
                       <div class="container_map_box_info col-sm-4">
                           <div class="map_box_info">
                               <?php 
    if (isset($google_map_overlay_address) && $google_map_overlay_address) {
        echo "<h4>" . $google_map_overlay_address . "</h4>";
    }
    ?>
                               <?php 
    if (isset($google_map_overlay_info) && $google_map_overlay_info) {
        echo "<p>" . nl2br($google_map_overlay_info) . "</p>";
    }
    ?>
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:map.php


示例12: yit_woocommerce_add_tabs

function yit_woocommerce_add_tabs($tabs = array())
{
    global $post;
    $custom_tabs = yit_get_post_meta($post->ID, '_custom_tab');
    if (!empty($custom_tabs)) {
        foreach ($custom_tabs as $tab) {
            yit_wpml_register_string('bishop-theme', 'custom_tab_' . sanitize_title($tab["name"]), $tab["name"]);
            $tab["name"] = yit_wpml_string_translate('bishop-theme', 'custom_tab_' . sanitize_title($tab["name"]), $tab["name"]);
            yit_wpml_register_string('bishop-theme', 'custom_tab_' . sanitize_title($tab["value"]), $tab["value"]);
            $tab["value"] = yit_wpml_string_translate('bishop-theme', 'custom_tab_' . sanitize_title($tab["value"]), $tab["value"]);
            $tabs['custom' . $tab["position"]] = array('title' => $tab["name"], 'priority' => 30, 'callback' => 'yit_woocommerce_add_custom_panel', 'custom_tab' => $tab);
        }
    }
    return $tabs;
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:15,代码来源:woocommerce.php


示例13: is_singular

<?php

/*
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
$image_size['height'] = $blog_type == 'big' && is_singular('post') ? (int) $image_size['height'] * 1.5 : $image_size['height'];
$video = array('id' => preg_replace('/[&|&amp;]feature=([\\w\\-]*)/', '', yit_get_post_meta(get_the_ID(), '_video-id')), 'host' => yit_get_post_meta(get_the_ID(), '_video-host'), 'width' => '100%', 'height' => $image_size['height']);
$layout_sidebar = YIT_Layout()->sidebars['layout'];
if ($layout_sidebar == 'sidebar-no') {
    $bootstrap_cols = "col-sm-5 col-xs-12";
} elseif ($layout_sidebar == 'sidebar-double') {
    $bootstrap_cols = "col-xs-12";
} else {
    $bootstrap_cols = "col-sm-6 col-xs-12";
}
extract($video);
switch ($video['host']) {
    case 'youtube':
        ?>
        <div class="post-format <?php 
        echo esc_attr($post_format);
        ?>
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:31,代码来源:video.php


示例14: yit_woocommerce_add_tabs

function yit_woocommerce_add_tabs($tabs)
{
    global $post;
    if (yit_get_post_meta($post->ID, '_use_ask_info')) {
        $tabs['info'] = array('title' => apply_filters('yit_ask_info_label', __('Product Inquiry', 'yit')), 'priority' => 30, 'callback' => 'yit_woocommerce_add_info_panel');
    }
    $custom_tabs = yit_get_post_meta($post->ID, '_custom_tabs');
    if (!empty($custom_tabs)) {
        foreach ($custom_tabs as $tab) {
            $tabs['custom' . $tab["position"]] = array('title' => $tab["name"], 'priority' => 30, 'callback' => 'yit_woocommerce_add_custom_panel', 'custom_tab' => $tab);
        }
    }
    return $tabs;
}
开发者ID:VitaliyProdan,项目名称:wp_shop,代码行数:14,代码来源:woocommerce.php


示例15: while

        <div class="nav">
            <a class="prev" href="#"><i class="fa fa-angle-left"></i></a>
            <a class="next" href="#"><i class="fa fa-angle-right"></i></a>
        </div>
        <div class="list_carousel">

            <ul class="logos-slides" data-speed="<?php 
echo $speed;
?>
">
            
                <?php 
while ($tests->have_posts()) {
    $tests->the_post();
    $logo_title = the_title('<strong><a href="' . get_permalink() . '" class="name">', '</a></strong>', false);
    $logo_link = yit_get_post_meta(get_the_ID(), '_logo_site');
    ?>
                    <li style="height: <?php 
    echo $height;
    ?>
px;">
                        <?php 
    if ($logo_link != '') {
        echo '<a href="' . esc_url($logo_link) . '" class="bwWrapper">';
    } else {
        echo '<a href="#" class="bwWrapper" >';
    }
    $image_id = get_post_thumbnail_id();
    $image_url = wp_get_attachment_image_src($image_id, 'full');
    $image_url = $image_url[0];
    echo '<img src="' . $image_url . '" style="max-height: ' . $height . 'px;" class="logo" />';
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:logos_slider.php


示例16: yit_get_sidebar_setting

 /**
  * Retrieve the sidebar settings for the current post.
  * 
  * @param string $setting
  * @return string
  * @since 1.0.0
  */
 function yit_get_sidebar_setting()
 {
     global $post, $yit_sidebar_layout;
     global $wp_query;
     $post_id = yit_post_id();
     if (empty($post_id) || is_category() || is_archive() || is_search()) {
         $yit_sidebar_layout = yit_get_standard_sidebar();
         return;
     } else {
         $sidebar_layout = yit_get_post_meta($post_id, '_sidebar-layout');
         if (!empty($sidebar_layout) && isset($sidebar_layout['sidebar']) && $sidebar_layout['sidebar'] != -1 || isset($sidebar_layout["layout"]) && $sidebar_layout["layout"] == 'sidebar-no') {
             $yit_sidebar_layout = $sidebar_layout;
         } else {
             $yit_sidebar_layout = yit_get_standard_sidebar();
         }
     }
 }
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:24,代码来源:functions-template.php


示例17: yit_get_post_meta

    ?>
px;">
	        	<?php 
    if (!empty($static_image_link)) {
        ?>
<a href="<?php 
        echo $static_image_link;
        ?>
" title="" target="<?php 
        echo yit_get_post_meta($post_id, '_static_image_target');
        ?>
"><?php 
    }
    ?>
                    <img src="<?php 
    echo yit_get_post_meta($post_id, '_static_image');
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
 Header" />
                <?php 
    if (!empty($static_image_link)) {
        ?>
</a><?php 
    }
    ?>
			</div>
	    </div>
	<?php 
    define('YIT_SLIDER_USED', true);
开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:31,代码来源:slider.php


示例18: yit_load_bg_slider

 function yit_load_bg_slider()
 {
     $bg_slider = yit_get_post_meta(yit_post_id(), '_bg_slider');
     if (empty($bg_slider) || $bg_slider == 'none') {
         return;
     }
     yit_add_body_class('background-slider');
     add_action('wp_head', 'yit_bg_slider');
 }
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:9,代码来源:functions-template.php


示例19: get_permalink

<div class="<?php 
if (!$has_thumbnail) {
    echo 'without ';
}
?>
thumbnail">
    <!-- post title -->
    <?php 
$link = get_permalink();
if (get_the_title() == '') {
    $title = __('(this post does not have a title)', 'yit');
} else {
    $title = get_the_title();
}
$id = yit_get_post_meta(get_the_ID(), '_format_video');
$type = yit_get_post_meta(get_the_ID(), '_format_video_host');
echo do_shortcode('[' . $type . ' video_id="' . $id . '"]');
?>
    
    <!-- post meta -->
    <?php 
if (get_post_type() == 'post') {
    ?>
    <div class="meta group span4">
        <?php 
    if (is_single()) {
        yit_string("<h1 class=\"post-title\"><a href=\"{$link}\">", $title, "</a></h1>");
    } else {
        yit_string("<h2 class=\"post-title\"><a href=\"{$link}\">", $title, "</a></h2>");
    }
    ?>
开发者ID:jooseeduu,项目名称:RopaModas,代码行数:31,代码来源:video.php


示例20: do_action

do_action('yit_before_primary');
?>
<!-- START PRIMARY -->
<div id="primary" class="<?php 
yit_sidebar_layout();
?>
">
    <div class="inner group">
        <?php 
do_action('yit_before_content');
?>
        <!-- START CONTENT -->
        <div id="content-page" class="content group">
        <?php 
$show_title = yit_get_post_meta(get_the_ID(), '_show-title');
$show_breadcrumb = yit_get_post_meta(get_the_ID(), '_show-breadcrumb');
$tag_title = apply_filters('yit_page_title_tag', 'h2');
do_action('yit_before_breadcrumb');
if ($show_breadcrumb) {
    yit_breadcrumb(apply_filters('yit_breadcrumb_delimiter', '&raquo;'));
}
do_action('yit_before_page_title');
if ($show_title) {
    yit_string('<' . $tag_title . '>', get_the_title(), '</' . $tag_title . '>');
}
do_action('yit_loop_page');
comments_template();
?>
        </div>
        <!-- END CONTENT -->
        <?php 
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:page.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP yit_get_sidebar_layout函数代码示例发布时间:2022-05-23
下一篇:
PHP yit_get_option函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap