WordPress.org

Ready to get started?Download WordPress

Forums

WoWHead Tooltips
Suggestion for shortcode (3 posts)

  1. Jon Breitenbucher
    Member
    Posted 1 year ago #

    If you add the following to your plugin then people will be able to use the shortcode [wowhead]itemnumber[/wowhead] in their posts. This may or may not be easier than adding the full link.

    function wowhead_shortcode( $atts, $content = null ) {
       return '<a href="http://www.wowhead.com/item=' . $content . '"></a>';
    }
    add_shortcode( 'wowhead', 'wowhead_shortcode' );

    You might also want to change the var to

    var wowhead_tooltips = { "colorlinks": true, "renamelinks": true }

    so that people don't have to add the name of the item and so that it is colored according to quality.

    http://wordpress.org/extend/plugins/wowhead-tooltips/

  2. Novium
    Member
    Plugin Author

    Posted 1 year ago #

    I can look this over :)
    Thanks for the suggestion!

  3. Novium
    Member
    Plugin Author

    Posted 9 months ago #

    Fixed!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.