WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4319 closed defect (bug) (invalid)

Boomark Link

Reported by: wesselam Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by rob1n)

bookmark-template.php

line: 61, 229-244

line 61 :get_links (.. $echo = false)

line:229-244

		foreach ( (array) $cats as $cat ) {
			// Handle each category.
			$bglink= get_links($cat->cat_ID, '<li>', "</li>", "\n", true, 'name', false);
			
			if(is_null($bglink))
				return false;
			// Display the category name
			echo '	<li id="linkcat-' . $cat->cat_ID . '" class="linkcat"><h2>' . $cat->cat_name . "</h2>\n\t<ul>\n";
			// Call get_links() with all the appropriate params
			print $bglink;
			// Close the last category
			echo "\n\t</ul>\n</li>\n";
		}

Change History (5)

comment:1 Otto427 years ago

  • Keywords Huh? added

comment:2 Nazgul7 years ago

  • Keywords reporter-feedback added; Huh? removed

Could you be a little more specific, because a few code snippets doesn't tell us much.

  • Is there something not working?
  • Do you get an error message?
  • Which version of wordpress?
  • ...

comment:3 rob1n7 years ago

  • Description modified (diff)

comment:4 rob1n7 years ago

  • Milestone 2.4 deleted
  • Resolution set to invalid
  • Status changed from new to closed

I think he means that even though he sets echo=false, it still echoes.

However, get_links() is deprecated. Use wp_list_bookmarks().

comment:5 Otto427 years ago

Oh. Well, anyway, he's confused two different functions here.

The code from lines 229-244 is get_links_list(), not get_links().

get_links() works correctly in 2.1.3, 2.2, and even in trunk.

Note: See TracTickets for help on using tickets.