Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#44838 closed enhancement (fixed)

Self_Link Should Have Echo Option

Reported by: dshanske's profile dshanske Owned by: pento's profile pento
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: Feeds Keywords: good-first-bug has-patch
Focuses: Cc:

Description

There is no get_self_link, so either one should be created or there should be an echo=true argument to address

Attachments (5)

44838.diff (1001 bytes) - added by jojotjebaby 6 years ago.
44838.1.diff (19.2 KB) - added by mobeen-abdullah 6 years ago.
First patch as a new contributor :)
44838.2.diff (1.2 KB) - added by jojotjebaby 6 years ago.
Changed the patch to add a new function get_self_link that is called and echoed by self_link
44838.3.diff (1.3 KB) - added by donmhico 5 years ago.
Refresh the patch.
44838.4.diff (1.5 KB) - added by audrasjb 5 years ago.
Proposal: some enhancements to inline docs

Download all attachments as: .zip

Change History (25)

#1 @dshanske
6 years ago

  • Keywords needs-patch good-first-bug added

#2 @stevenkword
6 years ago

Makes sense to me.

This ticket was mentioned in Slack in #core by jojotjebaby. View the logs.


6 years ago

@jojotjebaby
6 years ago

#4 @jojotjebaby
6 years ago

  • Version set to trunk

I just attached my patch. I went with the option to add the $echo = true option to the function.

This is my first contribution so some feedback would be welcome :)

This ticket was mentioned in Slack in #core by jojotjebaby. View the logs.


6 years ago

@mobeen-abdullah
6 years ago

First patch as a new contributor :)

#6 follow-up: @dshanske
6 years ago

@mobeen-abdullah Yours is not a diff.

@jojotjebaby Yours is implemented correctly except for not noting the new variable is since 4.9.9 or such...

But, in thinking about this after my initial comment, self_link is useful beyond RSS, which means adding get_self_link without the esc_url makes sense, as only in the original intent of exporting for RSS feeds should you need to escape, and adding two variables to change whether it escapes or not doesn't make sense, so the get function is the better move.

So, self_link would just call get_self_link and echo it with esc_url.

#7 in reply to: ↑ 6 @jojotjebaby
6 years ago

@dshanske , ok I will implement it with the new function and add the patch on here.

@jojotjebaby
6 years ago

Changed the patch to add a new function get_self_link that is called and echoed by self_link

#8 @jojotjebaby
6 years ago

  • Keywords has-patch added; needs-patch removed

#9 @dshanske
6 years ago

  • Milestone changed from Awaiting Review to 4.9.9

#10 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#11 @pento
6 years ago

  • Milestone changed from 4.9.9 to 5.0.1

#12 @pento
6 years ago

  • Milestone changed from 5.0.1 to 5.0.2

#13 @pento
6 years ago

  • Milestone changed from 5.0.2 to 5.0.3

#14 @audrasjb
6 years ago

  • Keywords needs-refresh added
  • Milestone changed from 5.0.3 to 5.1

Hi,

5.0.3 is going to be released in a couple of weeks. We are currently sorting the remaining tickets in the milestone. It doesn't appear that ticket can be handled in the next couple of weeks (it will both needs a refresh and a formal review). Let's address it in 5.1 which is coming in February. Feel free to change/ask to change the milestone if you think the issue can be quickly resolved.

#15 @pento
6 years ago

  • Milestone changed from 5.1 to 5.2
  • Version trunk deleted

#16 @desrosj
6 years ago

  • Milestone changed from 5.2 to 5.3

This ticket has not received any attention during the 5.2 cycle. With beta 1 tomorrow, going to punt this to 5.3.

@donmhico
5 years ago

Refresh the patch.

#17 @dshanske
5 years ago

I think this can get into 5.3 now, hopefully.

@audrasjb
5 years ago

Proposal: some enhancements to inline docs

#18 @audrasjb
5 years ago

  • Keywords needs-refresh removed

#19 @pento
5 years ago

  • Owner changed from SergeyBiryukov to pento
  • Status changed from reviewing to accepted

#20 @pento
5 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 45772:

Feeds: Introduce the get_self_link() function.

Corresponds to the self_link() template function.

This matches other feed template functions, using one function to get the value, and a different function to echo it.

Props jojotjebaby, mobeen-abdullah, donmhico, audrasjb, dshanske.
Fixes #44838.

Note: See TracTickets for help on using tickets.