- Upload ‘wow-armory-character’ to the
/wp-content/plugins/ directory - Ensure your webserver has write permissions to the
/wp-content/plugins/wow-armory-character/cache directory - Activate the plugin through the ‘Plugins’ menu in WordPress
- Configure a widget and add it to your site or use the
[armory-character] shortcode.
Shortcode UseThe shortcode can be added to any page or post and can be configured in an identical fashion to the widget. At a minimum you will need to specify the realm and character name for it to work – though this will assume that you wish to show all the details of character from the EU region in English. [armory-character realm="Terokkar" name="Grokknar"]
The configuration parameters available to use are: - region – EU, US, KO and TW currently supported
- show_portrait – 1 or 0
- show_title – 1 or 0
- show_talents – 1 or 0
- show_items – 1 or 0
- show_profs – This is a bitwise field. To get the setting you want add together the numbers below.
- 1 – Show profession badges
- 2 – Show secondary professions
- show_achievs – This is a bitwise field. To get the setting you want add together the numbers below.
- 1 – Show achievement bar
- 2 – Show achievement list
- 4 – Show descriptions on the achievement list.
- show_feed – This is a bitwise field. To get the setting you want add together the numbers below.
- 1 – Show items (loot).
- 2 – Show acheivements gained.
- 4 – Show acheivement criteria.
- 8 – Show icons next to each item.
- locale – en_GB, en_US, de_DE, es_ES, es_MX, fr_FR, it_IT, ru_RU, ko_KR, zh_TW or zh_CN
Note: Certain locale choices are only available when selecting some regions. Available FiltersFor more capable/adventurous developers there are a number of hooks that allow you to change the way the plugin functions without altering its code. This means you get to upgrade in the future without worrying about breaking any changes you may have made. wow-armory-character-template Allows you to specify an alternate template file to use to display your profile. Defaults to view-wow-armory-character.php function my_function_name($file_path) { // e.g. return realpath(__FILE__) . '/view-wow-armory-character.php' return "THE_PATH_TO_YOUR_TEMPLATE_FILE";
}
add_filter('wow-armory-character-template','my_function_name');
wow-armory-character-display Your profile once the template has been processed. It may be quicker to alter the display at runtime rather than duplicate the template when making only minor changes. As well as the output that will be displayed the Character data as retireved from the Community API is also passed. This should allow you to make any changes you need. function my_function_name($output, $character_data) { // Do something to the $output, perhaps using the $character_data return $output;
}
add_filter('wow-armory-character-display','my_function_name');
wow-armory-character-css Allows you to specify an alternate stylesheet. This is the replacement for the tickbox provided in the administration screen. You should now consider that option as deprecated and it will be removed in a future release. The rationale behind this is that if you’re overriding the css completely you will have access to your theme to be able to add this hook. function my_function_name($file_path) { // e.g. return realpath(__FILE__) . '/wowcss.css' return "THE_PATH_TO_YOUR_CSS_FILE";
}
add_filter('wow-armory-character-css','my_function_name'); |