Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#40516 closed defect (bug) (fixed)

Twenty Seventeen: Remove uneccessary return statement in twentyseventeen_edit_link()

Reported by: truongwp Owned by: obenland
Priority: normal Milestone: 4.8
Component: Bundled Theme Version: 4.7
Severity: normal Keywords: has-patch
Cc: Focuses: template

Description

I think that the return statement in twentyseventeen_edit_link() function is not neccessary because the edit_post_link() function always returns null.

Attachments (1)

40516.diff (648 bytes ) - added by truongwp 9 years ago.

Download all attachments as: .zip

Change History (11)

@truongwp
9 years ago

#1 @truongwp
9 years ago

  • Component ThemesBundled Theme
  • Summary Remove uneccessary return statement in twentyseventeen_edit_link()Twenty Seventeen: Remove uneccessary return statement in twentyseventeen_edit_link()

#2 @afercia
9 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review4.7.5
  • Type enhancementdefect (bug)
  • Version trunk4.7

Yep, actually edit_post_link() echoes the link and doesn't return anything so the implementation here doesn't look correct to me. Thanks @truongwp !

#3 follow-up: @Presskopp
9 years ago

what about the line

twentyseventeen_edit_link( get_the_ID() );

in:

content-front-page-panels.php
content-front-page.php
content-page.php

?

#4 in reply to: ↑ 3 @truongwp
9 years ago

@Presskopp: It shows the Edit page link.
@afercia: Thank you!

Last edited 9 years ago by truongwp (previous) (diff)

#5 @lukecavanagh
9 years ago

40516.diff Applies cleanly.

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


9 years ago

#7 @desrosj
9 years ago

  • Milestone 4.7.54.8

Looks like this just needs an owner. Putting it in 4.8.

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


9 years ago

#9 @obenland
9 years ago

  • Owner set to obenland
  • Status newaccepted

#10 @obenland
9 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 40795:

Twenty Seventeen: Remove uneccessary return statement

Props truongwp.
Fixes #40516.

Note: See TracTickets for help on using tickets.