本文整理汇总了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);
}
}