[buddypress-trac] [BuddyPress] #4761: Modify ajax url to work properly with FORCE_SSL_ADMIN

buddypress-trac noreply at wordpress.org
Fri Mar 1 18:27:19 UTC 2013


#4761: Modify ajax url to work properly with FORCE_SSL_ADMIN
-------------------------------------------------+-------------------------
 Reporter:  will_c                               |       Owner:
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  1.7
Component:  Core                                 |     Version:  1.7
 Severity:  major                                |  Resolution:
 Keywords:  needs-patch needs-unit-tests dev-    |
  feedback                                       |
-------------------------------------------------+-------------------------
Changes (by r-a-y):

 * keywords:  needs-patch needs-unit-tests => needs-patch needs-unit-tests
     dev-feedback


Comment:

 How about?

 `admin_url( 'admin-ajax.php', is_ssl() ? 'admin' : 'http' )`

 The second parameter in `admin_url()` can be used to enforce which scheme
 to use.

 I've tested this with `FORCE_SSL_ADMIN` defined and the AJAX URL does not
 use SSL when the frontend of thet site is on HTTP.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4761#comment:9>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list