Пример #1
0
 function wm_theme_options_array($options = array())
 {
     //Preparing output
     /**
      * Theme customizer options array
      */
     $options = array(100 . 'colors' => array('id' => 'colors', 'type' => 'section', 'theme-customizer-section' => _x('Colors', 'Customizer section title.', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 100 . 'colors' . 100 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Accent color', 'wm_domain') . '</h3>'), 100 . 'colors' . 110 => array('type' => 'color', 'id' => 'color' . '-accent', 'label' => __('Accent color', 'wm_domain'), 'description' => __('This color affects links, buttons and other elements of the website', 'wm_domain'), 'default' => '#0aac8e'), 100 . 'colors' . 120 => array('type' => 'color', 'id' => 'color' . '-accent-text', 'label' => __('Accent text color', 'wm_domain'), 'description' => __('Color of text over accent color background', 'wm_domain'), 'default' => '#ffffff'), 100 . 'colors' . 200 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Header', 'wm_domain') . '</h3>'), 100 . 'colors' . 210 => array('type' => 'color', 'id' => 'color' . '-header', 'label' => __('Background color', 'wm_domain'), 'default' => '#1a1c1e'), 100 . 'colors' . 220 => array('type' => 'color', 'id' => 'color' . '-header-text', 'label' => __('Text color', 'wm_domain'), 'description' => __('Note that for certain header elements the color will be faded out a bit', 'wm_domain'), 'default' => '#ffffff'), 100 . 'colors' . 300 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Content', 'wm_domain') . '</h3>'), 100 . 'colors' . 370 => array('type' => 'theme-customizer-html', 'content' => '<h4>' . __('Front page widgets', 'wm_domain') . '</h4>'), 100 . 'colors' . 373 => array('type' => 'color', 'id' => 'color' . '-front-widgets', 'label' => __('Background color', 'wm_domain'), 'default' => '#1a1c1e'), 100 . 'colors' . 376 => array('type' => 'color', 'id' => 'color' . '-front-widgets-text', 'label' => __('Text color', 'wm_domain'), 'default' => '#8a8c8e'), 100 . 'colors' . 400 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Footer', 'wm_domain') . '</h3>'), 100 . 'colors' . 410 => array('type' => 'color', 'id' => 'color' . '-footer', 'label' => __('Background color', 'wm_domain'), 'default' => '#1a1c1e'), 100 . 'colors' . 420 => array('type' => 'color', 'id' => 'color' . '-footer-text', 'label' => __('Text color', 'wm_domain'), 'default' => '#8a8c8e'), 200 . 'fonts' => array('id' => 'fonts', 'type' => 'section', 'theme-customizer-section' => _x('Fonts', 'Customizer section title.', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 200 . 'fonts' . 100 => array('type' => 'theme-customizer-html', 'content' => '<p class="description">' . __('Set a Google Font to be used for website logo, headings and general text.', 'wm_domain') . '<br />' . sprintf(__('Font matches recommendations from <a%s>Google Web Fonts Typographic Project</a>.', 'wm_domain'), ' href="http://femmebot.github.io/google-type/" target="_blank"') . '</p>'), 200 . 'fonts' . 110 => array('type' => 'select', 'id' => 'font' . '-family-logo', 'label' => __('Logo (site title) font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Ubuntu:400,300'), 200 . 'fonts' . 120 => array('type' => 'select', 'id' => 'font' . '-family-headings', 'label' => __('Headings font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Ubuntu:400,300'), 200 . 'fonts' . 130 => array('type' => 'select', 'id' => 'font' . '-family-body', 'label' => __('General text font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Ubuntu:400,300'), 200 . 'fonts' . 140 => array('type' => 'multiselect', 'id' => 'font' . '-subset', 'label' => __('Font subset', 'wm_domain'), 'options' => wm_helper_var('google-fonts-subset'), 'default' => 'latin'), 200 . 'fonts' . 150 => array('type' => 'text', 'id' => 'font' . '-size-body', 'label' => __('Basic font size', 'wm_domain'), 'description' => __('All other font sizes are calculated automatically from this basic font size', 'wm_domain'), 'default' => 16, 'validate' => 'absint', 'customizer_js' => array('css' => array('html' => array(array('font-size', 'px'))))), 300 . 'layout' => array('id' => 'layout', 'type' => 'section', 'theme-customizer-section' => _x('Layout', 'Customizer section title.', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 300 . 'layout' . 100 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Front page layout', 'wm_domain') . '</h3>'), 300 . 'layout' . 110 => array('type' => 'select', 'id' => 'layout' . '-blog-condensed', 'label' => __('Condensed blog posts', 'wm_domain'), 'description' => __('Select if and where to display this page section', 'wm_domain'), 'default' => 'top|10', 'options' => array('-' => __('Disable section', 'wm_domain'), 'top|10' => __('First section above page content', 'wm_domain'), 'top|20' => __('Second section above page content', 'wm_domain'), 'bottom|10' => __('First section below page content', 'wm_domain'), 'bottom|20' => __('Second section below page content', 'wm_domain'))), 300 . 'layout' . 120 => array('type' => 'select', 'id' => 'layout' . '-food-menu', 'label' => __('Food menu', 'wm_domain'), 'description' => __('Select if and where to display this page section', 'wm_domain'), 'default' => 'bottom|10', 'options' => array('-' => __('Disable section', 'wm_domain'), 'top|10' => __('First section above page content', 'wm_domain'), 'top|20' => __('Second section above page content', 'wm_domain'), 'bottom|10' => __('First section below page content', 'wm_domain'), 'bottom|20' => __('Second section below page content', 'wm_domain'))), 999 . 'credits' => array('id' => 'credits', 'type' => 'section', 'theme-customizer-section' => 'Credits'), 999 . 'credits' . 100 => array('id' => 'credits-text', 'type' => 'theme-customizer-html', 'content' => '<h3>' . __('Theme Credits', 'wm_domain') . '</h3><p class="description">' . sprintf(__('%s is free WordPress theme developed by WebMan. You can obtain other professional WordPress themes at <strong><a href="%s" target="_blank">WebManDesign.eu</a></strong>. Thank you for using this awesome theme!', 'wm_domain'), '<strong>' . wp_get_theme()->get('Name') . '</strong>', esc_url(wp_get_theme()->get('AuthorURI'))) . '</p><p><a href="' . esc_url(trailingslashit(wp_get_theme()->get('AuthorURI')) . WM_THEME_SHORTNAME . '-wordpress-theme/#donate') . '" class="donation-link" target="_blank">' . __('Donate', 'wm_domain') . '</a></p>'));
     //Output
     return apply_filters('wmhook_wm_theme_options_array_output', $options);
 }
 function wm_theme_options_array($options = array())
 {
     //Preparing output
     /**
      * Theme customizer options array
      */
     $prefix = '';
     $options = array(100 . 'colors' => array('id' => 'colors', 'type' => 'section', 'theme-customizer-section' => _x('Colors', 'Customizer section title.', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 100 . 'colors' . 100 => array('type' => 'color', 'id' => $prefix . 'color' . '-text', 'label' => __('Text color', 'wm_domain'), 'description' => __('Color of text over background color', 'wm_domain'), 'default' => '#ffffff'), 100 . 'colors' . 110 => array('type' => 'theme-customizer-html', 'content' => '<h3>' . __('Accent color', 'wm_domain') . '</h3>'), 100 . 'colors' . 120 => array('type' => 'color', 'id' => $prefix . 'color' . '-accent', 'label' => __('Accent color', 'wm_domain'), 'description' => __('This color affects links, buttons and other elements of the website', 'wm_domain'), 'default' => '#0aac8e'), 100 . 'colors' . 130 => array('type' => 'color', 'id' => $prefix . 'color' . '-accent-text', 'label' => __('Accent text color', 'wm_domain'), 'description' => __('Color of text over accent color background', 'wm_domain'), 'default' => '#ffffff'), 200 . 'fonts' => array('id' => 'fonts', 'type' => 'section', 'theme-customizer-section' => _x('Fonts', 'Customizer section title.', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 200 . 'fonts' . 100 => array('type' => 'theme-customizer-html', 'content' => '<p class="description">' . __('Set a Google Font to be used for website logo, headings and general text.', 'wm_domain') . '<br />' . sprintf(__('Font matches recommendations from <a%s>Google Web Fonts Typographic Project</a>.', 'wm_domain'), ' href="http://femmebot.github.io/google-type/" target="_blank"') . '</p>'), 200 . 'fonts' . 110 => array('type' => 'select', 'id' => $prefix . 'font' . '-family-logo', 'label' => __('Logo (site title) font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Fira Sans:400,300'), 200 . 'fonts' . 120 => array('type' => 'select', 'id' => $prefix . 'font' . '-family-headings', 'label' => __('Headings font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Fira Sans:400,300'), 200 . 'fonts' . 130 => array('type' => 'select', 'id' => $prefix . 'font' . '-family-body', 'label' => __('General text font', 'wm_domain'), 'options' => wm_helper_var('google-fonts'), 'default' => 'Fira Sans:400,300'), 200 . 'fonts' . 140 => array('type' => 'multiselect', 'id' => $prefix . 'font' . '-subset', 'label' => __('Font subset', 'wm_domain'), 'options' => wm_helper_var('google-fonts-subset'), 'default' => 'latin'), 200 . 'fonts' . 150 => array('type' => 'text', 'id' => $prefix . 'font' . '-size-body', 'label' => __('Basic font size', 'wm_domain'), 'description' => __('All other font sizes are calculated automatically from this basic font size', 'wm_domain'), 'default' => 16, 'validate' => 'absint', 'customizer_js' => array('css' => array('html' => array(array('font-size', 'px'))))), 300 . 'text' => array('id' => 'text', 'type' => 'section', 'theme-customizer-section' => __('Texts', 'wm_domain'), 'theme-customizer-panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 300 . 'text' . 110 => array('type' => 'theme-customizer-html', 'content' => '<p class="description">' . __('Front page banner area will display Header Images and custom text.', 'wm_domain') . '</p><p class="description">' . __('If you set a Static Front Page, the page title will be displayed as banner text. Or you can override the text by setting <code>banner_text</code> custom field for your front page. Page featured image will be used as banner image.', 'wm_domain') . '</p><p class="description">' . __('Or, if you are using Featured Content module of the Jetpack plugin, just set it up and posts slideshow will be displayed in the banner.', 'wm_domain') . '</p>'), 300 . 'text' . 120 => array('type' => 'textarea', 'id' => $prefix . 'banner-text', 'label' => __('Banner default text', 'wm_domain'), 'description' => __('Used only when displaying latest posts on homepage', 'wm_domain'), 'default' => __('Hello! Welcome to my awesome website!', 'wm_domain')), 999 . 'credits' => array('id' => 'credits', 'type' => 'section', 'theme-customizer-section' => 'Credits'), 999 . 'credits' . 100 => array('id' => 'credits-text', 'type' => 'theme-customizer-html', 'content' => '<h3>' . __('Theme Credits', 'wm_domain') . '</h3><p class="description">' . sprintf(__('%s is free WordPress theme developed by WebMan. You can obtain other professional WordPress themes at <strong><a href="%s" target="_blank">WebManDesign.eu</a></strong>. Thank you for using this awesome theme!', 'wm_domain'), '<strong>' . wp_get_theme()->get('Name') . '</strong>', esc_url(add_query_arg(array('utm_source' => WM_THEME_SHORTNAME . '-theme-credits'), esc_url(wp_get_theme()->get('AuthorURI'))))) . '</p><p><a href="' . esc_url(trailingslashit(wp_get_theme()->get('AuthorURI')) . WM_THEME_SHORTNAME . '-wordpress-theme/#donate') . '" class="donation-link" target="_blank">Donate</a></p>'));
     //Output
     return apply_filters('wmhook_wm_theme_options_array_output', $options);
 }
Пример #3
0
 function wm_theme_customizer($wp_customize)
 {
     /**
      * Custom customizer controls
      *
      * @link  https://github.com/bueltge/Wordpress-Theme-Customizer-Custom-Controls
      * @link  http://ottopress.com/2012/making-a-custom-control-for-the-theme-customizer/
      */
     locate_template(WM_LIBRARY_DIR . 'includes/controls/class-WM_Customizer_Hidden.php', true);
     locate_template(WM_LIBRARY_DIR . 'includes/controls/class-WM_Customizer_HTML.php', true);
     // locate_template( WM_LIBRARY_DIR . 'includes/controls/class-WP_Customize_Image_Control.php',       true );
     locate_template(WM_LIBRARY_DIR . 'includes/controls/class-WM_Customizer_Multiselect.php', true);
     locate_template(WM_LIBRARY_DIR . 'includes/controls/class-WM_Customizer_Radiocustom.php', true);
     locate_template(WM_LIBRARY_DIR . 'includes/controls/class-WM_Customizer_Range.php', true);
     //Helper variables
     $wm_skin_design = (array) apply_filters('wmhook_theme_options_skin_array', array());
     $allowed_option_types = apply_filters('wmhook_wm_theme_customizer_allowed_option_types', array('background', 'checkbox', 'color', 'email', 'hidden', 'html', 'image', 'multiselect', 'password', 'radio', 'radiocustom', 'range', 'select', 'text', 'textarea', 'url'));
     //To make sure our customizer sections start after WordPress default ones
     $priority = apply_filters('wmhook_wm_theme_customizer_priority', 900);
     //Default section name in case not set (should be overwritten anyway)
     $customizer_panel = '';
     $customizer_section = WM_THEME_SHORTNAME;
     //Generate customizer options
     if (is_array($wm_skin_design) && !empty($wm_skin_design)) {
         foreach ($wm_skin_design as $skin_option) {
             if (is_array($skin_option) && isset($skin_option['type']) && (in_array($skin_option['type'], $allowed_option_types) || isset($skin_option['create_section']))) {
                 //Helper variables
                 $priority++;
                 $option_id = $default = $description = '';
                 if (isset($skin_option['id'])) {
                     $option_id = WM_THEME_SETTINGS_PREFIX . $skin_option['id'];
                 }
                 if (isset($skin_option['default'])) {
                     $default = $skin_option['default'];
                 }
                 if (isset($skin_option['description'])) {
                     $description = $skin_option['description'];
                 }
                 $transport = isset($skin_option['customizer_js']) ? 'postMessage' : 'refresh';
                 /**
                  * Panels
                  *
                  * Panels are wrappers for customizer sections.
                  * Note that the panel will not display unless sections are assigned to it.
                  * Set the panel name in the section declaration with `in_panel`.
                  * Panel has to be defined for each section to prevent all sections within a single panel.
                  *
                  * @link  http://make.wordpress.org/core/2014/07/08/customizer-improvements-in-4-0/
                  */
                 if (isset($skin_option['in_panel'])) {
                     $panel_id = sanitize_title(trim($skin_option['in_panel']));
                     if ($customizer_panel !== $panel_id) {
                         $wp_customize->add_panel($panel_id, array('title' => $skin_option['in_panel'], 'description' => isset($skin_option['in_panel-description']) ? $skin_option['in_panel-description'] : '', 'priority' => $priority));
                         $customizer_panel = $panel_id;
                     }
                 }
                 /**
                  * Sections
                  */
                 if (isset($skin_option['create_section']) && trim($skin_option['create_section'])) {
                     if (empty($option_id)) {
                         $option_id = sanitize_title(trim($skin_option['create_section']));
                     }
                     $customizer_section = array('id' => $option_id, 'setup' => array('title' => $skin_option['create_section'], 'description' => isset($skin_option['create_section-description']) ? $skin_option['create_section-description'] : '', 'priority' => $priority));
                     if (!isset($skin_option['in_panel'])) {
                         $customizer_panel = '';
                     } else {
                         $customizer_section['setup']['panel'] = $customizer_panel;
                     }
                     $wp_customize->add_section($customizer_section['id'], $customizer_section['setup']);
                     $customizer_section = $customizer_section['id'];
                 }
                 /**
                  * Options
                  *
                  * With add_setting() use a 'type' => 'option' (available: 'option' and 'theme_mod').
                  * Read more at @link  http://wordpress.stackexchange.com/questions/155072/get-option-vs-get-theme-mod-why-is-one-slower
                  */
                 switch ($skin_option['type']) {
                     /**
                      * Background combo options
                      */
                     case 'background':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-color]', array('type' => 'option', 'default' => isset($default['color']) ? $default['color'] : null, 'transport' => $transport, 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
                         $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-color]', array('label' => __('Background color', 'mustang'), 'section' => $customizer_section, 'priority' => $priority)));
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url]', array('type' => 'option', 'default' => isset($default['url']) ? $default['url'] : null, 'transport' => $transport, 'sanitize_callback' => 'wm_sanitize_return_value', 'sanitize_js_callback' => 'wm_sanitize_return_value'));
                         $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url]', array('label' => __('Background image', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'context' => WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url]')));
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url-hidpi]', array('type' => 'option', 'default' => isset($default['url-hidpi']) ? $default['url-hidpi'] : null, 'transport' => $transport, 'sanitize_callback' => 'wm_sanitize_return_value', 'sanitize_js_callback' => 'wm_sanitize_return_value'));
                         $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url-hidpi]', array('label' => __('High DPI background image', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'context' => WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-url-hidpi]', 'active_callback' => 'wm_active_callback_background_image')));
                         if (function_exists('wm_helper_var')) {
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-position]', array('type' => 'option', 'default' => isset($default['position']) ? $default['position'] : '50% 0', 'transport' => $transport, 'sanitize_callback' => 'esc_attr', 'sanitize_js_callback' => 'esc_attr'));
                             $wp_customize->add_control(new WM_Customizer_Radiocustom($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-position]', array('label' => __('Background position', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'choices' => wm_helper_var('bg-css', 'position'), 'class' => 'matrix', 'active_callback' => 'wm_active_callback_background_image')));
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-repeat]', array('type' => 'option', 'default' => isset($default['repeat']) ? $default['repeat'] : 'no-repeat', 'transport' => $transport, 'sanitize_callback' => 'esc_attr', 'sanitize_js_callback' => 'esc_attr'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-repeat]', array('label' => __('Background repeat', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'type' => 'select', 'choices' => wm_helper_var('bg-css', 'repeat'), 'active_callback' => 'wm_active_callback_background_image'));
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-attachment]', array('type' => 'option', 'default' => isset($default['attachment']) ? $default['attachment'] : 'scroll', 'transport' => $transport, 'sanitize_callback' => 'esc_attr', 'sanitize_js_callback' => 'esc_attr'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-attachment]', array('label' => __('Background attachment', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'type' => 'select', 'choices' => wm_helper_var('bg-css', 'scroll'), 'active_callback' => 'wm_active_callback_background_image'));
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-size]', array('type' => 'option', 'default' => isset($default['size']) ? $default['size'] : '', 'transport' => $transport, 'sanitize_callback' => 'esc_attr', 'sanitize_js_callback' => 'esc_attr'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . '-bg-size]', array('label' => __('CSS3 background size', 'mustang'), 'section' => $customizer_section, 'priority' => ++$priority, 'type' => 'select', 'choices' => wm_helper_var('bg-css', 'size'), 'active_callback' => 'wm_active_callback_background_image'));
                         }
                         break;
                         /**
                          * Color
                          */
                     /**
                      * Color
                      */
                     case 'color':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
                         $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority)));
                         break;
                         /**
                          * Email
                          *
                          * @since  3.2, WordPress 4.0
                          */
                     /**
                      * Email
                      *
                      * @since  3.2, WordPress 4.0
                      */
                     case 'email':
                         if (wm_check_wp_version(4)) {
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => 'wm_sanitize_email', 'sanitize_js_callback' => 'wm_sanitize_email'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'email', 'label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority));
                         }
                         break;
                         /**
                          * Hidden
                          */
                     /**
                      * Hidden
                      */
                     case 'hidden':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr'));
                         $wp_customize->add_control(new WM_Customizer_Hidden($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => 'HIDDEN FIELD', 'section' => $customizer_section, 'priority' => $priority)));
                         break;
                         /**
                          * HTML
                          */
                     /**
                      * HTML
                      */
                     case 'html':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[custom-title-' . $priority . ']', array('sanitize_callback' => 'wm_sanitize_return_value', 'sanitize_js_callback' => 'wm_sanitize_return_value'));
                         $wp_customize->add_control(new WM_Customizer_HTML($wp_customize, WM_THEME_SETTINGS_SKIN . '[custom-title-' . $priority . ']', array('label' => $skin_option['content'], 'section' => $customizer_section, 'priority' => $priority)));
                         break;
                         /**
                          * Image
                          */
                     /**
                      * Image
                      */
                     case 'image':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_return_value', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_return_value'));
                         $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority, 'context' => WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']')));
                         break;
                         /**
                          * Checkbox, radio & select
                          */
                     /**
                      * Checkbox, radio & select
                      */
                     case 'checkbox':
                     case 'radio':
                     case 'select':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr'));
                         $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority, 'type' => $skin_option['type'], 'choices' => isset($skin_option['options']) ? $skin_option['options'] : ''));
                         break;
                         /**
                          * Multiselect
                          */
                     /**
                      * Multiselect
                      */
                     case 'multiselect':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_return_value', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_return_value'));
                         $wp_customize->add_control(new WM_Customizer_Multiselect($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority, 'choices' => isset($skin_option['options']) ? $skin_option['options'] : '')));
                         break;
                         /**
                          * Password
                          *
                          * @since  3.2, WordPress 4.0
                          */
                     /**
                      * Password
                      *
                      * @since  3.2, WordPress 4.0
                      */
                     case 'password':
                         if (wm_check_wp_version(4)) {
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'password', 'label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority));
                         }
                         break;
                         /**
                          * Radio custom labels
                          */
                     /**
                      * Radio custom labels
                      */
                     case 'radiocustom':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_attr'));
                         $wp_customize->add_control(new WM_Customizer_Radiocustom($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority, 'choices' => isset($skin_option['options']) ? $skin_option['options'] : '', 'class' => isset($skin_option['class']) ? $skin_option['class'] : '')));
                         break;
                         /**
                          * Slider
                          *
                          * Since WP4.0 there is also a "range" native input field. This will output
                          * HTML5 <input type="range" /> element - thus still using custom one.
                          */
                     /**
                      * Slider
                      *
                      * Since WP4.0 there is also a "range" native input field. This will output
                      * HTML5 <input type="range" /> element - thus still using custom one.
                      */
                     case 'range':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_intval', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'wm_sanitize_intval'));
                         $wp_customize->add_control(new WM_Customizer_Range($wp_customize, WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority, 'json' => array($skin_option['min'], $skin_option['max'], $skin_option['step']))));
                         break;
                         /**
                          * Text
                          */
                     /**
                      * Text
                      */
                     case 'text':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_textarea', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_textarea'));
                         $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'text', 'label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority));
                         break;
                         /**
                          * Textarea
                          *
                          * Since WordPress 4.0 this is native input field.
                          */
                     /**
                      * Textarea
                      *
                      * Since WordPress 4.0 this is native input field.
                      */
                     case 'textarea':
                         $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_textarea', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_textarea'));
                         $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'textarea', 'label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority));
                         break;
                         /**
                          * URL
                          *
                          * @since  3.2, WordPress 4.0
                          */
                     /**
                      * URL
                      *
                      * @since  3.2, WordPress 4.0
                      */
                     case 'url':
                         if (wm_check_wp_version(4)) {
                             $wp_customize->add_setting(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'option', 'default' => $default, 'transport' => $transport, 'sanitize_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_url', 'sanitize_js_callback' => isset($skin_option['validate']) ? $skin_option['validate'] : 'esc_url'));
                             $wp_customize->add_control(WM_THEME_SETTINGS_SKIN . '[' . $option_id . ']', array('type' => 'url', 'label' => $skin_option['label'], 'description' => $description, 'section' => $customizer_section, 'priority' => $priority));
                         }
                         break;
                         /**
                          * Default
                          */
                     /**
                      * Default
                      */
                     default:
                         break;
                 }
                 // /switch
             }
             // /if suitable option array
         }
         // /foreach
     }
     // /if skin options are non-empty array
     //Assets needed for customizer preview
     if ($wp_customize->is_preview()) {
         add_action('wp_enqueue_scripts', 'wm_theme_customizer_css');
         add_action('wp_footer', 'wm_theme_customizer_js', 99);
     }
 }
