2.0); } /** * Implements hook_skinr_group_info(). * * Optional. Defines group(s) that will contain skins. Groups are form element * containers used to organize skins categorically using vertical_tabs. If you * don't define a group, your skins will appear in Skinr's default group, which * is labeled "General." * * Group name(s): * Each group name must be unique. It is recommended to prefix the name of each * group with the name of the theme or module name implementing it, followed by * the name of the group. Note that you cannot define 2 groups with the same * the same name, even if they are in different plugins. * * Group properties: * - title (required): Brief title of the tab. * - description (optional): Description of the tab group. * - weight (discouraged): Weight of the tab group; NULL by default. * * The "hook" prefix is substituted with the name of the module or theme that * implements it, followed by the plugin name, e.g. * THEMENAME_PLUGINNAME_skinr_group_info(), or * MODULENAME_PLUGINNAME_skinr_group_info(). */ function skinr_styles_skinr_group_info() { $groups['skinr_typography'] = array( 'title' => t('Typography'), 'description' => t('Choose one or more styles to apply to content of this element.'), ); return $groups; } /** * Implements hook_skinr_skin_info(). * * Required. Define the skin(s) for this Skinr plugin. Each skin definition * consists of properties that define its form element and settings that are * needed to make it work, such as the class(es) Skinr should apply, which files * it should load, whether or not it should be disabled by default and which * theme hook(s) it was designed to work with. * * Skin name(s): * Each skin name must be unique. It is recommended to prefix the name of each * skin with the name of the theme or module name implementing it, followed by * the name of the skin. Note that you cannot define 2 skins with the same * the same name, even if they are in different plugins. * * Skin settings: * - title (required): Title of the skin form element. * - description (optional): Description of the skin form element. * - group (optional): The group the skin is attached to; defaults to a Skinr * provided group labeled "General." * - type (optional): The type of form element. Allowed values: * - checkboxes (default): Useful when single or multiple options can be * chosen. * Does not need to be set manually, as Skinr will apply this by default. * - select: Useful when a single option can be chosen, but many exist. * - radios: Useful when a single option can be chosen and only a few options * exist. * - weight (discouraged): Sets the weight of the skin inside the group; NULL * by default. weight should not be set on each individual skin. Instead * - attached (optional): A array containing information about CSS and * JavaScript files the skin requires. Each entry is an array keyed by type: * - css (optional): Maps to the functionality of drupal_add_css() with one * exception: paths are automatically assumed relative to the plugin * directory, unless external. Examples: * - Simple: * 'css' => array('css/skin-name.css') * - Advanced: * 'css' => array( * array('css/skin-name-ie.css', array( * 'media' => 'screen', * 'browsers' => array('IE' => 'lte IE 8'), * ), * ) * - js (optional): Maps to the functionality of drupal_add_js() with one * exception: paths are automatically assumed as relative to the plugin * directory, unless external. Examples: * - Simple: * 'js' => array('js/skin-name.js') * - Advanced: * 'js' => array( * array( * 'js/skin-name-advanced.js', * array( * 'scope' => 'footer', * 'group' => JS_THEME, * ), * ) * - options (required): An array containing one or more options (also arrays) * for the user to choose from when applying skins. Each option key should be * a machine name describing the option. An option should including the * following keys: * - label (required): The option label. * - class (required): An array containing one or more classes the skin * should apply. All classes should be entered as an array: For example: * 'class' => array('class-b', 'class-b') * - attached (optional): Same syntax as above, but applies to a specific * option only. * - theme hooks (optional): An array containing certain allowed hooks, which * allow you to limit where the skin can be used. Allowed options include: * block, block__MODULE, comment, comment__NODETYPE, comment_wrapper, * comment__wrapper_NODETYPE, node, node__NODETYPE, region, * region__REGIONNAME, panels_display, panels_region, panels_pane, views_view, * views_view__STYLENAME, views_view__DISPLAY_NAME, views_view__VIEWNAME, and * views_view__VIEWNAME_DISPLAYNAME. * - default_status (optional): Skins are disabled by default to keep UI * clutter to a minimum. In some cases, like contrib themes, it makes sense to * enable skins which are required to make the theme work properly by default. * Setting this property to 1, will cause it to be enabled it by default for * all installed themes. * * The "hook" prefix is substituted with the name of the module or theme * implementing it, followed by the plugin name, e.g. * THEMENAME_PLUGINNAME_skinr_skin_info(), or * MODULENAME_PLUGINNAME_skinr_skin_info(). * */ function skinr_styles_skinr_skin_info() { $skins['skinr_font'] = array( 'title' => t('Font family'), 'type' => 'select', 'group' => 'skinr_styles_typography', 'theme hooks' => array('block', 'panels_pane', 'views_view'), 'attached' => array( 'css' => array('css/typography.css'), ), 'options' => array( 'font_1' => array( 'title' => 'Arial, Helvetica, Nimbus Sans L, Liberation Sans, FreeSans', 'class' => array('font-1'), ), 'font_2' => array( 'title' => 'Lucida Grande, Lucida Sans Unicode, DejaVu Sans, Tahoma', 'class' => array('font-2'), ), 'font_3' => array( 'title' => 'Geneva, Bitstream Vera Serif, Tahoma', 'class' => array('font-3'), ), 'font_4' => array( 'title' => 'Georgia, Bitstream Vera Serif', 'class' => array('font-4'), ), 'font_5' => array( 'title' => 'Tahoma, Geneva, DejaVu Sans Condensed', 'class' => array('font-5'), ), 'font_6' => array( 'title' => 'Bitstream Vera Sans, Verdana, Arial', 'class' => array('font-6'), ), 'font_7' => array( 'title' => 'Palatino Linotype, URW Palladio L, Book Antiqua, Palatino', 'class' => array('font-7'), ), 'font_8' => array( 'title' => 'Free Serif, Times New Roman, Times', 'class' => array('font-8'), ), ), // The options below are programatically added. 'status' => array( // Overrides #default_status on a per theme basis 'bartik' => 1, 'fusion' => 1, ), ); $skins['skinr_font_size'] = array( 'title' => t('Font size'), 'type' => 'select', 'group' => 'skinr_styles_typography', 'attached' => array( 'css' => array('css/typography.css'), ), 'options' => array( 'size_1' => array( 'title' => '0.846em (11px)', 'class' => array('size-1'), ), 'size_2' => array( 'title' => '0.923em (12px)', 'class' => array('size-2'), ), 'size_3' => array( 'title' => '1.077em (14px)', 'class' => array('size-3'), ), 'size_4' => array( 'title' => '1.231em (16px)', 'class' => array('size-4'), ), 'size_5' => array( 'title' => '1.385em (18px)', 'class' => array('size-5'), ), 'size_6' => array( 'title' => '1.538em (20px)', 'class' => array('size-6'), ), ), // The options below are programatically added. 'status' => array( // Overrides #default_status on a per theme basis 'bartik' => 1, 'fusion' => 1, ), ); $skins['skinr_font_style'] = array( 'title' => t('Font style'), 'type' => 'radios', 'group' => 'skinr_styles_typography', 'attached' => array( 'css' => array('css/typography.css'), ), 'options' => array( 'normal' => array( 'title' => t('Normal'), 'class' => array('fs-normal'), ), 'italic' => array( 'title' => t('Italic'), 'class' => array('fs-italic'), ), ), // The options below are programatically added. 'status' => array( // Overrides #default_status on a per theme basis 'bartik' => 1, 'fusion' => 1, ), ); $skins['skinr_font_other'] = array( 'title' => t('Font weight'), 'group' => 'skinr_styles_typography', 'attached' => array( 'css' => array('css/typography.css'), ), 'options' => array( 'bold' => array( 'title' => t('Bold'), 'class' => array('fs-bold'), ), 'small_caps' => array( 'title' => t('Normal'), 'class' => array('fv-smallcaps'), ), ), // The options below are programatically added. 'status' => array( // Overrides #default_status on a per theme basis 'bartik' => 1, 'fusion' => 1, ), ); $skins['skinr_font_face'] = array( 'title' => t('Heading font family'), 'description' => t('Applies to headings level 1-3.'), 'group' => 'skinr_styles_typography', 'options' => array( 'droid_sans' => array( 'title' => t('Droid Sans'), 'class' => array('ff', 'droid-sans'), 'attached' => array( 'css' => array('fonts/droid-sans/css/regular.css'), ), ), 'droid_sans_bold' => array( 'title' => t('Droid Sans (bold)'), 'class' => array('ff', 'droid-sans-b'), 'attached' => array( 'css' => array('fonts/droid-sans/css/bold.css'), ), ), 'fontin_sans' => array( 'title' => t('Fontin Sans'), 'class' => array('ff', 'fontin-sans'), 'attached' => array( 'css' => array('fonts/fontin-sans/css/regular.css'), ), ), 'fontin_sans_bold' => array( 'title' => t('Fontin Sans (bold)'), 'class' => array('ff', 'fontin-sans-b'), 'attached' => array( 'css' => array('fonts/fontin-sans/css/bold.css'), ), ), 'museo_300' => array( 'title' => t('Museo (300)'), 'class' => array('ff', 'museo-300'), 'attached' => array( 'css' => array('fonts/museo/css/300.css'), ), ), 'museo_500' => array( 'title' => t('Museo (500)'), 'class' => array('ff', 'museo-500'), 'attached' => array( 'css' => array('fonts/museo/css/500.css'), ), ), 'museo_700' => array( 'title' => t('Museo (700)'), 'class' => array('ff', 'museo-700'), 'attached' => array( 'css' => array('fonts/museo/css/700.css'), ), ), ), // The options below are programatically added. 'status' => array( // Overrides #default_status on a per theme basis 'bartik' => 1, 'fusion' => 1, ), ); return $skins; }