Opened 14 years ago
Closed 14 years ago
#21465 closed defect (bug) (invalid)
Wrong operator in wp-includes/bookmark.php
| Reported by: | carmenDi0xide | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.4.1 |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: |
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)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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