WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#21041 closed enhancement (fixed)

Remove variable store in get_the_excerpt

Reported by: niallkennedy Owned by: markjaquith
Milestone: 3.5 Priority: normal
Severity: trivial Version:
Component: Template Keywords: has-patch commit
Focuses: Cc:

Description

It looks like get_the_excerpt() either returns a password protected message or post->post_excerpt passed through a filter.

Storing excerpt in a variable should not be necessary; pass directly instead.

Attachments (1)

post-template.diff (667 bytes) - added by niallkennedy 9 years ago.
return string without first storing it in a variable

Download all attachments as: .zip

Change History (3)

@niallkennedy
9 years ago

return string without first storing it in a variable

#1 @nacin
9 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 3.5
  • Severity changed from minor to trivial

#2 @markjaquith
9 years ago

  • Owner set to markjaquith
  • Resolution set to fixed
  • Status changed from new to closed

In [21159]:

Do not store post_excerpt in a temporary variable when we can just return it directly. props niallkennedy. fixes #21041

Note: See TracTickets for help on using tickets.