Support » Plugins » Trying to build a new plugin concerning wp_list_bookmarks

  • I’m trying to build a plugin that will enable me to use shortcode instead of php if I want to add a list of bookmarks in a post or page without resorting to templates.


    [Linklist ID=2 Desc=yes] will call for wp_list_bookmarks('category=2&show_description=1')

    I started off by peaking at the nasa_image plugin, but since this is my first attempt to build a plugin I’m stuck.
    How can I add a function to get the bookmarks, and add variables for ID and Description?
    Have patience. 😉

    if (!function_exists('Linklist')) {
    	function Linklist($atts){
    		extract(shortcode_atts(array('ID'=>'1','Hide'=>'yes', 'Desc'=>'yes'), $atts));
    		// Set the ID to user default, default 1 if 0 and Description to yes.
    		if(!is_numeric($ID)) $ID=1;
    		else return;
    add_shortcode('Linklist', 'Linklist');
  • The topic ‘Trying to build a new plugin concerning wp_list_bookmarks’ is closed to new replies.