Linux 软件免费装

Post Bookmarks

开发者 grosbouff
更新时间 2019年4月5日 05:46
捐献地址: 去捐款
PHP版本: 3.5 及以上
WordPress版本: 5.1.1
版权: GPLv2 or later

标签

links related links quick links custom links post links

下载

详情介绍:

Manage links attached to a post through a metabox, and setup how they are displayed in your posts... With a link favicon. Contributors Contributors are listed here Notes For feature request and bug reports, please use the forums. If you are a plugin developer, we would like to hear from you. Any contribution would be very welcome.

安装:

  1. Upload the plugin to your blog and Activate it.

屏幕截图:

  • Post Bookmarks metabox in the backend editor
  • Links displayed under a post
  • Settings page

常见问题:

How can I get only the links attached to a post ?

Use the function Post_Bookmarks::get_post_links($post_id,$args). If you want to display those links use the function Post_Bookmarks::get_link_list($post_id,$args). The two parameters are optionals. $args should be an array of parameters - the same you would set when using the native get_bookmarks() function. Example : <?php $args = array('category'=>12); Post_Bookmarks::get_link_list(null,$args); ?>

How can I get only the links NOT attached to a post ?

Use the the native function get_bookmarks() with the 'post_bkmarks_exclude' parameter. Example : <?php get_bookmarks( array('post_bkmarks_exclude'=>true) ); ?>

How can I style a link based on its domain, using CSS ?

Use the data-cp-link-domain attribute, for example : li.post-bkmarks[data-cp-link-domain='wikipedia.org'] .post-bkmarks-favicon { background-image: url('https://wikipedia.org/static/favicon/wikipedia.ico'); }

How can I change the way links are displayed ?

Use the filter post_bkmarks_single_link_html (located in the function Post_Bookmarks::get_link_html()), for example : `<?php function custom_output_single_link($output,$link){ return $output; } add_filter('post_bkmarks_single_link_html','custom_output_single_link',10,2); ?>`

更新日志:

2.1.7 2.1.6 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.9 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0 1.0