Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#11614 closed enhancement (fixed)

phpdoc and cleanup of deprecated $table globals

Reported by: nacin Owned by:
Milestone: 3.0 Priority: lowest
Severity: trivial Version:
Component: Inline Docs Keywords: has-patch commit
Focuses: Cc:


Trivial patch adds some phpdoc does slight cleanup. Alternatively, these globals can probably be removed at this point, as any plugin that uses them is doing it wrong. (Or is older than time.)

Attachments (3)

11614.diff (2.2 KB) - added by nacin 6 years ago.
11614-scalpel.diff (1.8 KB) - added by nacin 6 years ago.
11614-machete.diff (1.9 KB) - added by nacin 6 years ago.

Download all attachments as: .zip

Change History (7)

@nacin6 years ago

comment:1 @dd326 years ago

$tablecategories = $wpdb->categories;

My vote would be to remove those 2 items at least.. They're useless now.

As for the rest of the $table* vars.. I'd be tempted to say get rid of those too.. They need to be cleaned up at some point.

@nacin6 years ago

@nacin6 years ago

comment:2 @nacin6 years ago

Two more patches with the alternatives. Machete or scalpel, take your pick.

comment:3 @hakre6 years ago

For 3.0 we should not fear to break things, so just drop those (if you ask me). I've reviewed current trunk if those vars are used anywhere else and next to depreceated.php those do not appear anywhere.

In case you need a handy regex to smell them:

comment:4 @nacin6 years ago

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

(In [13229]) Introduce wpdb::tables() to fetch table names on a global or blog scope. Remove very old and long deprecated $table{table} globals, fixes #11614. See #12083

Note: See TracTickets for help on using tickets.