Пример #4
0
 function wm_css_font_name($value, $skin_option)
 {
     //Helper variables
     $helper = wm_helper_var('google-fonts');
     //Preparing output
     if (isset($skin_option['id']) && false !== strpos($skin_option['id'], 'font-family') && is_string($value)) {
         $value = trim($value);
         if (isset($helper[$value])) {
             $value = "'" . $helper[$value] . "', ";
         }
     }
     //Output
     return $value;
 }
Пример #5
0
 /**
  * Projects metabox fields alteration
  *
  * @version  1.6
  *
  * @param   array $fields Array of predefined metafields
  *
  * @return  array Modified $fields array
  */
 function wm_project_metafields($fields = array())
 {
     //Preparing output
     $fields[1000]['title'] = __('Settings', 'mustang');
     $fields[1010] = array('type' => 'select', 'id' => 'sidebar', 'label' => __('Page layout', 'mustang'), 'description' => esc_html__('Select a sidebar position or enable fullwidth sections.', 'mustang') . '<br>' . esc_html__('Fullwidth sections page layout is suitable for use with page builders.', 'mustang'), 'options' => !function_exists('wm_helper_var') ? array('' => __('Default', 'mustang')) : wm_helper_var('layouts', 'sidebars'));
     $fields[1015] = array('type' => 'text', 'id' => 'slider', 'label' => __('Custom preview slider', 'mustang'), 'description' => __('This slider will be displayed on projects list only, instead of featured image. Please enter the slider shortcode.', 'mustang'));
     $fields[1040]['options'][''] = '';
     unset($fields[1040]['options']['1OPTGROUP']);
     unset($fields[1040]['options']['1/OPTGROUP']);
     //Output
     return $fields;
 }
 /**
  * Projects metabox fields alteration
  *
  * @version  1.1
  *
  * @param   array $fields Array of predefined metafields
  *
  * @return  array Modified $fields array
  */
 function wm_project_metafields($fields = array())
 {
     //Preparing output
     $fields[1000]['title'] = __('Settings', 'wm_domain');
     $fields[1010] = array('type' => 'select', 'id' => 'sidebar', 'label' => __('Page layout', 'wm_domain'), 'description' => __('Select a sidebar position or enable fullwidth sections', 'wm_domain'), 'options' => !function_exists('wm_helper_var') ? array('' => __('Default', 'wm_domain')) : wm_helper_var('layouts', 'sidebars'));
     $fields[1011] = array('id' => 'sections-description', 'type' => 'html', 'content' => '<div class="box blue">' . __('All <code>[wm_row]</code> (and/or <code>[vc_row]</code>) shortcodes will be treated as fullwidth sections in "Fullwidth sections" page layout.', 'wm_domain') . '</div>', 'conditional' => array('option' => array('tag' => 'select', 'name' => 'wm-sidebar'), 'option_value' => array('sections'), 'operand' => 'IS'));
     $fields[1015] = array('type' => 'text', 'id' => 'slider', 'label' => __('Custom preview slider', 'wm_domain'), 'description' => __('This slider will be displayed on projects list only, instead of featured image. Please enter the slider shortcode.', 'wm_domain'));
     $fields[1040]['options'][''] = '';
     unset($fields[1040]['options']['1OPTGROUP']);
     unset($fields[1040]['options']['1/OPTGROUP']);
     //Output
     return $fields;
 }
