GC_Customize_Panel::check_capabilities()

最后更新于:2021-11-27 06:52:28

GC_Customize_Panel::check_capabilities()

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

响应

(bool) False if theme doesn’t support the panel or the user doesn’t have the capability.

源文件

文件: gc-includes/class-gc-customize-panel.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;
	}