HEX
Server: LiteSpeed
System: Linux standart103.isimtescil.net 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: byildiz (11197)
PHP: 8.2.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/byildiz.com.tr/httpdocs/wp-content/themes/lumex/inc/template-functions.php
<?php
/**
 * Functions which enhance the theme by hooking into WordPress
 *
 * @package lumex
 */

/**
 * Adds custom classes to the array of body classes.
 *
 * @param array $classes Classes for the body element.
 * @return array
 */
function lumex_body_classes( $classes ) {
	// Adds a class of hfeed to non-singular pages.
	if ( ! is_singular() ) {
		$classes[] = 'hfeed';
	}

	// Adds a class of no-sidebar when there is no sidebar present.
	if ( ! is_active_sidebar( 'sidebar-1' ) ) {
		$classes[] = 'no-sidebar';
	}

	$header_template = get_field( 'header_template', 'option' );

	if ( empty( $header_template ) ) {
		$classes[] = 'mil-default';
	}

	$smooth_scroll_enable = get_field( 'smooth_scroll_enable', 'option' );

	if ( !empty( $smooth_scroll_enable ) ) {
		$classes[] = 'mil-scrollbar';
	}

	$wrapper_type = get_field( 'wrapper_type' );
	
	if ( !empty( $wrapper_type ) ) {
		$classes[] = 'mil-wrapper-' . $wrapper_type;
	}

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

/**
 * Add a pingback url auto-discovery header for single posts, pages, or attachments.
 */
function lumex_pingback_header() {
	if ( is_singular() && pings_open() ) {
		echo '<link rel="pingback" href="', esc_url( get_bloginfo( 'pingback_url' ) ), '">';
	}
}
add_action( 'wp_head', 'lumex_pingback_header' );