PluginProbe
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant / 2.3.1
Product Labels, Quick View, Buy Now, Pre-Orders, Frequently Bought Together & More for WooCommerce – Merchant v2.3.1
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 / fields-group / status.php
admin/classes/admin-options/fields/fields-group
class-merchant-field-fields-group.php 5.6 KB 1 month ago status.php 1.4 KB 1 month ago template.php 2.4 KB 1 month ago

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

40 lines 1.4 KB Raw Download Zip
1 <?php
2 /**
3 * Template: Fields Group — status dropdown partial.
4 *
5 * Renders the status (active/inactive) select field for a fields group.
6 *
7 * @var array<string, mixed> $settings Field settings.
8 * @var mixed $value Field value.
9 * @var string $module_id Module ID.
10 * @var bool $inside_flexible Whether group is inside flexible_content.
11 * @var array<string, mixed> $args Extra args when inside flexible_content.
12 *
13 * @package Merchant
14 * @since 2.2.5
15 */
16
17 if ( ! defined( 'ABSPATH' ) ) {
18 exit;
19 }
20
21 $status_field = Merchant_Field_Fields_Group::get_status_field_definition( $settings, $value, $module_id );
22
23 if ( $inside_flexible ) {
24 Merchant_Field_Fields_Group::render_sub_field(
25 $status_field,
26 isset( $args['value'][ $settings['id'] ][ $status_field['id'] ] ) ? $args['value'][ $settings['id'] ][ $status_field['id'] ] : $status_field['default'] ?? '',
27 "name=\"merchant[{$status_field['id']}]",
28 "name=\"merchant[{$args['id']}][{$args['option_key']}][{$settings['id']}][{$status_field['id']}]\" data-name=\"merchant[{$args['id']}][0][{$settings['id']}][{$status_field['id']}]",
29 $module_id
30 );
31 } else {
32 Merchant_Field_Fields_Group::render_sub_field(
33 $status_field,
34 isset( $value[ $status_field['id'] ] ) ? $value[ $status_field['id'] ] : '',
35 "name=\"merchant[{$status_field['id']}]",
36 "name=\"merchant[{$settings['id']}][{$status_field['id']}]",
37 $module_id
38 );
39 }
40