本文整理汇总了PHP中WCV_Vendors::is_vendor_page方法的典型用法代码示例。如果您正苦于以下问题:PHP WCV_Vendors::is_vendor_page方法的具体用法?PHP WCV_Vendors::is_vendor_page怎么用?PHP WCV_Vendors::is_vendor_page使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WCV_Vendors
的用法示例。
在下文中一共展示了WCV_Vendors::is_vendor_page方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
}