WordPress.org

Plugin Directory

Changeset 784049


Ignore:
Timestamp:
10/07/13 15:16:32 (4 years ago)
Author:
elmoo32
Message:

Added shortcode, fixed css, auto add item names to links.

Location:
wowhead-tooltips/trunk
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • wowhead-tooltips/trunk/readme.txt

    r627339 r784049  
    44Tags: wowhead, tooltips, world of warcraft, wow 
    55Requires at least: 3.3 
    6 Tested up to: 3.4 
     6Tested up to: 3.6.1 
    77Stable tag: trunk 
    88License: GPLv2 or later 
     
    2727All data for the tooltips is loaded from http://*.wowhead.com (WoWHead) and the main JS script is loaded from http://static.wowhead.com/widgets/power.js 
    2828 
    29 = Edit CSS = 
    30 I will add that function in a later release, and if you are an experienced php/css programmer, you can edit the plugin .php file, the CSS is inside the "echo" 
     29= How to use? = 
     30Use the shortcode [wowhead id="[ITEMID]"] to automatically add an item. 
    3131 
    3232= How to use? = 
     33Since v2.0.0 
     34Use the shortcode [wowhead id="[ITEMID]"] to automatically add an item. 
     35Before v2.0.0 
    3336Create a link to any item etc. on WoWHead ex. <a href="http://www.wowhead.com/item=89112">[Mote of Harmony]</a> and it will automatically transform into a tooltip. 
    3437 
    3538== Screenshots == 
    3639 
    37 http://www.dreambreakz.tk/moteprofile.png 
    3840 
    3941== Changelog == 
    4042 
    41 * Initial plugin release 
     43* 2.0.0 Added shortcode, fixed styles, url names are fixed automatically. 
     44* 1.0.0 Initial plugin release 
  • wowhead-tooltips/trunk/wowhead-tooltips.php

    r627322 r784049  
    2424Author: Alexander Troshin 
    2525Author URI: http://www.dreambreakz.tk 
    26 Version: 1.0.0 
     26Version: 2.0.0 
    2727*/ 
    2828 
    2929/*  */ 
    3030 
    31  
    32 function dreambreakz_wowheadtooltips_header_code_function() { 
     31function novium_wowheadtooltips_header_code_function() { 
    3332     
    3433    echo '<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script> 
    35     <script>var wowhead_tooltips = { "iconizelinks": true }</script> 
    36     <style> 
    37     div.wowhead-tooltip {border: #ffcc00 1px solid;} 
    38     div.wowhead-tooltip table td, div.wowhead-tooltip table th {background: url('.plugins_url( 'stone.jpg' , __FILE__ ).');} 
    39     </style>'; 
     34    <script>var wowhead_tooltips = { "iconizelinks": true, "renamelinks": true }</script> 
     35    '; 
    4036     
    4137} 
    42 add_action('wp_head','dreambreakz_wowheadtooltips_header_code_function'); 
     38 
     39function novium_wowheadtooltips_shortcode( $atts, $content = null ) { 
     40    return '<a href="http://www.wowhead.com/item=' . $atts['id'] . '">item</a>'; 
     41} 
     42 
     43add_shortcode( 'wowhead', 'novium_wowheadtooltips_shortcode' ); 
     44add_action('wp_head','novium_wowheadtooltips_header_code_function'); 
    4345?> 
Note: See TracChangeset for help on using the changeset viewer.