Miscellaneous

Changing Theme on the Fly

The plugin supports the ability to change the theme “on the fly”. It is possible to change the theme only for entire page. Change theme only for one STB block is impossible.

To change the STB theme, you must replace the stylesheet and options of the current STB theme by stylesheet and options from another STB theme. For example:

This example is demonstrating how to change the STB theme using the plugin’s filter and predefined value of custom field. Place this code as close to the beginning of the file, before the HTML tags and output functions.

Of course, you can use filter “stb_pro_load_stylesheet” for replacement STB theme at any suitable location of blog template, for example in the file functions.php.  However, in this case, you have to set the conditions for the filter execution, depending of the currently loading site page.

Localization

STB Pro plugin uses the Separate Localization Model. This means that the plugin loads a different translation files for the Admin Side and the Front Side. This reduces the load on the server, because the translation file for the front side is significantly smaller than the file for the Admin Side.

If you want to localize this plugin, you have to do the translation both for the Admin Side and for the Front Side.

The translation files for the Front Side are located in the root folder of STB Pro plugin. The translation files for the Admin Side are located in the subfolder “langs” of STB Pro plugin.

© 2014, minimus. All rights reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *