- Timestamp:
- 02/15/2018 03:52:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/activity/ajax.php
r11856 r11858 86 86 */ 87 87 function bp_nouveau_ajax_mark_activity_favorite() { 88 // Bail if not a POST action. 89 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { 88 if ( ! bp_is_post_request() ) { 90 89 wp_send_json_error(); 91 90 } … … 127 126 */ 128 127 function bp_nouveau_ajax_unmark_activity_favorite() { 129 // Bail if not a POST action. 130 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { 128 if ( ! bp_is_post_request() ) { 131 129 wp_send_json_error(); 132 130 } … … 164 162 */ 165 163 function bp_nouveau_ajax_clear_new_mentions() { 166 // Bail if not a POST action. 167 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) { 164 if ( ! bp_is_post_request() ) { 168 165 wp_send_json_error(); 169 166 } … … 194 191 195 192 // Bail if not a POST action. 196 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD']) ) {193 if ( ! bp_is_post_request() ) { 197 194 wp_send_json_error( $response ); 198 195 } … … 266 263 267 264 // Bail if not a POST action. 268 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD']) ) {265 if ( ! bp_is_post_request() ) { 269 266 wp_send_json_error( $response ); 270 267 } … … 327 324 328 325 // Bail if not a POST action. 329 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD']) ) {326 if ( ! bp_is_post_request() ) { 330 327 wp_send_json_error( $response ); 331 328 } … … 564 561 565 562 // Bail if not a POST action. 566 if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD']) ) {563 if ( ! bp_is_post_request() ) { 567 564 wp_send_json_error( $response ); 568 565 }
Note: See TracChangeset
for help on using the changeset viewer.