Title: WP_Customize_Section::check_capabilities
Published: April 25, 2014
Last modified: April 28, 2025

---

# WP_Customize_Section::check_capabilities(): bool

## In this article

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

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

Checks required user capabilities and whether the theme has the feature support 
required by the section.

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

 bool False if theme doesn’t support the section or user doesn’t have the capability.

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

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

    	if ( $this->theme_supports && ! current_theme_supports( ...(array) $this->theme_supports ) ) {
    		return false;
    	}

    	return true;
    }
    ```

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

## 󠀁[Related](https://developer.wordpress.org/reference/classes/wp_customize_section/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.

  | 
| [current_theme_supports()](https://developer.wordpress.org/reference/functions/current_theme_supports/)`wp-includes/theme.php` |

Checks a theme’s support for a given feature.

  |

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

Check capabilities and render the section.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_customize_section/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_section%2Fcheck_capabilities%2F)
before being able to contribute a note or feedback.