WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
139 | 'exclude' => '', 'search' => '' |
140 | ); |
141 |
|
142 | $r = wp_parse_args( $args, $defaults ); |
143 | extract( $r, EXTR_SKIP ); |
144 |
|
145 | $key = md5( serialize( $r ) ); |
146 | if ( $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) |
147 | if ( isset( $cache[ $key ] ) ) |
148 | return apply_filters('get_bookmarks', $cache[ $key ], $r ); |
149 |
|
150 | $inclusions = ''; |
151 | if ( !empty($include) ) { |
152 | $exclude = ''; //ignore exclude, category, and category_name params if using include |
153 | $category = ''; |
154 | $category_name = ''; |
155 | $inclinks = preg_split('/[\s,]+/',$include); |
156 | if ( count($inclinks) ) { |
157 | foreach ( $inclinks as $inclink ) { |
Line | Code |
241 | $query .= " ORDER BY $orderby $order"; |
242 | if ($limit != -1) |
243 | $query .= " LIMIT $limit"; |
244 |
|
245 | $results = $wpdb->get_results($query); |
246 |
|
247 | $cache[ $key ] = $results; |
248 | wp_cache_set( 'get_bookmarks', $cache, 'bookmark' ); |
249 |
|
250 | return apply_filters('get_bookmarks', $results, $r); |
251 | } |
252 |
|
253 | /** |
254 | * Sanitizes all bookmark fields |
255 | * |
256 | * @since 2.3.0 |
257 | * |
258 | * @param object|array $bookmark Bookmark row |
259 | * @param string $context Optional, default is 'display'. How to filter the |