Make WordPress Core

Opened 13 years ago

Closed 11 years ago

#14546 closed enhancement (fixed)

Refactor direct references for $wp_rewrite class members

Reported by: ikailo's profile ikailo Owned by: duck_'s profile duck_
Milestone: 3.4 Priority: normal
Severity: normal Version:
Component: Permalinks Keywords: has-patch
Focuses: Cc:


This patch replaces direct references to class members $wp_rewrite->* with their public functions.

$wp_rewrite->flush_rules(), $wp_rewrite->add_permastruct(), $wp_rewrite->add_rewrite_tag()

Replaces with:
flush_rewrite_rules(), add_permastruct(), add_rewrite_tag()

Also removes extraneous $wp_rewrite globals.

Follow-Up to #10912

Attachments (2)

refactor_for_wp_rewrite.diff (10.2 KB) - added by ikailo 13 years ago.
14546.diff (8.5 KB) - added by duck_ 11 years ago.

Download all attachments as: .zip

Change History (7)

#1 @nacin
13 years ago

  • Keywords has-patch added; $wp_rewrite removed
  • Milestone changed from Awaiting Review to 3.1

#2 @markjaquith
13 years ago

  • Milestone changed from 3.1 to Future Release

#3 @duck_
11 years ago

  • Keywords needs-refresh added
  • Milestone changed from Future Release to 3.4

Patch needs a refresh and it requires #19871 since it tries to use add_rewrite_tag() with 3 parameters.

11 years ago

#4 @duck_
11 years ago

  • Keywords needs-refresh removed

#5 @duck_
11 years ago

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

In [20023]:

Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.

Note: See TracTickets for help on using tickets.