get_bookmarks хук-фильтрWP 2.1.0

Filters the returned list of bookmarks.

The first time the hook is evaluated in this file, it returns the cached bookmarks list. The second evaluation returns a cached bookmarks list if the link category is passed but does not exist. The third evaluation returns the full cached results.

Использование

add_filter( 'get_bookmarks', 'wp_kama_get_bookmarks_filter', 10, 2 );

/**
 * Function for `get_bookmarks` filter-hook.
 * 
 * @param array $bookmarks   List of the cached bookmarks.
 * @param array $parsed_args An array of bookmark query arguments.
 *
 * @return array
 */
function wp_kama_get_bookmarks_filter( $bookmarks, $parsed_args ){

	// filter...
	return $bookmarks;
}
$bookmarks(массив)
List of the cached bookmarks.
$parsed_args(массив)
An array of bookmark query arguments.

Список изменений

С версии 2.1.0 Введена.

Где вызывается хук

get_bookmarks()
get_bookmarks
wp-includes/bookmark.php 174
return apply_filters( 'get_bookmarks', $bookmarks, $parsed_args );
wp-includes/bookmark.php 228
return apply_filters( 'get_bookmarks', array(), $parsed_args );
wp-includes/bookmark.php 321
return apply_filters( 'get_bookmarks', $results, $parsed_args );

Где используется хук в WordPress

Использование не найдено.