' . awl_get_labels_html_by_position( 'on_image', $product_id ) . ''; } /* * Show labels for blocks title */ public function uc_filter_posts_list( $arrPosts, $value, $filters ) { if ( ! empty( $arrPosts ) ) { foreach ( $arrPosts as $arrPost ) { $title_label = awl_get_labels_html_by_position( 'before_title', $arrPost->ID ); $title_label = str_replace( 'flex-end;', 'center;', $title_label ); $title_label = str_replace( 'flex-start;', 'center;', $title_label ); $arrPost->post_title = $title_label . $arrPost->post_title; } } return $arrPosts; } /* * Render blocks content */ function render_content( $widget_content, $block ) { $block_categories = $block->get_categories(); if ( $block_categories && array_search( 'unlimited_elements', $block_categories ) !== false ) { if ( 'ucaddon_woocommerce_product_list' === $block->get_name() && strpos( $widget_content, 'awl-product-label' ) !== false ) { $widget_content = str_replace( 'justify-content:center;', 'justify-content:flex-start;', $widget_content ); } } return $widget_content; } } endif; AWL_Unlimited_Elements::instance();