GC_Customize_Setting::check_capabilities()
最后更新于:2021-11-27 08:29:55
GC_Customize_Setting::check_capabilities()Validate user capabilities whether the theme supports the setting.
响应
(bool) False if theme doesn’t support the setting or user can’t change setting, otherwise true.
源文件
文件: gc-includes/class-gc-customize-setting.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;
}