Skip to content

WordPress plugin providing a shortcode that outputs a list of your links, optionally with a Google +1 button for each.

License

Notifications You must be signed in to change notification settings

cheshire137/Links-List-with-Google-Plus-1-Buttons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Links List with Google +1 Buttons

This is a WordPress plugin that provides a WordPress shortcode that will list your WordPress links with a Google +1 button for each.

Usage

Show all links in the link category 'Techy':

<ul class="links-list">[plus-one-links category_name="Techy"]</ul>

Output several link categories:

<h2>First Category</h2>
<ul>[plus-one-links category="111" limit="3"]</ul>
<h2>Second Category</h2>
<ul>[plus-one-links category="61" limit="3"]</ul>
<h2>Third Category</h2>
<div>[plus-one-links category="57" before="" after="<br style='clear:both' />" limit="5"]</div>

The template is what's used to display each link. A custom template is passed between the [plus-one-links] and [/plus-one-links] tags. Defaults to <a href="{url}">{name}</a> - {desc}<br/>{plusone}. Recognized placeholder values: {url} (link URL), {name} (link name), {desc} (link description), and {plusone} (Google +1 button). Example of displaying links with a custom template:

<table>[plus-one-links limit="4" category_name="Personal" plusone_size="tall" plusone_annotation="bubble" before="<tr>" after="</tr>"]<td>{plusone}</td><td><a href="{url}" title="{desc}">{name}</a></td>[/plus-one-links]</table>

Options

All the same options as the WordPress function get_bookmarks() are provided.

  • before - Content to show up before each link. Defaults to <li class="link">.
  • after - Content to show up after each link. Defaults to </li>.
  • plusone - Whether to show a Google +1 button with each link. Valid values: yes, no. Defaults to yes.
  • plusone_size - The size of the Google +1 button. Valid values: small, standard, medium, and tall. Examples here. Default value: small.
  • plusone_annotation - The style of the Google +1 text. Valid values: inline, bubble, and none. Examples here. Default value: inline.
  • category - Comma separated list of bookmark category ID's.
  • category_name - Category name of a catgeory of bookmarks to retrieve. Overrides category parameter.
  • orderby - Value to sort bookmarks on. Defaults to name. Valid values: name, link_id, url, owner, rating, updated, visible, length, rand.
  • order - Sort order, ascending or descending for the orderby parameter. Valid values: ASC, DESC.
  • limit - Maximum number of bookmarks to display. Defaults to '-1' (all bookmarks).
  • hide_invisible - 1 causes only bookmarks with link_visible set to 'Y' to be retrieved. Valid values: 1, 0.
  • include - Comma separated list of numeric bookmark IDs to include in the output. For example, include="1,3,6" means to display bookmark IDs 1, 3, and 6. If the include string is used, the category, category_name, and exclude parameters are ignored. Defaults to (all Bookmarks).
  • exclude - Comma separated list of numeric bookmark IDs to exclude. For example, exclude="4,12" means that bookmark IDs 4 and 12 will NOT be displayed. Defaults to (exclude nothing).
  • search - Searches link url, link name or link description like the search string.

About

WordPress plugin providing a shortcode that outputs a list of your links, optionally with a Google +1 button for each.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages