Make WordPress Core

Opened 12 years ago

Closed 8 years ago

#22069 closed enhancement (wontfix)

unify function naming convention get_ vs. the_

Reported by: thomask's profile thomask Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4.2
Component: General Keywords:
Focuses: Cc:


even after about 400 custom wordpress instalation i always got problem remembering the proper name of many functions, if they are returning the content or echoing it.

Most of the functions got get_something() and the_something() but some functions got get_the_something() (e.g. get_the_post_thumbnail) and some got the_something(echo=false) or something(echo=true) etc.

It would be nice if we would consolidate the naming convention (IMO get_ and the_ would be the best) and make current functions obsolete.

Change History (2)

#1 @vancoder
10 years ago

  • Keywords reporter-feedback added

This is certainly a valid point, but not something that can be changed easily without breaking a lot of sites. It's something that should probably be addressed on a function-by-function basis, prioritizing those inconsistently-named functions that are the most problematic. A good next step would be to open tickets for those functions individually.

#2 @chriscct7
8 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

It's nice to have the functions follow a standard naming convention, but this needs to be considered on a function by function basis as specified above.

Note: See TracTickets for help on using tickets.