PATH:
home
/
lab2454c
/
fcxpro.com
/
wp-content
/
plugins
/
webon-core
/
inc
/
plugins
/
woocommerce
<?php if ( ! function_exists( 'webon_core_register_product_for_meta_options' ) ) { /** * Function that register product post type for meta box options * * @param array $post_types * * @return array */ function webon_core_register_product_for_meta_options( $post_types ) { $post_types[] = 'product'; return $post_types; } add_filter( 'qode_framework_filter_meta_box_save', 'webon_core_register_product_for_meta_options' ); add_filter( 'qode_framework_filter_meta_box_remove', 'webon_core_register_product_for_meta_options' ); } if ( ! function_exists( 'webon_core_woo_get_global_product' ) ) { /** * Function that return global WooCommerce object * * @return object */ function webon_core_woo_get_global_product() { global $product; return $product; } } if ( ! function_exists( 'webon_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 webon_core_woo_set_admin_options_map_position( $position, $map ) { if ( $map === 'woocommerce' ) { $position = 70; } return $position; } add_filter( 'webon_core_filter_admin_options_map_position', 'webon_core_woo_set_admin_options_map_position', 10, 2 ); } if ( ! function_exists( 'webon_core_include_woocommerce_shortcodes' ) ) { /** * Function that includes shortcodes */ function webon_core_include_woocommerce_shortcodes() { foreach ( glob( WEBON_CORE_PLUGINS_PATH . '/woocommerce/shortcodes/*/include.php' ) as $shortcode ) { include_once $shortcode; } } add_action( 'qode_framework_action_before_shortcodes_register', 'webon_core_include_woocommerce_shortcodes' ); } if ( ! function_exists( 'webon_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 webon_core_woo_product_get_rating_html( $html, $rating, $count ) { return qode_framework_is_installed( 'theme' ) ? webon_woo_product_get_rating_html( $html, $rating, $count ) : ''; } } if ( ! function_exists( 'webon_core_woo_get_product_categories' ) ) { /** * Function that render product categories * * @param string $before * @param string $after * * @return string */ function webon_core_woo_get_product_categories( $before = '', $after = '' ) { return qode_framework_is_installed( 'theme' ) ? webon_woo_get_product_categories( $before, $after ) : ''; } } if ( ! function_exists( 'webon_core_woo_add_product_to_search_types' ) ) { function webon_core_woo_add_product_to_search_types( $post_types ) { $post_types['product'] = esc_html__( 'Product', 'webon-core' ); return $post_types; } add_filter( 'webon_core_filter_search_post_type_params_post_type', 'webon_core_woo_add_product_to_search_types' ); } if ( ! function_exists( 'webon_core_woo_return_product_id' ) ) { /** * Function that filters and returns product id * * @param int $id * */ function webon_core_woo_return_product_id( $id ) { if ( is_singular( 'product' ) ) { return get_the_ID(); } return $id; } add_filter('webon_core_filter_page_id', 'webon_core_woo_return_product_id'); }
[+]
widgets
[-] woocommerce.php
[edit]
[+]
..
[+]
shortcodes
[-] include.php
[edit]
[+]
plugins
[-] helper.php
[edit]
[+]
dashboard