本文整理汇总了PHP中yith_wcpv_get_template函数的典型用法代码示例。如果您正苦于以下问题:PHP yith_wcpv_get_template函数的具体用法?PHP yith_wcpv_get_template怎么用?PHP yith_wcpv_get_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yith_wcpv_get_template函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: widget
/**
* Echo the widget content.
*
* Subclasses should over-ride this function to generate their widget code.
*
* @param array $args Display arguments including before_title, after_title,
* before_widget, and after_widget.
* @param array $instance The settings for the particular instance of the widget.
*
* @author Andrea Grillo <[email protected]>
*/
public function widget($args, $instance)
{
$vendor = yith_get_vendor(get_query_var('term'));
$hide_from_guests = !empty($instance['hide_from_guests']) ? true : false;
$show = true;
if ($hide_from_guests) {
$show = is_user_logged_in();
}
if (YITH_Vendors()->frontend->is_vendor_page() && !empty($vendor->store_email) && $show) {
$args = array('instance' => $instance, 'vendor' => $vendor, 'current_user' => wp_get_current_user(), 'widget' => $this);
$this->_instance = $instance;
yith_wcpv_get_template('quick-info', $args, 'widgets');
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:25,代码来源:class.yith-vendor-quick-info.php
示例2: widget
/**
* Echo the widget content.
*
* Subclasses should over-ride this function to generate their widget code.
*
* @param array $args Display arguments including before_title, after_title,
* before_widget, and after_widget.
* @param array $instance The settings for the particular instance of the widget.
*
* @author Andrea Grillo <[email protected]>
*/
public function widget($args, $instance)
{
$hide = !empty($instance['hide_on_vendor_page']) && is_product_taxonomy(YITH_Vendors()->get_taxonomy_name());
if (!$hide) {
yith_wcpv_get_template('vendors-list', $instance, 'widgets');
}
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:18,代码来源:class.yith-woocommerce-vendors-widget.php
示例3: widget
/**
* Echo the widget content.
*
* Subclasses should over-ride this function to generate their widget code.
*
* @param array $args Display arguments including before_title, after_title,
* before_widget, and after_widget.
* @param array $instance The settings for the particular instance of the widget.
*
* @author Andrea Grillo <[email protected]>
*/
public function widget($args, $instance)
{
$vendor = yith_get_vendor(get_query_var('term'));
if (YITH_Vendors()->frontend->is_vendor_page() && !empty($vendor->location)) {
$args = array('instance' => $instance, 'vendor' => $vendor, 'gmaps_link' => esc_url(add_query_arg(array('q' => urlencode($vendor->location)), '//maps.google.com/')));
yith_wcpv_get_template('store-location', $args, 'widgets');
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:19,代码来源:class.yith-vendor-store-location.php
示例4: output_report
/**
* Output the report
*/
public function output_report()
{
$this->chart_colours = array('totals' => '#3498db', 'enabled' => '#5cc488', 'disabled' => '#e74c3c');
$current_range = YITH_Reports()->get_current_date_range();
$this->calculate_current_range($current_range);
$args = array('report' => $this, 'current_range' => $current_range, 'ranges' => YITH_Reports()->get_ranges());
$this->get_chart_data();
yith_wcpv_get_template('vendors-registered', $args, 'woocommerce/admin/reports');
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-report-vendors-registered.php
示例5: output_report
/**
* Output the report
*/
public function output_report()
{
if (empty($this->vendor_ids) && !empty($_GET['vendor_ids'])) {
$this->vendor_ids = $_GET['vendor_ids'];
}
$this->chart_colours = array('vendor_sales' => '#d4d9dc', 'vendor_amount' => '#3498db');
$args = array('report' => $this, 'current_range' => YITH_Reports()->get_current_date_range(), 'ranges' => YITH_Reports()->get_ranges());
yith_wcpv_get_template('vendor-sales', $args, 'woocommerce/admin/reports');
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-report-vendors-sales.php
示例6: __
<?php
/**
* Admin new order email (plain text)
*
* @author WooThemes
* @package WooCommerce/Templates/Emails/Plain
* @version 2.0.0
*
* @var string $email_heading
* @var YITH_Commission $commission
* @var bool $sent_to_admin
* @var bool $plain_text
*/
if (!defined('ABSPATH')) {
exit;
// Exit if accessed directly
}
echo "= " . $email_heading . " =\n\n";
echo __('New vendor registered', 'yith_wc_product_vendors') . "\n\n";
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
do_action('woocommerce_email_before_new_vendor_table', $vendor, $sent_to_admin, $plain_text);
echo strtoupper(__('A new user has made a request to become a vendor in your store.', 'yith_wc_product_vendors')) . "\n";
echo "\n";
yith_wcpv_get_template('new-vendor-detail-table', array('vendor' => $vendor, 'owner' => $vendor->get_owner()), 'emails/plain');
do_action('woocommerce_email_after_new_vendor_table', $commission, $sent_to_admin, $plain_text);
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo apply_filters('woocommerce_email_footer_text', get_option('woocommerce_email_footer_text'));
开发者ID:shwetadubey,项目名称:upfit,代码行数:28,代码来源:new-vendor-registration.php
示例7: get_content_plain
/**
* get_content_plain function.
*
* @access public
* @return string
*/
function get_content_plain()
{
ob_start();
yith_wcpv_get_template($this->template_plain, array('order' => $this->object, 'vendor' => $this->vendor, 'email_heading' => $this->get_heading(), 'sent_to_admin' => true, 'plain_text' => false, 'yith_wc_email' => $this), '');
return ob_get_clean();
}
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:12,代码来源:class-yith-wc-email-cancelled-order.php
示例8: woocommerce_template_vendor_name
/**
* Add vendor name after product title
*
* @return string The title
* @since 1.0
* @author Andrea Grillo <[email protected]>
* @use the_title filter
*/
public function woocommerce_template_vendor_name()
{
global $product;
if (!empty($product) && is_object($product)) {
$vendor = yith_get_vendor($product, 'product');
if ($vendor->is_valid()) {
$args = array('vendor' => $vendor, 'label_color' => 'color: ' . get_option('yith_vendors_color_name'));
$template_info = array('name' => 'vendor-name-title', 'args' => $args, 'section' => is_product() ? 'woocommerce/single-product' : 'woocommerce/loop');
$template_info = apply_filters('yith_woocommerce_vendor_name_template_info', $template_info);
extract($template_info);
yith_wcpv_get_template($name, $args, $section);
}
}
}
开发者ID:tib07,项目名称:yith-woocommerce-product-vendors,代码行数:22,代码来源:class.yith-vendors-frontend.php
示例9: email_order_items_table
/**
* get the email vendor order table
*
* @return array The review average and the product with reviews count
*/
public function email_order_items_table($order, $show_download_links = false, $show_sku = false, $show_purchase_note = false, $show_image = false, $image_size = array(32, 32), $plain_text = false)
{
ob_start();
$template = $plain_text ? 'emails/plain/vendor-email-order-items.php' : 'emails/vendor-email-order-items.php';
yith_wcpv_get_template($template, array('order' => $order, 'vendor' => $this, 'items' => $order->get_items(), 'show_download_links' => $show_download_links, 'show_sku' => $show_sku, 'show_purchase_note' => $show_purchase_note, 'show_image' => $show_image, 'image_size' => $image_size), '');
return ob_get_clean();
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:12,代码来源:class.yith-vendor.php
示例10: get_content_plain
/**
* get_content_plain function.
*
* @access public
* @return string
*/
function get_content_plain()
{
ob_start();
yith_wcpv_get_template($this->template_plain, array('email_heading' => $this->get_heading(), 'blogname' => $this->get_blogname(), 'sent_to_admin' => false, 'plain_text' => true), '');
return ob_get_clean();
}
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:12,代码来源:class-yith-wc-email-vendor-new-account.php
示例11: output_report
/**
* Output the report
*/
public function output_report()
{
$this->chart_colours = array('orders_gross' => '#b1d4ea', 'orders_net' => '#3498db', 'orders_count' => '#95a5a6', 'products_count' => '#dbe1e3');
$current_range = YITH_Reports()->get_current_date_range();
$this->calculate_current_range($current_range);
$args = array('report' => $this, 'current_range' => $current_range, 'ranges' => YITH_Reports()->get_ranges());
yith_wcpv_get_template('sales-by-date', $args, 'woocommerce/admin/reports');
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:11,代码来源:class.yith-report-sales-by-date.php
示例12: single_product_commission_content
/**
* Add commission tab in single product "Product Data" section
*/
public function single_product_commission_content()
{
if (current_user_can('manage_woocommerce')) {
global $post;
$meta_value = get_post_meta($post->ID, '_product_commission', true);
$args = array('field_args' => array('id' => 'yith_wpv_product_commission', 'label' => __('Product commission', 'yith_wc_product_vendors'), 'desc_tip' => 'true', 'description' => __('You can set a specific commission for a single product. Keep this field blank or zero to use the vendor commission', 'yith_wc_product_vendors'), 'value' => $meta_value ? $meta_value : '', 'type' => 'number', 'custom_attributes' => array('step' => 0.1, 'min' => 0, 'max' => 100)));
yith_wcpv_get_template('product-data-commission', $args, 'woocommerce/admin');
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class.yith-vendors-admin-premium.php
示例13: email_commission_details_table
/**
* Retrieve the table for commission details
*
* @param bool $plain_text
*
* @return string
*/
public function email_commission_details_table($plain_text = false)
{
ob_start();
$template = $plain_text ? 'plain/commission-detail-table' : 'commission-detail-table';
yith_wcpv_get_template($template, array('commission' => $this, 'order' => $this->get_order(), 'vendor' => $this->get_vendor(), 'item' => $this->get_item(), 'product' => $this->get_product()), 'emails');
$return = apply_filters('woocommerce_email_commission_detail_table', ob_get_clean(), $this);
return $return;
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:15,代码来源:class.yith-commission.php
示例14: do_action
* @var YITH_Commission $commission
* @var bool $sent_to_admin
* @var bool $plain_text
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
?>
<?php do_action( 'woocommerce_email_header', $email_heading ); ?>
<p><?php _e( 'New vendor registered', 'yith_wc_product_vendors' ) ?></p>
<p><?php _e( 'A new user has made a request to become a vendor in your store.', 'yith_wc_product_vendors' ) ?></p>
<?php do_action( 'woocommerce_email_before_commission_table', $vendor, $sent_to_admin, $plain_text ); ?>
<h2><a href="<?php echo admin_url() ?>"><?php _e( 'Vendor detail', 'yith_wc_product_vendors ') ?></a></h2>
<table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee">
<tbody>
<?php yith_wcpv_get_template( 'new-vendor-detail-table', array( 'vendor' => $vendor, 'owner' => get_user_by( 'id', absint( $vendor->get_owner() ) ) ), 'emails' ); ?>
</tbody>
</table>
<?php do_action( 'woocommerce_email_after_commission_table', $vendor, $sent_to_admin, $plain_text ); ?>
<?php do_action( 'woocommerce_email_footer' ); ?>
开发者ID:shwetadubey,项目名称:upfit,代码行数:30,代码来源:new-vendor-registration.php
示例15: get_content_plain
/**
* get_content_plain function.
*
* @access public
* @return string
*/
function get_content_plain()
{
ob_start();
yith_wcpv_get_template($this->template_plain, array('commission' => $this->object, 'email_heading' => $this->get_heading(), 'sent_to_admin' => true, 'plain_text' => true), '');
return ob_get_clean();
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:12,代码来源:class-yith-wc-email-vendor-commissions-paid.php
示例16: add_report_abuse_link
/**
* Add a report abuse link in single product page
*
* @since 1.0
* @author Andrea Grillo <[email protected]>
* @return void
*/
public function add_report_abuse_link()
{
$abuse = get_option('yith_wpv_report_abuse_link', 'none');
$vendor = yith_get_vendor('current', 'product');
$args = array('abuse_text' => get_option('yith_wpv_report_abuse_link_text'), 'button_class' => apply_filters('yith_wpv_report_abuse_button_class', 'submit'), 'submit_label' => apply_filters('yith_wpv_report_submit_button_label', __('Report', 'yith_wc_product_vendors')), 'vendor' => $vendor, 'product' => wc_get_product());
if ('all' == $abuse) {
yith_wcpv_get_template('abuse', $args, 'woocommerce/single-product');
}
if ('vendor' == $abuse) {
if ($vendor->is_valid()) {
yith_wcpv_get_template('abuse', $args, 'woocommerce/single-product');
}
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:21,代码来源:class.yith-vendors-frontend-premium.php
示例17: become_a_vendor
public static function become_a_vendor($sc_args = array())
{
$user = wp_get_current_user();
$vendor = yith_get_vendor($user->ID, 'user');
if (!$vendor->is_valid() && (in_array('subscriber', $user->roles) || in_array('customer', $user->roles)) || $vendor->is_super_user()) {
$args = array('is_vat_require' => YITH_Vendors()->is_vat_require(), 'is_terms_and_conditions_require' => YITH_Vendors()->is_terms_and_conditions_require());
yith_wcpv_get_template('become-a-vendor', $args, 'shortcodes');
} else {
YITH_Vendors()->frontend->vendor_dashboard_endpoint($vendor);
}
}
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:11,代码来源:class.yith-multi-vendor-shortcodes.php
示例18: add_vacation_template
/**
* Add vacation part to add to cart template
*
* @param $template_name
* @param $template_path
* @param $located
* @param $args
*
* @return void
*
* @since 1.7
* @author Andrea Grillo <[email protected]>
*/
public function add_vacation_template($template_name, $template_path, $located, $args)
{
if (is_singular('product') && preg_match('/single-product\\/add-to-cart\\/(\\S+).php/', $template_name)) {
$vendor = yith_get_vendor('current', 'product');
$vendor->is_on_vacation() && 'enabled' == $vendor->vacation_selling && yith_wcpv_get_template('store-vacation', array('vendor' => $vendor), 'woocommerce/single-product');
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:20,代码来源:module.yith-vendor-vacation.php
示例19: commissions_details_page
/**
* Show the Commissions page
*
* @author Andrea Grillo <[email protected]>
* @since 1.0
* @return void
* @fire yith_vendors_commissions_template hooks
*/
public function commissions_details_page()
{
if (isset($_GET['view'])) {
$commission = YITH_Commission(absint($_GET['view']));
$args = apply_filters('yith_vendors_commission_view_template', array('commission' => $commission));
yith_wcpv_get_template('commission-view', $args, 'admin');
} else {
if (!class_exists('WP_List_Table')) {
require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
}
$path_class = YITH_WPV_PATH . 'includes/lib/class.yith-commissions-list-table';
$class = 'YITH_Commissions_List_Table';
require_once $path_class . '.php';
if (file_exists($path_class . '-premium.php')) {
require_once $path_class . '-premium.php';
$class .= '_Premium';
}
/** @var YITH_Commissions_List_Table|YITH_Commissions_List_Table_Premium $commissions_table */
$commissions_table = new $class();
$commissions_table->prepare_items();
$args = apply_filters('yith_vendors_commissions_template', array('commissions_table' => $commissions_table));
yith_wcpv_get_template('commissions', $args, 'admin');
}
}
开发者ID:shwetadubey,项目名称:upfit,代码行数:32,代码来源:class.yith-commissions.php
示例20: show_premium_tab
/**
* Show the premium tabs
*
* @since 1.0.0
* @author Andrea Grillo <[email protected]>
* @return string The premium landing link
*/
public function show_premium_tab()
{
yith_wcpv_get_template('premium', array(), 'admin');
}
开发者ID:kanhaiyasharma,项目名称:Bestswiss,代码行数:11,代码来源:class.yith-vendors-admin.php
注:本文中的yith_wcpv_get_template函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论