WC_Settings_API::get_custom_attribute_html( array $data )
Get custom attributes.
Description Description
Parameters Parameters
- $data
-
(Required) Field data.
Return Return
(string)
Source Source
File: includes/abstracts/abstract-wc-settings-api.php
public function get_custom_attribute_html( $data ) { $custom_attributes = array(); if ( ! empty( $data['custom_attributes'] ) && is_array( $data['custom_attributes'] ) ) { foreach ( $data['custom_attributes'] as $attribute => $attribute_value ) { $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"'; } } return implode( ' ', $custom_attributes ); }