Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#35511 closed defect (bug) (fixed)

Remove even more unused local variables

Reported by: Latz Owned by: rachelbaker
Priority: normal Milestone: 4.5
Component: Comments Version: 4.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

There are several local variables in "comment-template.php" which aren't used anymore.

Attachments (1)

35511.diff (1.7 KB ) - added by Latz 11 years ago.

Download all attachments as: .zip

Change History (8)

@Latz
11 years ago

#1 @Latz
11 years ago

  • Keywords has-patch added

#2 @rachelbaker
11 years ago

  • Owner set to rachelbaker
  • Status newreviewing

#3 @rachelbaker
11 years ago

In 36343:

Comments: Remove unused $default_comments_page variable in get_comment_link().

Left in r34735, fetches the default_comments_page option twice since this variable is unused.

See #34073 and #35511.

Props Latz.

#4 @rachelbaker
11 years ago

  • Milestone Awaiting Review4.5

#5 @rachelbaker
11 years ago

@Latz The comments_template() function is tricky because the variables set may be used in your theme's comments.php file. Example: I can see $comment_author_url used in theme-compat/comments.php.

Before any of the globals or local variables are removed from comments_template() some research and testing will need to be done across the theme directory.

#6 @Latz
11 years ago

Replying to rachelbaker:

@Latz The comments_template() function is tricky because the variables set may be used in your theme's comments.php file. Example: I can see $comment_author_url used in theme-compat/comments.php.

I have to admit that I hadn't thought that far. Will take a look but it at first sight it seems like a strange programming style.

Version 0, edited 11 years ago by Latz (next)

#7 @rachelbaker
11 years ago

  • Resolutionfixed
  • Status reviewingclosed

Closing this since the unused variable that can be cleaned up at this time was done in r36343. @Latz feel free to open a new ticket as needed.

Note: See TracTickets for help on using tickets.