=== K2 Style Switcher === Contributors: thecuriousfrog Donate link: http://thecuriousfrog.com/projects/ Tags: k2, style, style switcher, theme, theme switcher Requires at least: 2.8 Tested up to: 2.8.4 Stable tag: 1.1.0 This plugin allows site visitors to change the active style when the excellent K2 theme is selected. == Description == One of the best things about using WordPress is the ability to skin your site at will by choosing a new theme. There are theme switcher plugins available which allow your website visitors to skin your site with their choice of themes, selected from the stylesheets currently in your `/themes/` directory. I only have three themes in my `/themes/` directory: Classic, Default, and K2. When I skin my site, I do it with a style, an alternate stylesheet for K2. So all the nifty theme switcher programs don’t work for me. This plugin is the K2 equivalent of a theme switcher. It allows your visitors to re-skin your site from a list of K2 styles that you select. == Installation == **For this plugin to work correctly the latest version of K2 must be installed and selected as the current theme** 1. Unzip the plugin archive 1. Upload the entire `k2-style-switcher` directory to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress 1. Goto the plugin admin panel to customize the settings ('Appearance' > 'K2 Style Switcher') 1. To display the K2 Style Switcher either use the included widget or place the following code where you want it to appear: `` == Uninstallation == * If you wish to stop using the plugin but keep your configuration options then simply use the 'Deactivate' link on the WordPress 'Manage Plugins' screen * If you wish to completely uninstall the plugin then use the 'Deactivate' link followed by the 'Delete' link on the WordPress 'Manage Plugins' screen. This removes the plugin files and your configuration options == Frequently Asked Questions == = Do I Need To Make Any Changes to K2? = No, the K2 Style Switcher is completely self contained, no changes are required to the K2 core files = What Is The Difference Between A Base Style And A Selectable Style? = Base styles are activated on the K2 admin panel, these styles are applied to the site in addition to either the default selectable style or one that the site visitor has chosen. Base styles are intended to be used to add any snippets of CSS that should be loaded in all cases, thus saving the administrator from having to add these CSS snippets to each of the selectable styles. Selectable styles are activated on the K2 Style Switcher admin panel, these are the styles that the site visitors can choose from. The default selectable style chosen on the K2 Style Switcher admin panel is applied to the site before the site visitor chooses a different selectable style. Note that a K2 style cannot be both a base style and a selectable style at once. If it is chosen as a base style on the K2 admin panel then it will disappear from the K2 Style Switcher admin panel. = Why Can't I See the K2 Style Switcher Menu Under 'Appearance' In The Admin Area? = If K2 is not the active theme then the plugin does not instantiate itself and will not appear in the administration area or on the site. Make sure that K2 is the active theme. = Why Isn't XYZ Working? = The K2 Style Switcher relies on various options set by K2. For it to function correctly please make sure that the latest versions of K2 and WordPress are installed. If you are still having problems then you can ask questions, leave comments or find more information at the plugin's homepage: [K2 Style Switcher](http://thecuriousfrog.com/projects/k2-style-switcher/ "K2 Style Switcher") == Screenshots == 1. The K2 Style Switcher options panel (partial) == Changelog == = 23.08.09 - v1.1.0 - Minor Update = * Encapsulated plugin functionality in a class * Consolidated plugin options into an array stored in a single option * Cleaned up code to match [WordPress Coding Standards](http://codex.wordpress.org/WordPress_Coding_Standards/ "WordPress Coding Standards") * Re-wrote admin panel code to use the new options mechanism introduced in WordPress 2.7 * Made all plugin messages translatable * Added footer message to plugin admin panel stating the name of the plugin, the current version and the author's name * Re-wrote plugin activation hook to attempt to pull in existing options from current and previous versions of the plugin as well as removing redundant options * Added call to load the plugin l10n / i18n text domain * Removed plugin deactivation code to stop configuration options being removed when plugin is deactivated * Added uninstall script to ensure that configuration options are removed when plugin is deleted * Added plugin widget in a class based on the WP_Widget class introduced in WordPress 2.8 * Added option to hide specific elements of WordPress & K2 standard footers * Prevented styles that are always selected from being added to the list of switchable styles * Took out custom WPMU checks, detection of K2 styles directory and URL is now based on K2 options * Added a message to the K2 options page explaining how styles are layered * Added code to make sure that the plugin is not loaded if K2 is not active = 27.02.08 - v1.0.0 - Initial Version = * Initial version of plugin originally written by Kimya Hasira * Added WPMU compatibility == Usage == This plugin includes a widget that displays either a dropdown menu or an unordered list of the available styles. The title of the widget and the type of menu to use are set in the widget options. The other plugin options are set using the K2 Style Switcher administration panel, found in the Appearance menu. == Configuration == = Default Style = This option sets the style that visitors will see upon first landing on your page. Once they select a style, they will see that style instead. = Default Style Picker Format = This option sets the type of style picker that will be displayed when the `` function is called with no parameter set: * Unordered List - Displays a list of links * Dropdown Menu - Displays a dropdown menu If you opt to use the unordered list when displaying the style picker you can style the link to the currently selected style using the `.k2ss_selected` class. For example: `.k2ss_selected { border-left: 1px dashed #666; }` = Footer Template = This option sets the text that is displayed in your site footer. This is re-written each time the page is loaded, meaning that it always displays information relevant to the style that the visitor is currently seeing. For a list of the available macros click the option name ('Footer Template') on the administration panel. This will display the list of macros and the information they will be replaced with at runtime. = Display WordPress footer = This option controls the visibility of the standard WordPress footer ('Powered by WordPress and K2'). You may wish to hide this footer if you are placing the same information in the custom footer template. = Display feed links = This option controls the visibility of the feed links footer ('Entries Feed and Comments Feed'). You may wish to hide this footer if you are placing the same information in the custom footer template. = Display base styles footer = This option controls the visibility of the active styles K2 footer ('Styled with by '). You probably wish to hide this footer as any base styles that are active will probably be tweaks that do not need crediting. = Display page stats = This option controls the visibility of the WordPress page loading stats footer (' queries. seconds.'). You may wish to show this information, it will appear just above the output of the custom footer template. = Available Styles = This option displays all the styles currently available in your K2 styles directory. Select the styles you want visitors to be able to use. Note that styles are only shown here if they are not currently in use by K2. Any styles that are set as active on the K2 options screen will be used as base styles. This means they will be applied in addition to either the default K2 Style Switcher style or the style that the visitor has chosen. This allows any custom CSS snippets to be maintained in one place rather than being added to each style. == Release Notes == * No known issues are present in this version