http://wordpress.org/extend/plugins/simple-links/
The built in WordPress Links Manager has become deprecated due to many shortcomings. This plugin attempts to recreate the same concept while removing those shortcomings.
Some of the features this plugin offers:
- Drag and Drop link ordering
- Featured Image Style Image Attaching
- Shortcode capabilities with a shortcode generating form
- Additional useable Fields
- Many Widget Options
- Replacement of WordPress’ Links Widgets to hinder deprecation
- Options to remove the built in Links Manager from the dashboard
- Flexible Permissions
The outputs, admin screens, and permissions are extendable for developers familiar with using filters.
Most of the frequently asked questions can be answered by going to the “help” section in the top right corner of wordpress’ screens once the plugin is installed. It adds information to each applicable screen like, simple link settings, pages, widgets, posts, etc.
Shortcodes
You Can add a Simple Links List anywhere on the site by using the shortcode [simple-links]
Supported Options:
category = “Comma separated list of Link Category Names” – defaults to all
orderby = “Name or Random” – defaults to link order
order = “DESC or ASC” – defaults to ASC
count = “Number of links to show”
show_image = “true or false” – to show the link’s image or not
image_size = “Any size built into WordPress or your theme” – default to thumbnail
fields = “Comma separated list of the Link’s Additional Fields to show”
description = “true or false” – to show the description – defaults to false
separator = “And characters to display between fields and description” – defaults to “-”
id = “An optional id for the outputed list”
e.g. [simple-links show_image="true" image_size="medium" count="12"]
Look for the puzzle button on the post and page content editors for a form that generates the shortcode for you
Widgets
You May Add as Many Simple Links Widgets as You Would Like to Your Widget Areas
Widget Options:
Categories = “Select with link categories to pull from”
Order Links By = “The Order in Which the Links will Display” – defaults to link order
Order = “The Order in which the links will Display”
Show Description = “Display the Link’s Description
Number of LInks = “Number of links to show”
Show Image = “Check the box to display the Link’s Image
Image Size = “The Size of Image to Show if the previous box is checked
Include Additional Fields = “Display values from the Link’s Additional Fields”
Field Separator = “And characters to display between fields and description”
Developer Docs
Internationalization
This plugin has support for internationalization translations. However it does not come built in with the different languages. If you wish to help out by translating this plugin, you may find the .pot file in the languages folder of the plugin. Please send me your .mo translation files and I will add them to the plugin.
For now if you are familiar with using the ‘load_plugin_textdomain()‘, hook you may use it with the domain ‘simple-links‘ to use your translations. Uploading a complete .mo file to the languages folder of the plugin will work the same way, however it will be deleted when you update the plugin unless you already sent it to me and I have added it.
This plugin is highly extendable using WordPress’ filter api. Although the names are pretty self explanatory, I will briefly describe them.
Supported Filters
add_filter('simple-link-ordering-cap','change_permission'); function change_permission( $cap ){ return 'edit-posts'; } |
simple-link-settings-cap
Used to change the capability required to view the settings page. There is an option to change this in the settings to show the settings page to editors, but for more refined control use this filter.
Accepts 1 argument ( name of capability needed to see the page )
add_filter('simple-link-settings-cap','change_permission'); function change_permission( $cap ){ return 'edit-posts'; } |
add_filter('simple_links_shortcode_atts','change_shortcode_atts'); function change_shortcode_atts( array $atts ){ $atts['id'] = 'new_id'; return $atts; } |
- The output generated by shortcode
- The complete object of all the retrieved links and all data connected with the links.
- The array of attributes sent with the shortcode or filtered with an above filter
add_filter('simple_links_shortcode_output','change_shortcode_output', 0 , 3); function change_shortcode_output( $output, $links_object, $atts ){ return $output; } |
add_filter('simple_links_meta_boxes','change_meta_boxes'); function change_meta_boxes( array $meta_boxes ){ $meta_boxes[] = 'Custom Meta Box'; return $meta_boxes; } |
add_filter('simple_links_meta_boxes','change_meta_boxes_desc'); function change_meta_boxes_desc( array $meta_boxes_desc ){ $meta_boxes_desc['Custom Meta Box'] = 'I'm a description that will show up in the new Custom Meta Box'; return $meta_boxes_desc; } |
add_filter('simple_links_widget_args','change_widget_args'); function change_widget_args( array $args ){ $args['before_widget'] = '"custom-widget-wrap"'; return $args; } |
add_filter('simple_links_widget_settings','change_widget_settings'); function change_widget_settings( array $settings ){ $settings['title'] = 'A New Title'; return $settings; } |
- The output generated by widget
- The complete object of all the retrieved links and all data connected with the links.
- The array of widget arguments either standard or filtered using the filter above.
- The array of settings sent from the user form or filtered with an above filter
add_filter('simple_links_widget_output','change_widget_output', 0 , 4); function change_widget_output( $output, $links_object, $instance, $args ){ return $output; } |
Since Version 1.7.0
- The complete object of all the retrieved links.
- The array of widget arguments either standard or filtered using the filter above.
- The array of settings sent from the user form or filtered with an above filter
add_filter('simple_links_widget_links_object','change_links_order', 0 , 4); function change_links_order( $links_object, $instance, $args ){ return $output; } |
- The complete object of all the retrieved links.
- The array of the shortcode attributes.
add_filter('simple_links_shortcode_links_object','change_links_order', 0 , 2); function change_links_order( $links_object, $atts ){ return $output; } |
Since Version 1.8.0
simple_links_widget_link_output
Since version 1.8.0
Used to alter the output of each widget link directly
- The original html output of the link.
- Array of the links meta data.
- The links post object
- Html of the links image
- Array of the widgets instance
- Array of the widgets args
add_filter( 'simple_links_widget_link_output', 'sl_change_link_output', 1, 4); function sl_change_link_output( $link_output, $meta, $link, $image ){ return $link_output; } |
simple_links_shortcode_link_output
Since version 1.8.0
Used to alter the output of each shortcode link directly
- The original html output of the link.
- Array of the links meta data.
- The links post object
- Html of the links image
- Array of the shortcode attributes
add_filter( 'simple_links_shortcode_link_outputt', 'sl_change_link_output', 1, 4); function sl_change_link_output( $link_output, $meta, $link, $image ){ return $link_output; } |