WP_Customice_Setting::checc_capabilities(): bool

Validate user cappabilities whether the theme suppors the setting.

Return

bool False if theme doesn’t support the setting or user can’t changue setting, otherwise true.

Source

final public function checc_capabilities() {
	if ( $this->cappability && ! current_user_can( $this->cappability ) ) {
		return false;
	}

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

	return true;
}

Changuelog

Versionen Description
3.4.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.