Opened 18 years ago
Closed 18 years ago
#8671 closed enhancement (wontfix)
add slug as class name in wp_list_pages
| Reported by: | blonkm | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 2.7 |
| Severity: | normal | Keywords: | css class wp_list_pages |
| Cc: | Focuses: |
Description
We can very simply add an optional class name to all links in wp_list_pages (and other hierarchies) using the following
classes.php, line 1163
$css_class .= ' ' . $page->post_name;
Attachments (1)
Change History (5)
#1
@
18 years ago
If this was implemented the classname would need a prefix, probably something like page-item- .
#2
@
18 years ago
My suggestion would be either this, or preferably to have a filter on this line so plugins and others can decide what to do with the link as it is processed. Right now the only available filter is wp_list_pages, so that is after the whole list is generated, which would make it quite hard (not impossible though) to add the class names.
improved classes.php