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

PHP vp_metabox函数代码示例

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

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



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


示例16: url

    ?>
	
    <section class="testimonial parallax" style="background-image: url('<?php 
    echo $testimonial_bg;
    ?>
')">
        <div class="overlay"></div>
        <div class="container">
            <div class="row">
                <div class="col-xs-12">
                    <div class="testimonial-slider flexslider">
                        <ul class="slides">
                            <?php 
    while (have_posts()) {
        the_post();
        $company = vp_metabox('testimonial.companey_name');
        ?>
									
                                <li>
                                    <div class="slide">
                                        <h2><?php 
        echo vp_option('vpt_option.ch_hOne_testimonial_title');
        ?>
</h2>
                                        <blockquote>
                                            <?php 
        the_content();
        ?>
                                            <footer>
                                                <span><?php 
        the_title();
开发者ID:Angelpm28,项目名称:ong-canada,代码行数:31,代码来源:home-one-testimonial.php


示例17: vp_metabox

<?php

/* Template Name: Page for visual layout builder */
$header_disable = vp_metabox('vcr.header_disable');
$footer_disable = vp_metabox('vcr.footer_disable');
$content_type = vp_metabox('vcr.content_type');
if ($content_type == 'def') {
    $content_type = '';
}
if ($header_disable == '1') {
    ?>
<!DOCTYPE html>
<!--[if IE 8]>    <html class="ie8" <?php 
    language_attributes();
    ?>
> <![endif]-->
<!--[if IE 9]>    <html class="ie9" <?php 
    language_attributes();
    ?>
> <![endif]-->
<!--[if (gt IE 9)|!(IE)] <?php 
    language_attributes();
    ?>
><![endif]-->
<html <?php 
    language_attributes();
    ?>
>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
开发者ID:rhondamoananui,项目名称:rehub,代码行数:31,代码来源:visual_builder.php


示例18: foreach

"><div class="dashicons dashicons-no-alt"></div></li>
            </ul>
        </div>
    </div>
    <div class="clear"></div>

    <!-- ooooooooooooooooooooooooooooooooooooooooo
        IMAGE and MEDIA
    ooooooooooooooooooooooooooooooooooooooooooo -->
    <div class="<?php 
echo $mediawrap;
?>
 column ">
        <div class="zl_portimg">
            <?php 
if (1 == vp_metabox('portfolio.additional', $postID)) {
    ?>
                <?php 
    $islider = null;
    if (count($galls) === 1) {
        $islider = '';
    } else {
        $islider = 'portfolioslide owl-carousel';
    }
    ?>
                <div class="<?php 
    echo $islider;
    ?>
">
                    <?php 
    foreach ($galls as $gall) {
开发者ID:webtechfreaky,项目名称:vienna-content-focused-personal-blog-theme,代码行数:31,代码来源:portfoliodetail.php


示例19:

/images/skyi-icon.png"/></a>
                        <?php 
    if ($header_layout_class == 'nav-type-2' || $header_layout_class == 'nav-type-2 centered-nav') {
        ?>
                        <!-- BEGIN .container or .container-wide -->
                        <div class="<?php 
        echo $main_header_container;
        ?>
">
						
                        <?php 
    }
    ?>

                        <?php 
    if (vp_metabox('misc_settings.hb_onepage') && has_nav_menu('one-page-menu')) {
        wp_nav_menu(array('theme_location' => 'one-page-menu', 'menu_class' => 'sf-menu ', 'menu_id' => 'main-nav', 'container' => '', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new hb_custom_walker()));
    } else {
        if (has_nav_menu('main-menu')) {
            // User has assigned menu to this location
            wp_nav_menu(array('theme_location' => 'main-menu', 'menu_class' => 'sf-menu ', 'menu_id' => 'main-nav', 'container' => '', 'link_before' => '<span>', 'link_after' => '</span>', 'walker' => new hb_custom_walker()));
        } else {
            ?>
                            <ul id="main-nav" class="empty-menu">
                                <li>
								<?php 
            _e('Please attach a menu to this menu location in Appearance > Menu.', 'hbthemes');
            ?>
</li>
                            </ul>
                        <?php 
开发者ID:amit0773,项目名称:manaslake,代码行数:31,代码来源:header-navigation.php


示例20: vp_metabox

					<div class="clearfix"></div>
				</div>
				<?php 
        }
    }
    ?>
					
			</div>
		
		</div>
	</div>
</div>

<script>
	(function($) {
		$(document).ready(function() {
			$(".halfpage").jnormalblog();
			$(".halfpage").jfsmap({
				zoomfactor : <?php 
    echo vp_metabox('jkreativ_page_fsmap.mapzoom', 14);
    ?>
			});
		});
	})(jQuery);
</script>

<?php 
} else {
    jeg_get_template_part('template/password-form');
}
get_footer();
开发者ID:ntnvu,项目名称:tcb_online,代码行数:31,代码来源:template-contact-full-map.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP vp_option函数代码示例发布时间:2022-05-23
下一篇:
PHP vote函数代码示例发布时间: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