Opened 7 years ago
Closed 7 years ago
#7684 closed enhancement (fixed)
Use bp_is_post_request() instead of hardcoding the POST verification
Reported by: | espellcaste | Owned by: | espellcaste |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Core | Keywords: | has-patch commit |
Cc: |
Description
BuddyPress has a helper function that check if a request is a POST request. bp_is_post_request()
.
The strange part is that this helper function is not being used in several areas where the POST verification is done.
I'm not sure why. So I updated the places to use it both in core, BP Legacy and in some files, in Noveau.
Attachments (1)
Change History (5)
#2
@
7 years ago
Hi @DJPaul! Here it is:
Make use of bp_is_post_request()
instead of hardcoding POST verifications directly.
BuddyPress is not making use of the bp_is_post_request()
in several ajax scenarios to confirm if the post request is indeed a POST request. Instead, it is hardcoding the check directly. This change updates those places making use of this function.
This patch is good.
@espellcaste As I said in chat the other day, please write a commit message so we can check it before you commit the change. Thank you.