29 lines
596 B
PHP
29 lines
596 B
PHP
<?php
|
|
/**
|
|
* Theme bridge for Hesabix Help.
|
|
*
|
|
* @package Hesabix2
|
|
*/
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* @param array<int, string> $classes Body classes.
|
|
* @return array<int, string>
|
|
*/
|
|
function hesabix2_help_body_class( $classes ) {
|
|
if ( function_exists( 'hhelp_is_help' ) && hhelp_is_help() ) {
|
|
$classes[] = 'hx-help-theme';
|
|
}
|
|
return $classes;
|
|
}
|
|
add_filter( 'body_class', 'hesabix2_help_body_class' );
|
|
|
|
/**
|
|
* Hub URL helper for nav.
|
|
*
|
|
* @return string
|
|
*/
|
|
function hesabix2_help_hub_url() {
|
|
return function_exists( 'hhelp_hub_url' ) ? hhelp_hub_url() : home_url( '/help/' );
|
|
}
|