- 2.0.44 fixes;

This commit is contained in:
nikitasinelnikov
2019-05-07 14:57:08 +03:00
parent ec93755dc8
commit 6b08f88aae
2 changed files with 25 additions and 0 deletions
+1
View File
@@ -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 {
+24
View File
@@ -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() );
}
}