HEX
Server: Apache
System: Linux p3plzcpnl504740.prod.phx3.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User: l2pbkn5l6xav (4972877)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /home/l2pbkn5l6xav/public_html/wp-content/themes/safha-one-page/inc/template-functions.php
<?php
/**
 * Additional features to allow styling of the templates
 */

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function safha_one_page_body_classes( $classes ) {
	// Add class of group-blog to blogs with more than 1 published author.
	if ( is_multi_author() ) {
		$classes[] = 'group-blog';
	}

	// Add class of hfeed to non-singular pages.
	if ( ! is_singular() ) {
		$classes[] = 'hfeed';
	}

	// Add class if we're viewing the Customizer for easier styling of theme options.
	if ( is_customize_preview() ) {
		$classes[] = 'safha-one-page-customizer';
	}

	// Add class on front page.
	if ( is_front_page() && 'posts' !== get_option( 'show_on_front' ) ) {
		$classes[] = 'safha-one-page-front-page';
	}

	// Add class if sidebar is used.
	if ( is_active_sidebar( 'footer-1' ) && ! is_page() ) {
		$classes[] = 'has-sidebar';
	}

	return $classes;
}
add_filter( 'body_class', 'safha_one_page_body_classes' );