/** * Adds custom classes to the array of body classes. */ function flatbook_body_classes($classes) { if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function identity_body_classes($classes) { // Adds a class depending on whether sidebar is active and the selection in the customizer. $sidebar = get_theme_mod('identity_sidebar', 'right-sidebar'); if (!is_active_sidebar('sidebar-1') || $sidebar == 'no-sidebar') { $classes[] = 'no-sidebar'; } elseif (is_active_sidebar('sidebar-1') && $sidebar == 'right-sidebar') { $classes[] = 'right-sidebar'; } elseif (is_active_sidebar('sidebar-1') && $sidebar == 'left-sidebar') { $classes[] = 'left-sidebar'; } // Adds a class when the footer widget area is active and what is selected in the customizer. $footer = get_theme_mod('identity_footer_widgets', 'three-widgets'); if (!is_active_sidebar('sidebar-2') || $footer == 'no-widgets') { $classes[] = 'no-footer-widgets'; } elseif (is_active_sidebar('sidebar-2') && $footer == 'two-widgets') { $classes[] = 'two-footer-widgets'; } elseif (is_active_sidebar('sidebar-2') && $footer == 'three-widgets') { $classes[] = 'three-footer-widgets'; } elseif (is_active_sidebar('sidebar-2') && $footer == 'four-widgets') { $classes[] = 'four-footer-widgets'; } // Adds a class when the full width page template is being used. if (is_page_template('page-templates/full-width.php')) { $classes[] = 'full-width'; } // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
public function body_classes($classes) { if (is_multi_author()) { $classes[] = 'groupBlog'; } return $classes; }
function directory_theme_entry_meta() { if (is_sticky() && is_home() && !is_paged()) { printf('<span class="sticky-post">%s</span>', __('Featured', 'directory-starter')); } $format = get_post_format(); if (current_theme_supports('post-formats', $format)) { printf('<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>', sprintf('<span class="screen-reader-text">%s </span>', _x('Format', 'Used before post format.', 'directory-starter')), esc_url(get_post_format_link($format)), get_post_format_string($format)); } if (in_array(get_post_type(), array('post', 'attachment'))) { $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>'; $time_string = sprintf($time_string, esc_attr(get_the_date('c')), get_the_date(), esc_attr(get_the_modified_date('c')), get_the_modified_date()); printf('<span class="posted-on"><span class="screen-reader-text">%1$s </span><a href="%2$s" rel="bookmark">%3$s</a></span>', _x('Posted on', 'Used before publish date.', 'directory-starter'), esc_url(get_permalink()), $time_string); } if ('post' == get_post_type()) { if (is_singular() || is_multi_author()) { printf('<span class="byline"><span class="author vcard"><span class="screen-reader-text">%1$s </span><a class="url fn n" href="%2$s">%3$s</a></span></span>', _x('Author', 'Used before post author name.', 'directory-starter'), esc_url(get_author_posts_url(get_the_author_meta('ID'))), get_the_author()); } $categories_list = get_the_category_list(_x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter')); if ($categories_list) { printf('<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Categories', 'Used before category names.', 'directory-starter'), $categories_list); } $tags_list = get_the_tag_list('', _x(', ', 'Used between list items, there is a space after the comma.', 'directory-starter')); if ($tags_list) { printf('<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x('Tags', 'Used before tag names.', 'directory-starter'), $tags_list); } } if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) { echo '<span class="comments-link">'; comments_popup_link(__('Leave a comment', 'directory-starter'), __('1 Comment', 'directory-starter'), __('% Comments', 'directory-starter')); echo '</span>'; } }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * * @return array */ function shapely_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of hfeed to non-singular pages. if (!is_singular()) { $classes[] = 'hfeed'; } if (get_theme_mod('shapely_sidebar_position') == "pull-right") { $classes[] = 'has-sidebar-left'; } else { if (get_theme_mod('shapely_sidebar_position') == "no-sidebar") { $classes[] = 'has-no-sidebar'; } else { if (get_theme_mod('shapely_sidebar_position') == "full-width") { $classes[] = 'has-full-width'; } else { $classes[] = 'has-sidebar-right'; } } } return $classes; }
/** * Adds custom classes to the array of body classes. * * @since 1.0 * @param array $classes Classes for the body element. * @return array */ function onehost_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Add a class of layout $classes[] = onehost_get_layout(); // Add a class when choose no animation if (onehost_theme_option('no_animation')) { $classes[] = 'no-animation'; } // Add a class when choose no animation $classes[] = onehost_theme_option('site_style') . '-version'; // Add a class for color scheme if (onehost_theme_option('custom_color_scheme') && onehost_theme_option('custom_color_1')) { $classes[] = 'custom-color-scheme'; } else { $classes[] = onehost_theme_option('color_scheme'); } if (onehost_get_meta('hide_singular_title')) { $classes[] = 'hide-singular-title'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function boardwalk_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } if (get_next_posts_link()) { $classes[] = 'next-link'; } if (get_previous_posts_link()) { $classes[] = 'previous-link'; } if (1 == get_theme_mod('boardwalk_filter_featured_images')) { $classes[] = 'filter-on'; } if (1 == get_theme_mod('boardwalk_entry_title')) { $classes[] = 'title-with-content'; } if (1 == get_theme_mod('boardwalk_unfixed_header')) { $classes[] = 'unfixed-header'; } if (is_active_sidebar('sidebar-1') || has_nav_menu('primary')) { $classes[] = 'has-sidebar'; } return $classes; }
function xsbf_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds classes for various sizes of featured images. Our theme overrides the // custom header with a large featured image. if (has_post_thumbnail()) { $classes[] = 'featured-image'; global $post, $content_width; $featured_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full'); $image_width = $featured_image[1]; if ($content_width and $image_width >= $content_width) { if (is_home()) { $classes[] = 'has-cover-image'; } else { $classes[] = 'has-section-image'; } //endif is_home } //endif $content_width // If custom header and not overridden, then add class for that } elseif (get_header_image()) { $classes[] = 'has-header-image'; } //endif has_post_thumbnail return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * * @return array */ function listable_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } global $post; if (has_nav_menu('secondary')) { $classes[] = 'has--secondary-menu'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'jobs') || is_search() || is_tax(array('job_listing_category', 'job_listing_tag', 'job_listing_region'))) { $classes[] = 'page-listings'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'job_dashboard')) { $classes[] = 'page-job-dashboard'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'my_bookmarks')) { $classes[] = 'page-my-bookmarks'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'woocommerce_my_account')) { $classes[] = 'page-login'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'submit_job_form')) { $classes[] = 'page-add-listing'; } if (listable_using_facetwp()) { $classes[] = 'is--using-facetwp'; } if (isset($post->post_content) && has_shortcode($post->post_content, 'jobs_by_tag')) { $classes[] = 'jobs-by-tags-page'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @since vantage 1.0 */ function vantage_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } if (siteorigin_setting('layout_responsive')) { $classes[] = 'responsive'; } $classes[] = 'layout-' . siteorigin_setting('layout_bound'); $classes[] = 'no-js'; $is_full_width_template = is_page_template('templates/template-full.php') || is_page_template('templates/template-full-notitle.php'); if (!$is_full_width_template) { $wc_shop_sidebar = vantage_is_woocommerce_active() && is_shop() && is_active_sidebar('shop'); if (!is_active_sidebar('sidebar-1') && !$wc_shop_sidebar) { $classes[] = 'no-sidebar'; } else { $classes[] = 'has-sidebar'; } } if (wp_is_mobile()) { $classes[] = 'so-vantage-mobile-device'; } $mega_menu_active = function_exists('max_mega_menu_is_enabled') && max_mega_menu_is_enabled('primary'); if (siteorigin_setting('navigation_menu_search') && !$mega_menu_active) { $classes[] = 'has-menu-search'; } if (siteorigin_setting('layout_force_panels_full')) { $classes[] = 'panels-style-force-full'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function swell_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Add Browser to Body Class global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone; if ($is_lynx) { $classes[] = 'lynx'; } elseif ($is_gecko) { $classes[] = 'gecko'; } elseif ($is_opera) { $classes[] = 'opera'; } elseif ($is_NS4) { $classes[] = 'ns4'; } elseif ($is_safari) { $classes[] = 'safari'; } elseif ($is_chrome) { $classes[] = 'chrome'; } elseif ($is_IE) { $classes[] = 'ie'; } else { $classes[] = 'unknown'; } if ($is_iphone) { $classes[] = 'iphone'; } if (has_home_video()) { $classes[] = 'has-video'; } return $classes; }
/** * Extend the default WordPress body classes. * * Adds body classes to denote: * 1. Single or multiple authors. * 2. Presence of header image. * 3. Index views. * 4. Full-width content layout. * 5. Presence of footer widgets. * 6. Single views. * 7. Featured content layout. * * @param array $classes A list of existing body class values. * * @return array The filtered body class list. * @internal */ function _filter_theme_body_classes($classes) { if (is_multi_author()) { $classes[] = 'group-blog'; } if (get_header_image()) { $classes[] = 'header-image'; } else { $classes[] = 'masthead-fixed'; } if (is_archive() || is_search() || is_home()) { $classes[] = 'list-view'; } if (function_exists('fw_ext_sidebars_get_current_position')) { $current_position = fw_ext_sidebars_get_current_position(); if (in_array($current_position, array('full', 'left')) || empty($current_position) || is_page_template('page-templates/full-width.php') || is_page_template('page-templates/contributors.php') || is_attachment()) { $classes[] = 'full-width'; } } else { $classes[] = 'full-width'; } if (is_active_sidebar('sidebar-1')) { $classes[] = 'footer-widgets'; } if (is_singular() && !is_front_page()) { $classes[] = 'singular'; } if (is_front_page() && 'slider' == get_theme_mod('featured_content_layout')) { $classes[] = 'slider'; } elseif (is_front_page()) { $classes[] = 'grid'; } return $classes; }
/** * Adds custom classes to the array of body classes. * ================================================ * * @param array $classes Classes for the body element. * * @return array */ function tm_polygon_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } global $tm_polygon_custom_class; if ($tm_polygon_custom_class) { $classes[] = $tm_polygon_custom_class; } if (Kirki::get_option('tm-polygon', 'site_general_boxed') == 1) { $classes[] = 'boxed'; } $classes[] = Kirki::get_option('tm-polygon', 'header_type'); global $tm_polygon_page_layout_private; if ($tm_polygon_page_layout_private != 'default' && class_exists('cmb2_bootstrap_205')) { $tm_polygon_layout = get_post_meta(get_the_ID(), "tm_polygon_page_layout_private", true); } else { $tm_polygon_layout = Kirki::get_option('tm-polygon', 'page_layout'); } $classes[] = $tm_polygon_layout; if (defined('TM_CORE_VERSION')) { $classes[] = 'core_' . str_replace(".", "", TM_CORE_VERSION); } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function memberlite_body_classes($classes) { global $post, $memberlite_defaults; //sidebar classes $classes[] = get_theme_mod('sidebar_location', $memberlite_defaults['sidebar_location']); $classes[] = get_theme_mod('sidebar_location_blog', $memberlite_defaults['sidebar_location_blog']); if (is_page_template('templates/sidebar-content.php')) { $classes[] = 'sidebar-content'; } if (is_page_template('templates/content-sidebar.php')) { $classes[] = 'content-sidebar'; } //color scheme class $classes[] = 'scheme_' . get_theme_mod('memberlite_color_scheme', $memberlite_defaults['memberlite_color_scheme']); //other classes if (is_multi_author()) { $classes[] = 'group-blog'; } if (is_page_template('templates/landing.php')) { $classes[] = 'landing'; } if (is_page_template('templates/interstitial.php')) { $classes[] = 'interstitial'; } return $classes; }
function brvry_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } global $post; if (isset($post)) { $classes[] = $post->post_type . '-' . $post->post_name; } // Site name body class $site_name = get_bloginfo('name'); //Lower case everything $string = strtolower($site_name); //Make alphanumeric (removes all other characters) $string = preg_replace("/[^a-z0-9_\\s-]/", "", $string); //Clean up multiple dashes or whitespaces $string = preg_replace("/[\\s-]+/", " ", $string); //Convert whitespaces and underscore to dash $string = preg_replace("/[\\s_]/", "-", $string); $sitename = 'site-' . $string; if (isset($sitename)) { $classes[] = $sitename; } return $classes; }
/** * Body Custom classes */ function dw_minion_body_classes($classes) { if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function colinear_body_classes($classes) { // Adds a class to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class to blogs with a menu. if (has_nav_menu('primary')) { $classes[] = 'has-menu'; } // Adds a class to blogs depending on the sidebar. if ('right' === get_theme_mod('colinear_sidebars') || 'right-right' === get_theme_mod('colinear_sidebars')) { $classes[] = 'has-right-sidebar'; } if ('left' === get_theme_mod('colinear_sidebars') || 'left-left' === get_theme_mod('colinear_sidebars')) { $classes[] = 'has-left-sidebar'; } if ('right-right' === get_theme_mod('colinear_sidebars') || 'left-left' === get_theme_mod('colinear_sidebars') || 'right-left' === get_theme_mod('colinear_sidebars')) { $classes[] = 'has-double-sidebar'; } if ('right-left' === get_theme_mod('colinear_sidebars')) { $classes[] = 'has-right-left-sidebar'; } if ('full-width' === get_theme_mod('colinear_sidebars')) { $classes[] = 'has-no-sidebar'; } return $classes; }
function zerodev_body_classes($classes) { if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function ultra_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } // Adds a class of content-none if there are no posts. if (!have_posts()) { $classes[] = 'content-none'; } // Add widget-dependent classes. if (!is_active_sidebar('sidebar-1')) { $classes[] = 'one-column'; } // Add a class if the sidebar is use. if (is_active_sidebar('sidebar-1')) { $classes[] = 'sidebar'; } // Add a class if viewed on mobile. if (wp_is_mobile()) { $classes[] = 'mobile-device'; } if (siteorigin_setting('header_tagline')) { $classes[] = 'tagline'; } // Add a class if the page slider overlap is true. if (get_post_meta(get_the_ID(), 'ultra_metaslider_slider_overlap', true) == true) { $classes[] = 'overlap'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function siteorigin_north_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } $classes[] = 'no-js'; $classes[] = 'css3-animations'; $classes[] = 'responsive'; if (is_page()) { $classes[] = 'page-layout-' . SiteOrigin_Settings_Page_Settings::get('layout'); $classes[] = 'page-layout-menu-' . SiteOrigin_Settings_Page_Settings::get('menu'); if (!SiteOrigin_Settings_Page_Settings::get('masthead_margin')) { $classes[] = 'page-layout-no-masthead-margin'; } if (!SiteOrigin_Settings_Page_Settings::get('footer_margin')) { $classes[] = 'page-layout-no-footer-margin'; } } if (!is_active_sidebar('main-sidebar')) { $classes[] = 'no-active-sidebar'; } if (siteorigin_setting('navigation_sticky')) { $classes[] = 'sticky-menu'; } if (wp_is_mobile()) { $classes[] = 'is_mobile'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function foster_family_dental_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. */ function sktweddinglite_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * @since Kick-Punch-Block 1.0 */ function kpb_body_classes($classes) { // adds a class of group-blog to blogs with > 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
function thinkup_input_bodyclasses($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function city_of_prescott_tabula_rasa_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
function lgdcom_body_classes($classes) { // Adds a class of single-author to blogs with only 1 published author if (!is_multi_author()) { $classes[] = 'single-author'; } return $classes; }
function jwf_body_classes($classes) { //Add a class of group-blog with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function sw_wordpress_blog_theme_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. * * @author Automattic * @author Cherry Team <*****@*****.**> * @since 4.0.0 * @param array $classes Classes for the body element. * @return array */ function cherry_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author. if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }
/** * Adds custom classes to the array of body classes. */ function secondfirsts2013_body_classes($classes) { // Adds a class of group-blog to blogs with more than 1 published author if (is_multi_author()) { $classes[] = 'group-blog'; } return $classes; }