PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
themes
/
rehub
/
functions
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> <?php // Woo custom widget include (locate_template( 'inc/widgets/woocategory.php' )); //CREATE BRAND TAXONOMY include( 'woo_store_taxonomy_class.php' ); //CREATE REVIEW META PANEL $wooreview_metabox = get_template_directory() . '/admin/metabox/woo_review.php'; $wooreview_metabox_obj = new VP_Metabox($wooreview_metabox); //Remove Image customizer as theme has own resize on fly script function rehub_remove_woo_image_panel() { global $wp_customize; $wp_customize->remove_section( 'woocommerce_product_images' ); } add_action( 'customize_register', 'rehub_remove_woo_image_panel', 11 ); ////////////////////////////////////////////////////////////////// // WooCommerce css ////////////////////////////////////////////////////////////////// add_filter( 'woocommerce_enqueue_styles', '__return_false' ); ////////////////////////////////////////////////////////////////// // Display number products per page. ////////////////////////////////////////////////////////////////// if(!function_exists('rh_loop_shop_per_page')){ function rh_loop_shop_per_page( $cols ) { if(rehub_option('woo_number') == '16') { $cols = 16; } elseif(rehub_option('woo_number') == '24') { $cols = 24; } elseif(rehub_option('woo_number') == '30') { $cols = 30; } else { $cols = 12; } return $cols; } } add_filter( 'loop_shop_per_page', 'rh_loop_shop_per_page', 20 ); if(!function_exists('rh_loop_shop_number')){ function rh_loop_shop_number( ) { if(rehub_option('woo_columns') == '4_col' || rehub_option('woo_columns') == '4_col_side') { return 4; } elseif(rehub_option('woo_columns') == '5_col_side') { return 5; } else { return 3; } } } add_filter( 'loop_shop_columns', 'rh_loop_shop_number', 20 ); ////////////////////////////////////////////////////////////////// // Set 6 related products ////////////////////////////////////////////////////////////////// add_filter( 'woocommerce_output_related_products_args', 'rh_woo_related_products_args' ); function rh_woo_related_products_args( $args ) { $args['posts_per_page'] = 6; return $args; } ////////////////////////////////////////////////////////////////// // Woo hook customization ///////////////////////////////////////////////////////////// add_action('woocommerce_before_shop_loop', 'rehub_woocommerce_wrapper_start3', 33); function rehub_woocommerce_wrapper_start3() { echo '<div class="clear"></div>'; } remove_filter( 'woocommerce_product_loop_start', 'woocommerce_maybe_show_product_subcategories' ); remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_product_link_close', 5 ); remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 ); remove_action( 'woocommerce_before_shop_loop_item', 'woocommerce_template_loop_product_link_open', 10 ); remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_sharing', 50 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); add_action( 'woocommerce_checkout_before_customer_details', 'rehub_woo_before_checkout' ); add_action( 'woocommerce_checkout_after_customer_details', 'rehub_woo_average_checkout' ); add_action( 'woocommerce_checkout_after_order_review', 'rehub_woo_after_checkout' ); add_action( 'woocommerce_after_add_to_cart_button', 'rehub_woo_countdown' ); add_action( 'woocommerce_product_query', 'rh_change_product_query', 99 ); //Here we change and extend product loop data if(!rehub_option('woo_btn_inner_disable')){ add_action('rhwoo_template_single_add_to_cart', 'woocommerce_template_single_add_to_cart'); } add_filter( 'woocommerce_breadcrumb_defaults', 'rh_change_breadcrumb_delimiter' ); function rh_change_breadcrumb_delimiter( $defaults ) { // Change the breadcrumb delimeter from '/' to '>' $defaults['delimiter'] = '<span class="delimiter"><i class="far fa-angle-right"></i></span>'; return $defaults; } if (defined('wcv_plugin_dir')) { if ( class_exists( 'WCVendors_Pro' ) ) { remove_action( 'woocommerce_before_single_product', array($wcvendors_pro->wcvendors_pro_vendor_controller, 'store_single_header')); remove_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 ); remove_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 ); add_action( 'rehub_vendor_show_action', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9); add_action( 'wcvendors_settings_before_form', 'rh_show_gmw_form_before_wcvendor'); add_action( 'wcv_pro_store_settings_saved', 'rh_wcv_gwm_save_location' ); } else{ add_action('wcvendors_before_dashboard', 'rehub_woo_wcv_before_dash'); add_action('wcvendors_after_dashboard', 'rehub_woo_wcv_after_dash'); remove_action( 'woocommerce_before_single_product', array('WCV_Vendor_Shop', 'vendor_mini_header')); remove_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9 ); remove_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 ); add_action( 'rehub_vendor_show_action', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9); } remove_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'vendor_main_header'), 20 ); remove_action( 'woocommerce_before_main_content', array('WCV_Vendor_Shop', 'shop_description'), 30 ); if( !class_exists('WCVendors_Pro') && class_exists('WC_Vendors') ) { require_once ( locate_template( 'inc/wcvendor/wc-vendor-free-brand/class-shop-branding.php' ) ); } function rh_wcv_gwm_save_location( $vendor_id ){ if( !function_exists('gmw_update_user_location') ) return; $address = array(); $address['street'] = ( isset( $_POST[ '_wcv_store_address1' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_address1' ] ) : ''; $address['apt'] = ( isset( $_POST[ '_wcv_store_address2' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_address2' ] ) : ''; $address['city'] = ( isset( $_POST[ '_wcv_store_city' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_city' ] ) : ''; $address['state'] = ( isset( $_POST[ '_wcv_store_state' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_state' ] ) : ''; $address['country'] = ( isset( $_POST[ '_wcv_store_country' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_country' ] ) : ''; $address['zipcode'] = ( isset( $_POST[ '_wcv_store_postcode' ] ) ) ? sanitize_text_field( $_POST[ '_wcv_store_postcode' ] ) : ''; if( empty( $address['city'] ) && empty( $address['country'] ) ) return; gmw_update_user_location( $vendor_id, $address, true ); } } //Change position of YITH Buttons if ( defined( 'YITH_WCWL' )){ add_filter('yith_wcwl_positions', 'rh_wishlist_change_position'); function rh_wishlist_change_position($so_array=array()){ $so_array = array( "shortcode" => array('hook'=>'shortcode', 'priority'=>0), "add-to-cart"=> array('hook'=>'shortcode', 'priority'=>0), "thumbnails"=> array('hook'=>'shortcode', 'priority'=>0), "summary"=> array('hook'=>'shortcode', 'priority'=>0), ); return $so_array; } } if ( class_exists('YITH_Woocompare_Frontend')){ //$frontend = new YITH_Woocompare_Frontend(); global $yith_woocompare; remove_action( 'woocommerce_single_product_summary', array( $yith_woocompare->obj , 'add_compare_link' ), 35 ); } function rehub_woo_before_checkout() { echo '<div class="re_woocheckout_details">'; } function rehub_woo_average_checkout() { echo '</div><div class="re_woocheckout_order">'; } function rehub_woo_after_checkout() { echo '</div>'; } function rehub_woo_wcv_before_dash() { echo '<div class="rh_wcv_dashboard_page">'; } function rehub_woo_wcv_after_dash() { echo '</div>'; } if (!function_exists('rh_woo_code_zone')){ function rh_woo_code_zone($zone='button'){ if($zone == 'button'){ global $post; $code_incart = get_post_meta($post->ID, 'rh_code_incart', true ); if ( !empty($code_incart)) { echo '<div class="rh_woo_code_zone_button">'; echo do_shortcode($code_incart); echo '</div>'; }else{ $code_incart = rehub_option('woo_code_zone_button'); if ( !empty($code_incart)) { echo '<div class="rh_woo_code_zone_button">'; echo do_shortcode($code_incart); echo '</div>'; } } }elseif($zone =='content'){ global $post; $code_in_content = get_post_meta($post->ID, 'rehub_woodeals_short', true ); if(!empty ($code_in_content)){ echo '<div class="rh_woo_code_zone_content">'; echo do_shortcode($code_in_content); echo '</div>'; }else{ $code_in_content = rehub_option('woo_code_zone_content'); if ( !empty($code_in_content)) { echo '<div class="rh_woo_code_zone_content">'; echo do_shortcode($code_in_content); echo '</div>'; } } } elseif($zone =='bottom'){ global $post; $code_bottom = get_post_meta($post->ID, 'woo_code_zone_footer', true ); if(!empty ($code_bottom)){ echo '<div class="rh_woo_code_zone_bottom">'; echo do_shortcode($code_bottom); echo '</div>'; }else{ $code_bottom = rehub_option('woo_code_zone_footer'); if ( !empty($code_bottom)) { echo '<div class="rh_woo_code_zone_bottom">'; echo do_shortcode($code_bottom); echo '</div>'; } } } } } ////////////////////////////////////////////////////////////////// // Woo Tab customization ///////////////////////////////////////////////////////////// if (!function_exists('woo_ce_video_output')){ function woo_ce_video_output(){ echo do_shortcode('[content-egg module=Youtube template=custom/slider]' ); }} if (!function_exists('woo_ce_news_output')){ function woo_ce_news_output(){ echo do_shortcode('[content-egg module=GoogleNews template=custom/grid]' ); }} if (!function_exists('woo_ce_history_output')){ function woo_ce_history_output(){ echo do_shortcode('[content-egg-block template=custom/all_pricehistory_full]' ); }} if (!function_exists('woo_ce_pricelist_output')){ function woo_ce_pricelist_output(){ echo do_shortcode('[content-egg-block template=custom/all_offers_logo]' ); }} if (!function_exists('woo_photo_booking_out')){ function woo_photo_booking_out(){ global $product; $attachment_ids = $product->get_gallery_image_ids(); $galleryids = implode(',', $attachment_ids); echo '<div class="rh-woo-section-title"><h2 class="rh-heading-icon">'.__('Photos', 'rehub_framework').': <span class="rh-woo-section-sub">'.get_the_title().'</span></h2></div>'; echo rh_get_post_thumbnails(array('galleryids' => $galleryids, 'columns' => 4, 'height' => 150)); }} if (!function_exists('woo_cevideo_booking_out')){ function woo_cevideo_booking_out(){ echo '<div class="rh-woo-section-title"><h2 class="rh-heading-icon">'.__('Videos', 'rehub_framework').': <span class="rh-woo-section-sub">'.get_the_title().'</span></h2></div>'; echo do_shortcode('[content-egg module=Youtube template=custom/slider]' ); }} add_filter( 'woocommerce_product_tabs', 'woo_custom_video_tab', 98 ); function woo_custom_video_tab( $tabs ) { global $post; $post_image_videos = get_post_meta( $post->ID, 'rh_product_video', true ); if(!empty($post_image_videos)){ $tabs['woo-custom-videos'] = array( 'title' => __('Videos', 'rehub_framework'), 'priority' => '21', 'callback' => 'woo_custom_video_output', ); } return $tabs; } if (!function_exists('woo_custom_video_output')){ function woo_custom_video_output($args) { $defaults = array( 'class' => 'mb10 rh_videothumb_link mobileblockdisplay', 'rel' => 'wooyoutube', 'wrapper' => 1, ); $args = wp_parse_args( $args, $defaults ); extract( $args, EXTR_SKIP ); global $post; $post_image_videos = get_post_meta( $post->ID, 'rh_product_video', true ); if(!empty($post_image_videos)){ $post_image_videos = array_map('trim', explode(PHP_EOL, $post_image_videos)); if($wrapper == 1) {echo '<div class="modulo-lightbox rh-flex-eq-height compare-full-thumbnails mb20">';} if ($rel == 'wooyoutube'){ $random_key = rand(0, 50); $rel = 'wooyoutube_gallery_'.(int)$random_key; } wp_enqueue_script('modulobox'); wp_enqueue_style('modulobox'); foreach($post_image_videos as $key=>$video) { $video = trim($video); echo '<a href="'.esc_url($video).'" data-rel="'.$rel.'" target="_blank" class="'.$class.'" data-poster="'.parse_video_url(esc_url($video), 'maxthumb').'" data-thumb="'.parse_video_url(esc_url($video), "hqthumb").'"> <img src="'.parse_video_url(esc_url($video), "hqthumb").'" alt="video '.get_the_title().'" />'; echo '</a>'; } if($wrapper == 1) {echo '</div>';} } } } if (!function_exists('rehub_woo_countdown')){ function rehub_woo_countdown(){ global $post; $endshedule = get_post_meta($post->ID, '_sale_price_dates_to', true ); if($endshedule){ $endshedule = date_i18n( 'Y-m-d', $endshedule ); $countdown = explode('-', $endshedule); $year = $countdown[0]; $month = $countdown[1]; $day = $countdown[2]; $startshedule = get_post_meta($post->ID, '_sale_price_dates_from', true ); if ($startshedule){ $startshedule = strtotime(date_i18n( 'Y-m-d', $startshedule )); $current = time(); if($startshedule > $current){ return; } } echo wpsm_countdown(array('year'=> $year, 'month'=>$month, 'day'=>$day)); } else { $rehub_woo_expiration = get_post_meta( $post->ID, 'rehub_woo_coupon_date', true ); if ($rehub_woo_expiration){ $countdown = explode('-', $rehub_woo_expiration); $year = $countdown[0]; $month = $countdown[1]; $day = $countdown[2]; echo wpsm_countdown(array('year'=> $year, 'month'=>$month, 'day'=>$day)); } } } } function rh_show_gmw_form_before_wcvendor(){ if (function_exists('gmw_member_location_form') ) { echo rh_add_map_gmw(); echo '<div class="mb25"></div>'; } } ////////////////////////////////////////////////////////////////// // Woo default thumbnail ////////////////////////////////////////////////////////////////// add_filter('woocommerce_placeholder_img_src', 'rehub_woocommerce_placeholder_img_src'); function rehub_woocommerce_placeholder_img_src( $src ) { global $post; if (is_object($post)) { if (get_post_meta($post->ID, 'rehub_woo_coupon_code', true) !=''){ $src = get_template_directory_uri() . '/images/default/woocouponph.png'; } elseif (get_post_meta($post->ID, '_sale_price', true) !=''){ $src = get_template_directory_uri() . '/images/default/woodealph.png'; } else { $src = get_template_directory_uri() . '/images/default/wooproductph.png'; } } else { $src = get_template_directory_uri() . '/images/default/wooproductph.png'; } return $src; } ////////////////////////////////////////////////////////////////// // Woo update cart in header ////////////////////////////////////////////////////////////////// if (rehub_option('woo_cart_place') =='1' || rehub_option('woo_cart_place') =='2' || (rehub_option('rehub_header_style') =='header_seven' && rehub_option('header_seven_cart') != '')){ add_filter('woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment'); if( !function_exists('woocommerce_header_add_to_cart_fragment') ) { function woocommerce_header_add_to_cart_fragment( $fragments ) { global $woocommerce; ob_start(); ?> <?php if (rehub_option('woo_cart_place') =='1'):?> <a class="cart-contents cart_count_<?php echo ''.$woocommerce->cart->cart_contents_count; ?>" href="<?php echo wc_get_cart_url(); ?>"><i class="far fa-shopping-cart"></i> <?php _e( 'Cart', 'rehub_framework' ); ?> (<?php echo ''.$woocommerce->cart->cart_contents_count; ?>) - <?php echo ''.$woocommerce->cart->get_cart_total(); ?></a> <?php elseif (rehub_option('woo_cart_place') =='2' || rehub_option('rehub_header_style') =='header_nine' || (rehub_option('rehub_header_style') =='header_seven' && rehub_option('header_seven_cart')!= '') ):?> <a class="rh-flex-center-align rh-header-icon rh_woocartmenu-link cart-contents cart_count_<?php echo ''.$woocommerce->cart->cart_contents_count; ?>" href="<?php echo wc_get_cart_url(); ?>"><span class="rh_woocartmenu-icon"><span class="rh-icon-notice"><?php echo ''.$woocommerce->cart->cart_contents_count;?></span></span><span class="rh_woocartmenu-amount"><?php echo ''.$woocommerce->cart->get_cart_total();?></span></a> <?php endif;?> <?php $fragments['a.cart-contents'] = ob_get_clean(); return $fragments; } } } ////////////////////////////////////////////////////////////////// // Redirect Vendors to Vendor Dashboard on Login ////////////////////////////////////////////////////////////////// if (rehub_option('rehub_wcv_dash_redirect') == 1){ add_filter('woocommerce_login_redirect', 'rh_wcv_login_redirect', 10, 2); function rh_wcv_login_redirect( $redirect_to, $user ) { if( class_exists( 'WeDevs_Dokan' ) ){ $redirect_to = dokan_get_navigation_url(); } elseif (class_exists('WCV_Vendors') && class_exists('WCVendors_Pro') && WCV_Vendors::is_vendor( $user->id ) ) { $redirect_to = get_permalink(WCVendors_Pro::get_option( 'dashboard_page_id' )); } elseif (class_exists('WCV_Vendors') && WCV_Vendors::is_vendor( $user->id ) ) { $redirect_to = get_permalink(get_option('wcvendors_vendor_dashboard_page_id')); } elseif (class_exists('WCMp') && is_user_wcmp_vendor( $user->id) ) { $wcmp_option = get_option("wcmp_vendor_general_settings_name"); $dashlink = (!empty($wcmp_option['wcmp_vendor'])) ? $wcmp_option['wcmp_vendor'] : ''; if ($dashlink > 0){ $redirect_to = get_permalink($dashlink); } } return $redirect_to; } } ////////////////////////////////////////////////////////////////// // Custom rating Icons ////////////////////////////////////////////////////////////////// if(!function_exists('rh_woo_get_editor_rating')){ function rh_woo_get_editor_rating(){ global $post; $editor_rating = get_post_meta($post->ID, 'rehub_review_overall_score', true); if (!$editor_rating) return; if($editor_rating > 0){ $html = '<div class="rh_woo_star" title="'.sprintf( __( 'Rated %s out of', 'rehub_framework' ), esc_html( (float)$editor_rating )).' 10">'; $editor_rating = $editor_rating/2; for ($i = 1; $i <= 5; $i++){ if ($i <= $editor_rating){ $active = ' active'; }else{ $active =''; } $html .= '<span class="rhwoostar rhwoostar'.$i.$active.'">★</span>'; } $html .= '</div>'; return $html; } } } add_filter( 'woocommerce_product_get_rating_html', 'rh_woo_rating_icons_wrapper', 10, 3 ); add_filter( 'woocommerce_get_star_rating_html', 'rh_woo_rating_icons_html', 10, 3); function rh_woo_rating_icons_wrapper($html, $rating, $count){ if ( 0 < $rating ) { $html = '<div class="rh_woo_star" title="'.sprintf( __( 'Rated %s out of', 'rehub_framework' ), esc_html( (float)$rating )).' 5">'; $html .= wc_get_star_rating_html( $rating, $count ); $html .= '</div>'; } else { $html = ''; } return $html; } function rh_woo_rating_icons_html($html, $rating, $count){ $html = ''; if($rating > 0){ for ($i = 1; $i <= 5; $i++){ if ($i <= $rating){ $active = ' active'; }else{ $active =''; } $html .= '<span class="rhwoostar rhwoostar'.$i.$active.'">★</span>'; } } return $html; } ////////////////////////////////////////////////////////////////// // Add the Meta Box to woocommerce for using coupons ////////////////////////////////////////////////////////////////// add_action( 'woocommerce_product_options_pricing', 'show_rehub_woo_meta_box_inner' ); // Field Array $wooprefixrehub = 'rehub_woo_coupon_'; $woo_custom_meta_fields = apply_filters('rh_woo_custom_meta_fields', array( array( 'label'=> __('Set coupon code', 'rehub_framework'), 'desc' => __('Set coupon code or leave blank', 'rehub_framework'), 'id' => $wooprefixrehub.'code', 'type' => 'text' ), array( 'label' => __('Offer End Date', 'rehub_framework'), 'desc' => __('Choose expiration date of product or leave blank', 'rehub_framework'), 'id' => $wooprefixrehub.'date', 'type' => 'date' ), array( 'label'=> __('Mask coupon code?', 'rehub_framework'), 'desc' => __('If this option is enabled, coupon code will be hidden.', 'rehub_framework'), 'id' => $wooprefixrehub.'mask', 'type' => 'checkbox' ), array( 'label'=> __('Offer is expired?', 'rehub_framework'), 'desc' => __('This option depends on expiration date field, but you can also enable expiration if you have not expiration date', 'rehub_framework'), 'id' => 're_post_expired', 'type' => 'checkbox' ), array( 'label'=> __('Brand logo url', 'rehub_framework'), 'desc' => __('Fallback for brand logo (better to add brand logo in Products - Brands fields)', 'rehub_framework'), 'id' => $wooprefixrehub.'logo_url', 'type' => 'text' ), )); if(rehub_option('rehub_woo_print') =='1') { $woo_custom_meta_fields[] = array( 'label'=> __('Additional coupon image url', 'rehub_framework'), 'desc' => __('Used for printable coupon function. To enable it, you must have any coupon code above', 'rehub_framework'), 'id' => $wooprefixrehub.'coupon_img_url', 'type' => 'text' ); } add_action('admin_head','rehub_add_woo_custom_scripts',11); if ( !function_exists( 'rehub_add_woo_custom_scripts' ) ) { function rehub_add_woo_custom_scripts() { global $woo_custom_meta_fields, $post, $pagenow; if ( $pagenow=='post-new.php' || $pagenow=='post.php' ) { if ( 'product' === $post->post_type ) { $output = '<script type="text/javascript"> jQuery(function() {'; foreach ($woo_custom_meta_fields as $field) { // loop through the fields looking for certain types if($field['type'] == 'date') $output .= 'jQuery(".rehubdatepicker").each(function(){jQuery(this).datepicker({dateFormat: "yy-mm-dd"});});'; }; $output .= '}); </script>'; echo ''.$output; } if ( 'post' === $post->post_type || 'blog' === $post->post_type ) { //Easy woo chooser for reviews $path_script = get_template_directory_uri() . '/jsonids/json-ids.php'; $review_woo_link = vp_metabox('rehub_post.review_post.0.review_woo_product.0.review_woo_link'); $review_woo_links = vp_metabox('rehub_post.review_post.0.review_woo_list.0.review_woo_list_links'); if(!empty($review_woo_link)){ $woobox_array = array(); $woobox_title = get_the_title($review_woo_link); $woobox_array[] = array( 'id' => $review_woo_link, 'name' => $woobox_title ); $wooboxpre = json_encode( $woobox_array ); } if(!empty($review_woo_links)){ $review_woo_linkss = explode(',', $review_woo_links); $woolist_array = array(); foreach($review_woo_linkss as $review_woo_linksid){ $woolist_title = get_the_title($review_woo_linksid); $woolist_array[] = array( 'id' => $review_woo_linksid, 'name' => $woolist_title ); } $woolistpre = json_encode( $woolist_array ); } $wooboxprep = (!empty($wooboxpre)) ? $wooboxpre : 'null'; $woolistprep = (!empty($woolistpre)) ? $woolistpre : 'null'; $output = ' <link rel="stylesheet" href="'.get_template_directory_uri().'/jsonids/css/token-input.css" /> <script data-cfasync="false" src="'.get_template_directory_uri().'/jsonids/js/jquery.tokeninput.min.js"></script> <script data-cfasync="false"> jQuery(function () { jQuery("input[name=\"rehub_post[review_post][0][review_woo_product][0][review_woo_link]\"]").tokenInput("'.$path_script.'", { minChars: 3, preventDuplicates: true, theme: "rehub", prePopulate: '.$wooboxprep.', tokenLimit: 1, onSend: function(params) { params.data.posttype = "product"; params.data.postnum = 5; } }); jQuery("input[name=\"rehub_post[review_post][0][review_woo_list][0][review_woo_list_links]\"]").tokenInput("'.$path_script.'", { minChars: 3, preventDuplicates: true, theme: "rehub", prePopulate: '.$woolistprep.', onSend: function(params) { params.data.posttype = "product"; params.data.postnum = 5; } }); }); </script>'; echo ''.$output; } } } } // The Callback for external products function show_rehub_woo_meta_box_inner() { global $woo_custom_meta_fields, $post; // Use nonce for verification echo '<input type="hidden" name="custom_woo_meta_box_nonce" value="'.wp_create_nonce(basename(__FILE__)).'" />'; // Begin the field table and loop echo '<div class="options_group show_if_external">'; foreach ($woo_custom_meta_fields as $field) { // get value of this field if it exists for this post $meta = get_post_meta($post->ID, $field['id'], true); // begin a table row with echo '<p class="form-field rh_woo_meta_'.$field['id'].'"> <th><label for="'.$field['id'].'">'.$field['label'].'</label></th> <td>'; switch($field['type']) { // text case 'text': echo '<input class="short" type="text" name="'.$field['id'].'" id="'.$field['id'].'" value="'.$meta.'" size="70" /> <span class="description">'.$field['desc'].'</span>'; break; case 'textbox': echo '<textarea cols=20 rows=2 class="short" name="'.$field['id'].'" id="'.$field['id'].'">'.$meta.'</textarea> <span class="description">'.$field['desc'].'</span>'; break; // checkbox case 'checkbox': echo '<input type="checkbox" name="'.$field['id'].'" id="'.$field['id'].'" ',$meta ? ' checked="checked"' : '','/> <span class="description">'.$field['desc'].'</span>'; break; // date case 'date': echo '<input class="short rehubdatepicker" type="text" name="'.$field['id'].'" id="'.$field['id'].'" value="'.$meta.'" size="70" /> <span class="description">'.$field['desc'].'</span>'; break; } //end switch echo '</p>'; } // end foreach echo '</div>'; // end table woocommerce_wp_textarea_input( array( 'id' => 'rh_code_incart', 'class' => 'short', 'label' => __( 'Custom shortcode', 'rehub_framework' ), 'description' => __( 'Will be rendered near button', 'rehub_framework' ) )); woocommerce_wp_textarea_input( array( 'id' => 'rehub_woodeals_short', 'class' => 'short', 'label' => __( 'Custom shortcode', 'rehub_framework' ), 'description' => __( 'Will be rendered before Content', 'rehub_framework' ) )); woocommerce_wp_textarea_input( array( 'id' => 'woo_code_zone_footer', 'class' => 'short', 'label' => __( 'Custom shortcode', 'rehub_framework' ), 'description' => __( 'Will be rendered before Footer', 'rehub_framework' ) )); } //Add meta panel with Product layouts function add_rehub_woo_metabox() { add_meta_box( 'product_rh_woo', // $id 'Product Layout', // $title 'show_rehub_woo_meta_box_side', // $callback array('product'), 'side', // $context 'high'); // $priority } add_action('add_meta_boxes', 'add_rehub_woo_metabox'); function show_rehub_woo_meta_box_side(){ global $post; $meta = get_post_meta($post->ID, '_rh_woo_product_layout', true); echo '<select name="_rh_woo_product_layout" id="_rh_woo_product_layout" style="width:100%; margin: 10px 0">'; $product_layouts = apply_filters( 'rehub_product_layout_array', array( 'global' => __('Global from Theme option - Shop', 'rehub_framework'), 'default_sidebar' => __('Default with sidebar', 'rehub_framework'), 'default_no_sidebar' => __('Default full width', 'rehub_framework'), 'full_width_extended' => __('Full width Extended', 'rehub_framework'), 'sections_w_sidebar' => __('Sections with sidebar', 'rehub_framework'), 'ce_woo_list' => __('Content Egg List', 'rehub_framework'), 'ce_woo_sections' => __('Content Egg Auto Sections', 'rehub_framework'), 'ce_woo_blocks' => __('Review with Blocks', 'rehub_framework'), 'vendor_woo_list' => __('Compare Prices with shortcode', 'rehub_framework'), 'compare_woo_list' => __('Compare Prices by sku', 'rehub_framework'), 'full_photo_booking' => __('Full width Photo', 'rehub_framework'), 'woo_compact' => __('Compact Style', 'rehub_framework'), 'woo_directory' => __('Directory Style', 'rehub_framework'), ) ); foreach ($product_layouts as $key => $value) { echo '<option value="'.$key.'" '.selected($key, $meta).'>'.$value.'</option>'; } echo '</select>'; $badgemeta = get_post_meta($post->ID, 'is_editor_choice', true); $badges = apply_filters( 'rehub_product_badges', array( 'no' => __('No Badge', 'rehub_framework'), '1' => (rehub_option ('badge_label_1') !='') ? rehub_option ('badge_label_1') : __('Editor choice', 'rehub_framework'), '2' => (rehub_option ('badge_label_2') !='') ? rehub_option ('badge_label_2') : __('Best seller', 'rehub_framework'), '3' => (rehub_option ('badge_label_3') !='') ? rehub_option ('badge_label_3') : __('Best value', 'rehub_framework'), '4' => (rehub_option ('badge_label_4') !='') ? rehub_option ('badge_label_4') : __('Best price', 'rehub_framework'), ) ); foreach ($badges as $key => $value) { echo '<input type="radio" id="badge_'.$key.'" name="is_editor_choice" value="'.$key.'" '.checked($key, $badgemeta, false).'><label for="badge_'.$key.'">'.$value.'</label><br />'; } echo '<p>'.__('Check this if you want to show badge. You can customize them in theme option', 'rehub_framework').'</p>'; } // Save the Data function save_rehub_woo_custom_meta($post_id) { global $woo_custom_meta_fields; // verify nonce if ( ! isset( $_POST['custom_woo_meta_box_nonce'] ) ) { return $post_id; } if (!wp_verify_nonce($_POST['custom_woo_meta_box_nonce'], basename(__FILE__))) return $post_id; // check autosave if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id; // check permissions if ( isset( $_POST['post_type'] ) && 'page' == $_POST['post_type'] ) { if (!current_user_can('edit_page', $post_id)) return $post_id; } elseif (!current_user_can('edit_post', $post_id)) { return $post_id; } if (isset ($_POST['rh_code_incart'])) { $woo_custom_meta_fields[] = array( 'id' => 'rh_code_incart', ); } if (isset ($_POST['_rh_woo_product_layout'])) { $woo_custom_meta_fields[] = array( 'id' => '_rh_woo_product_layout', ); } if (isset ($_POST['is_editor_choice'])) { if($_POST['is_editor_choice'] == 'no'){ delete_post_meta($post_id, 'is_editor_choice'); }else{ $woo_custom_meta_fields[] = array( 'id' => 'is_editor_choice', ); } } if (isset ($_POST['rehub_woodeals_short'])) { $woo_custom_meta_fields[] = array( 'id' => 'rehub_woodeals_short', ); } if (isset ($_POST['woo_code_zone_footer'])) { $woo_custom_meta_fields[] = array( 'id' => 'woo_code_zone_footer', ); } // loop through fields and save the data foreach ($woo_custom_meta_fields as $field) { $old = get_post_meta($post_id, $field['id'], true); if (isset ($_POST[$field['id']])) { if($field['id'] == 'rh_code_incart' || $field['id'] == 'rehub_woodeals_short' || $field['id'] == 'woo_code_zone_footer'){ $new = $_POST[$field['id']]; }else{ $new = sanitize_text_field($_POST[$field['id']]); } } else { $new =''; } if ($new && $new != $old) { update_post_meta($post_id, $field['id'], $new); } elseif ('' == $new && $old) { delete_post_meta($post_id, $field['id'], $old); } } // end foreach } add_action('save_post', 'save_rehub_woo_custom_meta'); ////////////////////////////////////////////////////////////////// //EXPIRE FUNCTION ////////////////////////////////////////////////////////////////// add_action('woo_change_expired', 'woo_change_expired_function', 10, 1); if (!function_exists('woo_change_expired_function')) { function woo_change_expired_function($expired=''){ global $post; $expired_exist = get_post_meta($post->ID, 're_post_expired', true); if($expired ==1 && $expired_exist !=1){ update_post_meta($post->ID, 're_post_expired', 1); } elseif($expired =='no' && $expired_exist == 1){ update_post_meta($post->ID, 're_post_expired', 0); } elseif($expired_exist=='0'){ } elseif($expired_exist==''){ update_post_meta($post->ID, 're_post_expired', 0); } } } add_filter( 'post_class', 're_expired_post_classes' ); function re_expired_post_classes( $classes ){ if(is_singular('product')){ $expired = get_post_meta(get_the_ID(), 're_post_expired', true); if ($expired == true){ $classes[] = 're_post_expired'; } } return $classes; } if ( !function_exists('rh_show_vendor_info_single') ) { function rh_show_vendor_info_single() { $vendor_verified_label = $vacation_mode = $vacation_msg = ''; $verified_vendor = $featured_vendor = false; if( class_exists( 'WeDevs_Dokan' ) ) { $vendor_id = get_the_author_meta( 'ID' ); $store_info = dokan_get_store_info( $vendor_id ); $store_url = dokan_get_store_url( $vendor_id ); $sold_by_label = apply_filters( 'dokan_sold_by_label', __( 'Sold by', 'rehub_framework' ) ); $is_vendor = dokan_is_user_seller( $vendor_id ); $store_name = esc_html( $store_info['store_name'] ); $featured_vendor = get_user_meta( $vendor_id, 'dokan_feature_seller', true ); }elseif (class_exists('WCMp')){ $vendor_id = get_the_author_meta( 'ID' ); $is_vendor = is_user_wcmp_vendor( $vendor_id ); if($is_vendor){ $vendorobj = get_wcmp_vendor($vendor_id); $store_url = $vendorobj->permalink; $store_name = $vendorobj->page_title; $verified_vendor = get_user_meta($vendor_id, 'wcmp_vendor_is_verified', true); } $wcmp_option = get_option("wcmp_frontend_settings_name"); $sold_by_label = (!empty($wcmp_option['sold_by_text'])) ? $wcmp_option['sold_by_text'] : __( 'Sold by', 'rehub_framework' ); } elseif (defined( 'wcv_plugin_dir' )) { $vendor_id = get_the_author_meta( 'ID' ); $store_url = WCV_Vendors::get_vendor_shop_page( $vendor_id ); $sold_by_label = get_option( 'wcvendors_label_sold_by' ); $is_vendor = WCV_Vendors::is_vendor( $vendor_id ); $store_name = WCV_Vendors::get_vendor_sold_by( $vendor_id ); if ( class_exists( 'WCVendors_Pro' ) ) { $vendor_meta = array_map( function( $a ){ return $a[0]; }, get_user_meta($vendor_id ) ); $verified_vendor = ( array_key_exists( '_wcv_verified_vendor', $vendor_meta ) ) ? $vendor_meta[ '_wcv_verified_vendor' ] : false; $vacation_mode = get_user_meta( $vendor_id , '_wcv_vacation_mode', true ); $vacation_msg = ( $vacation_mode ) ? get_user_meta( $vendor_id , '_wcv_vacation_mode_msg', true ) : ''; } } else{ return false; } if($is_vendor){ if ( $verified_vendor || $featured_vendor == 'yes' ) { $vendor_verified_label = ''; if(function_exists('get_wcmp_vendor_verification_badge')){ $badge_img = get_vendor_verification_settings('badge_img'); if(!empty($badge_img)){ $vendor_verified_label = get_wcmp_vendor_verification_badge( $vendor_id, array( 'height' => 20, 'width' => 20, 'class' => 'floatleft mr5 rtlml5' ) ); } } if(!$vendor_verified_label){ $vendor_verified_label = '<i class="fas fa-shield-check" aria-hidden="true"></i>'; } } $sold_by = sprintf( '<h5><a href="%s" class="wcvendors_cart_sold_by_meta">%s</a></h5>', $store_url, $store_name ); /* HTML output */ echo '<div class="vendor_store_details">'; echo '<div class="vendor_store_details_image"><a href="'. $store_url .'"><img src="'. rh_show_vendor_avatar( $vendor_id, 50, 50 ) .'" class="vendor_store_image_single" width=50 height=50 /></a></div>'; echo '<div class="vendor_store_details_single">'; echo '<div class="vendor_store_details_nameshop">'; echo '<span class="vendor_store_details_label">'. $sold_by_label .'</span>'; echo '<span class="vendor_store_details_title">'. $vendor_verified_label . $sold_by .'</span>'; echo '</div>'; if(class_exists( 'WeDevs_Dokan' ) && dokan_get_option( 'contact_seller', 'dokan_general', 'on' ) == 'on'){ echo '<span class="vendor_store_details_contact">'; if(class_exists( 'BuddyPress' ) ) { echo '<a href="'. bp_core_get_user_domain( $vendor_id ) .'" class="vendor_store_owner_name"><span>'. get_the_author_meta('display_name') .'</span></a> '; }else{ echo '<span class="vendor_store_owner_label">@ <span class="vendor_store_owner_name">'.get_the_author_meta('display_name') .'</span></span>'; } $class = ( !is_user_logged_in() && rehub_option( 'userlogin_enable' ) == '1' ) ? ' act-rehub-login-popup' : ''; echo ' <a href="'.$store_url.'#dokan-contact-anchor" class="vendor_store_owner_contactlink'.$class.'"><i class="far fa-envelope" aria-hidden="true"></i> <span>'. __('Ask owner', 'rehub_framework') .'</span></a>'; echo '</span>'; } elseif(is_active_widget( '', '', 'dc-vendor-quick-info')){ echo '<span class="vendor_store_details_contact">'; if(class_exists( 'BuddyPress' ) ) { echo '<a href="'. bp_core_get_user_domain( $vendor_id ) .'" class="vendor_store_owner_name"><span>'. get_the_author_meta('display_name') .'</span></a> '; }else{ echo '<span class="vendor_store_owner_label">@ <span class="vendor_store_owner_name">'.get_the_author_meta('display_name') .'</span></span>'; } $class = ( !is_user_logged_in() && rehub_option( 'userlogin_enable' ) == '1' ) ? ' act-rehub-login-popup' : ''; echo ' <a href="'.$store_url.'#wcmp-vendor-contact-widget-top" class="vendor_store_owner_contactlink'.$class.'"><i class="far fa-envelope" aria-hidden="true"></i> <span>'. __('Ask owner', 'rehub_framework') .'</span></a>'; echo '</span>'; } elseif(class_exists( 'BuddyPress' ) ) { echo '<span class="vendor_store_details_contact"><span class="vendor_store_owner_label">@ </span>'; echo '<a href="'. bp_core_get_user_domain( $vendor_id ) .'" class="vendor_store_owner_name"><span>'. get_the_author_meta('display_name') .'</span></a> '; if ( bp_is_active( 'messages' )){ $link = (is_user_logged_in()) ? wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( $vendor_id) .'&ref='. urlencode(get_permalink())) : '#'; $class = (!is_user_logged_in() && rehub_option('userlogin_enable') == '1') ? ' act-rehub-login-popup' : ''; echo ' <a href="'.$link.'" class="vendor_store_owner_contactlink'.$class.'"><i class="far fa-envelope" aria-hidden="true"></i> <span>'. __('Ask owner', 'rehub_framework') .'</span></a>'; } echo '</span>'; } echo '</div></div>'; if ($vacation_msg) : echo '<div class="wpsm_box green_type nonefloat_box"><div>'. $vacation_msg .'</div></div>'; endif; } } } if ( !function_exists('rh_show_vendor_ministore') ) { function rh_show_vendor_ministore( $vendor_id, $label='' ) { $totaldeals = count_user_posts( $vendor_id, $post_type = 'product' ); $vendor_verified_label = ''; $verified_vendor = $featured_vendor = false; if( class_exists( 'WeDevs_Dokan' ) ){ $store_url = dokan_get_store_url( $vendor_id ); $is_vendor = dokan_is_user_seller( $vendor_id ); $store_info = dokan_get_store_info( $vendor_id ); $store_name = esc_html( $store_info['store_name'] ); $featured_vendor = get_user_meta( $vendor_id, 'dokan_feature_seller', true ); } else { $store_url = WCV_Vendors::get_vendor_shop_page( $vendor_id ); $is_vendor = WCV_Vendors::is_vendor( $vendor_id ); $store_name = WCV_Vendors::get_vendor_sold_by( $vendor_id ); if ( class_exists( 'WCVendors_Pro' ) ) { $vendor_meta = array_map( function( $a ){ return $a[0]; }, get_user_meta($vendor_id ) ); $verified_vendor = ( array_key_exists( '_wcv_verified_vendor', $vendor_meta ) ) ? $vendor_meta[ '_wcv_verified_vendor' ] : false; } } if( $totaldeals > 0 ){ if ( $verified_vendor || $featured_vendor == 'yes' ) { $vendor_verified_label = '<i class="far fa-check-square" aria-hidden="true"></i>'; } $sold_by = ( $is_vendor ) ? sprintf( '<h5><a href="%s" class="wcvendors_cart_sold_by_meta">%s</a></h5>', $store_url, $store_name ) : get_bloginfo( 'name' ); /* HTML output */ echo '<div class="vendor_store_in_bp">'; echo '<div class="vendor-list-like">'. getShopLikeButton( $vendor_id ) .'</div>'; echo '<div class="vendor_store_in_bp_image"><a href="'. $store_url .'"><img src="'. rh_show_vendor_avatar( $vendor_id, 80, 80 ) .'" class="vendor_store_image_single" width=80 height=80 /></a></div>'; echo '<div class="vendor_store_in_bp_single">'; echo '<span class="vendor_store_in_bp_label"><span class="vendor_store_owner_label">'. $label .'</span></span>'; echo '<span class="vendor_store_in_bp_title">'. $vendor_verified_label . $sold_by.'</span>'; echo '</div>'; echo '<div class="vendor_store_in_bp_last_products">'; $totaldeals = $totaldeals - 4; $args = array( 'post_type' => 'product', 'posts_per_page' => 4, 'author' => $vendor_id, 'ignore_sticky_posts'=> true, 'no_found_rows'=> true ); $looplatest = new WP_Query($args); if ( $looplatest->have_posts() ){ while ( $looplatest->have_posts() ) : $looplatest->the_post(); echo '<a href="'. get_permalink( $looplatest->ID ) .'">'; $showimg = new WPSM_image_resizer(); $showimg->use_thumb = true; $showimg->height = 70; $showimg->width = 70; $showimg->crop = true; $showimg->no_thumb = rehub_woocommerce_placeholder_img_src(''); $img = $showimg->get_resized_url(); echo '<img src="'. $img .'" width=70 height=70 alt="'. get_the_title( $looplatest->ID ) .'"/>'; echo '</a>'; endwhile; echo '<a class="vendor_store_in_bp_count_pr" href="'. $store_url .'"><span>+'. $totaldeals .'</span></a>'; } wp_reset_query(); echo '</div>'; echo '</div>'; } } } if ( !function_exists('rh_show_vendor_avatar') ) { function rh_show_vendor_avatar( $vendor_id, $width=150, $height=150 ) { if( !$vendor_id ) return; $store_icon_url = ''; if( class_exists( 'WeDevs_Dokan' ) ) { $store_info = dokan_get_store_info( $vendor_id ); if( !empty( $store_info['gravatar'] ) AND $store_info['gravatar'] !=0 ) { $store_icon_src = wp_get_attachment_image_src( $store_info['gravatar'], array( 150, 150 ) ); if ( is_array( $store_icon_src ) ) { $store_icon_url = $store_icon_src[0]; } } } elseif (class_exists('WCMp')){ $vendorobj = get_wcmp_vendor($vendor_id); if(!empty($vendorobj)){ $store_icon_url = $vendorobj->get_image(); } } elseif(defined( 'wcv_plugin_dir' )) { if( class_exists( 'WCVendors_Pro' ) ) { $store_icon_src = wp_get_attachment_image_src( get_user_meta( $vendor_id, '_wcv_store_icon_id', true ), array( 150, 150 ) ); if ( is_array( $store_icon_src ) ) { $store_icon_url= $store_icon_src[0]; } } else{ $store_icon_src = wp_get_attachment_image_src( get_user_meta( $vendor_id, 'rh_vendor_free_logo', true ), array( 150, 150 ) ); if ( is_array( $store_icon_src ) ) { $store_icon_url= $store_icon_src[0]; } } } else{ return; } if( !$store_icon_url ) { if( rehub_option('wcv_vendor_avatar') !='' ){ $store_icon_url = esc_url( rehub_option( 'wcv_vendor_avatar' ) ); } else{ $store_icon_url = get_template_directory_uri() . '/images/default/wcvendoravatar.png'; } } $showimg = new WPSM_image_resizer(); $showimg->src = $store_icon_url; $showimg->use_thumb = false; $showimg->height = $height; $showimg->width = $width; $showimg->crop = true; $img = $showimg->get_resized_url(); return $img; } } if( !function_exists( 'rh_show_vendor_bg' ) ) { function rh_show_vendor_bg( $vendor_id ) { $store_bg_styles = ''; if( !$vendor_id ) return; if( class_exists( 'WeDevs_Dokan' ) ) { $store_info = dokan_get_store_info( $vendor_id ); $store_bg = wp_get_attachment_url( $store_info['banner'] ); if( $store_bg ) { $store_bg_styles = 'background-image: url('. $store_bg .'); background-repeat: no-repeat;background-size: cover;'; } } elseif (class_exists('WCMp')){ $vendorobj = get_wcmp_vendor($vendor_id); $store_bg = $vendorobj->get_image('banner'); if($store_bg){ $store_bg_styles = 'background-image: url('. $store_bg .'); background-repeat: no-repeat;background-size: cover;'; } } elseif(defined( 'wcv_plugin_dir' )) { if ( class_exists( 'WCVendors_Pro' ) ) { $store_banner_src = wp_get_attachment_image_src( get_user_meta( $vendor_id, '_wcv_store_banner_id', true ), 'full'); if ( is_array( $store_banner_src ) ) { $store_bg= $store_banner_src[0]; } else { // Getting default banner $default_banner_src = WCVendors_Pro::get_option( 'default_store_banner_src' ); $store_bg= $default_banner_src; } $store_bg_styles = 'background-image: url('.$store_bg.'); background-repeat: no-repeat;background-size: cover;'; } else { $store_banner_src = wp_get_attachment_image_src( get_user_meta( $vendor_id, 'rh_vendor_free_header', true ), 'full'); if ( is_array( $store_banner_src ) ) { $store_bg= $store_banner_src[0]; $store_bg_styles = 'background-image: url('.$store_bg.'); background-repeat: no-repeat;background-size: cover;'; } } } else{ return; } if( !$store_bg_styles ) { if( rehub_option('wcv_vendor_bg') !='' ){ $store_bg = esc_url(rehub_option('wcv_vendor_bg')); $store_bg_styles = 'background-image: url('.$store_bg.'); background-repeat: no-repeat;background-size: cover;'; } else{ $store_bg_styles = 'background-image: url('.get_template_directory_uri() . '/images/default/brickwall.png); background-repeat:repeat;'; } } return $store_bg_styles; } } if (!function_exists('rh_change_product_query')){ function rh_change_product_query($q){ if (empty($q->query_vars['wc_query'])) return; $search_string = isset($_GET['rh_wcv_search']) ? esc_html($_GET['rh_wcv_search']) : ''; $cat_string = (isset($_GET['rh_wcv_vendor_cat'])) ? esc_html($_GET['rh_wcv_vendor_cat']) : ''; if($search_string){ $q->set( 's', $search_string); } if($cat_string){ $catarray = array( array( 'taxonomy' => 'product_cat', 'terms' => array($cat_string), 'field' => 'term_id' ) ); $q->set('tax_query', $catarray); } if (rehub_option('woo_exclude_expired') == '1') { //exclude from woo archives expired products if (is_post_type_archive('product') || is_product_category()) { $meta_query = $q->get( 'meta_query' ); $meta_query[] = array( 'relation' => 'OR', array( 'key' => 're_post_expired', 'value' => '1', 'compare' => '!=', ), array( 'key' => 're_post_expired', 'compare' => 'NOT EXISTS', ), ); $q->set( 'meta_query', $meta_query ); } } if (is_tax('store')){ //Here we change number of posts in brand store archives $q->set( 'posts_per_page', 30); } } } if (rehub_option('wooregister_xprofile') == 1){ //Synchronization with Woocommerce register form and Xprofiles add_action('woocommerce_register_form','rh_add_xprofile_to_woocommerce_register'); add_action('wcvendors_settings_before_paypal','rh_add_xprofile_to_wcvendor'); add_action('dokan_settings_form_bottom', 'rh_add_xprofile_to_dokan'); function rh_add_xprofile_to_woocommerce_register() { if ( class_exists( 'BuddyPress' ) ) { ?> <?php if ( bp_is_active( 'xprofile' ) ) : ?> <div id="xp-woo-profile-details-section"> <?php if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <div<?php bp_field_css_class( 'editfield form-row' ); ?>> <?php $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); $field_type->edit_field_html(); ?> </div> <?php endwhile; ?> <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> <?php endwhile; endif; ?> <?php do_action( 'bp_signup_profile_fields' ); ?> </div><!-- #profile-details-section --> <?php do_action( 'bp_after_signup_profile_fields' ); ?> <?php endif; ?> <?php } } function rh_add_xprofile_to_wcvendor() { if ( class_exists( 'BuddyPress' ) ) { ?> <?php if ( bp_is_active( 'xprofile' ) ) : ?> <div id="xp-wcvendor-profile"> <?php $user_id = get_current_user_id();?> <?php if ( bp_has_profile( array( 'user_id'=> $user_id, 'profile_group_id' => 1, 'fetch_field_data' => true, 'fetch_fields'=>true ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <div<?php bp_field_css_class( 'editfield form-row' ); ?>> <?php $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); $field_type->edit_field_html(array( 'user_id'=> $user_id)); ?> </div> <?php endwhile; ?> <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> <?php endwhile; endif; ?> <?php do_action( 'bp_signup_profile_fields' ); ?> </div><!-- #profile-details-section --> <?php do_action( 'bp_after_signup_profile_fields' ); ?> <?php endif; ?> <?php } } function rh_add_xprofile_to_dokan( $user_id ) { if ( class_exists( 'BuddyPress' ) ) { ?> <?php if ( bp_is_active( 'xprofile' ) ) : ?> <!-- Xprofile fields --> <div class="dokan-form-group xprofile-area"> <h2><?php _e( 'Extended Profile', 'rehub_framework' ); ?></h2> <?php if ( bp_has_profile( array( 'user_id'=> $user_id, 'profile_group_id' => 1, 'hide_empty_fields' => false, 'fetch_field_data' => true, 'fetch_fields'=>true ) ) ) : ?> <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <div class="dokan-w6 dokan-text-left"> <div <?php bp_field_css_class( 'editfield form-row' ); ?>> <?php $field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() ); $field_type->edit_field_html( array( 'user_id'=> $user_id ) ); ?> <p class="description"><?php bp_the_profile_field_description(); ?></p> </div> </div> <?php endwhile; ?> <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_field_ids(); ?>" /> <?php endwhile; ?> <?php endif; ?> <?php do_action( 'bp_signup_profile_fields' ); ?> </div> <?php do_action( 'bp_after_signup_profile_fields' ); ?> <script type="text/javascript"> jQuery('[aria-required]').each(function() { jQuery(this).prop('required',true); }); </script> <?php endif; ?> <?php } } //Validating required Xprofile fields add_action( 'woocommerce_register_post', 'rh_validate_xprofile_to_woocommerce_register', 10, 3 ); function rh_validate_xprofile_to_woocommerce_register( $username, $email, $validation_errors ) { if ( class_exists( 'BuddyPress' ) ) { if (!empty($_POST['signup_profile_field_ids'])){ $user_error_req_fields = array(); $signup_profile_field_ids = explode(',', $_POST['signup_profile_field_ids']); foreach ((array)$signup_profile_field_ids as $field_id) { if ( ! isset( $_POST['field_' . $field_id] ) ) { if ( ! empty( $_POST['field_' . $field_id . '_day'] ) && ! empty( $_POST['field_' . $field_id . '_month'] ) && ! empty( $_POST['field_' . $field_id . '_year'] ) ) { // Concatenate the values. $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year']; // Turn the concatenated value into a timestamp. $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $date_value ) ); } } // Create errors for required fields without values. if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST[ 'field_' . $field_id ] ) && ! bp_current_user_can( 'bp_moderate' ) ){ $field_data = xprofile_get_field($field_id ); if(is_object($field_data)){ $user_error_req_fields[]= $field_data->name; } } } if(!empty($user_error_req_fields)){ $validation_errors->add( 'billing_first_name_error', __( ' Next fields are required: ', 'rehub_framework' ).implode(', ',$user_error_req_fields) ); } } } return $validation_errors; } //Updating use meta after registration successful registration add_action('woocommerce_created_customer','rh_save_xprofile_to_woocommerce_register'); add_action( 'wcvendors_shop_settings_saved', 'rh_save_xprofile_to_woocommerce_register' ); add_action( 'dokan_store_profile_saved', 'rh_save_xprofile_to_woocommerce_register' ); function rh_save_xprofile_to_woocommerce_register($user_id) { if (!empty($_POST['signup_profile_field_ids'])){ $signup_profile_field_ids = explode(',', $_POST['signup_profile_field_ids']); foreach ((array)$signup_profile_field_ids as $field_id) { if ( ! isset( $_POST['field_' . $field_id] ) ) { if ( ! empty( $_POST['field_' . $field_id . '_day'] ) && ! empty( $_POST['field_' . $field_id . '_month'] ) && ! empty( $_POST['field_' . $field_id . '_year'] ) ) { // Concatenate the values. $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year']; // Turn the concatenated value into a timestamp. $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $date_value ) ); } } if(!empty($_POST['field_' . $field_id])){ $field_val = $_POST['field_' . $field_id]; xprofile_set_field_data($field_id, $user_id, $field_val); $visibility_level = ! empty( $_POST['field_' . $field_id . '_visibility'] ) ? $_POST['field_' . $field_id . '_visibility'] : 'public'; xprofile_set_field_visibility_level( $field_id, $user_id, $visibility_level ); } } } } } ////////////////////////////////////////////////////////////////// //Custom Currency for main product price for Content Egg ////////////////////////////////////////////////////////////////// if(rehub_option('ce_custom_currency')){ if(defined('\ContentEgg\PLUGIN_PATH')){ $currency_code = rehub_option('ce_custom_currency'); $woocurrency = get_woocommerce_currency(); if($currency_code != $woocurrency){ add_filter('woocommerce_get_price_html','rh_ce_multicurrency', 10, 2); if(!function_exists('rh_ce_multicurrency')){ function rh_ce_multicurrency($price, $product){ //$itemsync = \ContentEgg\application\WooIntegrator::getSyncItem($postid); $currency_code = rehub_option('ce_custom_currency'); $woocurrency = get_woocommerce_currency(); $currency_rate = \ContentEgg\application\helpers\CurrencyHelper::getCurrencyRate($woocurrency, $currency_code); if (!$currency_rate) $currency_rate = 1; $out = ''; if ( '' === $product->get_price() ) { $out = apply_filters( 'woocommerce_empty_price_html', '', $product); } elseif($product->is_on_sale()){ $out = '<del><span class="woocommerce-Price-amount amount">'.ContentEgg\application\helpers\TemplateHelper::formatPriceCurrency($product->get_regular_price()*$currency_rate, $currency_code, '<span class="woocommerce-Price-currencySymbol">', '</span>').'</span></del> <ins><span class="woocommerce-Price-amount amount">'.ContentEgg\application\helpers\TemplateHelper::formatPriceCurrency($product->get_price()*$currency_rate, $currency_code, '<span class="woocommerce-Price-currencySymbol">', '</span>').'</span></ins>'; }else{ $out = '<span class="woocommerce-Price-amount amount">'.ContentEgg\application\helpers\TemplateHelper::formatPriceCurrency($product->get_price()*$currency_rate, $currency_code, '<span class="woocommerce-Price-currencySymbol">', '</span>').'</span>'; } return $out; } } } } } ////////////////////////////////////////////////////////////////// //DOKAN FUNCTIONS ////////////////////////////////////////////////////////////////// if( class_exists( 'WeDevs_Dokan' ) ) { add_action('dokan_dashboard_wrap_before', 'rh_dokan_edit_page_before', 9); add_action('dokan_dashboard_wrap_after', 'rh_dokan_edit_page_after', 9); add_action('dokan_edit_product_wrap_before', 'rh_dokan_edit_page_before'); add_action('dokan_edit_product_wrap_after', 'rh_dokan_edit_page_after'); function rh_dokan_edit_page_before(){ echo '<div class="rh-container">'; } function rh_dokan_edit_page_after(){ echo '</div>'; } /* * Set defailt theme value for banner sizes */ function custom_dokan_set_banner_size() { $general_settings = get_option( 'dokan_general' ); if( is_array($general_settings) && empty( $general_settings['store_banner_width'] ) ) { $general_settings['store_banner_width'] = 1900; $theme_width = true; } else { $theme_width = false; } if( is_array($general_settings) && empty( $general_settings['store_banner_height'] ) ) { $general_settings['store_banner_height'] = 300; $theme_height = true; } else { $theme_height = false; } if( $theme_width AND $theme_height ) update_option( 'dokan_general', $general_settings ); return false; } add_action( 'init', 'custom_dokan_set_banner_size' ); /* * Save / Delete location to / from GEO my WP plugin */ function custom_dokan_gwm_save_location( $store_id, $dokan_settings ){ if( !$store_id OR !function_exists('gmw_update_user_location') ) return; $address_arr = ( isset( $dokan_settings['address'] ) AND is_array( $dokan_settings['address'] ) ) ? $dokan_settings['address'] : array(); $find_address = ( isset( $dokan_settings['find_address'] ) AND !empty( $dokan_settings['find_address'] ) ) ? $dokan_settings['find_address'] : ''; if( !empty( $address_arr ) OR !empty( $find_address ) ) { $address = empty( $find_address ) ? $address_arr : $find_address; gmw_update_user_location( $store_id, $address, true ); } } add_action( 'dokan_store_profile_saved', 'custom_dokan_gwm_save_location', 10, 2 ); /* * Change store map description in plugin settings */ function custom_dokan_admin_settings( $settings_fields ){ $settings_fields['dokan_general']['store_map']['desc'] = __( 'Enable showing link to Store location map on store', 'rehub_framework' ); unset($settings_fields['dokan_general']['enable_theme_store_sidebar']); return $settings_fields; } add_filter( 'dokan_settings_fields', 'custom_dokan_admin_settings' ); /* * Remove while Appearance tab in plugin settings */ function custom_dokan_remove_section($settings_fields){ if(!empty($settings_fields) && is_array($settings_fields)){ if(isset($settings_fields['dokan_appearance']['store_header_template'] )){ unset($settings_fields['dokan_appearance']['store_header_template']); } } return $settings_fields; } add_filter( 'dokan_settings_fields', 'custom_dokan_remove_section' ); /* * Change URL and Title of the About store tab */ function custom_dokan_toc_url( $tabs ){ $tabs['terms_and_conditions'] = array( 'title' => apply_filters( 'dokan_about_store_title', __( 'Terms and Conditions', 'rehub_framework' ) ), 'url' => '#vendor-about' ); return $tabs; } add_filter( 'dokan_store_tabs', 'custom_dokan_toc_url' ); /* * Output Sold by <store_name> label in loop */ function dokan_loop_sold_by() { $vendor_id = get_the_author_meta( 'ID' ); $store_info = dokan_get_store_info( $vendor_id ); $sold_by = dokan_is_user_seller( $vendor_id ) ? sprintf( '<a href="%s">%s</a>', dokan_get_store_url( $vendor_id ), esc_html( $store_info['store_name'] ) ) : get_bloginfo( 'name' ); ?> <small class="wcvendors_sold_by_in_loop"><span><?php echo apply_filters( 'dokan_sold_by_label', __( 'Sold by', 'rehub_framework' ) ); ?></span> <?php echo ''.$sold_by; ?></small><br /> <?php } add_action( 'rehub_vendor_show_action', 'dokan_loop_sold_by' ); } ////////////////////////////////////////////////////////////////// //WC Marketplace Functions ////////////////////////////////////////////////////////////////// if( class_exists('WCMp')) { add_action('init', 'wcmp_remove_rh_hook_vendor', 11); add_action('rehub_vendor_show_action', 'wcmprh_loop_sold_by'); add_filter('settings_vendor_dashboard_tab_options', 'wcmp_remove_rh_vendor_dashboard_template_settings'); add_filter('is_vendor_add_external_url_field', 'rh_wcmp_add_external_url_field', 10, 2); //filter adds an external URL of vendor store add_action('widget_wcmp_quick_info_top', 'rh_anchor_vendor_contact_widget'); add_action( 'wcmp_frontend_enqueue_scripts', 'rh_add_theme_style_wcmp' ); function rh_add_theme_style_wcmp() { $theme_css = "#logo_mobile_wrapper, #rhmobpnlcustom{display:none}"; wp_add_inline_style( 'vandor-dashboard-style', $theme_css ); } function rh_anchor_vendor_contact_widget(){ echo '<div id="wcmp-vendor-contact-widget-top"></div>'; } function wcmp_remove_rh_hook_vendor(){ global $WCMp; remove_action( 'woocommerce_product_meta_start', array( $WCMp->vendor_caps, 'wcmp_after_add_to_cart_form' ), 25); remove_action( 'woocommerce_after_shop_loop_item_title', array( $WCMp->vendor_caps, 'wcmp_after_add_to_cart_form' ), 30); //remove_action( 'woocommerce_after_shop_loop', array( $WCMp->review_rating, 'wcmp_seller_review_rating_form' ), 30); } function wcmp_remove_rh_vendor_dashboard_template_settings($settings_tab_options){ if(isset($settings_tab_options['sections']['wcmp_vendor_shop_template']['fields']['wcmp_vendor_shop_template'])){ unset($settings_tab_options['sections']['wcmp_vendor_shop_template']['fields']['wcmp_vendor_shop_template']); } return $settings_tab_options; } function rh_wcmp_add_external_url_field($status, $user_id = ''){ return true; } function wcmprh_loop_sold_by(){ global $WCMp, $post; if ('Enable' === get_wcmp_vendor_settings('sold_by_catalog', 'general') && apply_filters('wcmp_sold_by_text_after_products_shop_page', true, $post->ID)){ $multivendor_product = $WCMp->product->get_multiple_vendors_array_for_single_product($post->ID); $vendor_id = get_the_author_meta( 'ID' ); $is_vendor = is_user_wcmp_vendor( $vendor_id ); $vendor_verified_label=''; if($is_vendor && empty($multivendor_product['more_product_array'])){ $vendor = get_wcmp_vendor($vendor_id); $store_url = $vendor->permalink; $store_name = $vendor->page_title; $sold_by = sprintf('<a href="%s">%s</a>', $store_url, esc_html($store_name)); $verified_vendor = get_user_meta($vendor_id, 'wcmp_vendor_is_verified', true); if($verified_vendor){ $vendor_verified_label = '<i class="fas fa-shield-check greencolor"></i> '; } }elseif(!empty($multivendor_product['more_product_array'])){ $sold_by = apply_filters('rh_sold_by_multivendor', __('Multiple vendor', 'rehub_framework'), $multivendor_product['more_product_array']); }else{ $sold_by = apply_filters('rh_sold_by_site', get_bloginfo('name')); } $sold_by_text = apply_filters('wcmp_sold_by_text', __('Sold By', 'rehub_framework')); ?><small class="wcvendors_sold_by_in_loop"><span><?php echo ''.$sold_by_text ?></span> <?php echo ''.$vendor_verified_label; echo ''.$sold_by; ?></small><br /><?php } } add_filter('wcmp_vendor_dashboard_nav', 'rh_wcmp_vendor_dashboard_nav' ); if(!function_exists('rh_wcmp_vendor_dashboard_nav')) { function rh_wcmp_vendor_dashboard_nav($vendor_nav) { if(class_exists('WCFM')) return $vendor_nav; if(current_user_can('edit_products')) { $userlogin_submit_page = rehub_option('url_for_add_product'); $userlogin_edit_page = rehub_option('url_for_edit_product'); if(!empty($userlogin_submit_page)) { $vendor_nav['vendor-products']['submenu']['add-new-product'] = array( 'label' => __('Add Product', 'rehub_framework'), 'url' => esc_url($userlogin_submit_page), 'capability' => apply_filters('wcmp_vendor_dashboard_menu_add_new_product_capability', 'edit_products'), 'position' => 10, 'link_target' => '_self' ); unset($vendor_nav['vendor-products']['submenu']['add-product']); } if(!empty($userlogin_edit_page)) { $vendor_nav['vendor-products']['submenu']['edit-products'] = array( 'label' => __('Products', 'rehub_framework'), 'url' => esc_url($userlogin_edit_page), 'capability' => apply_filters('wcmp_vendor_dashboard_menu_vendor_products_capability', 'edit_products'), 'position' => 20, 'link_target' => '_self' ); unset($vendor_nav['vendor-products']['submenu']['products']); } } else { unset($vendor_nav['vendor-products']); } return $vendor_nav; } } add_filter( 'wcmp_vendor_dashboard_header_nav', 'rh_wcmp_vendor_dashboard_header_nav', 10, 1 ); function rh_wcmp_vendor_dashboard_header_nav( $header_nav ) { $userlogin_submit_page = rehub_option('url_for_add_product'); if($userlogin_submit_page){ unset($header_nav['add-product']); //remove Add Product Link } return $header_nav; } if(!function_exists('rh_wcmp_gwm_save_adress')) { function rh_wcmp_gwm_save_adress($user_id = '') { if(function_exists('gmw_update_user_location')){ $vendor_id = (is_admin() && !empty($user_id)) ? $user_id : get_current_user_id(); $location = ''; if ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_POST)) { if(!empty($_POST['_store_location'])) { $location = $_POST['_store_location']; } else if(!empty($_POST['vendor_address_1']) && !empty($_POST['vendor_city'])){ $location = array( 'street' => $_POST['vendor_address_1'], 'city' => $_POST['vendor_city'], 'state' => (!empty($_POST['vendor_state'])) ? $_POST['vendor_state'] : '', 'zipcode' => (!empty($_POST['vendor_postcode'])) ? $_POST['vendor_postcode'] : '', 'country' => (!empty($_POST['vendor_country'])) ? $_POST['vendor_country'] : '', ); } } if(empty($location)) return; gmw_update_user_location( $vendor_id, $location, true ); } } add_action('before_wcmp_vendor_dashboard', 'rh_wcmp_gwm_save_adress'); add_action('edit_user_profile_update', 'rh_wcmp_gwm_save_adress'); } if(class_exists('WCMP_Vendor_Vacation')){ add_action('rhwoo_template_single_add_to_cart', 'rh_wcmp_vacation_addon_fix', 9); function rh_wcmp_vacation_addon_fix() { global $product; $vendor_product = get_wcmp_product_vendors($product->get_id()); if ($vendor_product) { remove_action( 'rhwoo_template_single_add_to_cart', 'woocommerce_template_single_add_to_cart' ); } } } } ////////////////////////////////////////////////////////////////// //Woo REVIEWS ////////////////////////////////////////////////////////////////// if(get_option( 'woocommerce_enable_reviews' ) === 'yes' && rehub_option('woo_helpornot')){ add_action( 'woocommerce_review_after_comment_text', 'getCommentLike_woo' ); } function getCommentLike_woo( $comment ){ echo getCommentLike_re(''); } ////////////////////////////////////////////////////////////////// //Save Review of Editor ////////////////////////////////////////////////////////////////// add_action('save_post_product', 'rehub_save_post_product', 13); if( !function_exists('rehub_save_post_product') ) { function rehub_save_post_product( $post_id ){ global $post; $rehub_meta_id = 'rehub_review_woo'; // check autosave if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id; // make sure data came from our meta box, verify nonce $nonce = isset($_POST[$rehub_meta_id.'_nonce']) ? $_POST[$rehub_meta_id.'_nonce'] : NULL ; if (!wp_verify_nonce($nonce, $rehub_meta_id)) return $post_id; // check user permissions if (!current_user_can(apply_filters( 'woocommerce_duplicate_product_capability', 'manage_woocommerce' ))) return $post_id; // authentication passed, process data $meta_data = isset( $_POST[$rehub_meta_id] ) ? $_POST[$rehub_meta_id] : NULL ; if ( !wp_is_post_revision( $post_id ) ) { // if is review post, save data $thecriteria = $meta_data['_review_post_criteria']; array_pop($thecriteria); $manual_score = $meta_data['_review_post_score_manual']; $score = 0; $total_counter = 0; if (!empty($thecriteria)) { foreach ($thecriteria as $criteria) { $score += (float) $criteria['review_post_score']; $total_counter ++; } } if ($manual_score) { $total_score = $manual_score; } else { if( !empty( $score ) && !empty( $total_counter ) ) $total_score = $score / $total_counter ; if( empty($total_score) ) $total_score = 0; $total_score = round($total_score,1); } if($total_score){ update_post_meta($post_id, 'rehub_review_overall_score', $total_score); // save total score of review $firstcriteria = (!empty($thecriteria[0]['review_post_name'])) ? $thecriteria[0]['review_post_name'] : ''; if($firstcriteria) : foreach ($thecriteria as $key=>$criteria) { $key = $key + 1; $metakey = '_review_score_criteria_'.$key; update_post_meta($post_id, $metakey, $criteria['review_post_score']); } endif; } elseif($manual_score==0){ delete_post_meta($post_id, 'rehub_review_overall_score'); } } } } ?>
[+]
..
[-] vc_functions_theme.php
[edit]
[+]
vc
[+]
vc_templates
[-] member_helper_functions.php
[edit]
[-] affiliate_functions.php
[edit]
[-] user_review_functions.php
[edit]
[-] edd_functions.php
[edit]
[-] thumbandhot.php
[edit]
[-] taxonomy_meta.php
[edit]
[-] video_class.php
[edit]
[-] review_functions.php
[edit]
[-] user_review_no_editor.php
[edit]
[-] woo_store_permalink_class.php
[edit]
[-] woo_store_taxonomy_class.php
[edit]
[-] woo_functions.php
[edit]
[-] vc_functions.php
[edit]
[-] ajax_helper_functions.php
[edit]
[-] commentplus.php
[edit]
[-] helper_functions.php
[edit]
[-] sidebar_functions.php
[edit]
[-] rehub_ajax.php
[edit]