Home › Forums › Calendar Products › Community Events › Trailing slashes needed in three functions
- This topic has 5 replies, 2 voices, and was last updated 11 years, 10 months ago by Rob.
-
AuthorPosts
-
June 11, 2012 at 11:19 am #20482JenParticipant
I was running a link checker today and noticed that a number of links generated in the grid view are missing their trailing slashes. The links aren’t broken, but they require a redirect and it slows things down.
The three functions that I found (at least initially) that need trailing slashes added are tribe_get_previous_month_link(), tribe_get_next_month_link(), and tribe_get_linked_day(). I can patch the output of the first two through the views, but the last one is trickier.
I thought I’d ask for a fix in the next update, since it’s an easy one and will clean things up a little. Thanks!
June 11, 2012 at 11:44 am #20484JenParticipantOops, the third function is actually getLink(), not tribe_get_linked_day(), and refers only to the ‘day’ case.
June 11, 2012 at 12:04 pm #20486JenParticipantOK, it looks like all the trailing slash problems trace back to getLink(), but I’ll let y’all figure it out. I see you also have a function trailingslashit() that could be used to clean it up.
June 11, 2012 at 6:43 pm #20528RobMemberThis is a solid suggestion, Jen – thanks for the heads up here. I’ve passed this on to Paul for review and it looks straightforward enough that we could include it in July’s maintenance release (which should be out in that first week of July). Let me know if you notice anything else along these lines or if we can help in any other way.
June 12, 2012 at 7:55 am #20554JenParticipantThanks, Rob! I also found some double-slashed links in the grid, so a good look-see at the getLink() function and a liberal application of trailingslashit() should solve everything.
June 12, 2012 at 6:25 pm #20588RobMemberNice – thanks, Jen. Noted and passed along to the dev on this end, too. Anything else comes to mind…just give us a shout.
-
AuthorPosts
- The topic ‘Trailing slashes needed in three functions’ is closed to new replies.