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 ) . '" ';
		}
	}


Top ↑

Changelog

Changelog
VersionDescription
4.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.