✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ server366.web-hosting.com ​🇻​♯➤ 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 67.223.118.204 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.243
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/builxejc/public_html/wp-content/plugins/woocommerce/includes/admin//wc-meta-box-functions.php
<?php
/**
 * WooCommerce Meta Box Functions
 *
 * @author      WooThemes
 * @category    Core
 * @package     WooCommerce\Admin\Functions
 * @version     2.3.0
 */

use Automattic\WooCommerce\Utilities\OrderUtil;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/**
 * Output a text input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_text_input( $field, ?WC_Data $data = null ) {
	global $post;

	$field['placeholder']   = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
	$field['class']         = isset( $field['class'] ) ? $field['class'] : 'short';
	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
	$field['value']         = $field['value'] ?? OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true );
	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
	$field['type']          = isset( $field['type'] ) ? $field['type'] : 'text';
	$field['desc_tip']      = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;
	$data_type              = empty( $field['data_type'] ) ? '' : $field['data_type'];

	switch ( $data_type ) {
		case 'price':
			$field['class'] .= ' wc_input_price';
			$field['value']  = wc_format_localized_price( $field['value'] );
			break;
		case 'decimal':
			$field['class'] .= ' wc_input_decimal';
			$field['value']  = wc_format_localized_decimal( $field['value'] );
			break;
		case 'stock':
			$field['class'] .= ' wc_input_stock';
			$field['value']  = wc_stock_amount( $field['value'] );
			break;
		case 'url':
			$field['class'] .= ' wc_input_url';
			$field['value']  = esc_url( $field['value'] );
			break;

		default:
			break;
	}

	// Custom attribute handling
	$custom_attributes = array();

	if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {

		foreach ( $field['custom_attributes'] as $attribute => $value ) {
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
		}
	}

	echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '">
		<label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';

	$help_tip    = null;
	$description = null;
	if ( ! empty( $field['description'] ) ) {
		if ( is_array( $field['description'] ) ) {
			$help_tip    = reset( $field['description'] );
			$description = end( $field['description'] );
		} elseif ( false !== $field['desc_tip'] ) {
			$help_tip = $field['description'];
		} else {
			$description = $field['description'];
		}
	}

	if ( ! is_null( $help_tip ) ) {
		echo wc_help_tip( $help_tip );
	}

	echo '<input type="' . esc_attr( $field['type'] ) . '" class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '" name="' . esc_attr( $field['name'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" ' . implode( ' ', $custom_attributes ) . ' /> ';

	if ( ! is_null( $description ) ) {
		$hidden_class = true === ( $field['description_hidden'] ?? false ) ? ' hidden' : '';
		//phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
		echo '<span class="description' . $hidden_class . '">' . wp_kses_post( $description ) . '</span>';
	}

	echo '</p>';
}

/**
 * Output a hidden input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_hidden_input( $field, ?WC_Data $data = null ) {
	global $post;

	$field['value'] = isset( $field['value'] ) ? $field['value'] : OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true );
	$field['class'] = isset( $field['class'] ) ? $field['class'] : '';

	echo '<input type="hidden" class="' . esc_attr( $field['class'] ) . '" name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" value="' . esc_attr( $field['value'] ) . '" /> ';
}

/**
 * Output a textarea input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_textarea_input( $field, ?WC_Data $data = null ) {
	global $post;

	$field['placeholder']   = isset( $field['placeholder'] ) ? $field['placeholder'] : '';
	$field['class']         = isset( $field['class'] ) ? $field['class'] : 'short';
	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
	$field['value']         = $field['value'] ?? OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true );
	$field['desc_tip']      = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;
	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
	$field['rows']          = isset( $field['rows'] ) ? $field['rows'] : 2;
	$field['cols']          = isset( $field['cols'] ) ? $field['cols'] : 20;

	// Custom attribute handling
	$custom_attributes = array();

	if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {

		foreach ( $field['custom_attributes'] as $attribute => $value ) {
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
		}
	}

	echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '">
		<label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';

	if ( ! empty( $field['description'] ) && false !== $field['desc_tip'] ) {
		echo wc_help_tip( $field['description'] );
	}

	echo '<textarea class="' . esc_attr( $field['class'] ) . '" style="' . esc_attr( $field['style'] ) . '"  name="' . esc_attr( $field['name'] ) . '" id="' . esc_attr( $field['id'] ) . '" placeholder="' . esc_attr( $field['placeholder'] ) . '" rows="' . esc_attr( $field['rows'] ) . '" cols="' . esc_attr( $field['cols'] ) . '" ' . implode( ' ', $custom_attributes ) . '>' . esc_textarea( $field['value'] ) . '</textarea> ';

	if ( ! empty( $field['description'] ) && false === $field['desc_tip'] ) {
		echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
	}

	echo '</p>';
}

/**
 * Output a checkbox input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_checkbox( $field, ?WC_Data $data = null ) {
	global $post;

	$field['class']         = isset( $field['class'] ) ? $field['class'] : 'checkbox';
	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
	$field['value']         = $field['value'] ?? OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true );
	$field['cbvalue']       = isset( $field['cbvalue'] ) ? $field['cbvalue'] : 'yes';
	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
	$field['desc_tip']      = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;

	/**
	 * These values are what get passed vis $_POST depending on if the field is checked or not. If no unchecked_value is
	 * provided, the $_POST will not be set. This maintains backwards compatibility where consumers would use `isset`.
	 */
	$field['checked_value']   = isset( $field['checked_value'] ) ? $field['checked_value'] : $field['cbvalue'];
	$field['unchecked_value'] = isset( $field['unchecked_value'] ) ? $field['unchecked_value'] : null;

	// Custom attribute handling.
	$custom_attributes = array();

	if ( ! empty( $field['custom_attributes'] ) && is_array( $field['custom_attributes'] ) ) {

		foreach ( $field['custom_attributes'] as $attribute => $value ) {
			$custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $value ) . '"';
		}
	}

	if ( ! empty( $field['style'] ) ) {
		$custom_attributes[] = 'style="' . esc_attr( $field['style'] ) . '"';
	}

	if ( ! empty( $field['class'] ) ) {
		$custom_attributes[] = 'class="' . esc_attr( $field['class'] ) . '"';
	}

	echo '<p class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '">
		<label for="' . esc_attr( $field['id'] ) . '">' . wp_kses_post( $field['label'] ) . '</label>';

	if ( ! empty( $field['description'] ) && false !== $field['desc_tip'] ) {
		echo wc_help_tip( $field['description'] );
	}

	// Output a hidden field so a value is POSTed if the box is not checked.
	if ( ! is_null( $field['unchecked_value'] ) ) {
		printf( '<input type="hidden" name="%1$s" value="%2$s" />', esc_attr( $field['name'] ), esc_attr( $field['unchecked_value'] ) );
	}

	printf(
		'<input type="checkbox" name="%1$s" id="%2$s" value="%3$s" %4$s %5$s />',
		esc_attr( $field['name'] ),
		esc_attr( $field['id'] ),
		esc_attr( $field['checked_value'] ),
		checked( $field['value'], $field['checked_value'], false ),
		implode( ' ', $custom_attributes ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
	);

	if ( ! empty( $field['description'] ) && false === $field['desc_tip'] ) {
		echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
	}

	echo '</p>';
}

/**
 * Output a select input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_select( $field, ?WC_Data $data = null ) {
	global $post;

	$field = wp_parse_args(
		$field,
		array(
			'class'             => 'select short',
			'style'             => '',
			'wrapper_class'     => '',
			'value'             => OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true ),
			'name'              => $field['id'],
			'desc_tip'          => false,
			'custom_attributes' => array(),
		)
	);

	$wrapper_attributes = array(
		'class' => $field['wrapper_class'] . " form-field {$field['id']}_field",
	);

	$label_attributes = array(
		'for' => $field['id'],
	);

	$field_attributes          = (array) $field['custom_attributes'];
	$field_attributes['style'] = $field['style'];
	$field_attributes['id']    = $field['id'];
	$field_attributes['name']  = $field['name'];
	$field_attributes['class'] = $field['class'];

	$tooltip     = ! empty( $field['description'] ) && false !== $field['desc_tip'] ? $field['description'] : '';
	$description = ! empty( $field['description'] ) && false === $field['desc_tip'] ? $field['description'] : '';
	?>
	<p <?php echo wc_implode_html_attributes( $wrapper_attributes ); // WPCS: XSS ok. ?>>
		<label <?php echo wc_implode_html_attributes( $label_attributes ); // WPCS: XSS ok. ?>><?php echo wp_kses_post( $field['label'] ); ?></label>
		<?php if ( $tooltip ) : ?>
			<?php echo wc_help_tip( $tooltip ); // WPCS: XSS ok. ?>
		<?php endif; ?>
		<select <?php echo wc_implode_html_attributes( $field_attributes ); // WPCS: XSS ok. ?>>
			<?php
			foreach ( $field['options'] as $key => $value ) {
				echo '<option value="' . esc_attr( $key ) . '"' . wc_selected( $key, $field['value'] ) . '>' . esc_html( $value ) . '</option>';
			}
			?>
		</select>
		<?php if ( $description ) : ?>
			<span class="description"><?php echo wp_kses_post( $description ); ?></span>
		<?php endif; ?>
	</p>
	<?php
}

/**
 * Output a radio input box.
 *
 * @param array        $field Field data.
 * @param WC_Data|null $data  WC_Data object, will be preferred over post object when passed.
 */
