Title: WP_Customize_Control::check_capabilities
Published: April 25, 2014
Last modified: August 20, 2026

---

# WP_Customize_Control::check_capabilities(): bool

## In this article

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

Checks if the user can use this control.

## 󠀁[Description](https://developer.wordpress.org/reference/classes/wp_customize_control/check_capabilities/?output_format=md#description)󠁿

Returns false if the user cannot manipulate one of the associated settings, or if
one of the associated settings does not exist. Also returns false if the associated
section does not exist or if its capability check returns false.

## 󠀁[Return](https://developer.wordpress.org/reference/classes/wp_customize_control/check_capabilities/?output_format=md#return)󠁿

 bool False if theme doesn’t support the control or user doesn’t have the required
permissions, otherwise true.

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

    ```php
    final public function check_capabilities() {
    	if ( ! empty( $this->capability ) && ! current_user_can( $this->capability ) ) {
    		return false;
    	}

    	foreach ( $this->settings as $setting ) {
    		if ( ! $setting || ! $setting->check_capabilities() ) {
    			return false;
    		}
    	}

    	$section = $this->manager->get_section( $this->section );
    	if ( isset( $section ) && ! $section->check_capabilities() ) {
    		return false;
    	}

    	return true;
    }
    ```

[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/7.1/src/wp-includes/class-wp-customize-control.php#L358)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/class-wp-customize-control.php#L358-L375)

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

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

Returns whether the current user has the specified capability.

  |

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

Checks capabilities and render the control.

  |

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

| Version | Description | 
| [3.4.0](https://developer.wordpress.org/reference/since/3.4.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%2Fcheck_capabilities%2F)
before being able to contribute a note or feedback.