• Resolved janaa

    (@janaa)


    Thank you for a wonderful plugin! It is by far the best available, extremely comprehensive, and it looks like you provide good support too. Well done, guys!

    A couple of feature requests:
    1. I would like to be able to change the hover message on the icons. For example, when I hover over the “+” icon, it says “[author name] On The Web”. I would to change this to “More about [author name]”

    2. Email link: instead of disclosing my email address, I would like to have the option for the email icon to link to my “Contact” webpage.

    http://wordpress.org/plugins/wp-biographia/

Viewing 1 replies (of 1 total)
  • Plugin Author vicchi

    (@vicchi)

    Thinking about this in some detail, I agree that point 1. would make an excellent feature request and I’ll look at building this into the next release of the plugin.

    For now though, you should be able to use the plugin’s filters, specifically the wp_biographia_link_item filter to do 99% of this …

    This filter is called once for each contact link that the Biography Box contains and is passed an array containing all the elements of that contact link. So for point 1, the passed array would look something like this …

    array (
      'type' => 'text',
      'format' => '<li><a href="%s" %s title="%s" class="%s">%s</a></li>',
      'url' => 'http://www.garygale.com/',
      'meta' => 'target="_self"',
      'title' => 'Gary On The Web',
      'body' => 'Web',
      'link-class' => 'wp-biographia-link-text',
    )

    You can rebuild the content of the link by using the format element as the input to a call to sprintf in a filter hook and trap the link type from the body element. So to change each occurence of ‘[author name] On The Web’ to ‘More about [author name]’, your filter hook would look something like this …

    add_filter('wp_biographia_link_item', 'filter_link_item', 10, 2);
    function filter_link_item($content, $params) {
    	if ($params['body'] === 'Web') {
    		$text = str_replace(__(' On The Web'), '', $params['title']);
    		$title = __('More about ') . $text;
    		$content = sprintf($params['format'], $params['url'], $params['meta'], $title, $params['link-class'], $params['body']);
    	}
    
    	return $content;
    }

    For point 2, you can repeat the process, this time trapping on $params['body'] containing the text Mail.

    Hope this helps …

    -Gary

Viewing 1 replies (of 1 total)
  • The topic ‘Feature request – hover message & email link’ is closed to new replies.