0 && ! current_user_can( 'edit_post', $attachment_id ) ) { return false; } return true; } /** * Whether the current user may change plugin settings. * * @return bool */ public static function can_manage() { return current_user_can( 'manage_options' ); } /** * Whether the current user may convert attachments they did not upload. * * @return bool */ public static function can_see_all() { $allowed = current_user_can( 'edit_others_posts' ) || current_user_can( 'manage_options' ); /** * Filters whether the current user can list and queue every attachment. * * Each conversion still requires edit_post on that attachment. * * @param bool $allowed Whether the user can see every attachment. */ return (bool) apply_filters( 'flipwebp_can_convert_others', $allowed ); } }