Title: WP_Customize_Control::input_attrs
Published: September 4, 2014
Last modified: April 28, 2025

---

# WP_Customize_Control::input_attrs()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#wp--skip-link--target)

Renders the custom attributes for the control’s input element.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#source)󠁿

    ```php
    public function input_attrs() {
    	foreach ( $this->input_attrs as $attr => $value ) {
    		echo $attr . '="' . esc_attr( $value ) . '" ';
    	}
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-customize-control.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/class-wp-customize-control.php#L475)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/class-wp-customize-control.php#L475-L479)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#related)󠁿

| Uses | Description | 
| [esc_attr()](https://developer.wordpress.org/reference/functions/esc_attr/)`wp-includes/formatting.php` |

Escaping for HTML attributes.

  |

| Used by | Description | 
| [WP_Customize_Control::render_content()](https://developer.wordpress.org/reference/classes/wp_customize_control/render_content/)`wp-includes/class-wp-customize-control.php` |

Renders the control’s content.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_control/input_attrs/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.0.0](https://developer.wordpress.org/reference/since/4.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_customize_control%2Finput_attrs%2F)
before being able to contribute a note or feedback.