| Server IP : 209.17.116.165 / Your IP : 10.45.137.123 Web Server : Apache/2.4.62 (AlmaLinux) mod_fcgid/2.3.9 System : Linux prod-iad-shwpweb2006c 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : ftpypagio ( 17933) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /data/user/2006/2020/55/17933/wordpress/dadanddementia.com/wp-content/themes/nisarg/inc/ |
Upload File : |
<?php
/**
* Custom functions that act independently of the theme templates
*
* Eventually, some of the functionality here could be replaced by core features
*
* @package Nisarg
*/
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function nisarg_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;
}
add_filter( 'body_class', 'nisarg_body_classes' );
/**
* Adds the URL to the top level navigation menu item.
*/
function nisarg_add_top_level_menu_url( $atts, $item, $args ) {
if ( isset( $args->has_children ) && $args->has_children ) {
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
}
return $atts;
}
add_filter( 'nav_menu_link_attributes', 'nisarg_add_top_level_menu_url', 99, 3 );