WP_User::has_prop() WordPress Method
The WP_User::has_prop() method is used to check if a user has a certain property. This is useful for checking if a user has a certain capability or role.
WP_User::has_prop( string $key ) #
Determines whether a property or meta key is set.
Description
Consults the users and usermeta tables.
Parameters
- $key
(string)(Required)Property.
Return
(bool)
Source
File: wp-includes/class-wp-user.php
public function has_prop( $key ) { return $this->__isset( $key ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |