Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40516 closed defect (bug) (fixed)

Twenty Seventeen: Remove uneccessary return statement in twentyseventeen_edit_link()

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

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 8 years ago.

Download all attachments as: .zip

Change History (11)

@truongwp
8 years ago

#1 @truongwp
8 years ago

  • Component changed from Themes to Bundled Theme
  • Summary changed from Remove uneccessary return statement in twentyseventeen_edit_link() to Twenty Seventeen: Remove uneccessary return statement in twentyseventeen_edit_link()

#2 @afercia
8 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.7.5
  • Type changed from enhancement to defect (bug)
  • Version changed from trunk to 4.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
8 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
8 years ago

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

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

#5 @lukecavanagh
8 years ago

40516.diff Applies cleanly.

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


8 years ago

#7 @desrosj
8 years ago

  • Milestone changed from 4.7.5 to 4.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.


8 years ago

#9 @obenland
8 years ago

  • Owner set to obenland
  • Status changed from new to accepted

#10 @obenland
8 years ago

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

In 40795:

Twenty Seventeen: Remove uneccessary return statement

Props truongwp.
Fixes #40516.

Note: See TracTickets for help on using tickets.