[buddypress-trac] [BuddyPress Trac] #7536: Use bp_get_admin_url() in XProfile instead of hard-coded links

buddypress-trac noreply at wordpress.org
Wed Jan 10 21:34:16 UTC 2018


#7536: Use bp_get_admin_url() in XProfile instead of hard-coded links
------------------------------+------------------------------
 Reporter:  JohnPBloch        |       Owner:  johnjamesjacoby
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  3.0
Component:  Extended Profile  |     Version:  1.2
 Severity:  normal            |  Resolution:  fixed
 Keywords:  needs-testing     |
------------------------------+------------------------------
Changes (by johnjamesjacoby):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"11808"]:
 {{{
 #!CommitTicketReference repository="" revision="11808"
 XProfile: use `bp_get_admin_url()` where appropriate.

 This change updates all inline and querystring-based URL references to
 `users.php` to instead use the built-in supplied wrapper function. This
 comes with a few benefits:

 * URLs will be consistent across BuddyPress installation configurations
 (rather than relative to the current admin dashboard area)
 * Code is cleaner and easier to understand
 * Variable IDs are now cast to integers as needed (where they were not all
 previously)

 Bonus: also updates a few `bp_get_admin_url()` calls in the about page to
 use the second parameter of `add_query_arg()` rather than wrapping it
 entirely, to match the expected usage format of all `add_query_arg()`
 calls.

 Fixes #7536. Props JohnPBloch.
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7536#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list