Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#11631 closed enhancement (worksforme)

php code improvements get_the_title() and get_post()

Reported by: hakre Owned by:
Priority: normal Milestone:
Component: Optimization Version: 2.9
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

php code improvements get_the_title() and get_post(). done some cleanup while looking into other areas.

Attachments (3)

11631-code-improvements.patch​ (5.5 KB ) - added by hakre 17 years ago.
11631-code-improvements.2.patch​ (5.7 KB ) - added by hakre 17 years ago.
Removed duplicate code
11631-code-improvements.3.patch​ (5.6 KB ) - added by hakre 17 years ago.
Removed duplicate code (again); Better helper function name.

Download all attachments as: .zip

Change History (7)

@hakre
17 years ago

Removed duplicate code

@hakre
17 years ago

Removed duplicate code (again); Better helper function name.

#1 @hakre
17 years ago

  • Keywords dev-feedback added

#2 @Denis-de-Bernardy
17 years ago

  • Component General → Optimization
  • Keywords dev-feedback removed
  • Milestone Unassigned → 3.0

in the 3rd patch, you need to clone the post in the event it's not using the raw filter.

#3 @nacin
17 years ago

The stuff in get_the_title() does not appear to be code improvements in any way. We're making more variable assignments we don't need to be doing, and new isset() checks, and we're calling is_admin() twice now, and we're now checking for $format. Sure, it looks more compact, but that's not what we're going for.

Same with get_post(), though less so. None of this seems necessary.

#4 @nacin
17 years ago

  • Milestone 3.0
  • Resolution → worksforme
  • Status new → closed

Reopen > 3.0 if there are improvements we can work in.

Note: See TracTickets for help on using tickets.