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


PHP yit_get_post_meta函数代码示例

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


在下文中一共展示了yit_get_post_meta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 <info@yithemes.com>
 *
 * 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 <info@yithemes.com>
 *
 * 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 <info@yithemes.com>
 *
 * 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


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