首页 WordPress函数大全 get_linkobjects()

get_linkobjects()

2020-05-01 / 2159阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

Warning: This function has been deprecated. Use get_bookmarks() instead.

get_linkobjects( int $category, string $orderby = 'name', int $limit )

Gets an array of link objects associated with category n.

描述

Usage:

$links = get_linkobjects(1);
if ($links) {
    foreach ($links as $link) {
        echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
    }
} 

Fields are:

  • link_id
  • link_url
  • link_name
  • link_image
  • link_target
  • link_category
  • link_description
  • link_visible
  • link_owner
  • link_rating
  • link_updated
  • link_rel
  • link_notes

See also See also

  • get_bookmarks()

Top ↑

参数

$category

(int)
(Required)
The category to use. If no category supplied uses all

$orderby

(string)
(Optional)
the order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'. Or maybe owner. 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 random order.

Default value: 'name'

$limit

(int)
(Required)
Limit to X entries. If not specified, all entries are shown.

返回

(array)

大家谈论
    我的见解