���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/elirickard.com/wp-content/plugins/micdrop-core/inc/plugins/woocommerce/helper.php
���ѧ٧ѧ�
<?php if ( ! function_exists( 'micdrop_core_register_product_for_meta_options' ) ) { /** * Function that register product post type for meta box options * * @param array $post_types * * @return array */ function micdrop_core_register_product_for_meta_options( $post_types ) { $post_types[] = 'product'; return $post_types; } add_filter( 'qode_framework_filter_meta_box_save', 'micdrop_core_register_product_for_meta_options' ); add_filter( 'qode_framework_filter_meta_box_remove', 'micdrop_core_register_product_for_meta_options' ); } if ( ! function_exists( 'micdrop_core_woo_get_global_product' ) ) { /** * Function that return global WooCommerce object * * @return object */ function micdrop_core_woo_get_global_product() { global $product; return $product; } } if ( ! function_exists( 'micdrop_core_woo_set_admin_options_map_position' ) ) { /** * Function that set dashboard admin options map position for this module * * @param int $position * @param string $map * * @return int */ function micdrop_core_woo_set_admin_options_map_position( $position, $map ) { if ( 'woocommerce' === $map ) { $position = 70; } return $position; } add_filter( 'micdrop_core_filter_admin_options_map_position', 'micdrop_core_woo_set_admin_options_map_position', 10, 2 ); } if ( ! function_exists( 'micdrop_core_include_woocommerce_shortcodes' ) ) { /** * Function that includes shortcodes */ function micdrop_core_include_woocommerce_shortcodes() { foreach ( glob( MICDROP_CORE_PLUGINS_PATH . '/woocommerce/shortcodes/*/include.php' ) as $shortcode ) { include_once $shortcode; } } add_action( 'qode_framework_action_before_shortcodes_register', 'micdrop_core_include_woocommerce_shortcodes' ); } if ( ! function_exists( 'micdrop_core_woo_product_get_rating_html' ) ) { /** * Function that return ratings templates * * @param string $html - contains html content * @param float $rating * @param int $count - total number of ratings * * @return string */ function micdrop_core_woo_product_get_rating_html( $html, $rating, $count ) { return qode_framework_is_installed( 'theme' ) ? micdrop_woo_product_get_rating_html( $html, $rating, $count ) : ''; } } if ( ! function_exists( 'micdrop_core_woo_get_product_categories' ) ) { /** * Function that render product categories * * @param string $before * @param string $after * * @return string */ function micdrop_core_woo_get_product_categories( $before = '', $after = '' ) { return qode_framework_is_installed( 'theme' ) ? micdrop_woo_get_product_categories( $before, $after ) : ''; } } if ( ! function_exists( 'micdrop_core_set_product_styles' ) ) { /** * Function that generates module inline styles * * @param string $style * * @return string */ function micdrop_core_set_product_styles( $style ) { $price_styles = micdrop_core_get_typography_styles( 'qodef_product_price' ); $price_single_styles = micdrop_core_get_typography_styles( 'qodef_product_single_price' ); if ( ! empty( $price_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page .price', '.qodef-woo-shortcode .price', ), $price_styles ); } if ( ! empty( $price_single_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page.qodef--single .entry-summary .price', ), $price_single_styles ); } $price_discount_styles = array(); $price_discount_color = micdrop_core_get_option_value( 'admin', 'qodef_product_price_discount_color' ); $price_single_discount_styles = array(); $price_single_discount_color = micdrop_core_get_option_value( 'admin', 'qodef_product_single_price_discount_color' ); if ( ! empty( $price_discount_color ) ) { $price_discount_styles['color'] = $price_discount_color; } if ( ! empty( $price_single_discount_color ) ) { $price_single_discount_styles['color'] = $price_single_discount_color; } if ( ! empty( $price_discount_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page .price del', '.qodef-woo-shortcode .price del', ), $price_discount_styles ); } if ( ! empty( $price_single_discount_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page.qodef--single .entry-summary .price del', ), $price_single_discount_styles ); } $label_styles = micdrop_core_get_typography_styles( 'qodef_product_label' ); $info_styles = micdrop_core_get_typography_styles( 'qodef_product_info' ); $info_hover_styles = micdrop_core_get_typography_hover_styles( 'qodef_product_info' ); if ( ! empty( $label_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page.qodef--single .product_meta .qodef-woo-meta-label', ), $label_styles ); } if ( ! empty( $info_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page.qodef--single .product_meta .qodef-woo-meta-value', '#qodef-woo-page.qodef--single .shop_attributes th', '#qodef-woo-page.qodef--single .woocommerce-Reviews .woocommerce-review__author', ), $info_styles ); } if ( ! empty( $info_hover_styles ) ) { $style .= qode_framework_dynamic_style( array( '#qodef-woo-page.qodef--single .product_meta .qodef-woo-meta-value a:hover', ), $info_hover_styles ); } return $style; } add_filter( 'micdrop_filter_add_inline_style', 'micdrop_core_set_product_styles' ); } if ( ! function_exists( 'micdrop_core_set_product_archive_list_body_classes' ) ) { /** * Function that add additional class name into global class list for body tag * * @param array $classes * * @return array */ function micdrop_core_set_product_archive_list_body_classes( $classes ) { $product_archive_title_skin_option = micdrop_core_get_post_value_through_levels( 'qodef_woo_product_archive_title_skin' ); $product_archive_title_skin = ! empty( $product_archive_title_skin_option ) ? 'qodef-product-archive-title-skin--' . $product_archive_title_skin_option : ''; if ( ( is_product_tag() || is_product_category() ) && ! empty( $product_archive_title_skin ) ) { $classes[] = $product_archive_title_skin; } $product_archive_header_skin_option = micdrop_core_get_post_value_through_levels( 'qodef_woo_product_archive_title_skin' ); $product_archive_header_skin = ! empty( $product_archive_header_skin_option ) ? 'qodef-product-archive-header-skin--' . $product_archive_header_skin_option : ''; if ( ( is_product_tag() || is_product_category() ) && ! empty( $product_archive_header_skin ) ) { $classes[] = $product_archive_header_skin; } return $classes; } add_filter( 'body_class', 'micdrop_core_set_product_archive_list_body_classes' ); }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