| 192 | | /** function get_linksbyname() |
|---|
| 193 | | ** Gets the links associated with category 'cat_name'. |
|---|
| 194 | | ** Parameters: |
|---|
| 195 | | ** cat_name (default 'noname') - The category name to use. If no |
|---|
| 196 | | ** match is found uses all |
|---|
| 197 | | ** before (default '') - the html to output before the link |
|---|
| 198 | | ** after (default '<br />') - the html to output after the link |
|---|
| 199 | | ** between (default ' ') - the html to output between the link/image |
|---|
| 200 | | ** and it's description. Not used if no image or show_images == true |
|---|
| 201 | | ** show_images (default true) - whether to show images (if defined). |
|---|
| 202 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 203 | | ** 'url', 'description' or 'rating'. Or maybe owner. If you start the |
|---|
| 204 | | ** name with an underscore the order will be reversed. |
|---|
| 205 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 206 | | ** random order. |
|---|
| 207 | | ** show_description (default true) - whether to show the description if |
|---|
| 208 | | ** show_images=false/not defined |
|---|
| 209 | | ** show_rating (default false) - show rating stars/chars |
|---|
| 210 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 211 | | ** are shown. |
|---|
| 212 | | ** show_updated (default 0) - whether to show last updated timestamp |
|---|
| 213 | | */ |
|---|
| 214 | | function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', |
|---|
| 215 | | $between = " ", $show_images = true, $orderby = 'id', |
|---|
| 216 | | $show_description = true, $show_rating = false, |
|---|
| 217 | | $limit = -1, $show_updated = 0) { |
|---|
| 218 | | global $wpdb; |
|---|
| 219 | | $cat_id = -1; |
|---|
| 220 | | $cat = get_term_by('name', $cat_name, 'link_category'); |
|---|
| 221 | | if ( $cat ) |
|---|
| 222 | | $cat_id = $cat->term_id; |
|---|
| 223 | | |
|---|
| 224 | | get_links($cat_id, $before, $after, $between, $show_images, $orderby, |
|---|
| 225 | | $show_description, $show_rating, $limit, $show_updated); |
|---|
| 226 | | } |
|---|
| 227 | | |
|---|
| 228 | | /** function wp_get_linksbyname() |
|---|
| 229 | | ** Gets the links associated with the named category. |
|---|
| 230 | | ** Parameters: |
|---|
| 231 | | ** category (no default) - The category to use. |
|---|
| 232 | | **/ |
|---|
| | 407 | /** |
|---|
| | 408 | * get_linksbyname() - Gets the links associated with category $cat_name. |
|---|
| | 409 | * |
|---|
| | 410 | * @since 0.71 |
|---|
| | 411 | * @deprecated Use get_links() |
|---|
| | 412 | * @see get_links() |
|---|
| | 413 | * |
|---|
| | 414 | * @param string $cat_name Optional. The category name to use. If no match is found uses all. |
|---|
| | 415 | * @param string $before Optional. The html to output before the link. |
|---|
| | 416 | * @param string $after Optional. The html to output after the link. |
|---|
| | 417 | * @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. |
|---|
| | 418 | * @param bool $show_images Optional. Whether to show images (if defined). |
|---|
| | 419 | * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. |
|---|
| | 420 | * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a |
|---|
| | 421 | * random order. |
|---|
| | 422 | * @param bool $show_description Optional. Whether to show the description if show_images=false/not defined. |
|---|
| | 423 | * @param bool $show_rating Optional. Show rating stars/chars. |
|---|
| | 424 | * @param int $limit Optional. Limit to X entries. If not specified, all entries are shown. |
|---|
| | 425 | * @param int $show_updated Optional. Whether to show last updated timestamp |
|---|
| | 426 | */ |
|---|
| | 427 | function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id', |
|---|
| | 428 | $show_description = true, $show_rating = false, |
|---|
| | 429 | $limit = -1, $show_updated = 0) { |
|---|
| | 430 | $cat_id = -1; |
|---|
| | 431 | $cat = get_term_by('name', $cat_name, 'link_category'); |
|---|
| | 432 | if ( $cat ) |
|---|
| | 433 | $cat_id = $cat->term_id; |
|---|
| | 434 | |
|---|
| | 435 | get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated); |
|---|
| | 436 | } |
|---|
| | 437 | |
|---|
| | 438 | /** |
|---|
| | 439 | * wp_get_linksbyname() - Gets the links associated with the named category. |
|---|
| | 440 | * |
|---|
| | 441 | * @since 1.0.1 |
|---|
| | 442 | * @deprecated Use wp_get_links() |
|---|
| | 443 | * @see wp_get_links() |
|---|
| | 444 | * |
|---|
| | 445 | * @param string $category The category to use. |
|---|
| | 446 | * @param string $args |
|---|
| | 447 | * @return bool|null |
|---|
| | 448 | */ |
|---|
| 245 | | /** function get_linkobjectsbyname() |
|---|
| 246 | | ** Gets an array of link objects associated with category 'cat_name'. |
|---|
| 247 | | ** Parameters: |
|---|
| 248 | | ** cat_name (default 'noname') - The category name to use. If no |
|---|
| 249 | | ** match is found uses all |
|---|
| 250 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 251 | | ** 'url', 'description', or 'rating'. Or maybe owner. If you start the |
|---|
| 252 | | ** name with an underscore the order will be reversed. |
|---|
| 253 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 254 | | ** random order. |
|---|
| 255 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 256 | | ** are shown. |
|---|
| 257 | | ** |
|---|
| 258 | | ** Use this like: |
|---|
| 259 | | ** $links = get_linkobjectsbyname('fred'); |
|---|
| 260 | | ** foreach ($links as $link) { |
|---|
| 261 | | ** echo '<li>'.$link->link_name.'</li>'; |
|---|
| 262 | | ** } |
|---|
| 263 | | **/ |
|---|
| | 459 | /** |
|---|
| | 460 | * get_linkobjectsbyname() - Gets an array of link objects associated with category $cat_name. |
|---|
| | 461 | * |
|---|
| | 462 | * <code> |
|---|
| | 463 | * $links = get_linkobjectsbyname('fred'); |
|---|
| | 464 | * foreach ($links as $link) { |
|---|
| | 465 | * echo '<li>'.$link->link_name.'</li>'; |
|---|
| | 466 | * } |
|---|
| | 467 | * </code> |
|---|
| | 468 | * |
|---|
| | 469 | * @since 1.0.1 |
|---|
| | 470 | * @deprecated Use get_linkobjects() |
|---|
| | 471 | * @see get_linkobjects() |
|---|
| | 472 | * |
|---|
| | 473 | * @param string $cat_name The category name to use. If no match is found uses all. |
|---|
| | 474 | * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. |
|---|
| | 475 | * Or maybe owner. If you start the name with an underscore the order will be reversed. You can also |
|---|
| | 476 | * specify 'rand' as the order which will return links in a random order. |
|---|
| | 477 | * @param int $limit Limit to X entries. If not specified, all entries are shown. |
|---|
| | 478 | * @return unknown |
|---|
| | 479 | */ |
|---|
| 265 | | global $wpdb; |
|---|
| 266 | | $cat_id = -1; |
|---|
| 267 | | $cat = get_term_by('name', $cat_name, 'link_category'); |
|---|
| 268 | | if ( $cat ) |
|---|
| 269 | | $cat_id = $cat->term_id; |
|---|
| 270 | | |
|---|
| 271 | | return get_linkobjects($cat_id, $orderby, $limit); |
|---|
| 272 | | } |
|---|
| 273 | | |
|---|
| 274 | | /** function get_linkobjects() |
|---|
| 275 | | ** Gets an array of link objects associated with category n. |
|---|
| 276 | | ** Parameters: |
|---|
| 277 | | ** category (default -1) - The category to use. If no category supplied |
|---|
| 278 | | ** uses all |
|---|
| 279 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 280 | | ** 'url', 'description', or 'rating'. Or maybe owner. If you start the |
|---|
| 281 | | ** name with an underscore the order will be reversed. |
|---|
| 282 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 283 | | ** random order. |
|---|
| 284 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 285 | | ** are shown. |
|---|
| 286 | | ** |
|---|
| 287 | | ** Use this like: |
|---|
| 288 | | ** $links = get_linkobjects(1); |
|---|
| 289 | | ** if ($links) { |
|---|
| 290 | | ** foreach ($links as $link) { |
|---|
| 291 | | ** echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>'; |
|---|
| 292 | | ** } |
|---|
| 293 | | ** } |
|---|
| 294 | | ** Fields are: |
|---|
| 295 | | ** link_id |
|---|
| 296 | | ** link_url |
|---|
| 297 | | ** link_name |
|---|
| 298 | | ** link_image |
|---|
| 299 | | ** link_target |
|---|
| 300 | | ** link_category |
|---|
| 301 | | ** link_description |
|---|
| 302 | | ** link_visible |
|---|
| 303 | | ** link_owner |
|---|
| 304 | | ** link_rating |
|---|
| 305 | | ** link_updated |
|---|
| 306 | | ** link_rel |
|---|
| 307 | | ** link_notes |
|---|
| 308 | | **/ |
|---|
| 309 | | // Deprecate in favor of get_linkz(). |
|---|
| | 481 | $cat_id = -1; |
|---|
| | 482 | $cat = get_term_by('name', $cat_name, 'link_category'); |
|---|
| | 483 | if ( $cat ) |
|---|
| | 484 | $cat_id = $cat->term_id; |
|---|
| | 485 | |
|---|
| | 486 | return get_linkobjects($cat_id, $orderby, $limit); |
|---|
| | 487 | } |
|---|
| | 488 | |
|---|
| | 489 | /** |
|---|
| | 490 | * get_linkobjects() - Gets an array of link objects associated with category n. |
|---|
| | 491 | * |
|---|
| | 492 | * Usage: |
|---|
| | 493 | * <code> |
|---|
| | 494 | * $links = get_linkobjects(1); |
|---|
| | 495 | * if ($links) { |
|---|
| | 496 | * foreach ($links as $link) { |
|---|
| | 497 | * echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>'; |
|---|
| | 498 | * } |
|---|
| | 499 | * } |
|---|
| | 500 | * </code> |
|---|
| | 501 | * |
|---|
| | 502 | * Fields are: |
|---|
| | 503 | * <ol> |
|---|
| | 504 | * <li>link_id</li> |
|---|
| | 505 | * <li>link_url</li> |
|---|
| | 506 | * <li>link_name</li> |
|---|
| | 507 | * <li>link_image</li> |
|---|
| | 508 | * <li>link_target</li> |
|---|
| | 509 | * <li>link_category</li> |
|---|
| | 510 | * <li>link_description</li> |
|---|
| | 511 | * <li>link_visible</li> |
|---|
| | 512 | * <li>link_owner</li> |
|---|
| | 513 | * <li>link_rating</li> |
|---|
| | 514 | * <li>link_updated</li> |
|---|
| | 515 | * <li>link_rel</li> |
|---|
| | 516 | * <li>link_notes</li> |
|---|
| | 517 | * </ol> |
|---|
| | 518 | * |
|---|
| | 519 | * @since 1.0.1 |
|---|
| | 520 | * @deprecated Use get_bookmarks() |
|---|
| | 521 | * @see get_bookmarks() |
|---|
| | 522 | * |
|---|
| | 523 | * @param int $category The category to use. If no category supplied uses all |
|---|
| | 524 | * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', |
|---|
| | 525 | * 'description', or 'rating'. Or maybe owner. If you start the name with an |
|---|
| | 526 | * underscore the order will be reversed. You can also specify 'rand' as the |
|---|
| | 527 | * order which will return links in a random order. |
|---|
| | 528 | * @param int $limit Limit to X entries. If not specified, all entries are shown. |
|---|
| | 529 | * @return unknown |
|---|
| | 530 | */ |
|---|
| 311 | | global $wpdb; |
|---|
| 312 | | |
|---|
| 313 | | $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit"); |
|---|
| 314 | | |
|---|
| 315 | | $links_array = array(); |
|---|
| 316 | | foreach ($links as $link) { |
|---|
| 317 | | $links_array[] = $link; |
|---|
| 318 | | } |
|---|
| 319 | | |
|---|
| 320 | | return $links_array; |
|---|
| 321 | | } |
|---|
| 322 | | |
|---|
| 323 | | /** function get_linksbyname_withrating() |
|---|
| 324 | | ** Gets the links associated with category 'cat_name' and display rating stars/chars. |
|---|
| 325 | | ** Parameters: |
|---|
| 326 | | ** cat_name (default 'noname') - The category name to use. If no |
|---|
| 327 | | ** match is found uses all |
|---|
| 328 | | ** before (default '') - the html to output before the link |
|---|
| 329 | | ** after (default '<br />') - the html to output after the link |
|---|
| 330 | | ** between (default ' ') - the html to output between the link/image |
|---|
| 331 | | ** and it's description. Not used if no image or show_images == true |
|---|
| 332 | | ** show_images (default true) - whether to show images (if defined). |
|---|
| 333 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 334 | | ** 'url' or 'description'. Or maybe owner. If you start the |
|---|
| 335 | | ** name with an underscore the order will be reversed. |
|---|
| 336 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 337 | | ** random order. |
|---|
| 338 | | ** show_description (default true) - whether to show the description if |
|---|
| 339 | | ** show_images=false/not defined |
|---|
| 340 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 341 | | ** are shown. |
|---|
| 342 | | ** show_updated (default 0) - whether to show last updated timestamp |
|---|
| 343 | | */ |
|---|
| 344 | | function get_linksbyname_withrating($cat_name = "noname", $before = '', |
|---|
| 345 | | $after = '<br />', $between = " ", |
|---|
| 346 | | $show_images = true, $orderby = 'id', |
|---|
| 347 | | $show_description = true, $limit = -1, $show_updated = 0) { |
|---|
| 348 | | |
|---|
| 349 | | get_linksbyname($cat_name, $before, $after, $between, $show_images, |
|---|
| 350 | | $orderby, $show_description, true, $limit, $show_updated); |
|---|
| 351 | | } |
|---|
| 352 | | |
|---|
| 353 | | /** function get_links_withrating() |
|---|
| 354 | | ** Gets the links associated with category n and display rating stars/chars. |
|---|
| 355 | | ** Parameters: |
|---|
| 356 | | ** category (default -1) - The category to use. If no category supplied |
|---|
| 357 | | ** uses all |
|---|
| 358 | | ** before (default '') - the html to output before the link |
|---|
| 359 | | ** after (default '<br />') - the html to output after the link |
|---|
| 360 | | ** between (default ' ') - the html to output between the link/image |
|---|
| 361 | | ** and it's description. Not used if no image or show_images == true |
|---|
| 362 | | ** show_images (default true) - whether to show images (if defined). |
|---|
| 363 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 364 | | ** 'url' or 'description'. Or maybe owner. If you start the |
|---|
| 365 | | ** name with an underscore the order will be reversed. |
|---|
| 366 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 367 | | ** random order. |
|---|
| 368 | | ** show_description (default true) - whether to show the description if |
|---|
| 369 | | ** show_images=false/not defined . |
|---|
| 370 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 371 | | ** are shown. |
|---|
| 372 | | ** show_updated (default 0) - whether to show last updated timestamp |
|---|
| 373 | | */ |
|---|
| 374 | | function get_links_withrating($category = -1, $before = '', $after = '<br />', |
|---|
| 375 | | $between = " ", $show_images = true, |
|---|
| 376 | | $orderby = 'id', $show_description = true, |
|---|
| 377 | | $limit = -1, $show_updated = 0) { |
|---|
| 378 | | |
|---|
| 379 | | get_links($category, $before, $after, $between, $show_images, $orderby, |
|---|
| 380 | | $show_description, true, $limit, $show_updated); |
|---|
| 381 | | } |
|---|
| 382 | | |
|---|
| 383 | | /** function get_get_autotoggle() |
|---|
| 384 | | ** Gets the auto_toggle setting of category n. |
|---|
| 385 | | ** Parameters: id (default 0) - The category to get. If no category supplied |
|---|
| 386 | | ** uses 0 |
|---|
| | 532 | $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit"); |
|---|
| | 533 | |
|---|
| | 534 | $links_array = array(); |
|---|
| | 535 | foreach ($links as $link) |
|---|
| | 536 | $links_array[] = $link; |
|---|
| | 537 | |
|---|
| | 538 | return $links_array; |
|---|
| | 539 | } |
|---|
| | 540 | |
|---|
| | 541 | /** |
|---|
| | 542 | * get_linksbyname_withrating() - Gets the links associated with category 'cat_name' and display rating stars/chars. |
|---|
| | 543 | * |
|---|
| | 544 | * @since 0.71 |
|---|
| | 545 | * @deprecated Use get_bookmarks() |
|---|
| | 546 | * @see get_bookmarks() |
|---|
| | 547 | * |
|---|
| | 548 | * @param string $cat_name The category name to use. If no match is found uses all |
|---|
| | 549 | * @param string $before The html to output before the link |
|---|
| | 550 | * @param string $after The html to output after the link |
|---|
| | 551 | * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true |
|---|
| | 552 | * @param bool $show_images Whether to show images (if defined). |
|---|
| | 553 | * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', |
|---|
| | 554 | * 'description', or 'rating'. Or maybe owner. If you start the name with an |
|---|
| | 555 | * underscore the order will be reversed. You can also specify 'rand' as the |
|---|
| | 556 | * order which will return links in a random order. |
|---|
| | 557 | * @param bool $show_description Whether to show the description if show_images=false/not defined |
|---|
| | 558 | * @param int $limit Limit to X entries. If not specified, all entries are shown. |
|---|
| | 559 | * @param int $show_updated Whether to show last updated timestamp |
|---|
| | 560 | */ |
|---|
| | 561 | function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ", |
|---|
| | 562 | $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { |
|---|
| | 563 | |
|---|
| | 564 | get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); |
|---|
| | 565 | } |
|---|
| | 566 | |
|---|
| | 567 | /** |
|---|
| | 568 | * get_links_withrating() - Gets the links associated with category n and display rating stars/chars. |
|---|
| | 569 | * |
|---|
| | 570 | * @since 0.71 |
|---|
| | 571 | * @deprecated Use get_bookmarks() |
|---|
| | 572 | * @see get_bookmarks() |
|---|
| | 573 | * |
|---|
| | 574 | * @param int $category The category to use. If no category supplied uses all |
|---|
| | 575 | * @param string $before The html to output before the link |
|---|
| | 576 | * @param string $after The html to output after the link |
|---|
| | 577 | * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true |
|---|
| | 578 | * @param bool $show_images Whether to show images (if defined). |
|---|
| | 579 | * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', |
|---|
| | 580 | * 'description', or 'rating'. Or maybe owner. If you start the name with an |
|---|
| | 581 | * underscore the order will be reversed. You can also specify 'rand' as the |
|---|
| | 582 | * order which will return links in a random order. |
|---|
| | 583 | * @param bool $show_description Whether to show the description if show_images=false/not defined. |
|---|
| | 584 | * @param string $limit Limit to X entries. If not specified, all entries are shown. |
|---|
| | 585 | * @param int $show_updated Whether to show last updated timestamp |
|---|
| | 586 | */ |
|---|
| | 587 | function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true, |
|---|
| | 588 | $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) { |
|---|
| | 589 | |
|---|
| | 590 | get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated); |
|---|
| | 591 | } |
|---|
| | 592 | |
|---|
| | 593 | /** |
|---|
| | 594 | * get_autotoggle() - Gets the auto_toggle setting |
|---|
| | 595 | * |
|---|
| | 596 | * @since 0.71 |
|---|
| | 597 | * @deprecated No alternative function available |
|---|
| | 598 | * |
|---|
| | 599 | * @param int $id The category to get. If no category supplied uses 0 |
|---|
| | 600 | * @return int Only returns 0. |
|---|
| 392 | | // Use wp_list_cats(). |
|---|
| 393 | | function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) { |
|---|
| | 606 | /** |
|---|
| | 607 | * @since 0.71 |
|---|
| | 608 | * @deprecated Use wp_list_categories() |
|---|
| | 609 | * @see wp_list_categories() |
|---|
| | 610 | * |
|---|
| | 611 | * @param int $optionall |
|---|
| | 612 | * @param string $all |
|---|
| | 613 | * @param string $sort_column |
|---|
| | 614 | * @param string $sort_order |
|---|
| | 615 | * @param string $file |
|---|
| | 616 | * @param bool $list |
|---|
| | 617 | * @param int $optiondates |
|---|
| | 618 | * @param int $optioncount |
|---|
| | 619 | * @param int $hide_empty |
|---|
| | 620 | * @param int $use_desc_for_title |
|---|
| | 621 | * @param bool $children |
|---|
| | 622 | * @param int $child_of |
|---|
| | 623 | * @param int $categories |
|---|
| | 624 | * @param int $recurse |
|---|
| | 625 | * @param string $feed |
|---|
| | 626 | * @param string $feed_image |
|---|
| | 627 | * @param string $exclude |
|---|
| | 628 | * @param bool $hierarchical |
|---|
| | 629 | * @return unknown |
|---|
| | 630 | */ |
|---|
| | 631 | function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, |
|---|
| | 632 | $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0, |
|---|
| | 633 | $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) { |
|---|
| 520 | | } // end wp_get_links |
|---|
| 521 | | |
|---|
| 522 | | /** function get_links() |
|---|
| 523 | | ** Gets the links associated with category n. |
|---|
| 524 | | ** Parameters: |
|---|
| 525 | | ** category (default -1) - The category to use. If no category supplied |
|---|
| 526 | | ** uses all |
|---|
| 527 | | ** before (default '') - the html to output before the link |
|---|
| 528 | | ** after (default '<br />') - the html to output after the link |
|---|
| 529 | | ** between (default ' ') - the html to output between the link/image |
|---|
| 530 | | ** and its description. Not used if no image or show_images == true |
|---|
| 531 | | ** show_images (default true) - whether to show images (if defined). |
|---|
| 532 | | ** orderby (default 'id') - the order to output the links. E.g. 'id', 'name', |
|---|
| 533 | | ** 'url', 'description', or 'rating'. Or maybe owner. If you start the |
|---|
| 534 | | ** name with an underscore the order will be reversed. |
|---|
| 535 | | ** You can also specify 'rand' as the order which will return links in a |
|---|
| 536 | | ** random order. |
|---|
| 537 | | ** show_description (default true) - whether to show the description if |
|---|
| 538 | | ** show_images=false/not defined . |
|---|
| 539 | | ** show_rating (default false) - show rating stars/chars |
|---|
| 540 | | ** limit (default -1) - Limit to X entries. If not specified, all entries |
|---|
| 541 | | ** are shown. |
|---|
| 542 | | ** show_updated (default 0) - whether to show last updated timestamp |
|---|
| 543 | | ** echo (default true) - whether to echo the results, or return them instead |
|---|
| 544 | | */ |
|---|
| 545 | | function get_links($category = -1, |
|---|
| 546 | | $before = '', |
|---|
| 547 | | $after = '<br />', |
|---|
| 548 | | $between = ' ', |
|---|
| 549 | | $show_images = true, |
|---|
| 550 | | $orderby = 'name', |
|---|
| 551 | | $show_description = true, |
|---|
| 552 | | $show_rating = false, |
|---|
| 553 | | $limit = -1, |
|---|
| 554 | | $show_updated = 1, |
|---|
| 555 | | $echo = true) { |
|---|
| 556 | | |
|---|
| 557 | | global $wpdb; |
|---|
| | 888 | } |
|---|
| | 889 | |
|---|
| | 890 | /** |
|---|
| | 891 | * get_links() - Gets the links associated with category by id. |
|---|
| | 892 | * |
|---|
| | 893 | * @since 0.71 |
|---|
| | 894 | * @deprecated Use get_bookmarks() |
|---|
| | 895 | * @see get_bookmarks() |
|---|
| | 896 | * |
|---|
| | 897 | * @param int $category The category to use. If no category supplied uses all |
|---|
| | 898 | * @param string $before the html to output before the link |
|---|
| | 899 | * @param string $after the html to output after the link |
|---|
| | 900 | * @param string $between the html to output between the link/image and its description. |
|---|
| | 901 | * Not used if no image or show_images == true |
|---|
| | 902 | * @param bool $show_images whether to show images (if defined). |
|---|
| | 903 | * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', |
|---|
| | 904 | * 'description', or 'rating'. Or maybe owner. If you start the name with an |
|---|
| | 905 | * underscore the order will be reversed. You can also specify 'rand' as the order |
|---|
| | 906 | * which will return links in a random order. |
|---|
| | 907 | * @param bool $show_description whether to show the description if show_images=false/not defined. |
|---|
| | 908 | * @param bool $show_rating show rating stars/chars |
|---|
| | 909 | * @param int $limit Limit to X entries. If not specified, all entries are shown. |
|---|
| | 910 | * @param int $show_updated whether to show last updated timestamp |
|---|
| | 911 | * @param bool $echo whether to echo the results, or return them instead |
|---|
| | 912 | * @return null|string |
|---|
| | 913 | */ |
|---|
| | 914 | function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name', |
|---|
| | 915 | $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) { |
|---|