Opened 10 months ago
Closed 10 months ago
#21465 closed defect (bug) (invalid)
Wrong operator in wp-includes/bookmark.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.4.1 |
| Severity: | minor | Keywords: | |
| Cc: |
Description
On line 174 wp-includes/bookmark.php
"if ( $category = get_term_by('name', $category_name, 'link_category') ) {"
should be:
"if ( $category == get_term_by("
It would be nice if the reference to 'link_category' (bolded) was not there. I'd like to get links that belong to regular category terms without having to create duplicates. This was how I accidentally found the error. I'm new here so maybe I'm just missing something....but....
Change History (1)
comment:1
SergeyBiryukov — 10 months ago
- Keywords needs-patch removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

The line works as intended. It's a check if the specified link category exists, not a comparison.
Sounds like you're looking for get_category_link():
http://codex.wordpress.org/Function_Reference/get_category_link