[ Index ] |
WordPress Cross Reference |
[Source view] [Print] [Project Stats]
Link/Bookmark API
File Size: | 408 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') X-Ref |
Retrieve Bookmark data param: mixed $bookmark param: string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant param: string $filter Optional, default is 'raw'. return: array|object Type returned depends on $output value. |
get_bookmark_field( $field, $bookmark, $context = 'display' ) X-Ref |
Retrieve single bookmark data item or field. param: string $field The name of the data field to return param: int $bookmark The bookmark ID to get field param: string $context Optional. The context of how the field will be used. return: string |
get_bookmarks($args = '') X-Ref |
Retrieves the list of bookmarks Attempts to retrieve from the cache first based on MD5 hash of arguments. If that fails, then the query will be built from the arguments and executed. The results will be stored to the cache. List of default arguments are as follows: 'orderby' - Default is 'name' (string). How to order the links by. String is based off of the bookmark scheme. 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either ascending or descending order. 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to display. 'category' - Default is empty string (string). Include the links in what category ID(s). 'category_name' - Default is empty string (string). Get links by category name. 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide links marked as 'invisible'. 'show_updated' - Default is 0 (integer). Will show the time of when the bookmark was last updated. 'include' - Default is empty string (string). Include bookmark ID(s) separated by commas. 'exclude' - Default is empty string (string). Exclude bookmark ID(s) separated by commas. param: string|array $args List of arguments to overwrite the defaults return: array List of bookmark row objects |
sanitize_bookmark($bookmark, $context = 'display') X-Ref |
Sanitizes all bookmark fields param: object|array $bookmark Bookmark row param: string $context Optional, default is 'display'. How to filter the return: object|array Same type as $bookmark but with fields sanitized. |
sanitize_bookmark_field($field, $value, $bookmark_id, $context) X-Ref |
Sanitizes a bookmark field Sanitizes the bookmark fields based on what the field name is. If the field has a strict value set, then it will be tested for that, else a more generic filtering is applied. After the more strict filter is applied, if the $context is 'raw' then the value is immediately return. Hooks exist for the more generic cases. With the 'edit' context, the 'edit_$field' filter will be called and passed the $value and $bookmark_id respectively. With the 'db' context, the 'pre_$field' filter is called and passed the value. The 'display' context is the final context and has the $field has the filter name and is passed the $value, $bookmark_id, and $context respectively. param: string $field The bookmark field param: mixed $value The bookmark field value param: int $bookmark_id Bookmark ID param: string $context How to filter the field value. Either 'raw', 'edit', return: mixed The filtered value |
clean_bookmark_cache( $bookmark_id ) X-Ref |
Deletes bookmark cache |
Generated: Tue Mar 25 01:41:18 2014 | WordPress honlapkészítés: online1.hu |