Changeset 29108 for trunk/src/wp-includes/bookmark-template.php
- Timestamp:
- 07/11/2014 10:53:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/bookmark-template.php
r28501 r29108 20 20 * used by themes. 21 21 * 22 * The defaults for overwriting are:23 * 'show_updated' - Default is 0 (integer). Will show the time of when the24 * bookmark was last updated.25 * 'show_description' - Default is 0 (integer). Whether to show the description26 * of the bookmark.27 * 'show_images' - Default is 1 (integer). Whether to show link image if28 * available.29 * 'show_name' - Default is 0 (integer). Whether to show link name if30 * available.31 * 'before' - Default is '<li>' (string). The html or text to prepend to each32 * bookmarks.33 * 'after' - Default is '</li>' (string). The html or text to append to each34 * bookmarks.35 * 'link_before' - Default is '' (string). The html or text to prepend to each36 * bookmarks inside the <a> tag.37 * 'link_after' - Default is '' (string). The html or text to append to each38 * bookmarks inside the <a> tag.39 * 'between' - Default is '\n' (string). The string for use in between the link,40 * description, and image.41 * 'show_rating' - Default is 0 (integer). Whether to show the link rating.42 *43 22 * @since 2.1.0 44 23 * @access private 45 24 * 46 * @param array $bookmarks List of bookmarks to traverse 47 * @param string|array $args Optional. Overwrite the defaults. 25 * @param array $bookmarks List of bookmarks to traverse. 26 * @param string|array $args { 27 * Optional. Bookmarks arguments. 28 * 29 * @type int|bool $show_updated Whether to show the time the bookmark was last updated. 30 * Accepts 1|true or 0|false. Default 0|false. 31 * @type int|bool $show_description Whether to show the bookmakr description. Accepts 1|true, 32 * Accepts 1|true or 0|false. Default 0|false. 33 * @type int|bool $show_images Whether to show the link image if available. Accepts 1|true 34 * or 0|false. Default 1|true. 35 * @type int|bool $show_name Whether to show link name if available. Accepts 1|true or 36 * 0|false. Default 0|false. 37 * @type string $before The HTML or text to prepend to each bookmark. Default '<li>'. 38 * @type string $after The HTML or text to append to each bookmark. Default '</li>'. 39 * @type string $link_before The HTML or text to prepend to each bookmark inside the anchor 40 * tags. Default empty. 41 * @type string $link_after The HTML or text to append to each bookmark inside the anchor 42 * tags. Default empty. 43 * @type string $between The string for use in between the link, description, and image. 44 * Default "\n". 45 * @type int|bool $show_rating Whether to show the link rating. Accepts 1|true or 0|false. 46 * Default 0|false. 47 * 48 * } 48 49 * @return string Formatted output in HTML 49 50 */ … … 149 150 * 150 151 * List of default arguments are as follows: 151 * 'orderby' - Default is 'name' (string). How to order the links by. String is152 * based off of the bookmark scheme.153 * 'order' - Default is 'ASC' (string). Either 'ASC' or 'DESC'. Orders in either154 * ascending or descending order.155 * 'limit' - Default is -1 (integer) or show all. The amount of bookmarks to156 * display.157 * 'category' - Default is empty string (string). Include the links in what158 * category ID(s).159 * 'category_name' - Default is empty string (string). Get links by category160 * name.161 * 'hide_invisible' - Default is 1 (integer). Whether to show (default) or hide162 * links marked as 'invisible'.163 * 'show_updated' - Default is 0 (integer). Will show the time of when the164 * bookmark was last updated.165 * 'echo' - Default is 1 (integer). Whether to echo (default) or return the166 * formatted bookmarks.167 * 'categorize' - Default is 1 (integer). Whether to show links listed by168 * category (default) or show links in one column.169 * 'show_description' - Default is 0 (integer). Whether to show the description170 * of the bookmark.171 152 * 172 153 * These options define how the Category name will appear before the category 173 154 * links are displayed, if 'categorize' is 1. If 'categorize' is 0, then it will 174 155 * display for only the 'title_li' string and only if 'title_li' is not empty. 175 * 'title_li' - Default is 'Bookmarks' (translatable string). What to show176 * before the links appear.177 * 'title_before' - Default is '<h2>' (string). The HTML or text to show before178 * the 'title_li' string.179 * 'title_after' - Default is '</h2>' (string). The HTML or text to show after180 * the 'title_li' string.181 * 'class' - Default is 'linkcat' (string). The CSS class to use for the182 * 'title_li'.183 *184 * 'category_before' - Default is '<li id="%id" class="%class">'. String must185 * contain '%id' and '%class' to get186 * the id of the category and the 'class' argument. These are used for187 * formatting in themes.188 * Argument will be displayed before the 'title_before' argument.189 * 'category_after' - Default is '</li>' (string). The HTML or text that will190 * appear after the list of links.191 *192 * These are only used if 'categorize' is set to 1 or true.193 * 'category_orderby' - Default is 'name'. How to order the bookmark category194 * based on term scheme.195 * 'category_order' - Default is 'ASC'. Set the order by either ASC (ascending)196 * or DESC (descending).197 *198 * @see _walk_bookmarks() For other arguments that can be set in this function199 * and passed to _walk_bookmarks().200 * @see get_bookmarks() For other arguments that can be set in this function and201 * passed to get_bookmarks().202 * @link http://codex.wordpress.org/Template_Tags/wp_list_bookmarks203 156 * 204 157 * @since 2.1.0 205 * @uses _walk_bookmarks() Used to iterate over all of the bookmarks and return 206 * the html 207 * @uses get_terms() Gets all of the categories that are for links. 208 * 209 * @param string|array $args Optional. Overwrite the defaults of the function 210 * @return string|null Will only return if echo option is set to not echo. 211 * Default is not return anything. 158 * 159 * @see _walk_bookmarks() 160 * 161 * @param string|array $args { 162 * Optional. String or array of arguments to list bookmarks. 163 * 164 * @type string $orderby How to order the links by. Accepts post fields. Default 'name'. 165 * @type string $order Whether to order bookmarks in ascending or descending order. 166 * Accepts 'ASC' (ascending) or 'DESC' (descending). Default 'ASC'. 167 * @type int $limit Amount of bookmarks to display. Accepts 1+ or -1 for all. 168 * Default -1. 169 * @type string $category Comma-separated list of category ids to include links from. 170 * Default empty. 171 * @type string $category_name Category to retrieve links for by name. Default empty. 172 * @type int|bool $hide_invisible Whether to show or hide links marked as 'invisible'. Accepts 173 * 1|true or 0|false. Default 1|true. 174 * @type int|bool $show_updated Whether to display the time the bookmark was last updated. 175 * Accepts 1|true or 0|false. Default 0|false. 176 * @type int|bool $echo Whether to echo or return the formatted bookmarks. Accepts 177 * 1|true (echo) or 0|false (return). Default 1|true. 178 * @type int|bool $categorize Whether to show links listed by category or in a single column. 179 * Accepts 1|true (by category) or 0|false (one column). Default 1|true. 180 * @type int|bool $show_description Whether to show the bookmark descriptions. Accepts 1|true or 0|false. 181 * Default 0|false. 182 * @type string $title_li What to show before the links appear. Default 'Bookmarks'. 183 * @type string $title_before The HTML or text to prepend to the $title_li string. Default '<h2>'. 184 * @type string $title_after The HTML or text to append to the $title_li string. Default '</h2>'. 185 * @type string $class The CSS class to use for the $title_li. Default 'linkcat'. 186 * @type string $category_before The HTML or text to prepend to $title_before if $categorize is true. 187 * String must contain '%id' and '%class' to inherit the category ID and 188 * the $class argument used for formatting in themes. 189 * Default '<li id="%id" class="%class">'. 190 * @type string $category_after The HTML or text to append to $title_after if $categorize is true. 191 * Default '</li>'. 192 * @type string $category_orderby How to order the bookmark category based on term scheme if $categorize 193 * is true. Default 'name'. 194 * @type string $category_order Whether to order categories in ascending or descending order if 195 * $categorize is true. Accepts 'ASC' (ascending) or 'DESC' (descending). 196 * Default 'ASC'. 197 * } 198 * @return string|null Will only return if echo option is set to not echo. Default is not return anything. 212 199 */ 213 200 function wp_list_bookmarks( $args = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.