mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
- 2.0.44 fixes;
This commit is contained in:
@@ -33,6 +33,7 @@ if ( ! class_exists( 'UM' ) ) {
|
||||
* @method UM_Photos_API Photos_API()
|
||||
* @method UM_Groups Groups()
|
||||
* @method UM_Frontend_Posting Frontend_Posting()
|
||||
* @method UM_Notes Notes()
|
||||
*
|
||||
*/
|
||||
final class UM extends UM_Functions {
|
||||
|
||||
@@ -2685,4 +2685,28 @@ function is_ultimatemember() {
|
||||
*/
|
||||
function um_maybe_unset_time_limit() {
|
||||
@set_time_limit( 0 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Check if current user is owner of requested profile
|
||||
* @Returns Boolean
|
||||
*/
|
||||
if ( ! function_exists( 'um_is_profile_owner' ) ) {
|
||||
/**
|
||||
* @param $user_id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function um_is_profile_owner( $user_id = false ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( empty( $user_id ) ) {
|
||||
$user_id = get_current_user_id();
|
||||
}
|
||||
|
||||
return ( $user_id == um_profile_id() );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user