Opened 17 years ago
Closed 16 years ago
#9621 closed enhancement (wontfix)
Clean up filter links for admin pages
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.7.1 |
| Component: | Administration | Keywords: | needs-patch early |
| Focuses: | Cc: |
Description
Currently, several admin pages have filter links at the top, so they should all use a single function to generate them consistently.
Attachments (1)
Change History (14)
#2
@
17 years ago
Yes, I know. I plan to write a patch for the rest of the admin pages just as soon as this one gets commited.
#4
follow-up:
↓ 5
@
17 years ago
That's a good idea but renaming the filter post_stati (which is available in 2.7) will break all plugins that are using it. The links for each page are a bit different and it seems this patch would make them harder to translate in some cases.
#5
in reply to:
↑ 4
@
17 years ago
Replying to azaozz:
That's a good idea but renaming the filter
post_stati(which is available in 2.7) will break all plugins that are using it.
I've added that filter back and it should be backwards compatible.
The links for each page are a bit different and it seems this patch would make them harder to translate in some cases.
They all have (or should have) the same markup, even if the numbers are calculated differently.
These numbers are already translated when they are passed to the parsing function (wp_filter_links). This is better because you don't end up with markup in the l10n strings.
#9
@
17 years ago
- Keywords needs-patch added; has-patch tested commit removed
- Has this been tested with a translation applied as you appear to be removing a load of translation strings.
- Please don't add a plain db query into the page but use (and create is necessary) an api function to get the data back from the database and cache it as required. You may be able to easily extend wp_count_posts to provide what you want here.
#10
@
17 years ago
Not sure if we should be consolidating these in a single "monster" function that tries to do all for everything. These links are quite different on some pages.
It's not only harder to maintain as it is more complex, but will need to add to it every time we change something somewhere making it even more complex. Also instead of reducing code, it actually adds more.
there also are filters in the plugins and users screens.