Opened 14 months ago
Last modified 14 months ago
#20359 new enhancement
wp_list_categories - Diff to make use_desc_for_title parameter more flexible
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 2.2.1 |
| Severity: | normal | Keywords: | has-patch needs-testing needs-codex |
| Cc: |
Description
Right now, the @use_desc_for_title is defined as a boolean parameter which outputs category link title attributes containing either:
- Category descriptions by default (bool 1);
- 'View all posts filed under [category-name]'.
Now, since the title attribute is not required for <a> tags in any HTML spec, I made a patch to turn this parameter into a string, with the following supported values:
- 'desc' => (default) Outputs category descriptions;
- 'viewall' => Same output as bool 0 (false) before: 'View all posts filed under [category-name]';
- 'none' => Does not output any title attributes.
I have tested this thoroughly, but additional testing would not hurt.
Attachments (1)
Change History (3)
Enhances $use_desc_for_title in 'category-template.php' and 'deprecated.php'
- Keywords needs-codex added
- Version changed from 3.4 to 2.2.1
It seems this had already been reported in #4596 but the fix was discarded by darkdragon. Since I already created this ticket, and the other one is very old and is closed now, I'll keep posting here.
Added the needs-codex Keyword to update the wp_list_categories Codex entry if this gets implemented.

I forgot to mention that the proposed patch also introduces small changes to deprecated.php.