function woocommerce_wp_radio( $field, ?WC_Data $data = null ) {
	global $post;

	$field['class']         = isset( $field['class'] ) ? $field['class'] : 'select short';
	$field['style']         = isset( $field['style'] ) ? $field['style'] : '';
	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';
	$field['value']         = $field['value'] ?? OrderUtil::get_post_or_object_meta( $post, $data, $field['id'], true );
	$field['name']          = isset( $field['name'] ) ? $field['name'] : $field['id'];
	$field['desc_tip']      = isset( $field['desc_tip'] ) ? $field['desc_tip'] : false;

	echo '<fieldset class="form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '"><legend>' . wp_kses_post( $field['label'] ) . '</legend>';

	if ( ! empty( $field['description'] ) && false !== $field['desc_tip'] ) {
		echo wc_help_tip( $field['description'] );
	}

	echo '<ul class="wc-radios">';

	foreach ( $field['options'] as $key => $value ) {

		echo '<li><label><input
				name="' . esc_attr( $field['name'] ) . '"
				value="' . esc_attr( $key ) . '"
				type="radio"
				class="' . esc_attr( $field['class'] ) . '"
				style="' . esc_attr( $field['style'] ) . '"
				' . checked( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '
				/> ' . esc_html( $value ) . '</label>
		</li>';
	}
	echo '</ul>';

	if ( ! empty( $field['description'] ) && false === $field['desc_tip'] ) {
		echo '<span class="description">' . wp_kses_post( $field['description'] ) . '</span>';
	}

	echo '</fieldset>';
}

/**
 * Output a note.
 *
 * @param array $field Field data.
 */
function woocommerce_wp_note( $field ) {
	$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';

	echo '<p class="form-field ' . esc_attr( $field['wrapper_class'] ) . '">';
	echo '<label for="' . esc_attr( $field['id'] ) . '" ';

	if ( ! empty( $field['label-aria-label'] ) ) {
		echo 'aria-label="' . esc_attr( $field['label-aria-label'] ) . '"';
	}

	echo '>' . esc_attr( $field['label'] ) . '</label>';
	echo '<output name="' . esc_attr( $field['id'] ) . '" id="' . esc_attr( $field['id'] ) . '" aria-live="off">' . wp_kses_post( $field['message'] ) . '</output>';
	echo '</p>';
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
helper
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
importers
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
list-tables
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
marketplace-suggestions
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
meta-boxes
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
notes
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
plugin-updates
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
reports
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
settings
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
views
--
9 Jun 2026 8.39 AM
builxejc / builxejc
0755
class-wc-admin-addons.php
13.236 KB
6 Oct 2025 5.56 PM
builxejc / builxejc
0644
class-wc-admin-api-keys-table-list.php
7.065 KB
18 Jul 2023 11.53 PM
builxejc / builxejc
0644
class-wc-admin-api-keys.php
7.819 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-admin-assets.php
49.061 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-admin-attributes.php
20.667 KB
24 Aug 2022 2.07 AM
builxejc / builxejc
0644
class-wc-admin-brands.php
26.696 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-customize.php
2.504 KB
18 Aug 2020 7.20 PM
builxejc / builxejc
0644
class-wc-admin-dashboard-setup.php
4.574 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-admin-dashboard.php
28.015 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-duplicate-product.php
13.034 KB
19 Jan 2026 2.46 PM
builxejc / builxejc
0644
class-wc-admin-exporters.php
7.428 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-admin-help.php
4.711 KB
10 Apr 2024 4.54 PM
builxejc / builxejc
0644
class-wc-admin-importers.php
8.447 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-admin-log-table-list.php
13.065 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-marketplace-promotions.php
11.518 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-menus.php
19.55 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-meta-boxes.php
9.989 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-admin-notices.php
25.196 KB
5 May 2026 2.26 PM
builxejc / builxejc
0644
class-wc-admin-permalink-settings.php
9.104 KB
18 May 2021 9.00 PM
builxejc / builxejc
0644
class-wc-admin-pointers.php
2.187 KB
19 Apr 2023 3.03 AM
builxejc / builxejc
0644
class-wc-admin-post-types.php
36.488 KB
3 Mar 2025 10.28 PM
builxejc / builxejc
0644
class-wc-admin-profile.php
9.848 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-admin-reports.php
10.128 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-settings.php
39.961 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
class-wc-admin-setup-wizard.php
86.929 KB
23 Feb 2026 5.58 PM
builxejc / builxejc
0644
class-wc-admin-status.php
14.456 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
class-wc-admin-taxonomies.php
17.718 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
class-wc-admin-upload-downloadable-product.php
3.745 KB
27 Dec 2023 12.45 AM
builxejc / builxejc
0644
class-wc-admin-webhooks-table-list.php
11.056 KB
30 Jul 2024 7.31 PM
builxejc / builxejc
0644
class-wc-admin-webhooks.php
14.564 KB
29 Jul 2025 12.34 PM
builxejc / builxejc
0644
class-wc-admin.php
13.658 KB
30 Mar 2026 5.12 PM
builxejc / builxejc
0644
wc-admin-functions.php
18.919 KB
24 Nov 2025 11.10 PM
builxejc / builxejc
0644
wc-meta-box-functions.php
13.705 KB
12 May 2025 9.07 PM
builxejc / builxejc
0644
woocommerce-legacy-reports.php
0.522 KB
14 Nov 2024 1.17 AM
builxejc / builxejc
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF