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


PHP vp_metabox函数代码示例

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


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

示例1: hb_testimonial_quote

function hb_testimonial_quote($post_id)
{
    $testimonial_post = get_post($post_id);
    if ($testimonial_post) {
        setup_postdata($testimonial_post);
        $author_name = vp_metabox('testimonial_type_settings.hb_testimonial_author');
        $author_desc = vp_metabox('testimonial_type_settings.hb_testimonial_description');
        $author_desc_link = vp_metabox('testimonial_type_settings.hb_testimonial_description_link');
        ?>

    <p><?php 
        the_content();
        ?>
</p>
    <div class="testimonial-quote-meta">
        <span><?php 
        if ($author_name) {
            echo $author_name;
        }
        if ($author_desc) {
            if ($author_desc_link) {
                echo ', <a href="' . $author_desc_link . '">' . $author_desc . '</a>';
            } else {
                echo ', ' . $author_desc;
            }
        }
        ?>
        </span>
    </div>
         
    <?php 
        wp_reset_postdata();
    }
}
开发者ID:phupx,项目名称:genco,代码行数:34,代码来源:testimonial-quote.php

示例2: charity_event_media_view

function charity_event_media_view()
{
    $image = vp_metabox('charity_event.event_video_image');
    $youtube = vp_metabox('charity_event.event_you_tube_url');
    $viemo = vp_metabox('charity_event.event_vimeo_url');
    $width = 600;
    $height = 400;
    if (!empty($image)) {
        ?>
       <figure class="charity-event-video">
            <?php 
        $videoUrl = "";
        if (!empty($youtube)) {
            $videoUrl = $youtube;
        }
        if (!empty($viemo)) {
            $videoUrl = $viemo;
        }
        ?>
            <img  src="<?php 
        echo esc_url($image);
        ?>
" alt="<?php 
        the_title();
        ?>
" data-video='<?php 
        echo esc_html($videoUrl);
        ?>
'/>                        
        </figure>
    <?php 
    }
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:33,代码来源:event.php

示例3: get_tour_badge

 /**
  * Returns badge settings for specific tour.
  *
  * @param  integer $tour_id
  * @param  boolean $ignore_inactive
  * @return assoc
  */
 public function get_tour_badge($tour_id, $ignore_inactive = true)
 {
     $bid = $tour_id ? vp_metabox('tour_tabs_meta.tour_badge', null, $tour_id) : null;
     if ($this->is_active($bid)) {
         return array('title' => $this->get_title($bid), 'color' => $this->get_color($bid));
     }
     return null;
 }
开发者ID:j-kenneth,项目名称:Expeero,代码行数:15,代码来源:AtBadgeService.php

示例4: charity_vc_home_become_volunteer

function charity_vc_home_become_volunteer($atts, $content = null)
{
    extract(shortcode_atts(array('home_page_volunteer' => '', 'page_volunteer' => ''), $atts, 'volunteer'));
    $pageid = $page_volunteer;
    function getTitleID($str)
    {
        $arr = array();
        $regx1 = '/[\\{\\d\\}]+/';
        preg_match_all($regx1, $str, $all);
        if (!empty($all[0]) && $all[0][count($all[0]) - 1]) {
            $regx2 = '/[\\d]+/';
            preg_match($regx2, $all[0][count($all[0]) - 1], $ids);
            if (!empty($ids[0])) {
                $arr['title'] = str_replace($all[0][count($all[0]) - 1], "", $str);
                $arr['id'] = $ids[0];
            }
        }
        return $arr;
    }
    $selectedpage = getTitleID($pageid);
    //echo $selectedpage['id'];
    query_posts(array("page_id" => $selectedpage['id']));
    if (have_posts()) {
        the_post();
        $title = vp_metabox('volunteer.volunteer-title');
        $image = vp_metabox('volunteer.volunteer-image');
        $content = vp_metabox('volunteer.volunteer-content');
        //$url = wp_get_attachment_image_src( get_post_thumbnail_id($pageid), array( 1143,479 ) );
        ?>
        <section class="parallax-section parallax" style="background-image: url('<?php 
        echo esc_url($image);
        ?>
')">
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-sm-7 col-md-5">
                        <h2><?php 
        print $title;
        ?>
</h2>
                        <p><?php 
        print $content;
        ?>
</p>
                    </div>
                </div>
            </div>
        </section>
        <?php 
    }
    wp_reset_query();
}
开发者ID:kautzar,项目名称:drpp4,代码行数:52,代码来源:become-a-volunteer.php

示例5: add_criteria_raitings_comment_fields

 function add_criteria_raitings_comment_fields($fields)
 {
     $reviewType = vp_metabox('rehub_post.rehub_framework_post_type');
     $reviewCriteria = vp_metabox('rehub_post.review_post.0.review_post_criteria');
     $firstcriteria = $reviewCriteria[0]['review_post_name'];
     if ($reviewType == 'review' && $firstcriteria != '') {
         wp_enqueue_style('jquery.nouislider');
         wp_enqueue_script('jquery.nouislider');
         $criteriaNamesArray = array();
         $criteriaInputs = '<div id="user_reviews_in_comment"><div class="user_rating_left_com">';
         for ($i = 0; $i < count($reviewCriteria); $i++) {
             $criteriaNamesArray[$i] = $reviewCriteria[$i]['review_post_name'];
             $criteriaInputs .= '<label for="criteria_input_' . $i . '">' . $reviewCriteria[$i]['review_post_name'] . '</label>';
             $criteriaInputs .= '<input id="criteria_input_' . $i . '" type="hidden" name="user_criteria[]" value="0" class="criteria_hidden_input' . $i . '" /><span class="criteria_visible_input' . $i . '">0</span><div class="user_rating_slider_criteria"></div>';
         }
         $criteriaInputs .= '<div class="your_total_score">' . __('Your total score', 'rehub_framework') . ' <span>0</span></div></div><input type="hidden" name="criteria_names" value="' . base64_encode(serialize($criteriaNamesArray)) . '" />';
         $criteriaInputs .= '<div class="user_rating_right_com"><textarea id="pros_review" name="pros_review" rows="5" placeholder="' . __('PROS', 'rehub_framework') . '"></textarea><br /><textarea id="cons_review" name="cons_review" rows="5" placeholder="' . __('CONS', 'rehub_framework') . '"></textarea></div>';
         $criteriaInputs .= '</div>';
         // check if rated post already
         $current_user_id = get_current_user_id();
         if ($current_user_id) {
             $rated_posts = get_user_meta($current_user_id, 'rated_posts', true);
             if ($rated_posts) {
                 $current_post_id = get_the_ID();
                 if (in_array($current_post_id, $rated_posts)) {
                     $criteriaInputs = '';
                     wp_dequeue_style('jquery.nouislider');
                     wp_dequeue_script('jquery.nouislider');
                 }
             }
         } else {
             if (isset($_COOKIE['rated_posts'])) {
                 $rated_posts = explode(',', $_COOKIE['rated_posts']);
                 if ($rated_posts) {
                     $criteriaInputs = '';
                     wp_dequeue_style('jquery.nouislider');
                     wp_dequeue_script('jquery.nouislider');
                 }
             }
         }
         if (is_user_logged_in()) {
             $fields .= $criteriaInputs;
         } else {
             $fields['criteria'] = $criteriaInputs;
         }
         return $fields;
     } else {
         return $fields;
     }
 }
开发者ID:rhondamoananui,项目名称:rehub,代码行数:50,代码来源:user_review_functions.php

示例6: bgImage

 function bgImage($args)
 {
     if (!empty($args['template_file'])) {
         $id = charity_get_page_template($args['template_file'], $by = "ID");
     } else {
         global $post;
         $id = $post->ID;
     }
     $bgImage = vp_metabox('breadcrumb.image', '', $id);
     $bgDefaultImage = vp_option('vpt_option.img_404');
     if (!empty($bgImage)) {
         printf('style="background-image:url(%s)"', $bgImage);
     } else {
         printf('style="background-image:url(%s)"', $bgDefaultImage);
         //default image
     }
 }
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:17,代码来源:breadcrumb-hooks.php

示例7: charity_causes_row

function charity_causes_row($column_name, $post_id)
{
    //$custom_fields = get_post_custom( $post_id );
    switch ($column_name) {
        case 'donation-target':
            echo vp_metabox('doantion-settings.donation-target');
            break;
        case 'doantion-achivement':
            echo vp_metabox('doantion-settings.donation-achivement');
            break;
        case 'doantion-status':
            $status = vp_metabox('doantion-settings.doantion-status');
            echo $status == 0 ? "off" : "on";
            break;
        default:
    }
}
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:17,代码来源:causes-helper.php

示例8: video

    function video() {
        global $post;
        $videoMeta = vp_metabox('cahrity-meta-type-settings.charity-meta-video');
        if (!empty($videoMeta[0])):
            $src = (!empty($videoMeta[0]['upload-video-image'])) ? $videoMeta[0]['upload-video-image'] : false;

            if ($src):
                $videoURL = "";
                if (!empty($videoMeta[0]['txt-youtube-video-url'])) {
                    $videoURL = $videoMeta[0]['txt-youtube-video-url'];
                } elseif (!empty($videoMeta[0]['txt-vimeo-video-url'])) {
                    $videoURL = $videoMeta[0]['txt-vimeo-video-url'];
                }
                ?>
                <div class="embed-responsive embed-responsive-16by9">
                    <img  src="<?php echo esc_url(charity_resize($src, 600, 400)); ?>" alt="<?php esc_attr_e("Click to play", "charity"); ?>" data-video='<?php print($videoURL); ?>'/>
                </div>
                <?php
            endif;
        endif;
    }
开发者ID:kautzar,项目名称:drpp4,代码行数:21,代码来源:gallery-hooks.php

示例9: foreach

		<div class="post_slider media_slider<?php 
        if ($resizer == '1') {
            ?>
 blog_slider<?php 
        } else {
            ?>
 gallery_top_slider<?php 
        }
        ?>
 loading">	
			<ul class="slides">		
				<?php 
        foreach ($gallery_images as $gallery_img) {
            ?>
					<?php 
            if (vp_metabox('rehub_post_side.post_size') == 'full_post') {
                ?>
                        <?php 
                if (!empty($gallery_img['gallery_post_video'])) {
                    ?>
                            <li data-thumb="<?php 
                    echo parse_video_url($gallery_img['gallery_post_video'], 'hqthumb');
                    ?>
" class="play3">
                                <?php 
                    echo parse_video_url($gallery_img['gallery_post_video'], 'embed', '1130', '604');
                    ?>
                            </li>                                            
                        <?php 
                } else {
                    ?>
开发者ID:rhondamoananui,项目名称:rehub,代码行数:31,代码来源:top_image.php

示例10: jeg_get_slider_id

<?php

$sliderid = jeg_get_slider_id();
?>
<div class="landingslider">
	<div class="splitslider">
		<div id="slider" class="sl-slider-wrapper">
			<div class="sl-slider">
				<?php 
$slideritem = vp_metabox('jkreativ_slider_splitslider.slideritem', null, $sliderid);
foreach ($slideritem as $id => $slider) {
    if ($id % 2 == 0) {
        echo '<div class="sl-slide" data-orientation="horizontal" data-slice1-rotation="-25" data-slice2-rotation="-25" data-slice1-scale="2" data-slice2-scale="2">';
    } else {
        echo '<div class="sl-slide" data-orientation="vertical" data-slice1-rotation="10" data-slice2-rotation="-15" data-slice1-scale="1.5" data-slice2-scale="1.5">';
    }
    $pos = '';
    if ($slider['text_align'] == 'center') {
        $pos = 'center';
    } else {
        if ($slider['text_align'] == 'left') {
            $pos = 'leftpos';
        } else {
            if ($slider['text_align'] == 'right') {
                $pos = 'rightpos';
            }
        }
    }
    $secondline = '';
    if ($slider['show_secondline']) {
        $secondline = "<div class='text2'>{$slider['secondline']}</div>";
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:31,代码来源:section-heading-slider-split.php

示例11: vp_metabox

							<?php 
            $enable_project_link = vp_metabox('jkreativ_portfolio_meta.enable_project_link');
            if ($enable_project_link) {
                ?>
								<span class="portfolio-meta-line" style=""></span>									
								<div class="portfolio-link">
									<span><?php 
                echo vp_metabox('jkreativ_portfolio_meta.project_link.0.title');
                ?>
</span>
									<a class="slider-button" target="_blank" href="<?php 
                echo vp_metabox('jkreativ_portfolio_meta.project_link.0.url');
                ?>
">															
										<span class="button-text"><?php 
                echo vp_metabox('jkreativ_portfolio_meta.project_link.0.content');
                ?>
</span>
									</a>
								</div>
							<?php 
            }
            ?>
						</div>
					</div>
					<!-- end slider content -->
				<?php 
        }
    }
    ?>
				
开发者ID:OpenDoorBrewCo,项目名称:odbc-wp-prod,代码行数:30,代码来源:portfolio-single.php

示例12: the_title

						<div class="js-portfolio-details-floating">
							<h1 class="portfolio-title heading"><?php 
            the_title();
            ?>
</h1>

							<div class="portfolio-content">
								<?php 
            the_content();
            ?>
							</div>

							<dl class="portfolio-metadata">
								<?php 
            foreach (vp_metabox('_vp_portfolio_info.info') as $info) {
                ?>
									<dt><?php 
                echo $info['title'];
                ?>
</dt>
									<dd><?php 
                echo apply_filters('meta_content', $info['content']);
                ?>
</dd>
								<?php 
            }
            ?>
							</dl>
						</div>
开发者ID:GaryJones,项目名称:m2xdemo,代码行数:29,代码来源:single-portfolio.php

示例13: _e

    _e('Course Title', 'kazaz');
    ?>
</th>
                                </tr>
                            </thead>
                            <tbody>
				
							<?php 
    while (have_posts()) {
        the_post();
        ?>
		                    	
                                <tr>
                                    <td>
                                    	<?php 
        $course_id = vp_metabox('course.course_id');
        if ($course_id) {
            echo esc_attr($course_id);
        } else {
            echo _x('-----', 'non-existing table value', 'kazaz');
        }
        ?>
                                    </td>
                                    <td>
		                            	<a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title_attribute(array('before' => 'Permalink to: ', 'after' => ''));
        ?>
">
开发者ID:CUPolishSociety,项目名称:campolsoc,代码行数:31,代码来源:taxonomy-courses.php

示例14: admin_url

    ?>
</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="portfolioloader bigloader"></div>
	
	<script>
		(function($){
			$(document).ready(function(){
				$(".portfoliocontent").jportfoliosingle({				
					adminurl : '<?php 
    echo admin_url("admin-ajax.php");
    ?>
',
					imgfsmode : '<?php 
    echo vp_metabox("jkreativ_portfolio_ajax.single_scale_mode", "fit");
    ?>
'
				});
			});						
		})(jQuery);
	</script>
	
<?php 
} else {
    jeg_get_template_part('template/password-form');
}
get_footer();
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:template-portfolio-ajax.php

示例15: while

<?php

/**
 * Charity - causes single fullwidth
 * 
 * @package     charity
 * @version     v.1.0
 */
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $shortCodeMeta = vp_metabox('causes-short-code.causesshortcode');
        ?>
                    <div class="col-xs-12">
                        <div class="row article-list-large progressbar">
                            <div class="col-xs-12 anim-section">
                                <div class="text-center section-header">
                                    <h2 class="h4"><?php 
        the_title();
        ?>
</h2>
                                    <?php 
        do_action("charity_causes_details_attribute");
        ?>
                                </div>
                                <?php 
        if (has_post_thumbnail()) {
            ?>
                                    <figure class="article-pic"><?php 
            the_post_thumbnail("charity_causes_details");
            ?>
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:31,代码来源:causes-fullwidth.php


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