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


PHP WCV_Vendors::get_vendor_id方法代码示例

本文整理汇总了PHP中WCV_Vendors::get_vendor_id方法的典型用法代码示例。如果您正苦于以下问题:PHP WCV_Vendors::get_vendor_id方法的具体用法?PHP WCV_Vendors::get_vendor_id怎么用?PHP WCV_Vendors::get_vendor_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WCV_Vendors的用法示例。


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

示例1: is_vendor_page

 public static function is_vendor_page()
 {
     $vendor_shop = urldecode(get_query_var('vendor_shop'));
     $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
     return $vendor_id ? true : false;
 }
开发者ID:oleggen,项目名称:wcvendors,代码行数:6,代码来源:class-vendors.php

示例2: urldecode

<?php

if (!is_product()) {
    if (of_get_option('tokopress_wcvendors_shop_description') == 'no') {
        return;
    }
    $vendor_shop = urldecode(get_query_var('vendor_shop'));
    if (!$vendor_shop) {
        return;
    }
    $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
    if (!$vendor_id) {
        return;
    }
    $vendor_avatar = of_get_option('tokopress_wcvendors_shop_avatar') != 'no' ? true : false;
    $vendor_profile = of_get_option('tokopress_wcvendors_shop_profile') != 'no' ? true : false;
} else {
    if (of_get_option('tokopress_wcvendors_product_description') != 'yes') {
        return;
    }
    $vendor_id = WCV_Vendors::get_vendor_from_product(get_the_ID());
    if (!$vendor_id) {
        return;
    }
    $vendor_avatar = of_get_option('tokopress_wcvendors_product_avatar') == 'yes' ? true : false;
    $vendor_profile = of_get_option('tokopress_wcvendors_product_profile') != 'no' ? true : false;
}
$vendor = get_userdata($vendor_id);
if (!$vendor) {
    return;
}
开发者ID:Artgorae,项目名称:wp-artgorae,代码行数:31,代码来源:store-header.php

示例3: page_title

 public static function page_title($page_title = "")
 {
     $vendor_shop = urldecode(get_query_var('vendor_shop'));
     $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
     return $vendor_id ? WCV_Vendors::get_vendor_shop_name($vendor_id) : $page_title;
 }
开发者ID:shubham79,项目名称:Jhintaak,代码行数:6,代码来源:class-vendor-shop.php

示例4: vendor_main_header

 public static function vendor_main_header()
 {
     // Remove the basic shop description from the loop
     remove_action('woocommerce_before_main_content', array('WCV_Vendor_Shop', 'shop_description'), 30);
     if (WCV_Vendors::is_vendor_page()) {
         $vendor_shop = urldecode(get_query_var('vendor_shop'));
         $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
         $shop_name = get_user_meta($vendor_id, 'pv_shop_name', true);
         // Shop description
         $has_html = get_user_meta($vendor_id, 'pv_shop_html_enabled', true);
         $global_html = WC_Vendors::$pv_options->get_option('shop_html_enabled');
         $description = do_shortcode(get_user_meta($vendor_id, 'pv_shop_description', true));
         $shop_description = $global_html || $has_html ? wpautop(wptexturize(wp_kses_post($description))) : sanitize_text_field($description);
         $seller_info = $global_html || $has_html ? wpautop(get_user_meta($vendor_id, 'pv_seller_info', true)) : sanitize_text_field(get_user_meta($vendor_id, 'pv_seller_info', true));
         $vendor = get_userdata($vendor_id);
         $vendor_email = $vendor->user_email;
         $vendor_login = $vendor->user_login;
         do_action('wcv_before_main_header', $vendor_id);
         wc_get_template('vendor-main-header.php', array('vendor' => $vendor, 'vendor_id' => $vendor_id, 'shop_name' => $shop_name, 'shop_description' => $shop_description, 'seller_info' => $seller_info, 'vendor_email' => $vendor_email, 'vendor_login' => $vendor_login), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/');
         do_action('wcv_after_main_header', $vendor_id);
     }
 }
开发者ID:simplementNat,项目名称:wcvendors,代码行数:22,代码来源:class-vendor-shop.php

示例5: mango_wc_vendor_header

    function mango_wc_vendor_header()
    {
        global $mango_settings, $post, $wp_query, $vendor_shop;
        $vendor_id = WCV_Vendors::get_vendor_id($vendor_shop);
        $shop_name = get_user_meta($vendor_id, 'pv_shop_name', true);
        $description = do_shortcode(get_user_meta($vendor_id, 'pv_shop_description', true));
        if ($vendor_shop) {
            if ($mango_settings['mango_wcvendors_shop_description']) {
                ?>
				 <?php 
                $product_id = get_the_ID();
                $author = WCV_Vendors::get_vendor_from_product($product_id);
                $link = WCV_Vendors::get_vendor_shop_page($author);
                $author = WCV_Vendors::get_vendor_from_product(get_the_ID());
                $user = get_userdata($author);
                ?>
					 
						<?php 
                $r = get_user_meta($user->ID, 'picture', true);
                $r = $r['url'];
                if ($r) {
                    ?>
						<div class="vendor-profile-bg" style="background:url('<?php 
                    echo $r;
                    ?>
') ;background-size:cover">
						<?php 
                } else {
                    ?>
						<div class="vendor-profile-bg">
						<?php 
                }
                ?>
						<div class="overlay-vendor-effect">
					<?php 
                if ($mango_settings['mango_wcvendors_shop_avatar']) {
                    ?>
					<div class="vendor_userimg">
				
					<div class="profile-img">
					  	<a href="<?php 
                    echo $link;
                    ?>
"> <?php 
                    echo get_avatar($vendor_id, 80);
                    ?>
</a>
					</div>
					
					</div>
					<?php 
                }
                ?>
					  <h1><a href="<?php 
                echo $link;
                ?>
"><?php 
                echo $shop_name;
                ?>
</a></h1>
					  <div class="custom_shop_description">
					  <?php 
                echo wpautop($description);
                ?>
					  </div>
				<?php 
                $author = WCV_Vendors::get_vendor_from_product(get_the_ID());
                $user = get_userdata($author);
                if ($mango_settings['mango_wcvendors_shop_profile']) {
                    ?>
				  
					 <?php 
                    if ($mango_settings['mango_wcvendors_phone']) {
                        if ($user->phone_number) {
                            ?>
				      <span class="vendorcustom-mail"><i class="fa fa-phone aligmentvendor"></i> &nbsp;<?php 
                            echo $user->phone_number;
                            ?>
</span>
				      <?php 
                        }
                    }
                    ?>
  &nbsp;&nbsp;
				    <?php 
                    if ($mango_settings['mango_wcvendors_email']) {
                        if ($user->user_email) {
                            ?>
				    <span class="vendorcustom-mail"><i class="fa fa-envelope aligmentvendor"></i> &nbsp;<?php 
                            echo $user->user_email;
                            ?>
</span>
				   <?php 
                        }
                    }
                    ?>
				   &nbsp;&nbsp;
					 <?php 
                    if ($mango_settings['mango_wcvendors_url']) {
                        if ($user->user_url) {
//.........这里部分代码省略.........
开发者ID:nickkoskowski,项目名称:Work-Depot,代码行数:101,代码来源:general.php


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