當前位置: 首頁>>代碼示例>>PHP>>正文


PHP WCV_Vendors::is_vendor_product_page方法代碼示例

本文整理匯總了PHP中WCV_Vendors::is_vendor_product_page方法的典型用法代碼示例。如果您正苦於以下問題:PHP WCV_Vendors::is_vendor_product_page方法的具體用法?PHP WCV_Vendors::is_vendor_product_page怎麽用?PHP WCV_Vendors::is_vendor_product_page使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在WCV_Vendors的用法示例。


在下文中一共展示了WCV_Vendors::is_vendor_product_page方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: vendor_mini_header

 public static function vendor_mini_header()
 {
     global $product;
     if (WCV_Vendors::is_vendor_product_page($product->post->post_author)) {
         $vendor = get_userdata($product->post->post_author);
         $vendor_id = $product->post->post_author;
         $vendor_shop_link = site_url(WC_Vendors::$pv_options->get_option('vendor_shop_permalink') . '/' . $vendor->pv_shop_slug);
         $shop_name = get_user_meta($vendor_id, 'pv_shop_name', true);
         $has_html = $vendor->pv_shop_html_enabled;
         $global_html = WC_Vendors::$pv_options->get_option('shop_html_enabled');
         $description = do_shortcode($vendor->pv_shop_description);
         $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_email = $vendor->user_email;
         $vendor_login = $vendor->user_login;
         do_action('wcv_before_mini_header', $vendor->ID);
         wc_get_template('vendor-mini-header.php', array('vendor' => $vendor, 'vendor_id' => $vendor_id, 'vendor_shop_link' => $vendor_shop_link, 'shop_name' => $vendor->pv_shop_name, 'shop_description' => $shop_description, 'seller_info' => $seller_info, 'shop_name' => $shop_name, 'vendor_email' => $vendor_email, 'vendor_login' => $vendor_login), 'wc-vendors/front/', wcv_plugin_dir . 'templates/front/');
         do_action('wcv_after_mini_header', $vendor->ID);
     }
 }
開發者ID:simplementNat,項目名稱:wcvendors,代碼行數:20,代碼來源:class-vendor-shop.php


注:本文中的WCV_Vendors::is_vendor_product_page方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。