WP_Customize_Control::input_attrs() WordPress Method
The WP_Customize_Control::input_attrs() method is used to add custom attributes to a control. This is useful for adding data attributes, setting the control's input type, or other attributes that aren't covered by the other methods in the class.
WP_Customize_Control::input_attrs() #
Render the custom attributes for the control’s input element.
Source
File: wp-includes/class-wp-customize-control.php
public function input_attrs() { foreach ( $this->input_attrs as $attr => $value ) { echo $attr . '="' . esc_attr( $value ) . '" '; } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |