內容簡介
若您使用 WordPress 博客內容管理系統維護自己的網站或網誌,blogroll-links 是一個開源 WordPress 外掛,可利用 WordPress 內建的 Blogroll 功能,使用 XFN 顯示連結到朋友們的主頁和社交網站上的自己的頁面的連結。
這個外掛的特點:
在博客文章和 WordPress 頁面中可以按類別顯示連結。
它使用 WordPress 的標準內建 Blogroll 連結資料庫,不需維護另一個連結列表。
可以使用特定類別的連結顯示,輸入按類別的別名,即可定義在 WordPress 中該類別的設置。
遵從 WordPress 中所定義的每個連結的顯示/隱藏設置。
在 WordPress 中指定每個連結的相同視窗或新視窗顯示。
欲了解更多關於此外掛的信息,請閱讀我關於它的博客文章,標題為:“Social Graphs API: WordPress Plugin: Blogroll Links”
範例
在下列由 WordPress 提供動力的文章和頁面中查看此外掛:
www.rajiv.com/friends/
生成的兩個列表,第一個是到各種社交網絡上自己頁面的連結,第二個是到我某些朋友頁面的連結,都是此外掛生成的。是的,這些社交網絡的logo圖片也是通過 WordPress 標準 Blogroll 連結由外掛取自。代碼:
<h3>My Pages on Social Networking Sites</h3>
語法:
[blogroll-links categoryslug="rajiv-web" sortby="link_name" sortorder="desc"]
舊的語法以支援遺產:
<h3>Web Sites of Some People I Know</h3>
語法:
[blogroll-links categoryslug="people" sortby="link_name" sortorder="desc"]
www.rajiv.com/charity/
此外掛生成的簡要描述的慈善機構列表。代碼:
語法:
[blogroll-links categoryslug="charity"]
www.rajiv.com/blog/2004/08/02/search-engines/
這個搜索引擎列表是在 WordPress 的 Blogroll 連結中維護的。代碼:
語法:
[blogroll-links categoryslug="search-engines"]
www.rajiv.com/
在“這裡有什麼特色?”部分顯示的特色連結顯示我將其分類為 WordPress 的 Blogroll 連結的鏈接。代碼:
<a title="featured" name="featured"></a>
<h2>What's featured here?</h2>
語法:
[blogroll-links categoryslug="featured" sortby="link_name" sortorder="desc"]
感謝 Dave Grega、Adam E. Falk(xenograg)對此代碼的貢獻。
外掛標籤
開發者團隊
原文外掛簡介
Blogroll Links is a WordPress plugin that displays your site’s link bookmarks (formerly called “blogroll”) within posts and pages using a simple shortcode.
For people who maintain their website or blog using the WordPress content management system, Blogroll Links uses WordPress’ built-in Links feature and presents links to friends’ pages, resources, and social networking profiles.
Features
Display links by category using the category slug
Customizable sorting (by name, URL, rating, or ID)
Honors link visibility settings (show/hidden)
Respects target window settings for each link
Displays link descriptions and images if available
Works with WordPress’ built-in Links Manager
Supports XFN (XHTML Friends Network) relationship tags
Full PHP 8+ compatibility
Secure: Protected against SQL injection, XSS, and CSRF attacks
Usage
Add this shortcode to any post or page:
[blogroll-links categoryslug="my-links"]
Full Shortcode Options
[blogroll-links categoryslug="my-links" sortby="link_name" sortorder="asc"]
Parameters
categoryslug – The slug of the link category to display (required)
sortby – Sort field: link_name, link_url, link_rating, link_id (default: link_name)
sortorder – Sort direction: asc or desc (default: asc)
Examples
Display friends’ websites sorted by name:
[blogroll-links categoryslug=”friends” sortby=”link_name” sortorder=”asc”]
Display resources sorted by rating (highest first):
[blogroll-links categoryslug=”resources” sortby=”link_rating” sortorder=”desc”]
Display social media profiles:
[blogroll-links categoryslug=”social-profiles”]
Live Examples
See this plugin in action:
www.rajiv.com/friends/ – Social networking links with XFN tags
www.rajiv.com/charity/ – Charitable organizations list
Credits
Thanks to Dave Grega and Adam E. Falk (xenograg) for their contributions to this code.
Version 3.0 was modernized using Synthesis Coding with Claude Code – a human-AI collaborative development approach.
