#2786 closed task (blessed) (fixed)
Helper function for getting $wp_rewrite global
Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Tools - Code Improvements | Keywords: | |
Cc: |
Description
There are 44 references and global touches to $wp_rewrite
in the codebase. Each touch poses the threat of accidental assignments, increasing the risk factor of interacting with its data.
bbPress primarily references $wp_rewrite
for:
- Comparisons to
using_permalinks()
- Using the
root
variable - Using
pagination_base
to buildpagination_links
Change History (6)
Note: See
TracTickets for help on using
tickets.
We should likely do something for other globals, so naming conventions here will be important.
Do we have 1 wrapper, like:
bbp_get_global( 'wp_roles' );
Or case-by-case them:
bbp_get_wp_roles();