implode( ' ', $css_classes ), 'label' => addonify_wishlist_get_option( 'sidebar_btn_label' ), 'show_icon' => (int) addonify_wishlist_get_option( 'sidebar_show_icon' ), 'icon' => addonify_wishlist_get_wishlist_icons( addonify_wishlist_get_option( 'sidebar_toggle_btn_icon' ) ), ) ) ); } } if ( ! function_exists( 'addonify_wishlist_sidebar_wishlist_content_template' ) ) { /** * Render sidebar. * * @param array $products Wishlist product ids. */ function addonify_wishlist_sidebar_wishlist_content_template( $products = array() ) { if ( get_the_ID() === (int) addonify_wishlist_get_option( 'wishlist_page' ) ) { // do not show sidebar in wishlist page. return; } if ( (int) addonify_wishlist_get_option( 'show_sidebar' ) !== 1 ) { return; } $sidebar_position = addonify_wishlist_get_option( 'sidebar_position' ); if ( empty( $sidebar_position ) ) { $sidebar_position = 'right'; } $wishlist_title = addonify_wishlist_get_option( 'sidebar_title' ); $wishlist_page = addonify_wishlist_get_option( 'wishlist_page' ); $wishlist_page_url = $wishlist_page ? get_permalink( $wishlist_page ) : ''; $wishlist_page_link_label = addonify_wishlist_get_option( 'view_wishlist_page_button_label' ); Addonify_Wishlist_Template_Loader::load_template( 'wishlist-sidebar/sidebar-content.php', apply_filters( 'addonify_wishlist_sidebar_args', array( 'total_items' => count( $products ), 'css_class' => 'addonify-align-' . $sidebar_position, 'title' => $wishlist_title, 'wishlist_url' => $wishlist_page_url, 'alignment' => 'addonify-align-' . $sidebar_position, 'view_wishlist_page_button_label' => $wishlist_page_link_label, 'product_ids' => $products, ) ) ); } } if ( ! function_exists( 'addonify_wishlist_sidebar_wishlist_products_template' ) ) { /** * Render sidebar loop. * * @param array $products Product ids. */ function addonify_wishlist_sidebar_wishlist_products_template( $products = array() ) { Addonify_Wishlist_Template_Loader::load_template( 'wishlist-sidebar/wishlist-products.php', apply_filters( 'addonify_wishlist_sidebar_loop_args', array( 'wishlist_product_ids' => $products, ) ) ); } } if ( ! function_exists( 'addonify_wishlist_sidebar_product_template' ) ) { /** * Renders HTML template of product row displayed in wishlist sidebar. * * @since 2.0.6 * * @param object $product WC_Product object. */ function addonify_wishlist_sidebar_product_template( $product ) { if ( $product instanceof WC_Product ) { $product_id = $product->get_id(); $product_link = $product->get_permalink(); $product_name = $product->get_name(); $product_image = $product->get_image( array( 82, 82 ) ); $product_price_html = $product->get_price_html(); $product_avaibility = addonify_wishlist_get_product_avaibility( $product ); ?>
  • 'adfy-wl-btn adfy-wl-sidebar-btn adfy-wl-add-to-cart', ) ); ?>