Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11614 closed enhancement (fixed)

phpdoc and cleanup of deprecated $table globals

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

Description

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 15 years ago.
11614-scalpel.diff (1.8 KB) - added by nacin 15 years ago.
11614-machete.diff (1.9 KB) - added by nacin 15 years ago.

Download all attachments as: .zip

Change History (7)

@nacin
15 years ago

#1 @dd32
15 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.

@nacin
15 years ago

@nacin
15 years ago

#2 @nacin
15 years ago

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

#3 @hakre
15 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:
\$table(posts|users|categories|post2cat|comments|options|postmeta)

#4 @nacin
15 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.