[buddypress-trac] [BuddyPress] #4141: Wrapper Function for getting the currently displayed page url.
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Apr 13 12:27:45 UTC 2012
#4141: Wrapper Function for getting the currently displayed page url.
--------------------------+------------------------------
Reporter: chrisclayton | Owner: chrisclayton
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Comment (by chrisclayton):
Agreed. Knew there was a reason i wanted advice :) Don't think i was too
confident in that patch.
Haven't tested it and i could be reading it wrong, but looking through the
bp_rel_canonical function (thanks btw, somehow i missed that update) it
already seems to detect every page possible so, wouldn't we just be
repeating the same code in both? (or am i reading it wrong?)
Wouldn't moving the url building stuff into bp_get_permalink() and
returning the url_stack and then changing bp_rel_canonical() to simply
just echo the bp_get_permalink()?
{{{
echo "<link rel='canonical' href='" . bp_get_permalink() . "' />\n";
}}}
Work perfectly, while keeping the DRY principle intact?
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4141#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list