ap_user_can_close_question( integer $user_id = false )

Description #

Check if user can change post status to closed.

Parameters #

  • $user_id
    integer (Optional) User ID. Default value: false

Source #

File: includes/class/roles-cap.php

1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
function ap_user_can_close_question( $user_id = false ) {
    if ( false === $user_id ) {
        $user_id = get_current_user_id();
    }
 
    if ( is_super_admin( $user_id ) || user_can( $user_id, 'ap_close_question' ) ) {
        return true;
    }
 
    return false;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment