PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.2
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.2
2.3.2 2.3.1 2.3.0 2.2.8 2.2.7 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.11.0 1.11.1 1.11.2 1.6 1.7 1.8 1.8.1 1.8.2 1.8.3 1.9.0 1.9.1 1.9.10 1.9.11 All 60 releases
merchant / admin / classes / admin-options / fields / reviews-selector / template.php

template.php in Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant 2.3.2, at admin/classes/admin-options/fields/reviews-selector/template.php

55 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Template: Reviews Selector field.
4 *
5 * @var array<string, mixed> $settings Field configuration.
6 * @var mixed $value Current saved value.
7 * @var string $module_id Module ID.
8 *
9 * @package Merchant
10 * @since 2.2.5
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 if ( ! is_array( $value ) ) {
18 $value = array();
19 }
20 ?>
21 <div class="merchant-reviews-selector" data-id="<?php echo esc_attr( $settings['id'] ); ?>">
22 <div class="selected-reviews">
23 <div class="product-reviews"><?php // keep this (no space) between the div and php tag to avoid white space issues with css
24 foreach ( $value as $review ) {
25 echo wp_kses( Merchant_Admin_Ajax::get_review( $review ), merchant_kses_allowed_tags( array( 'div' ) ) );
26 } ?></div>
27 </div>
28 <button type="button" class="merchant-btn-control popup-trigger"><?php esc_html_e( 'Select Reviews', 'merchant' ); ?></button>
29 <div class="overlay"></div>
30 <div class="selector-popup">
31 <div class="popup-content">
32 <div class="popup-header">
33 <label>
34 <span>
35 <?php esc_html_e( 'Search & filter', 'merchant' ); ?>
36 </span>
37 <input type="text" name="products_search" class="products-search" placeholder="<?php echo esc_attr__( 'Search for a product', 'merchant' ); ?>">
38 </label>
39
40 <span class="close" title="<?php esc_attr_e( 'Close', 'merchant' ); ?>">&times;</span>
41 </div>
42 <div class="popup-body merchant-reviews-selector-body">
43 <div class="products-search-results">
44 <?php
45 echo wp_kses( Merchant_Admin_Ajax::products_selector_search_results(), merchant_kses_allowed_tags( array( 'div' ) ) ); ?>
46 </div>
47 </div>
48 <div class="loader"></div>
49 </div>
50 </div>
51 <input type="hidden" class="review-saved-ids" name="merchant[<?php echo esc_attr( $settings['id'] ); ?>]" value="<?php
52 echo esc_attr( implode( ',', $value ) ) ?>">
53 </div>
54 <?php
55