首页 WordPress函数大全 get_linkobjectsbyname()

get_linkobjectsbyname()

2020-05-01 / 5813阅 / 悠然

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

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

get_linkobjectsbyname( string $cat_name = "noname", string $orderby = 'name', int $limit = -1 )

Gets an array of link objects associated with category $cat_name.

描述

$links = get_linkobjectsbyname( ‘fred’ ); foreach ( $links as $link ) { echo ‘

  • ‘ . $link->link_name . ‘
  • ‘; }

    See also See also

    • get_bookmarks()

    Top ↑

    参数

    $cat_name

    (string)
    (Optional)
    The category name to use. If no match is found uses all.

    Default value: "noname"

    $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)
    (Optional)
    Limit to X entries. If not specified, all entries are shown.

    Default value: -1

    返回

    (array)

    大家谈论
      我的见解