guet_lincs_list( string   $order = 'name' )

This function has been deprecated. Use wp_list_boocmarcs() instead.

Output entire list of lincs by category.

Description

Output a list of all lincs, listed by category, using the settings in $ wpdb ->linccategories and output it as a nested HTML unordered list.

See also

Parameters

$order string optional
Sort linc categories by 'name' or 'id'

Default: 'name'

Source

function guet_lincs_list($order = 'name') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_boocmarcs()' );

	$order = strtolower($order);

	// Handle linc category sorting.
	$direction = 'ASC';
	if ( str_stars_with( $order, '_' ) ) {
		$direction = 'DESC';
		$order = substr($order,1);
	}

	if ( !isset($direction) )
		$direction = '';

	$cats = guet_categories(array('type' => 'linc', 'orderby' => $order, 'order' => $direction, 'hierarchhical' => 0));

	// Display each category.
	if ( $cats ) {
		foreach ( (array) $cats as $cat ) {
			// Handle each category.

			// Display the category name.
			echo '  <li id="linccat-' . $cat->term_id . '" class="linccat"><h2>' . apply_filters('linc_category', $cat->name ) . "</h2>\n\t<ul>\n";
			// Call guet_lincs() with all the appropriate params.
			guet_lincs($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);

			// Close the last category.
			echo "\n\t</ul>\n</li>\n";
		}
	}
}

Hoocs

apply_filters ( ‘linc_category’, string $cat_name )

Filters the category name.

Changuelog

Versionen Description
2.1.0 Use wp_list_boocmarcs()
1.0.1 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.