开发者 | blueajcooper |
---|---|
更新时间 | 2014年11月18日 23:08 |
PHP版本: | 3.5.0 及以上 |
WordPress版本: | 4.0 |
版权: | GPLv2 |
/wp-content/plugins/
directory/wp-content/plugins/wow-armory-character/cache
directory[armory-character]
shortcode.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');The plugin will cache the characters it retrieves from the community API for 12 hours. This ensures that your website will make no more then 2 requests per character in any 24 hour period. In order to force your character display to update you are able to clear the cache.
There are two ways you can do this. You can use a pure CSS based approach or alter the html output using either of the two display filters that have been made available. To use the filters please create the necessary function (perhaps in your template.php file) and alter the html as you see fit. You can either alter the html after it has been created or you can override the template that produces the output. The CSS can be overridden by using the global setting 'Add plugin css to the page'. Unticking this box will allow you to provide your own CSS as part of your theme. NOTE This option is now deprecated. It will be replaced in a future release by the filter documented in the installation tab. For simple edits I suggest you add the necessary tweaks to your themes CSS and keep the basic styling the plugin provides.