/** * Adds custom classes to the array of body classes. * * @since Patchwork 1.0 */ function patchwork_body_classes($classes) { // Adds a class of single-author to blogs with only 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } $options = patchwork_get_theme_options(); $themestyle = $options['theme_style']; if ($themestyle) { $classes[] = 'style-' . $themestyle; } return $classes; }
/** * Returns layout defaults */ function patchwork_get_layout_defaults() { $options = patchwork_get_theme_options(); $theme_style = $options['theme_style']; $default_theme_options = patchwork_get_default_theme_options(); $default_theme_style = $default_theme_options['theme_style']; $theme_style_values = patchwork_theme_style(); if ($theme_style) { $defaults = $theme_style_values[$theme_style]['defaults']; } else { $defaults = $theme_style_values[$default_theme_style]['defaults']; } return apply_filters('patchwork_get_layout_defaults', $defaults); }