Opened 12 years ago
Closed 12 years ago
#21465 closed defect (bug) (invalid)
Wrong operator in wp-includes/bookmark.php
Reported by: | carmenDi0xide | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.4.1 |
Component: | General | Keywords: | |
Focuses: | 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)
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