Пример #7
0
 function wm_ws_default_sidebar_params($params)
 {
     //Preparing output
     if (!isset($params[0]['after_widget']) || '</li>' === trim($params[0]['after_widget'])) {
         global $wp_registered_widgets;
         $theme_default_args = wm_helper_var('widget-areas', 'general');
         //Substitute HTML id and class attributes into before_widget
         $id = $params[0]['widget_id'];
         $classname_ = '';
         foreach ((array) $wp_registered_widgets[$id]['classname'] as $cn) {
             if (is_string($cn)) {
                 $classname_ .= '_' . $cn;
             } elseif (is_object($cn)) {
                 $classname_ .= '_' . get_class($cn);
             }
         }
         $classname_ = ltrim($classname_, '_');
         $params[0]['before_widget'] = sprintf($theme_default_args['before_widget'], $id, $classname_);
         $params[0]['after_widget'] = $theme_default_args['after_widget'];
         $params[0]['before_title'] = $theme_default_args['before_title'];
         $params[0]['after_title'] = $theme_default_args['after_title'];
     }
     //Output
     return $params;
 }
 function wm_theme_options_skin_array($wm_skin_design = array())
 {
     //Preparing output
     /**
      * Theme customizer options array
      */
     $prefix = 'skin-';
     $wm_skin_design = array('topbar' => array('type' => 'section', 'create_section' => __('Section: Top Bar', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'topbar' . 10 => array('type' => 'html', 'content' => '<p class="description">' . __('These settings will affect both Topbar Widgets and Topbar Extra Widgets areas.', 'wm_domain') . '</p>'), 'topbar' . 20 => array('type' => 'color', 'id' => $prefix . 'topbar' . '-color', 'label' => __('Text color', 'wm_domain')), 'topbar' . 30 => array('type' => 'color', 'id' => $prefix . 'topbar' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'topbar' . 40 => array('type' => 'color', 'id' => $prefix . 'topbar' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'topbar' . 50 => array('type' => 'background', 'id' => $prefix . 'topbar'), 'topbar-extra' . 10 => array('type' => 'html', 'content' => '<h3>' . __('Topbar Extra widgets', 'wm_domain') . '</h3>'), 'topbar-extra' . 20 => array('type' => 'color', 'id' => $prefix . 'topbar-extra' . '-color', 'label' => __('Text color', 'wm_domain')), 'topbar-extra' . 30 => array('type' => 'color', 'id' => $prefix . 'topbar-extra' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'topbar-extra' . 40 => array('type' => 'color', 'id' => $prefix . 'topbar-extra' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'topbar-extra' . 50 => array('type' => 'color', 'id' => $prefix . 'topbar-extra' . '-bg-color', 'label' => __('Background color', 'wm_domain')), 'header' => array('type' => 'section', 'create_section' => __('Section: Header', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'header' . 10 => array('type' => 'select', 'id' => $prefix . 'header' . '-shadow', 'label' => __('Header shadow', 'wm_domain'), 'options' => array('' => __('No shadow', 'wm_domain'), '1' => __('Display shadow', 'wm_domain'))), 'header' . 20 => array('type' => 'checkbox', 'id' => $prefix . 'header' . '-sticky', 'label' => __('Sticky header', 'wm_domain')), 'header' . 30 => array('type' => 'html', 'content' => '<h3>' . __('Design', 'wm_domain') . '</h3>'), 'header' . 40 => array('type' => 'color', 'id' => $prefix . 'header' . '-color', 'label' => __('Text color', 'wm_domain')), 'header' . 50 => array('type' => 'color', 'id' => $prefix . 'header' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'header' . 60 => array('type' => 'color', 'id' => $prefix . 'header' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'header' . 70 => array('type' => 'background', 'id' => $prefix . 'header'), 'header' . 140 => array('type' => 'html', 'content' => '<h3>' . __('Navigation design', 'wm_domain') . '</h3>'), 'header' . 150 => array('type' => 'html', 'content' => '<p class="description">' . __('Navigation padding will affect the header height and logo position.', 'wm_domain') . '</p>'), 'header' . 160 => array('type' => 'range', 'id' => $prefix . 'nav' . '-padding', 'label' => __('Navigation padding', 'wm_domain'), 'default' => 25, 'min' => 0, 'max' => 60, 'step' => 1, 'zero' => true), 'header' . 170 => array('type' => 'color', 'id' => $prefix . 'nav' . '-color', 'label' => __('Subnav text color', 'wm_domain')), 'header' . 180 => array('type' => 'color', 'id' => $prefix . 'nav' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'header' . 190 => array('type' => 'color', 'id' => $prefix . 'nav' . '-bg-color', 'label' => __('Subnav background', 'wm_domain')), 'header' . 200 => array('type' => 'html', 'content' => '<p class="description">' . __('Subnav colors will be also used to style the mobile navigation.', 'wm_domain') . '</p>'), 'range' => array('type' => 'section', 'create_section' => __('Section: Special Slider', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'range' . 10 => array('type' => 'color', 'id' => $prefix . 'range' . '-color', 'label' => __('Text color', 'wm_domain')), 'range' . 20 => array('type' => 'color', 'id' => $prefix . 'range' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'range' . 30 => array('type' => 'color', 'id' => $prefix . 'range' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'range' . 40 => array('type' => 'color', 'id' => $prefix . 'range' . '-bg-color', 'label' => __('Background color', 'wm_domain')), 'heading' => array('type' => 'section', 'create_section' => __('Section: Main Heading', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'heading' . 10 => array('type' => 'color', 'id' => $prefix . 'heading' . '-color', 'label' => __('Text color', 'wm_domain')), 'heading' . 20 => array('type' => 'color', 'id' => $prefix . 'heading' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'heading' . 30 => array('type' => 'color', 'id' => $prefix . 'heading' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'heading' . 40 => array('type' => 'background', 'id' => $prefix . 'heading'), 'content' => array('type' => 'section', 'create_section' => __('Section: Content', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'content' . 10 => array('type' => 'select', 'id' => $prefix . 'sidebar' . '-position', 'label' => __('Sidebar position', 'wm_domain'), 'options' => array('left' => __('Left', 'wm_domain'), 'right' => __('Right', 'wm_domain')), 'default' => WM_DEFAULT_SIDEBAR_POSITION), 'content' . 20 => array('type' => 'select', 'id' => $prefix . 'sidebar' . '-width', 'label' => __('Sidebar width', 'wm_domain'), 'options' => array(' pane three; pane nine' => __('1/4 sidebar', 'wm_domain'), ' pane four; pane eight' => __('1/3 sidebar', 'wm_domain'), ' pane golden-narrow; pane golden-wide' => __('Golden ratio', 'wm_domain')), 'default' => WM_DEFAULT_SIDEBAR_WIDTH), 'content' . 30 => array('type' => 'html', 'content' => '<h3>' . __('Design', 'wm_domain') . '</h3>'), 'content' . 40 => array('type' => 'color', 'id' => $prefix . 'content' . '-color', 'label' => __('Text color', 'wm_domain')), 'content' . 50 => array('type' => 'color', 'id' => $prefix . 'content' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'content' . 60 => array('type' => 'color', 'id' => $prefix . 'content' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'content' . 70 => array('type' => 'background', 'id' => $prefix . 'content'), 'footer' => array('type' => 'section', 'create_section' => __('Section: Footer', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'footer' . 10 => array('type' => 'html', 'content' => '<p class="description">' . __('Footer consists of footer widgets area and credits (copyright) widgets area. Set the footer widgets layout below and backgrounds for both footer areas.', 'wm_domain') . '</p>'), 'header' . 15 => array('type' => 'select', 'id' => $prefix . 'footer' . '-shadow', 'label' => __('Footer shadow', 'wm_domain'), 'options' => array('' => __('No shadow', 'wm_domain'), '1' => __('Display shadow', 'wm_domain'))), 'footer' . 20 => array('type' => 'html', 'content' => '<h3>' . __('Footer widgets', 'wm_domain') . '</h3>'), 'footer' . 30 => array('type' => 'select', 'id' => $prefix . 'footer-widgets' . '-layout', 'label' => __('Footer widgets layout', 'wm_domain'), 'options' => array(1 => __('1 column', 'wm_domain'), 2 => __('2 columns', 'wm_domain'), 3 => __('3 columns', 'wm_domain'), 4 => __('4 columns', 'wm_domain'), 5 => __('5 columns', 'wm_domain'))), 'footer' . 40 => array('type' => 'html', 'content' => '<p class="description">' . __('Footer widgets will be layed out into columns using masonry script.', 'wm_domain') . '</p>'), 'footer' . 50 => array('type' => 'color', 'id' => $prefix . 'footer-widgets' . '-color', 'label' => __('Text color', 'wm_domain')), 'footer' . 60 => array('type' => 'color', 'id' => $prefix . 'footer-widgets' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'footer' . 70 => array('type' => 'color', 'id' => $prefix . 'footer-widgets' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'footer' . 80 => array('type' => 'background', 'id' => $prefix . 'footer-widgets'), 'footer' . 150 => array('type' => 'html', 'content' => '<h3>' . __('Credits', 'wm_domain') . '</h3>'), 'footer' . 160 => array('type' => 'color', 'id' => $prefix . 'credits' . '-color', 'label' => __('Text color', 'wm_domain')), 'footer' . 170 => array('type' => 'color', 'id' => $prefix . 'credits' . '-accent-color', 'label' => __('Accent color', 'wm_domain')), 'footer' . 180 => array('type' => 'color', 'id' => $prefix . 'credits' . '-border-color', 'label' => __('Borders color', 'wm_domain')), 'footer' . 190 => array('type' => 'background', 'id' => $prefix . 'credits'), 'website-background' => array('type' => 'section', 'create_section' => __('Background', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'website-background' . 5 => array('type' => 'html', 'content' => '<h3>' . __('Website background', 'wm_domain') . '</h3>' . '<p class="description">' . __('Please note that this background is only visible when using boxed theme layout (set this under "Setup" section).', 'wm_domain') . '</p>'), 'website-background' . 10 => array('type' => 'background', 'id' => $prefix . 'html'), 'colors-global' => array('type' => 'section', 'create_section' => __('Colors', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'colors-global' . 10 => array('type' => 'html', 'content' => '<h3>' . __('Global colors', 'wm_domain') . '</h3>'), 'colors-global' . 20 => array('type' => 'color', 'id' => $prefix . 'accent-color', 'label' => __('Accent color', 'wm_domain')), 'colors-global' . 30 => array('type' => 'html', 'content' => '<p class="description">' . __('Accent color is being used globally throughout the whole theme. All of theme design colors are being calculated automatically based on this color, so if you only want the basic theme design, just set this color. If you need to tweak the design settings, feel free to explore theme sections options below.', 'wm_domain') . '</p>'), 'colors-global' . 40 => array('type' => 'color', 'id' => $prefix . 'blue-color', 'label' => __('General blue color', 'wm_domain')), 'colors-global' . 50 => array('type' => 'color', 'id' => $prefix . 'gray-color', 'label' => __('General gray color', 'wm_domain')), 'colors-global' . 60 => array('type' => 'color', 'id' => $prefix . 'green-color', 'label' => __('General green color', 'wm_domain')), 'colors-global' . 70 => array('type' => 'color', 'id' => $prefix . 'orange-color', 'label' => __('General orange color', 'wm_domain')), 'colors-global' . 80 => array('type' => 'color', 'id' => $prefix . 'red-color', 'label' => __('General red color', 'wm_domain')), 'colors-global' . 90 => array('type' => 'html', 'content' => '<h3>' . __('Color treshold', 'wm_domain') . '</h3>'), 'colors-global' . 100 => array('type' => 'range', 'id' => $prefix . 'text-color-treshold', 'label' => __('Auto color treshold', 'wm_domain'), 'default' => 0, 'min' => -50, 'max' => 50, 'step' => 1), 'colors-global' . 110 => array('type' => 'html', 'content' => '<p class="description">' . __('Auto color treshold is being used to automatically calculate the additional colors in the theme (such as text color from the background color). You can tweak the calculation treshold here.', 'wm_domain') . '</p>'), 'branding' => array('type' => 'section', 'create_section' => __('Logo', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'branding' . 10 => array('type' => 'image', 'id' => $prefix . 'logo', 'label' => __('Logo', 'wm_domain')), 'branding' . 20 => array('type' => 'image', 'id' => $prefix . 'logo-hidpi', 'label' => __('High DPI logo', 'wm_domain')), 'images' => array('type' => 'section', 'create_section' => __('Images', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'images' . 5 => array('type' => 'html', 'content' => '<h3>' . __('Lightbox', 'wm_domain') . '</h3>'), 'images' . 10 => array('type' => 'html', 'content' => '<p class="description">' . __('If you use a special image lightbox effect plugin, you should disable the theme native effect below.', 'wm_domain') . '</p>'), 'images' . 20 => array('type' => 'checkbox', 'id' => $prefix . 'disable-lightbox', 'label' => __('Disable lightbox effect', 'wm_domain')), 'images' . 30 => array('type' => 'html', 'content' => '<h3>' . __('Image ratios', 'wm_domain') . '</h3>'), 'images' . 40 => array('type' => 'html', 'content' => '<p class="description">' . __('Set up image ratios for the different theme items.', 'wm_domain') . '</p>'), 'images' . 50 => array('type' => 'select', 'id' => $prefix . 'image' . '-blog', 'label' => __('Blog list image', 'wm_domain'), 'options' => wm_helper_var('image-ratio')), 'images' . 60 => array('type' => 'select', 'id' => $prefix . 'image' . '-posts', 'label' => __('[wm_posts] shortcode image', 'wm_domain'), 'options' => wm_helper_var('image-ratio')), 'images' . 70 => array('type' => 'select', 'id' => $prefix . 'image' . '-gallery', 'label' => __('[gallery] shortcode image', 'wm_domain'), 'options' => wm_helper_var('image-ratio')), 'images' . 80 => array('type' => 'html', 'content' => '<p class="description">' . __('Please decide on, and set the image ratios up for different website sections right after the theme activation. If you change the image sizes later on, the settings will apply only on newly uploaded images - the images you upload after you have made an image ratio change. All previous images will keep their original sizes.', 'wm_domain') . '</p><p class="description">' . __('If you wish to resize the previously uploaded images to conform the new image ratios, you can use a plugin for this. Recommended plugins are <a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/" target="_blank">Regenerate Thumbnails</a> or <a href="http://wordpress.org/extend/plugins/ajax-thumbnail-rebuild/" target="_blank">AJAX Thumbnail Rebuild</a>.', 'wm_domain') . '</p>'), 'fonts' => array('type' => 'section', 'create_section' => __('Fonts', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'fonts' . 10 => array('type' => 'html', 'content' => '<p class="description">' . __('Set the Google Font to be used for website headings and body text. You can additionally set a font subset for different character lists.', 'wm_domain') . '</p>'), 'fonts-logo' => array('type' => 'select', 'id' => $prefix . 'font' . '-logo', 'label' => __('Text logo font', 'wm_domain'), 'options' => function_exists('wma_asort') ? wma_asort(wm_helper_var('google-fonts')) : wm_helper_var('google-fonts')), 'fonts' . 20 => array('type' => 'select', 'id' => $prefix . 'font' . '-headings', 'label' => __('Headings font', 'wm_domain'), 'options' => function_exists('wma_asort') ? wma_asort(wm_helper_var('google-fonts')) : wm_helper_var('google-fonts')), 'fonts' . 30 => array('type' => 'select', 'id' => $prefix . 'font' . '-body', 'label' => __('Body text font', 'wm_domain'), 'options' => function_exists('wma_asort') ? wma_asort(wm_helper_var('google-fonts')) : wm_helper_var('google-fonts')), 'fonts' . 40 => array('type' => 'multiselect', 'id' => $prefix . 'font' . '-subset', 'label' => __('Font subset', 'wm_domain'), 'options' => wm_helper_var('google-fonts-subset')), 'fonts' . 50 => array('type' => 'html', 'content' => '<h3>' . __('Font sizes', 'wm_domain') . '</h3>'), 'fonts' . 60 => array('type' => 'range', 'id' => $prefix . 'font' . '-size-body', 'label' => __('Basic font size', 'wm_domain'), 'default' => 14, 'min' => 10, 'max' => 20, 'step' => 1, 'customizer_js' => array('css' => array('html, body' => array(array('font-size', 'px'))))), 'fonts' . 70 => array('type' => 'html', 'content' => '<p class="description">' . __('Heading font size is counted from the basic font size. Set the percentage of the basic font size for each heading.', 'wm_domain') . '</p>'), 'fonts' . 80 => array('type' => 'range', 'id' => $prefix . 'font' . '-size-h1', 'label' => __('Heading H1 font size', 'wm_domain'), 'default' => 100, 'min' => 75, 'max' => 450, 'step' => 5, 'customizer_js' => array('css' => array('h1, .heading-style-1' => array(array('font-size', '%'))))), 'fonts' . 90 => array('type' => 'range', 'id' => $prefix . 'font' . '-size-h2', 'label' => __('Heading H2 font size', 'wm_domain'), 'default' => 100, 'min' => 75, 'max' => 450, 'step' => 5, 'customizer_js' => array('css' => array('h2, .heading-style-2' => array(array('font-size', '%'))))), 'fonts' . 100 => array('type' => 'range', 'id' => $prefix . 'font' . '-size-h3', 'label' => __('Heading H3 font size', 'wm_domain'), 'default' => 100, 'min' => 75, 'max' => 450, 'step' => 5, 'customizer_js' => array('css' => array('h3, .heading-style-3' => array(array('font-size', '%'))))), 'fonts' . 110 => array('type' => 'range', 'id' => $prefix . 'font' . '-size-h4', 'label' => __('Heading H4, H5 and H6 font size', 'wm_domain'), 'default' => 100, 'min' => 75, 'max' => 450, 'step' => 5, 'customizer_js' => array('css' => array('h4, h5, h6, .heading-style-4, .heading-style-5, .heading-style-6' => array(array('font-size', '%'))))), 'layout' => array('type' => 'section', 'create_section' => __('Layout', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'layout' . 10 => array('type' => 'html', 'content' => '<h3>' . __('Layout', 'wm_domain') . '</h3>'), 'layout' . 20 => array('type' => 'select', 'id' => $prefix . 'layout', 'label' => __('Website layout', 'wm_domain'), 'options' => array('fullwidth' => __('Fullwidth', 'wm_domain'), 'boxed' => __('Boxed', 'wm_domain'))), 'layout' . 40 => array('type' => 'range', 'id' => $prefix . 'website-width', 'label' => __('Website width', 'wm_domain'), 'default' => 1020, 'min' => 1020, 'max' => 1920, 'step' => 20, 'customizer_js' => array('css' => array('.boxed .wrap, .wrap.boxed, body.boxed.page-meta-layout .wrap, .wrap-inner' => array(array('width', 'px'))))), 'layout' . 45 => array('type' => 'html', 'content' => '<p class="description">' . __('The website width is being set up for the boxed layout. The actual website content width would be the website width minus the boxed layout paddings (160px). So if you set the width of 1480, the actual website content width will be 1320px (= 1480 - 160).', 'wm_domain') . '</p>'), 'others' => array('type' => 'section', 'create_section' => __('Others', 'wm_domain'), 'in_panel' => _x('Theme', 'Customizer panel title.', 'wm_domain')), 'others' . 10 => array('type' => 'html', 'content' => '<h3>' . __('CSS3 Animations', 'wm_domain') . '</h3>'), 'others' . 20 => array('type' => 'checkbox', 'id' => $prefix . 'disable-animatecss', 'label' => __('Disable Animate.css library', 'wm_domain')));
     //Output
     return $wm_skin_design;
 }
Пример #9
0
 function wm_custom_styles($visual_editor = false)
 {
     //Helper variables
     $output = '';
     $custom_styles = $helper = array();
     $helper = array('border_color' => 25, 'brighter_color' => 9, 'multiplier' => 2, 'button_color' => 'accent', 'darker_color' => -9, 'google_fonts' => wm_helper_var('google-fonts'), 'headings_color' => -68, 'line_height' => 1.62, 'prefix' => 'skin-', 'elements' => array('accent' => array('base' => '{p}a, {p}ul.hover-enlarge li:hover:before', 'hover-active' => '{p}a:hover, {p}a:active'), 'colored' => array('base' => '{p}, .wm-button{p}, button{p}, input[type="button"]{p}, input[type="submit"]{p}', 'border-left' => '.wm-call-to-action.cta-button-{p}', 'hover-active' => '.wm-button{p}:hover, button{p}:hover, input[type="button"]{p}:hover, input[type="submit"]{p}:hover, .wm-button{p}:active, button{p}:active, input[type="button"]{p}:active, input[type="submit"]{p}:active'), 'forms' => '{p} input[type="date"], {p} input[type="email"], {p} input[type="file"], {p} input[type="number"], {p} input[type="search"], {p} input[type="password"], {p} input[type="text"], {p} input[type="url"], {p} input[type="tel"], {p} select, {p} textarea', 'headings' => '{p} h1, {p} h2, {p} h3, {p} h4, {p} h5, {p} h6, {p} .h1, {p} .h2, {p} .h3, {p} .h4, {p} .h5, {p} .h6, {p} [class*="heading-style-"], {p} .no-icon-background .wm-iconbox-module .wm-content-module-element.image, {p} .no-icon-bg .wm-iconbox-module .wm-content-module-element.image', 'pagination' => array('base' => ', .wm-pagination a, .wm-pagination span, .bbp-pagination .bbp-pagination-links a, .bbp-pagination .bbp-pagination-links span, .woocommerce-pagination a, .woocommerce-pagination span', 'active' => ', .wm-pagination > span, .wm-pagination a:active, .wm-pagination .current, .bbp-pagination .bbp-pagination-links > span, .bbp-pagination .bbp-pagination-links a:active, .bbp-pagination .bbp-pagination-links .current, .woocommerce-pagination > span, .woocommerce-pagination a:active, .woocommerce-pagination .current'), 'shortcodes' => array('brighter-bg' => '{p} .wm-accordion .wm-item.active .wm-item-title, {p} .wm-posts-post.wm-posts-layout-default .meta, {p} .wm-posts-forum .meta, {p} .wm-posts-wm_staff .title, {p} .wm-price-header, {p} .wm-price-feature-row, {p} .wm-progress, {p} .wm-tabs .wm-tab-links li.active, {p} .wm-tabs.layout-top .wm-tab-links li.active, {p} .wm-tabs-items .wm-item, {p} .wm-table.type-striped tr.even th, {p} .wm-table.type-striped tr.even td, {p} .wm-table.type-bordered-striped tr.even th, {p} .wm-table.type-bordered-striped tr.even td, {p} .bypostauthor .comment-author .fn', 'brighter-border-bottom' => '{p} .wm-tabs .wm-tab-links li.active, {p} .wm-tabs.layout-top .wm-tab-links li.active', 'brighter-border-left' => '{p} div.wm-tabs.layout-right .wm-tab-links li.active', 'brighter-border-right' => '{p} div.wm-tabs.layout-left .wm-tab-links li.active', 'iconbox' => '{p}.wm-iconbox-module .font-icon', 'iconbox-link-color' => '{p}.wm-iconbox-module .font-icon a', 'iconbox-text-shadow' => '{p}.wm-iconbox-module.wm-content-module-item:hover .image i:before'), 'woocommerce' => array('buttons' => '.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce-page a.button, .woocommerce-page button.button, .woocommerce-page input.button, .woocommerce-page #respond input#submit, .woocommerce-page a.button.alt, .woocommerce-page button.button.alt, .woocommerce-page input.button.alt, .woocommerce-page #respond input#submit.alt, .woocommerce-MyAccount-navigation .is-active a', 'buttons-hover-active' => '.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce-page a.button:hover, .woocommerce-page button.button:hover, .woocommerce-page input.button:hover, .woocommerce-page #respond input#submit:hover, .woocommerce-page a.button.alt:hover, .woocommerce-page button.button.alt:hover, .woocommerce-page input.button.alt:hover, .woocommerce-page #respond input#submit.alt:hover, .woocommerce a.button:active, .woocommerce button.button:active, .woocommerce input.button:active, .woocommerce-page a.button:active, .woocommerce-page button.button:active, .woocommerce-page input.button:active, .woocommerce-page #respond input#submit:active, .woocommerce-page a.button.alt:active, .woocommerce-page button.button.alt:active, .woocommerce-page input.button.alt:active, .woocommerce-page #respond input#submit.alt:active')), 'text_color' => 200, 'treshold' => class_exists('WM_Amplifier') ? apply_filters('wmhook_wmamp_' . 'wma_contrast_color' . '_default_treshold', 127) : 127, 'visual_editor' => $visual_editor);
     $helper['google_fonts'][''] = '';
     $helper = apply_filters('wmhook_wm_custom_styles_helper', $helper);
     /**
      * Array of custom styles from admin panel
      *
      * You can hook onto "wmhook_wm_custom_styles_use_custom_array" and disable the theme
      * default array preparation. Then just hook onto "wmhook_wm_custom_styles_array"
      * to create your own array.
      */
     if (!apply_filters('wmhook_wm_custom_styles_use_custom_array', false)) {
         if (!$visual_editor) {
             $custom_styles = array('skin-css' => array('condition' => trim(wm_option($helper['prefix'] . 'css')), 'custom' => '/* Custom skin styles */' . "\r\n\t\t" . wm_option($helper['prefix'] . 'css')), 'layout' => array('custom' => '/* Layout */'), 'layout-' . 10 => array('selector' => '.boxed .website-container, .boxed .wrap, .wrap.boxed, .boxed.post-meta-layout .wrap, .wrap-inner', 'styles' => array('width' => wm_option($helper['prefix'] . 'website-width', '', 'px'))), 'layout-' . 15 => array('selector' => '.fl-builder .fl-row-fixed-width', 'styles' => array('max-width' => absint(wm_option($helper['prefix'] . 'website-width') - 2 * 60) . 'px')), 'layout-' . 20 => array('selector' => '.nav-main > ul > li', 'styles' => array('padding-top' => wm_option($helper['prefix'] . 'nav-padding', '', 'px'), 'padding-bottom' => wm_option($helper['prefix'] . 'nav-padding', '', 'px'))), 'colors' => array('custom' => '/* Accent color */'), 'colors-' . 10 => array('selector' => array($helper['elements']['accent']['base'] . ', .text-color-accent', ''), 'styles' => array('color' => wm_option($helper['prefix'] . 'accent-color', 'color'))), 'colors-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], ''), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), 50))), 'colors-bg' => array('custom' => '/* Colors: Global backgrounds based on accent color */'), 'colors-bg-' . 10 => array('selector' => array('.header, #search-container input, .mobile-nav, .footer-widgets, ol > li:before, .next-prev-post-in-tax a, .wm-posts-wm_staff .wm-posts-item:hover .title, .content-section .custom-font-color .wm-posts-wm_staff .wm-posts-item:hover .title, .wm-posts-wm_projects.wm-posts-layout-default .wm-posts-item:hover, .wm-posts-wm_projects.wm-posts-layout-simple .wm-posts-item:hover .title, .wm-posts-post.wm-posts-layout-simple .wm-posts-item:hover .title, .floating-cart-switch, .floating-cart-switch:hover, .floating-cart-switch:active, .background-color-accent, .bg-color-accent, ' . $helper['elements']['shortcodes']['iconbox'] . $helper['elements']['pagination']['active'], ''), 'styles' => array('background' => wm_option($helper['prefix'] . 'accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 15 => array('selector' => '#search-container input::-webkit-input-placeholder', 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 16 => array('selector' => '#search-container input::-moz-placeholder', 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 17 => array('selector' => '#search-container input:-ms-input-placeholder', 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 20 => array('selector' => '.topbar, .topbar-extra, .topbar-extra .topbar-extra-switch, .credits', 'styles' => array('background' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'accent-color'), $helper['darker_color']), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 30 => array('selector' => '.topbar, .topbar-extra' . $helper['elements']['pagination']['active'], 'styles' => array('border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'accent-color'), $helper['darker_color']))), 'colors-bg-' . 40 => array('selector' => '.footer-widgets', 'styles' => array('border-color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), absint($helper['darker_color'] + $helper['border_color'])))), 'colors-bg-' . 50 => array('selector' => '.credits', 'styles' => array('border-color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), absint($helper['multiplier'] * $helper['darker_color'] + $helper['border_color'])))), 'colors-bg-' . 60 => array('selector' => '.topbar a, .topbar-extra a, .footer-widgets a, .credits a', 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color'] - 50))), 'colors-bg-' . 70 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], ''), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['text_color']))), 'colors-bg-' . 80 => array('condition' => trim(wm_option($helper['prefix'] . 'accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], ''), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'colors-bg-' . 'forms' . 10 => array('selector' => array($helper['elements']['forms'], '.topbar-extra'), 'styles' => array('background-color' => wma_contrast_color(wma_alter_color_brightness(wm_option($helper['prefix'] . 'accent-color'), $helper['darker_color']), $helper['brighter_color']))), 'colors-bg-' . 'forms' . 20 => array('selector' => array($helper['elements']['forms'], '.footer-widgets'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), $helper['brighter_color']))), 'colors-bg-' . 'forms' . 30 => array('selector' => array($helper['elements']['forms'], '.credits'), 'styles' => array('background-color' => wma_contrast_color(wma_alter_color_brightness(wm_option($helper['prefix'] . 'accent-color'), $helper['darker_color']), $helper['brighter_color']))), 'colors-shortcodes' => array('custom' => '/* Colors: Shortcodes default colors */'), 'colors-shortcodes-' . 10 => array('selector' => '.wm-button, button, input[type="button"], input[type="submit"], .wm-marker, .wm-dropcap, .wm-progress-bar, #bbpress-forums .quicktags-toolbar input, #bbpress-forums .bbp-new-post-toggle .wm-item-title, .bbp-logged-in a.button', 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . $helper['button_color'] . '-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['darker_color']))), 'colors-shortcodes-' . 20 => array('selector' => '.wm-button:hover, button:hover, input[type="button"]:hover, input[type="submit"]:hover, .wm-button:active, button:active, input[type="button"]:active, input[type="submit"]:active, #bbpress-forums .quicktags-toolbar input:hover, #bbpress-forums .quicktags-toolbar input:active, #bbpress-forums .bbp-new-post-toggle .wm-item-title:hover, #bbpress-forums .bbp-new-post-toggle .wm-item.active .wm-item-title, .bbp-logged-in a.button:hover, .bbp-logged-in a.button:active', 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-shortcodes-' . 30 => array('selector' => '.wm-call-to-action', 'styles' => array('border-left-color' => wm_option($helper['prefix'] . $helper['button_color'] . '-color', 'color'))), 'colors-shortcodes-' . 40 => array('condition' => class_exists('WooCommerce'), 'selector' => $helper['elements']['woocommerce']['buttons'], 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['text_color'], ' !important'), 'background' => wm_option($helper['prefix'] . $helper['button_color'] . '-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['darker_color']))), 'colors-shortcodes-' . 50 => array('condition' => class_exists('WooCommerce'), 'selector' => $helper['elements']['woocommerce']['buttons-hover-active'], 'styles' => array('background' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . $helper['button_color'] . '-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-blue' => array('custom' => '/* Colors: Blue color */'), 'colors-blue-' . 10 => array('selector' => array($helper['elements']['colored']['base'], '.color-blue'), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'blue-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'blue-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . 'blue-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'blue-color'), $helper['darker_color']))), 'colors-blue-' . 20 => array('selector' => array($helper['elements']['colored']['hover-active'], '.color-blue'), 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'blue-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'blue-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-blue-' . 30 => array('selector' => array($helper['elements']['colored']['border-left'], 'color-blue'), 'styles' => array('border-left-color' => wm_option($helper['prefix'] . 'blue-color', 'color'))), 'colors-gray' => array('custom' => '/* Colors: Gray color */'), 'colors-gray-' . 10 => array('selector' => array($helper['elements']['colored']['base'], '.color-gray'), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'gray-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'gray-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . 'gray-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'gray-color'), $helper['darker_color']))), 'colors-gray-' . 20 => array('selector' => array($helper['elements']['colored']['hover-active'], '.color-gray'), 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'gray-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'gray-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-gray-' . 30 => array('selector' => array($helper['elements']['colored']['border-left'], 'color-gray'), 'styles' => array('border-left-color' => wm_option($helper['prefix'] . 'gray-color', 'color'))), 'colors-green' => array('custom' => '/* Colors: Green color */'), 'colors-green-' . 10 => array('selector' => array($helper['elements']['colored']['base'], '.color-green'), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'green-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'green-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . 'green-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'green-color'), $helper['darker_color']))), 'colors-green-' . 20 => array('selector' => array($helper['elements']['colored']['hover-active'], '.color-green'), 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'green-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'green-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-green-' . 30 => array('selector' => array($helper['elements']['colored']['border-left'], 'color-green'), 'styles' => array('border-left-color' => wm_option($helper['prefix'] . 'green-color', 'color'))), 'colors-orange' => array('custom' => '/* Colors: Orange color */'), 'colors-orange-' . 10 => array('selector' => array($helper['elements']['colored']['base'], '.color-orange'), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'orange-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'orange-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . 'orange-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'orange-color'), $helper['darker_color']))), 'colors-orange-' . 20 => array('selector' => array($helper['elements']['colored']['hover-active'], '.color-orange'), 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'orange-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'orange-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-orange-' . 30 => array('selector' => array($helper['elements']['colored']['border-left'], 'color-orange'), 'styles' => array('border-left-color' => wm_option($helper['prefix'] . 'orange-color', 'color'))), 'colors-red' => array('custom' => '/* Colors: Red color */'), 'colors-red-' . 10 => array('selector' => array($helper['elements']['colored']['base'], '.color-red'), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'red-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'red-color'), $helper['text_color'], ' !important'), 'background-color' => wm_option($helper['prefix'] . 'red-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'red-color'), $helper['darker_color']))), 'colors-red-' . 20 => array('selector' => array($helper['elements']['colored']['hover-active'], '.color-red'), 'styles' => array('background-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'red-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'red-color'), $helper['multiplier'] * $helper['darker_color']))), 'colors-red-' . 30 => array('selector' => array($helper['elements']['colored']['border-left'], 'color-red'), 'styles' => array('border-left-color' => wm_option($helper['prefix'] . 'red-color', 'color'))), 'colors-red-' . 40 => array('condition' => class_exists('WooCommerce') || class_exists('bbPress'), 'selector' => '.woocommerce-page .woocommerce-error, div.bbp-template-notice.error, div.bbp-template-notice.warning', 'styles' => array('border-color' => wm_option($helper['prefix'] . 'red-color', 'color'))), 'html' => array('custom' => '/* Background: HTML and body */'), 'html-' . 10 => array('selector' => 'html', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'html-')))), 'topbar' => array('custom' => '/* Background: Topbar */'), 'topbar-' . 10 => array('selector' => '.topbar, .topbar-extra', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'topbar-')), 'color' => wm_option($helper['prefix'] . 'topbar-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'topbar-border-color', 'color', ' !important'))), 'topbar-' . 20 => array('selector' => '.topbar-extra .topbar-extra-switch', 'styles' => array('background' => wm_option($helper['prefix'] . 'topbar-border-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-border-color'), $helper['text_color']))), 'topbar-' . 30 => array('condition' => trim(wm_option($helper['prefix'] . 'topbar-color')), 'selector' => array($helper['elements']['headings'], '.topbar-extra'), 'styles' => array('color' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'topbar-color', 'color')) ? wma_alter_color_brightness(wm_option($helper['prefix'] . 'topbar-color'), $helper['headings_color']) : wma_alter_color_brightness(wm_option($helper['prefix'] . 'topbar-color'), -$helper['headings_color']))), 'topbar-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.topbar'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']))), 'topbar-extra-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.topbar-extra'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']), 'background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-bg-color'), $helper['brighter_color']))), 'topbar-extra-' . 10 => array('selector' => array($helper['elements']['shortcodes']['brighter-bg'], '.topbar-extra'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']), 'background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-bg-color'), $helper['brighter_color']))), 'topbar-extra-' . 20 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-bottom'], '.topbar-extra'), 'styles' => array('border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']), 'border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-bg-color'), $helper['brighter_color']))), 'topbar-extra-' . 30 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-right'], '.topbar-extra'), 'styles' => array('border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']), 'border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-bg-color'), $helper['brighter_color']))), 'topbar-extra-' . 40 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-left'], '.topbar-extra'), 'styles' => array('border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-bg-color'), $helper['brighter_color']), 'border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-bg-color'), $helper['brighter_color']))), 'topbar-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.topbar '), 'styles' => array('color' => wm_option($helper['prefix'] . 'topbar-accent-color', 'color'))), 'topbar-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.topbar '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-accent-color'), 50))), 'topbar-extra-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.topbar-extra '), 'styles' => array('color' => wm_option($helper['prefix'] . 'topbar-accent-color', 'color'), 'color' => wm_option($helper['prefix'] . 'topbar-extra-accent-color', 'color'))), 'topbar-extra-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.topbar-extra '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-accent-color'), 50), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-accent-color'), 50))), 'topbar-extra-accent-' . 30 => array('selector' => array($helper['elements']['shortcodes']['iconbox'], '.topbar-extra '), 'styles' => array('background' => wm_option($helper['prefix'] . 'topbar-accent-color', 'color'), 'background|2' => wm_option($helper['prefix'] . 'topbar-extra-accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-accent-color'), $helper['text_color']), 'color|2' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-accent-color'), $helper['text_color']))), 'topbar-extra-accent-' . 40 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], '.topbar-extra '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-accent-color'), $helper['text_color']), 'color|2' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-accent-color'), $helper['text_color']))), 'topbar-extra-accent-' . 50 => array('condition' => trim(wm_option($helper['prefix'] . 'topbar-accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], '.topbar-extra '), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'topbar-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)', 'text-shadow|2' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'topbar-extra-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'topbar-extra-' . 10 => array('selector' => '.topbar-extra', 'styles' => array('background' => wm_option($helper['prefix'] . 'topbar-extra-bg-color', 'color'), 'color' => wm_option($helper['prefix'] . 'topbar-extra-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'topbar-extra-border-color', 'color', ' !important'))), 'topbar-extra-' . 20 => array('selector' => '.topbar-extra .topbar-extra-switch', 'styles' => array('background' => wm_option($helper['prefix'] . 'topbar-extra-border-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'topbar-extra-border-color'), $helper['text_color']))), 'topbar-extra-' . 30 => array('condition' => trim(wm_option($helper['prefix'] . 'topbar-extra-color')), 'selector' => array($helper['elements']['headings'], '.topbar-extra'), 'styles' => array('color' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'topbar-extra-color', 'color')) ? wma_alter_color_brightness(wm_option($helper['prefix'] . 'topbar-extra-color'), $helper['headings_color']) : wma_alter_color_brightness(wm_option($helper['prefix'] . 'topbar-extra-color'), -$helper['headings_color']))), 'header' => array('custom' => '/* Background: Header and navigation */'), 'header-' . 10 => array('selector' => '.header, #search-container input, .mobile-nav', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'header-')), 'color' => wm_option($helper['prefix'] . 'header-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'header-border-color', 'color', ' !important'))), 'header-' . 15 => array('selector' => '#search-container input::-webkit-input-placeholder', 'styles' => array('color' => wm_option($helper['prefix'] . 'header-color', 'color'))), 'header-' . 16 => array('selector' => '#search-container input::-moz-placeholder', 'styles' => array('color' => wm_option($helper['prefix'] . 'header-color', 'color'))), 'header-' . 17 => array('selector' => '#search-container input:-ms-input-placeholder', 'styles' => array('color' => wm_option($helper['prefix'] . 'header-color', 'color'))), 'header-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.header'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'header-bg-color'), $helper['brighter_color']))), 'header-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.header '), 'styles' => array('color' => wm_option($helper['prefix'] . 'header-accent-color', 'color'))), 'header-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.header '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'header-accent-color'), 50))), 'navigation-' . 10 => array('selector' => '.nav-main li ul', 'styles' => array('background-color' => wm_option($helper['prefix'] . 'nav-bg-color', 'color'), 'color' => wm_option($helper['prefix'] . 'nav-color', 'color'))), 'navigation-' . 20 => array('selector' => '.nav-main li ul', 'styles' => array('border-color' => wm_option($helper['prefix'] . 'nav-border-color', 'color'))), 'navigation-' . 30 => array('selector' => '.nav-main li li:hover > a, .nav-main li li a:hover, .nav-main li li.active-menu-item > a', 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'nav-bg-color'), $helper['multiplier'] * $helper['brighter_color']))), 'navigation-' . 40 => array('condition' => trim(wm_option($helper['prefix'] . 'accent-color')) && !trim(wm_option($helper['prefix'] . 'header-bg-color')), 'selector' => '.nav-main > ul > li > .inner:hover, .nav-main > ul > li:hover > .inner', 'styles' => array('-webkit-box-shadow' => 'inset 0 .15em .72em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'accent-color', 'color')), 15) / 100 / 2 . ')', 'box-shadow' => 'inset 0 .15em .72em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'accent-color', 'color')), 15) / 100 / 2 . ')')), 'navigation-' . 50 => array('condition' => trim(wm_option($helper['prefix'] . 'accent-color')) && !trim(wm_option($helper['prefix'] . 'header-bg-color')), 'selector' => '.nav-main > ul > li.active-menu-item > a' . ' /* Brightness (accent) = ' . wma_color_brightness(wm_option($helper['prefix'] . 'accent-color', 'color')) . ' */', 'styles' => array('-webkit-box-shadow' => 'inset 0 .15em 1.4em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'accent-color', 'color')), 15) / 100 . ')', 'box-shadow' => 'inset 0 .15em 1.4em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'accent-color', 'color')), 15) / 100 . ')')), 'navigation-' . 60 => array('condition' => trim(wm_option($helper['prefix'] . 'header-bg-color')), 'selector' => '.nav-main > ul > li > .inner:hover, .nav-main > ul > li:hover > .inner', 'styles' => array('-webkit-box-shadow' => 'inset 0 .15em .72em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'header-bg-color', 'color')), 15) / 100 / 2 . ')', 'box-shadow' => 'inset 0 .15em .72em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'header-bg-color', 'color')), 15) / 100 / 2 . ')')), 'navigation-' . 70 => array('condition' => trim(wm_option($helper['prefix'] . 'header-bg-color')), 'selector' => '.nav-main > ul > li.active-menu-item > a' . ' /* Brightness = ' . wma_color_brightness(wm_option($helper['prefix'] . 'header-bg-color', 'color')) . ' */', 'styles' => array('-webkit-box-shadow' => 'inset 0 .15em 1.4em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'header-bg-color', 'color')), 15) / 100 . ')', 'box-shadow' => 'inset 0 .15em 1.4em 0 rgba(0,0,0, ' . wm_nav_shadow_opacity(wma_color_brightness(wm_option($helper['prefix'] . 'header-bg-color', 'color')), 15) / 100 . ')')), 'slider' => array('custom' => '/* Background: Special slider */'), 'slider-' . 10 => array('selector' => '.slider', 'styles' => array('background-color' => wm_option($helper['prefix'] . 'slider-bg-color', 'color'), 'color' => wm_option($helper['prefix'] . 'slider-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'slider-border-color', 'color', ' !important'))), 'slider-' . 30 => array('selector' => array($helper['elements']['shortcodes']['brighter-bg'], '.slider'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-bg-color'), $helper['brighter_color']))), 'slider-' . 40 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-bottom'], '.slider'), 'styles' => array('border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-bg-color'), $helper['brighter_color']))), 'slider-' . 50 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-right'], '.slider'), 'styles' => array('border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-bg-color'), $helper['brighter_color']))), 'slider-' . 60 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-left'], '.slider'), 'styles' => array('border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-bg-color'), $helper['brighter_color']))), 'slider-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.slider'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-bg-color'), $helper['brighter_color']))), 'slider-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.slider '), 'styles' => array('color' => wm_option($helper['prefix'] . 'slider-accent-color', 'color'))), 'slider-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.slider '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-accent-color'), 50))), 'slider-accent-' . 30 => array('selector' => array($helper['elements']['shortcodes']['iconbox'], '.slider '), 'styles' => array('background' => wm_option($helper['prefix'] . 'slider-accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-accent-color'), $helper['text_color']))), 'slider-accent-' . 40 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], '.slider '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'slider-accent-color'), $helper['text_color']))), 'slider-accent-' . 50 => array('condition' => trim(wm_option($helper['prefix'] . 'slider-accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], '.slider '), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'slider-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'main-heading' => array('custom' => '/* Background: Main heading */'), 'main-heading-' . 10 => array('selector' => '.main-heading', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'heading-')), 'color' => wm_option($helper['prefix'] . 'heading-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'heading-border-color', 'color', ' !important'))), 'main-heading-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.main-heading'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'heading-bg-color'), $helper['brighter_color']))), 'main-heading-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.main-heading '), 'styles' => array('color' => wm_option($helper['prefix'] . 'heading-accent-color', 'color'))), 'main-heading-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.main-heading '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'heading-accent-color'), 50))), 'content' => array('custom' => '/* Background: Content area */'), 'content-' . 10 => array('selector' => '.content-section, .page-template-page-templateblank-php', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'content-')), 'color' => wm_option($helper['prefix'] . 'content-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'content-border-color', 'color', ' !important'))), 'content-' . 20 => array('selector' => array($helper['elements']['headings'] . ', {p} pre, .single {p} blockquote, .single {p} .entry-summary', '.content-section'), 'styles' => array('color' => $helper['treshold'] < wma_color_brightness(wm_option($helper['prefix'] . 'content-bg-color')) ? wma_alter_color_brightness(wm_option($helper['prefix'] . 'content-color'), $helper['headings_color']) : wma_alter_color_brightness(wm_option($helper['prefix'] . 'content-color'), -$helper['headings_color']))), 'content-' . 30 => array('selector' => '.woocommerce-page .quantity .plus, .woocommerce-page .quantity .minus', 'styles' => array('color' => wm_option($helper['prefix'] . 'content-color', 'color', ' !important'))), 'content-' . 50 => array('selector' => array($helper['elements']['shortcodes']['brighter-bg'] . $helper['elements']['pagination']['base'] . ', .list-articles .entry-meta, .woocommerce-page .order-total th, .woocommerce-page .order-total td, .woocommerce-page #payment, .bbp-large-topic, #bbpress-forums div.bbp-reply-header, #bbpress-forums .bbp-search-results div.bbp-forum-header, #bbpress-forums .bbp-search-results div.bbp-topic-header', '.content-section'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['brighter_color']))), 'content-' . 60 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-bottom'], '.content-section'), 'styles' => array('border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['brighter_color']))), 'content-' . 70 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-right'], '.content-section'), 'styles' => array('border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['brighter_color']))), 'content-' . 80 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-left'], '.content-section'), 'styles' => array('border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['brighter_color']))), 'content-' . 'forms' => array('selector' => array($helper['elements']['forms'] . ', .woocommerce .form-row .select2-container, .woocommerce-checkout .form-row .select2-container, #bbpress-forums #bbp-your-profile fieldset input, #bbpress-forums #bbp-your-profile fieldset textarea', '.content-section'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['brighter_color']))), 'content-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.content-section '), 'styles' => array('color' => wm_option($helper['prefix'] . 'content-accent-color', 'color'))), 'content-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.content-section '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-accent-color'), 50))), 'content-accent-' . 30 => array('selector' => 'blockquote, blockquote.alignleft, blockquote.alignright', 'styles' => array('border-color' => wm_option($helper['prefix'] . 'accent-color', 'color'), 'border-color|2' => wm_option($helper['prefix'] . 'content-accent-color', 'color'))), 'content-accent-' . 40 => array('selector' => array($helper['elements']['shortcodes']['iconbox'] . ', .floating-cart-switch, .floating-cart-switch:hover, .floating-cart-switch:active', '.content-section '), 'styles' => array('background' => wm_option($helper['prefix'] . 'content-accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-accent-color'), $helper['text_color']))), 'content-accent-' . 50 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], '.content-section '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-accent-color'), $helper['text_color']))), 'content-accent-' . 60 => array('condition' => trim(wm_option($helper['prefix'] . 'content-accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], '.content-section '), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'content-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'colors-accent-' . 70 => array('condition' => class_exists('WooCommerce') && trim(wm_option($helper['prefix'] . 'content-accent-color')), 'selector' => $helper['elements']['woocommerce']['buttons'], 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'content-accent-color')) ? '0 -1px 0 rgba(0,0,0, .6)' : '0 1px 0 rgba(255,255,255, .6)', 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-accent-color'), $helper['text_color'], ' !important'), 'background' => wm_option($helper['prefix'] . 'content-accent-color', 'color'), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'content-accent-color'), $helper['darker_color']))), 'colors-accent-' . 80 => array('condition' => class_exists('WooCommerce') && trim(wm_option($helper['prefix'] . 'content-accent-color')), 'selector' => $helper['elements']['woocommerce']['buttons-hover-active'], 'styles' => array('background' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'content-accent-color'), $helper['multiplier'] * $helper['brighter_color']), 'border-color' => wma_alter_color_brightness(wm_option($helper['prefix'] . 'content-accent-color'), $helper['multiplier'] * $helper['darker_color']))), 'footer-widgets' => array('custom' => '/* Background: Footer widgets */'), 'footer-widgets-' . 10 => array('selector' => '.footer-widgets', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'footer-widgets-')), 'color' => wm_option($helper['prefix'] . 'footer-widgets-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'footer-widgets-border-color', 'color', ' !important'))), 'footer-widgets-' . 20 => array('selector' => array($helper['elements']['headings'], '.footer-widgets'), 'styles' => array('color' => $helper['treshold'] < wma_color_brightness(wm_option($helper['prefix'] . 'footer-widgets-bg-color')) ? wma_alter_color_brightness(wm_option($helper['prefix'] . 'footer-widgets-color'), $helper['headings_color']) : wma_alter_color_brightness(wm_option($helper['prefix'] . 'footer-widgets-color'), -$helper['headings_color']))), 'footer-widgets-' . 30 => array('selector' => array($helper['elements']['shortcodes']['brighter-bg'], '.footer-widgets'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-bg-color'), $helper['brighter_color']))), 'footer-widgets-' . 40 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-bottom'], '.footer-widgets'), 'styles' => array('border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-bg-color'), $helper['brighter_color']))), 'footer-widgets-' . 50 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-right'], '.footer-widgets'), 'styles' => array('border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-bg-color'), $helper['brighter_color']))), 'footer-widgets-' . 60 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-left'], '.footer-widgets'), 'styles' => array('border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-bg-color'), $helper['brighter_color']))), 'footer-widgets-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.footer-widgets'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-bg-color'), $helper['brighter_color']))), 'footer-widgets-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.footer-widgets '), 'styles' => array('color' => wm_option($helper['prefix'] . 'footer-widgets-accent-color', 'color'))), 'footer-widgets-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.footer-widgets '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-accent-color'), 50))), 'footer-widgets-accent-' . 30 => array('selector' => array($helper['elements']['shortcodes']['iconbox'], '.footer-widgets '), 'styles' => array('background' => wm_option($helper['prefix'] . 'footer-widgets-accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-accent-color'), $helper['text_color']))), 'footer-widgets-accent-' . 40 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], '.footer-widgets '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'footer-widgets-accent-color'), $helper['text_color']))), 'footer-widgets-accent-' . 50 => array('condition' => trim(wm_option($helper['prefix'] . 'footer-widgets-accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], '.footer-widgets '), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'footer-widgets-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'credits' => array('custom' => '/* Background: Credits */'), 'credits-' . 10 => array('selector' => '.credits', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'credits-')), 'color' => wm_option($helper['prefix'] . 'credits-color', 'color'), 'border-color' => wm_option($helper['prefix'] . 'credits-border-color', 'color', ' !important'))), 'credits-' . 20 => array('selector' => array($helper['elements']['headings'], '.credits'), 'styles' => array('color' => $helper['treshold'] < wma_color_brightness(wm_option($helper['prefix'] . 'credits-bg-color')) ? wma_alter_color_brightness(wm_option($helper['prefix'] . 'credits-color'), $helper['headings_color']) : wma_alter_color_brightness(wm_option($helper['prefix'] . 'credits-color'), -$helper['headings_color']))), 'credits-' . 30 => array('selector' => array($helper['elements']['shortcodes']['brighter-bg'], '.credits'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-bg-color'), $helper['brighter_color']))), 'credits-' . 40 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-bottom'], '.credits'), 'styles' => array('border-bottom-color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-bg-color'), $helper['brighter_color']))), 'credits-' . 50 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-right'], '.credits'), 'styles' => array('border-right-color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-bg-color'), $helper['brighter_color']))), 'credits-' . 60 => array('selector' => array($helper['elements']['shortcodes']['brighter-border-left'], '.credits'), 'styles' => array('border-left-color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-bg-color'), $helper['brighter_color']))), 'credits-' . 'forms' => array('selector' => array($helper['elements']['forms'], '.credits'), 'styles' => array('background-color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-bg-color'), $helper['brighter_color']))), 'credits-accent-' . 10 => array('selector' => array($helper['elements']['accent']['base'], '.credits '), 'styles' => array('color' => wm_option($helper['prefix'] . 'credits-accent-color', 'color'))), 'credits-accent-' . 20 => array('selector' => array($helper['elements']['accent']['hover-active'], '.credits '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-accent-color'), 50))), 'credits-accent-' . 30 => array('selector' => array($helper['elements']['shortcodes']['iconbox'], '.credits '), 'styles' => array('background' => wm_option($helper['prefix'] . 'credits-accent-color', 'color'), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-accent-color'), $helper['text_color']))), 'credits-accent-' . 40 => array('selector' => array($helper['elements']['shortcodes']['iconbox-link-color'], '.credits '), 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'credits-accent-color'), $helper['text_color']))), 'credits-accent-' . 50 => array('condition' => trim(wm_option($helper['prefix'] . 'credits-accent-color')), 'selector' => array($helper['elements']['shortcodes']['iconbox-text-shadow'], '.credits '), 'styles' => array('text-shadow' => $helper['treshold'] > wma_color_brightness(wm_option($helper['prefix'] . 'credits-accent-color')) ? '0 0 .5em rgba(0,0,0, .62)' : '0 0 .5em rgba(255,255,255, .75)')), 'typography' => array('custom' => '/* Typography */'), 'fonts-body' => array('selector' => 'body', 'styles' => array('font-family' => '"' . $helper['google_fonts'][wm_option($helper['prefix'] . 'font-body')] . '", Helvetica, Arial, Verdana, sans-serif', 'font-size' => wm_option($helper['prefix'] . 'font-size-body', '', 'px'))), 'fonts-body-' . 10 => array('selector' => '.sidebar', 'styles' => array('font-size' => 12 < wm_option($helper['prefix'] . 'font-size-body') ? '.9em' : '')), 'fonts-headings' => array('condition' => wm_option($helper['prefix'] . 'font-headings'), 'selector' => '.logo.type-text, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, [class*="heading-style-"], blockquote', 'styles' => array('font-family' => '"' . $helper['google_fonts'][wm_option($helper['prefix'] . 'font-headings')] . '", Helvetica, Arial, Verdana, sans-serif')), 'fonts-logo' => array('condition' => !wm_option($helper['prefix'] . 'logo') && wm_option($helper['prefix'] . 'font-logo'), 'selector' => '.logo.type-text', 'styles' => array('font-family' => '"' . $helper['google_fonts'][wm_option($helper['prefix'] . 'font-logo')] . '", Helvetica, Arial, Verdana, sans-serif')), 'fonts-size-h1' => array('selector' => 'h1, .h1, .heading-style-1, #bbpress-forums h1', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h1', '', '%'))), 'fonts-size-h2' => array('selector' => 'h2, .h2, .heading-style-2, #bbpress-forums h2', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h2', '', '%'))), 'fonts-size-h3' => array('selector' => 'h3, .h3, .heading-style-3, #bbpress-forums h3', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h3', '', '%'))), 'fonts-size-h4' => array('selector' => 'h4, h5, h6, .h4, .h5, .h6, .heading-style-4, .heading-style-5, .heading-style-6, #bbpress-forums h4, #bbpress-forums h5, #bbpress-forums h6', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h4', '', '%'))), 'highdpi' => array('custom' => '/* High DPI/Retina displays styles */'), 'highdpi-' . 10 => array('custom' => "@media only screen and (-webkit-min-device-pixel-ratio: 1.5), \r\n\t\tonly screen and (min--moz-device-pixel-ratio: 1.5), \r\n\t\tonly screen and (-moz-min-device-pixel-ratio: 1.5), \r\n\t\tonly screen and (-o-min-device-pixel-ratio: 3/2), \r\n\t\tonly screen and (min-device-pixel-ratio: 1.5), \r\n\t\tonly screen and (min-resolution: 144dpi), \r\n\t\tonly screen and (min-resolution: 1.5dppx) {"), 'highdpi-' . 'html-' . 10 => array('selector' => 'html', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'html-', 'high_dpi' => true)))), 'highdpi-' . 'topbar-' . 10 => array('selector' => '.topbar, .topbar-extra', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'topbar-', 'high_dpi' => true)))), 'highdpi-' . 'header-' . 10 => array('selector' => '.header, #search-container input, .mobile-nav', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'header-', 'high_dpi' => true)))), 'highdpi-' . 'main-heading-' . 10 => array('selector' => '.main-heading', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'heading-', 'high_dpi' => true)))), 'highdpi-' . 'content-' . 10 => array('selector' => '.content-section', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'content-', 'high_dpi' => true)))), 'highdpi-' . 'footer-widgets-' . 10 => array('selector' => '.footer-widgets', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'footer-widgets-', 'high_dpi' => true)))), 'highdpi-' . 'credits-' . 10 => array('selector' => '.credits', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'credits-', 'high_dpi' => true)))), 'highdpi-' . 20 => array('custom' => '} /* /High DPI */'));
             // /$custom_styles
             /**
              * Logo centering
              */
             if (wm_option('skin-logo')) {
                 $logo_id = wm_get_image_id_from_url(wm_option('skin-logo'));
                 if ($logo_id) {
                     $logo_height = wp_get_attachment_image_src($logo_id, 'full');
                     $logo_height = $logo_height[2];
                 } else {
                     $logo_height = explode('x', WM_DEFAULT_LOGO_SIZE);
                     $logo_height = $logo_height[1];
                 }
                 $logo_padding = wm_option($helper['prefix'] . 'font-size-body') ? absint(wm_option($helper['prefix'] . 'font-size-body')) : 14;
                 $logo_padding = floor($logo_padding * ($helper['line_height'] + 0.6 + 0.6) / 2 + wm_option($helper['prefix'] . 'nav-padding')) - $logo_height / 2 . 'px';
                 $custom_styles['layout-' . 29] = array('custom' => '/* Logo padding - centering logo in header */');
                 $custom_styles['layout-' . 30] = array('selector' => '.logo, h1.logo', 'styles' => array('padding-top' => $logo_padding));
             }
         } else {
             //Visual editor styles
             $custom_styles = array('ve-' . 'colors' => array('custom' => '/* Global colors */'), 've-' . 'colors-' . 10 => array('selector' => 'a', 'styles' => array('color' => wm_option($helper['prefix'] . 'accent-color', 'color'), 'color|2' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['text_color'] - 50), 'color|3' => wm_option($helper['prefix'] . 'content-accent-color', 'color'))), 've-' . 'colors-' . 20 => array('selector' => 'a:hover, a:active', 'styles' => array('color' => wma_contrast_color(wm_option($helper['prefix'] . 'accent-color'), 50), 'color|2' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['text_color'] - 50), 'color|3' => wma_contrast_color(wm_option($helper['prefix'] . 'content-accent-color'), 50))), 've-' . 'colors-' . 30 => array('selector' => 'blockquote, blockquote.alignleft, blockquote.alignright', 'styles' => array('border-color' => wm_option($helper['prefix'] . 'accent-color', 'color'), 'border-color|2' => wm_option($helper['prefix'] . 'content-accent-color', 'color'))), 've-' . 'html' => array('custom' => '/* Background: HTML and body */'), 've-' . 'html-' . 10 => array('selector' => 'html, body', 'styles' => array('background' => wm_css_background(array('option_base' => $helper['prefix'] . 'content-')), 'color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['text_color']), 'color|2' => wm_option($helper['prefix'] . 'content-color', 'color'), 'border-color' => wma_contrast_color(wm_option($helper['prefix'] . 'content-bg-color'), $helper['border_color']), 'border-color|2' => wm_option($helper['prefix'] . 'content-border-color', 'color'))), 've-' . 'typography' => array('custom' => '/* Typography */'), 've-' . 'fonts-body' => array('condition' => wm_option($helper['prefix'] . 'font-body'), 'selector' => 'body', 'styles' => array('font-family' => '"' . $helper['google_fonts'][wm_option($helper['prefix'] . 'font-body')] . '", Helvetica, Arial, Verdana, sans-serif', 'font-size' => wm_option($helper['prefix'] . 'font-size-body', '', 'px'))), 've-' . 'fonts-headings' => array('condition' => wm_option($helper['prefix'] . 'font-headings'), 'selector' => 'h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, [class*="heading-style-"]', 'styles' => array('font-family' => '"' . $helper['google_fonts'][wm_option($helper['prefix'] . 'font-headings')] . '", Helvetica, Arial, Verdana, sans-serif')), 've-' . 'fonts-size-h1' => array('selector' => 'h1, .h1, .heading-style-1, .no-sidebar.list-articles-short .list-articles .entry-title', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h1', '', '%'))), 've-' . 'fonts-size-h2' => array('selector' => 'h2, .h2, .heading-style-2', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h2', '', '%'))), 've-' . 'fonts-size-h3' => array('selector' => 'h3, .h3, .heading-style-3', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h3', '', '%'))), 've-' . 'fonts-size-h4' => array('selector' => 'h4, h5, h6, .h4, .h5, .h6, .heading-style-4, .heading-style-5, .heading-style-6', 'styles' => array('font-size' => wm_option($helper['prefix'] . 'font-size-h4', '', '%'))));
             // /$custom_styles for visual editor
         }
         /**
          * Theme version
          */
         $custom_styles['version'] = array('custom' => '/* Using ' . WM_THEME_NAME . ' theme by WebMan - Oliver Juhas (' . WM_DEVELOPER_URL . '), version ' . WM_THEME_VERSION . '. CSS generated on ' . date('Y/m/d H:i, e') . '. */');
     }
     // /wmhook_wm_custom_styles_use_custom_array
     //Filter custom styles array
     $custom_styles = apply_filters('wmhook_wm_custom_styles_array', $custom_styles, $helper);
     //Preparing output
     if (!empty($custom_styles)) {
         foreach ($custom_styles as $selector) {
             if (isset($selector['condition']) && !trim($selector['condition'])) {
                 continue;
             }
             if (isset($selector['selector']) && $selector['selector'] && isset($selector['styles']) && is_array($selector['styles']) && !empty($selector['styles'])) {
                 $selector_styles = $prepend = '';
                 $prepend = !isset($selector['prepend']) ? "\t\t" : $selector['prepend'];
                 if (is_array($selector['selector'])) {
                     //Replace placeholders in selector string
                     //array( 'selector string with {p}', 'placeholder' )
                     $selector['selector'] = str_replace('{p}', $selector['selector'][1], $selector['selector'][0]);
                 }
                 $selector['selector'] = str_replace(', ', ",\r\n" . $prepend, $selector['selector']);
                 foreach ($selector['styles'] as $property => $style) {
                     if (trim($style)) {
                         if (strpos($property, '|')) {
                             //This is for multiple overriden properties
                             $property = explode('|', $property);
                             $property = $property[0];
                         }
                         //RTL languages property swap
                         if (is_rtl()) {
                             $replacements_rtl = apply_filters('wmhook_wm_custom_styles_replacements_rtl', array('border-left-color' => 'border-right-color', 'border-right-color' => 'border-left-color'));
                             $property = strtr($property, $replacements_rtl);
                         }
                         $selector_styles .= $prepend . "\t" . $property . ': ' . trim($style) . ';' . "\r\n";
                     }
                 }
                 if ($selector_styles) {
                     $output .= $prepend . $selector['selector'] . ' {' . "\r\n" . $selector_styles . $prepend . '}' . "\r\n\r\n";
                 }
             } elseif (isset($selector['custom']) && $selector['custom']) {
                 $output .= "\r\n\t" . $selector['custom'] . "\r\n\r\n";
             }
         }
     }
     //Output
     return apply_filters('wmhook_wm_custom_styles_output', $output);
 }